Handle S_LSHL_B32 in ParseCopyShader (#3477)

Fixes an assert in My First Gran Turismo

Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>
This commit is contained in:
Stephen Miller
2025-08-29 18:33:19 -05:00
committed by GitHub
parent 412355aab4
commit 90757d6d09

View File

@@ -25,6 +25,14 @@ CopyShaderData ParseCopyShader(std::span<const u32> code) {
while (!code_slice.atEnd()) { while (!code_slice.atEnd()) {
auto inst = decoder.decodeInstruction(code_slice); auto inst = decoder.decodeInstruction(code_slice);
switch (inst.opcode) { switch (inst.opcode) {
case Gcn::Opcode::S_LSHL_B32: {
ASSERT(inst.src[0].field == Gcn::OperandField::SignedConstIntPos &&
inst.src[1].field == Gcn::OperandField::SignedConstIntPos);
sources[inst.dst[0].code] =
(inst.src[0].code - Gcn::OperandFieldRange::SignedConstIntPosMin + 1)
<< (inst.src[1].code - Gcn::OperandFieldRange::SignedConstIntPosMin + 1);
break;
}
case Gcn::Opcode::S_MOVK_I32: { case Gcn::Opcode::S_MOVK_I32: {
sources[inst.dst[0].code] = inst.control.sopk.simm; sources[inst.dst[0].code] = inst.control.sopk.simm;
break; break;