summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-04-12 11:39:02 -0400
committerMarek Olšák <[email protected]>2019-04-15 12:52:02 -0400
commitdbab755ecf7dd3cc1bfce97b9069dcdfc262adff (patch)
tree5e704b6dd18f774e3a8ca50b73b8829c6ed0ba74
parent8671cfe2a203f2d5492eb22eeb2694e0e37239d9 (diff)
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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r--src/amd/common/ac_nir_to_llvm.c6
1 files changed, 3 insertions, 3 deletions
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;