diff --git a/src/graphics/shader/recompiler/frontend/decode/VectorAluOps.cpp b/src/graphics/shader/recompiler/frontend/decode/VectorAluOps.cpp index eff3d10d9..248705268 100644 --- a/src/graphics/shader/recompiler/frontend/decode/VectorAluOps.cpp +++ b/src/graphics/shader/recompiler/frontend/decode/VectorAluOps.cpp @@ -940,7 +940,7 @@ constexpr Vop2SdwaRule VOP2_SDWA_RULES[] = { true, true}, {SdwaSelFull(), SdwaSelAll(), SdwaSelAll(), false, false}, {SdwaSelAll(), SdwaSelAll(), SdwaSelAll(), true, false}, - {SdwaSelFull(), SdwaSelFull(), SdwaSelWords() | SdwaSelFull(), false, false}, + {SdwaSelFull(), SdwaSelAll(), SdwaSelWords() | SdwaSelFull(), false, false}, {SdwaSelFull(), SdwaSelFull(), SdwaSelAll(), false, false}, {SdwaSelWords() | SdwaSelFull(), SdwaSelAll(), SdwaSelAll(), true, false}, }; diff --git a/tests/shaderCfgTests.cpp b/tests/shaderCfgTests.cpp index 070188c24..ca594e481 100644 --- a/tests/shaderCfgTests.cpp +++ b/tests/shaderCfgTests.cpp @@ -4043,6 +4043,22 @@ void TestNewShaderDecoderArchitecture() { "decoder rejected or misdecoded captured partial-destination " "V_ADD_NC_U32"); + const uint32_t vop2_sdwa_byte_shift[] = { + 0x2c0910f9u, + 0x86000613u, // v_lshrrev_b32 v4, v19.byte0, 8 + }; + Instruction byte_shift; + Check(DecodeInstruction(vop2_sdwa_byte_shift, 0u, byte_shift, &error), + error.c_str()); + Check(byte_shift.family == Family::VOP2 && + byte_shift.opcode == Opcode::V_LSHRREV_B32 && + byte_shift.word_count == 2u && byte_shift.dst.reg == 4u && + byte_shift.src0.kind == OperandKind::Vgpr && + byte_shift.src0.reg == 19u && byte_shift.src0.sdwa_sel == 0u && + byte_shift.src1.kind == OperandKind::IntegerInlineConstant && + byte_shift.src1.value == 8u, + "decoder rejected or misdecoded captured V_LSHRREV_B32 byte shift"); + const uint32_t mimg_nsa[] = {EncodeMimg0(0x20, 0xf) | (3u << 1u), EncodeMimg1(4, 0, 1, 8), 0x03020100u, 0x07060504u, 0x0b0a0908u};