From abc887faa108b52f1e622ac8c1a3e30c4f317475 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Wed, 30 Nov 2016 00:41:16 +0100 Subject: [PATCH] ac/nir: Fix out of bounds array access. With nir_intrinsic_ssbo_atomic_comp_swap we run out of params. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index ee98f5f88e8..df121d853c2 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -1946,7 +1946,7 @@ static LLVMValueRef visit_atomic_ssbo(struct nir_to_llvm_context *ctx, nir_intrinsic_instr *instr) { const char *name; - LLVMValueRef params[5]; + LLVMValueRef params[6]; int arg_count = 0; if (ctx->stage == MESA_SHADER_FRAGMENT) ctx->shader_info->fs.writes_memory = true; -- 2.30.2