From 55df7ad571470562ffa3f6d71c32787f11b61b14 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 20 Dec 2022 17:30:21 +0100 Subject: [PATCH] r600/sfn: Fix possible dest channels for variable size dot Fixes: 357e5fac9953b26eedc8819ab528b981be6e1b69 r600/sfn: Use variable length DOT on Evergreen and Cayman Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp b/src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp index afc7709..9ae005c 100644 --- a/src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_instr_alu.cpp @@ -26,6 +26,7 @@ #include "sfn_instr_alu.h" +#include "sfn_alu_defines.h" #include "sfn_debug.h" #include "sfn_instr_alugroup.h" #include "sfn_instr_tex.h" @@ -495,8 +496,13 @@ uint8_t AluInstr::allowed_src_chan_mask() const uint8_t AluInstr::allowed_dest_chan_mask() const { - if (alu_slots() != 1 && has_alu_flag(alu_is_cayman_trans)) { + if (alu_slots() != 1) { + if (has_alu_flag(alu_is_cayman_trans)) return (1 << alu_slots()) - 1; + + if (m_opcode == op2_dot_ieee || m_opcode == op2_dot) { + return (1 << (4 - alu_slots())) - 1; + } } return 0xf; } -- 2.7.4