mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-28 06:16:23 -05:00
gl_shader_decompiler: Partially implement MUFU.
This commit is contained in:
parent
5b9bcbf438
commit
5d529698c9
1 changed files with 11 additions and 2 deletions
|
@ -270,6 +270,17 @@ private:
|
||||||
SetDest(0, dest, op_a + " + " + op_b, 1, 1);
|
SetDest(0, dest, op_a + " + " + op_b, 1, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case OpCode::Id::MUFU: {
|
||||||
|
switch (instr.sub_op) {
|
||||||
|
case SubOp::Rcp:
|
||||||
|
SetDest(0, dest, "1.0 / " + op_a, 1, 1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
LOG_ERROR(HW_GPU, "Unhandled sub op: 0x%02x", (int)instr.sub_op.Value());
|
||||||
|
throw DecompileFail("Unhandled sub op");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
LOG_CRITICAL(HW_GPU, "Unhandled arithmetic instruction: 0x%02x (%s): 0x%08x",
|
LOG_CRITICAL(HW_GPU, "Unhandled arithmetic instruction: 0x%02x (%s): 0x%08x",
|
||||||
static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
|
static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
|
||||||
|
@ -298,7 +309,6 @@ private:
|
||||||
SetDest(0, dest, op_a + " * " + op_b + " + " + op_c, 1, 1);
|
SetDest(0, dest, op_a + " * " + op_b + " + " + op_c, 1, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
LOG_CRITICAL(HW_GPU, "Unhandled arithmetic FFMA instruction: 0x%02x (%s): 0x%08x",
|
LOG_CRITICAL(HW_GPU, "Unhandled arithmetic FFMA instruction: 0x%02x (%s): 0x%08x",
|
||||||
static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
|
static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
|
||||||
|
@ -347,7 +357,6 @@ private:
|
||||||
LOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x",
|
LOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x",
|
||||||
static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
|
static_cast<unsigned>(instr.opcode.EffectiveOpCode()),
|
||||||
OpCode::GetInfo(instr.opcode).name.c_str(), instr.hex);
|
OpCode::GetInfo(instr.opcode).name.c_str(), instr.hex);
|
||||||
throw DecompileFail("Unhandled instruction");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue