From: Bas Nieuwenhuizen Date: Tue, 29 Nov 2016 23:41:16 +0000 (+0100) Subject: ac/nir: Fix out of bounds array access. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=abc887faa108b52f1e622ac8c1a3e30c4f317475;p=mesa.git 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 --- 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;