From bbcde41cb2ea5fdf99b43430bcb1213c23e303d1 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 16 Nov 2022 10:35:19 +0000 Subject: [PATCH] aco: fix FS inputs loads in WQM with 16-bit p_wqm needs to use the same size. Fixes: 16d2c7ad557 ("aco/gfx11: perform FS input loads in WQM") Signed-off-by: Samuel Pitoiset Reviewed-by: Rhys Perry Part-of: (cherry picked from commit 50fe37070fb6b35a1468297f48021d58a9c94463) --- .pick_status.json | 2 +- src/amd/compiler/aco_instruction_selection.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d8ff15735bb..a5322911673 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -22,7 +22,7 @@ "description": "aco: fix FS inputs loads in WQM with 16-bit", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "16d2c7ad557b46104f91365ab3405f0a3ed7e36d" }, diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 66078d8f4eb..ae2fd975a43 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -5347,7 +5347,10 @@ emit_interp_instr_gfx11(isel_context* ctx, unsigned idx, unsigned component, Tem res = bld.vinterp_inreg(aco_opcode::v_interp_p2_f32_inreg, bld.def(v1), p, coord2, p10); } /* lds_param_load must be done in WQM, and the result kept valid for helper lanes. */ - emit_wqm(bld, res, dst, true); + if (dst.regClass() != v2b) + emit_wqm(bld, res, dst, true); + else + emit_extract_vector(ctx, emit_wqm(bld, res, Temp(0, s1), true), 0, dst); } void @@ -5417,7 +5420,10 @@ emit_interp_mov_instr(isel_context* ctx, unsigned idx, unsigned component, unsig Temp res = bld.vop1_dpp(aco_opcode::v_mov_b32, bld.def(v1), p, dpp_ctrl); /* lds_param_load must be done in WQM, and the result kept valid for helper lanes. */ - emit_wqm(bld, res, dst, true); + if (dst.regClass() != v2b) + emit_wqm(bld, res, dst, true); + else + emit_extract_vector(ctx, emit_wqm(bld, res, Temp(0, s1), true), 0, dst); } } else { bld.vintrp(aco_opcode::v_interp_mov_f32, Definition(dst), Operand::c32(vertex_id),