From cc582885102fd4801eb80abf8504e87c49bf2aaa Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Mon, 23 Dec 2024 17:25:19 +0800 Subject: [PATCH] aco: fix voffset missing when buffer store base >=4096 Regression on test: dEQP-GLES31.functional.geometry_shading.basic.output_256 voffset is missing if buffer store base >=4096, we need to re-calculate offen after resolve_excess_vmem_const_offset(). Fixes: cdaf269924f ("aco: inline store_vmem_mubuf/emit_single_mubuf_store") (cherry picked from commit dff14d102dfe006b69fcde3ea3cf04c2697d9689) Part-of: --- .pick_status.json | 2 +- src/amd/compiler/aco_instruction_selection.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 79f41f5b349..5b8fbd04302 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1964,7 +1964,7 @@ "description": "aco: fix voffset missing when buffer store base >=4096", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "cdaf269924ffc2f40c38ff05359466bfc0155fde", "notes": null diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index f1515a1a304..abff5e82b0b 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -7303,6 +7303,9 @@ visit_store_buffer(isel_context* ctx, nir_intrinsic_instr* intrin) unsigned const_offset = resolve_excess_vmem_const_offset( bld, write_voffset, offsets[i] + nir_intrinsic_base(intrin)); + /* write_voffset may be updated in resolve_excess_vmem_const_offset(). */ + offen = write_voffset.id(); + Operand vaddr_op(v1); if (offen && idxen) vaddr_op = bld.pseudo(aco_opcode::p_create_vector, bld.def(v2), idx, write_voffset);