From 61b2d2e0a8ba7be0fc3d71ad158afb89e7ff6663 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 26 Sep 2022 18:16:08 +1000 Subject: [PATCH] gallivm/nir: fixup atomic path for explicit pointers. Reviewed-by: Mihai Preda Reviewed-by: Brian Paul Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index d17c3a4bbe8..245ebbd41ae 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -4669,7 +4669,9 @@ lp_build_do_atomic_soa(struct gallivm_state *gallivm, LLVMVectorType(ref_type, type.length); LLVMValueRef atom_res = lp_build_alloca(gallivm, atom_res_elem_type, ""); - offset = LLVMBuildGEP(gallivm->builder, base_ptr, &offset, 1, ""); + offset = LLVMBuildGEP2(gallivm->builder, + LLVMInt8TypeInContext(gallivm->context), + base_ptr, &offset, 1, ""); struct lp_build_loop_state loop_state; lp_build_loop_begin(&loop_state, gallivm, lp_build_const_int32(gallivm, 0));