From dbab755ecf7dd3cc1bfce97b9069dcdfc262adff Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 12 Apr 2019 11:39:02 -0400 Subject: ac: fix incorrect bindless atomic code in visit_image_atomic Coverity: CID 1444664 Fixes: d62d434fe920 ("ac/nir_to_llvm: add image bindless support") Reviewed-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/amd/common/ac_nir_to_llvm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/amd/common') diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 421b7f478b5..aa85029aed0 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -2553,11 +2553,11 @@ static LLVMValueRef visit_image_atomic(struct ac_nir_context *ctx, MAYBE_UNUSED int length; enum glsl_sampler_dim dim; - bool is_unsigned; + bool is_unsigned = false; bool is_array; if (bindless) { - if (instr->intrinsic == nir_intrinsic_image_atomic_min || - instr->intrinsic == nir_intrinsic_image_atomic_max) { + if (instr->intrinsic == nir_intrinsic_bindless_image_atomic_min || + instr->intrinsic == nir_intrinsic_bindless_image_atomic_max) { const GLenum format = nir_intrinsic_format(instr); assert(format == GL_R32UI || format == GL_R32I); is_unsigned = format == GL_R32UI; -- cgit v1.2.3