Commit 7e591184 authored by Michel Dänzer's avatar Michel Dänzer Committed by Marge Bot
Browse files

lima/ppir: Cast pointer to uintptr_t instead of uint64_t



Avoids warnings on armhf:

./src/gallium/drivers/lima/ir/pp/nir.c: In function 'ppir_get_block':
../src/gallium/drivers/lima/ir/pp/nir.c:554:66: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
    ppir_block *block = _mesa_hash_table_u64_search(comp->blocks, (uint64_t)nblock);
                                                                  ^
../src/gallium/drivers/lima/ir/pp/nir.c: In function 'ppir_compile_nir':
../src/gallium/drivers/lima/ir/pp/nir.c:899:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
          _mesa_hash_table_u64_insert(comp->blocks, (uint64_t)nblock, block);
                                                    ^
Reviewed-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
Part-of: <mesa/mesa!10220>
parent cf727e6b
......@@ -551,7 +551,7 @@ static bool ppir_emit_tex(ppir_block *block, nir_instr *ni)
static ppir_block *ppir_get_block(ppir_compiler *comp, nir_block *nblock)
{
ppir_block *block = _mesa_hash_table_u64_search(comp->blocks, (uint64_t)nblock);
ppir_block *block = _mesa_hash_table_u64_search(comp->blocks, (uintptr_t)nblock);
return block;
}
......@@ -896,7 +896,7 @@ bool ppir_compile_nir(struct lima_fs_compiled_shader *prog, struct nir_shader *n
if (!block)
return false;
block->index = nblock->index;
_mesa_hash_table_u64_insert(comp->blocks, (uint64_t)nblock, block);
_mesa_hash_table_u64_insert(comp->blocks, (uintptr_t)nblock, block);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment