From 94b2aebf6f4133112e13711ec20ecd393dad5a52 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Mon, 28 Nov 2022 11:43:16 +0100 Subject: [PATCH] r600/sfn: always use four slots for Cayman trans ops This is a partial revert of ed6204eb0 (r600/sfn: only use 3 channels on Cayman for trans ops) The scheduler and/or optimizer passes generate faulty code when we use only three slots as decribed in the spec. So for now disable this optimization. Fixes: ed6204eb0 (r600/sfn: only use 3 channels on Cayman for trans ops) Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7774 Signed-off-by: Gert Wollny Part-of: (cherry picked from commit 28c7684eb9a898089844376193d8332b5f58f3d8) --- .pick_status.json | 2 +- src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 6a4c786..75a4849 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -697,7 +697,7 @@ "description": "r600/sfn: always use four slots for Cayman trans ops", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ed6204eb06cb559d9ed354aca00f1ddb0a6f68f7" }, diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp b/src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp index 4995887..d7a2f0f 100644 --- a/src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp @@ -2818,7 +2818,7 @@ emit_alu_trans_op1_cayman(const nir_alu_instr& alu, EAluOp opcode, Shader& shade auto pin = pin_for_components(alu); - unsigned ncomp = nir_dest_num_components(alu.dest.dest) == 4 ? 4 : 3; + unsigned ncomp = 4; //nir_dest_num_components(alu.dest.dest) == 4 ? 4 : 3; /* todo: Actually we need only three channels, but then we have * to make sure that we don't hava w dest */ -- 2.7.4