From f2922126156b9bc9fd10bfd3690e7ed3db08184f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 27 Sep 2022 15:26:42 +1000 Subject: [PATCH] gallivm/nir: bitcast when non-float ptr type. This matters more when opaque pointers are used. Fixes: 203920d4c693 ("gallivm: add atomic 32-bit float support") Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index 5e1a987049d..b5e401f6132 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -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. */ - if (bit_size == 32) + if (bit_size == 32 && !mem_bld->type.floating) return ptr; else return LLVMBuildBitCast(gallivm->builder, ptr, LLVMPointerType(mem_bld->elem_type, 0), "");