gallivm/nir: bitcast when non-float ptr type.
This matters more when opaque pointers are used.
Fixes: 203920d4c6
("gallivm: add atomic 32-bit float support")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18835>
This commit is contained in:
@@ -1224,7 +1224,7 @@ mem_access_base_pointer(struct lp_build_nir_context *bld_base,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Cast it to the pointer type of the access this instruction is doing. */
|
/* Cast it to the pointer type of the access this instruction is doing. */
|
||||||
if (bit_size == 32)
|
if (bit_size == 32 && !mem_bld->type.floating)
|
||||||
return ptr;
|
return ptr;
|
||||||
else
|
else
|
||||||
return LLVMBuildBitCast(gallivm->builder, ptr, LLVMPointerType(mem_bld->elem_type, 0), "");
|
return LLVMBuildBitCast(gallivm->builder, ptr, LLVMPointerType(mem_bld->elem_type, 0), "");
|
||||||
|
Reference in New Issue
Block a user