From cfb816b2a5b9dc0766c0c6ad83c044d9e65245c4 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 6 Oct 2021 18:10:25 +0100 Subject: [PATCH] aco: use correct dim for FMASK fetches I think it somehow worked fine previously, but this is more correct. Signed-off-by: Rhys Perry Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index e1915ce40c6..828e3565316 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -9741,7 +9741,10 @@ visit_tex(isel_context* ctx, nir_tex_instr* instr) Operand vdata = instr->is_sparse ? emit_tfe_init(bld, tmp_dst) : Operand(v1); MIMG_instruction* tex = emit_mimg(bld, op, Definition(tmp_dst), resource, Operand(s4), args, 0, vdata); - tex->dim = dim; + if (instr->op == nir_texop_fragment_mask_fetch_amd) + tex->dim = da ? ac_image_2darray : ac_image_2d; + else + tex->dim = dim; tex->dmask = dmask & 0xf; tex->unrm = true; tex->da = da;