mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-24 21:42:49 +00:00
Merge pull request #564 from bunnei/lop32i_passb
gl_shader_decompiler: Implement LOP32I LogicOperation PassB.
This commit is contained in:
commit
fb5bd0920d
|
@ -930,20 +930,26 @@ private:
|
||||||
if (instr.alu.lop.invert_b)
|
if (instr.alu.lop.invert_b)
|
||||||
imm = ~imm;
|
imm = ~imm;
|
||||||
|
|
||||||
|
std::string op_b = std::to_string(imm);
|
||||||
|
|
||||||
switch (instr.alu.lop.operation) {
|
switch (instr.alu.lop.operation) {
|
||||||
case Tegra::Shader::LogicOperation::And: {
|
case Tegra::Shader::LogicOperation::And: {
|
||||||
regs.SetRegisterToInteger(instr.gpr0, true, 0,
|
regs.SetRegisterToInteger(instr.gpr0, true, 0, '(' + op_a + " & " + op_b + ')',
|
||||||
'(' + op_a + " & " + std::to_string(imm) + ')', 1, 1);
|
1, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Tegra::Shader::LogicOperation::Or: {
|
case Tegra::Shader::LogicOperation::Or: {
|
||||||
regs.SetRegisterToInteger(instr.gpr0, true, 0,
|
regs.SetRegisterToInteger(instr.gpr0, true, 0, '(' + op_a + " | " + op_b + ')',
|
||||||
'(' + op_a + " | " + std::to_string(imm) + ')', 1, 1);
|
1, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Tegra::Shader::LogicOperation::Xor: {
|
case Tegra::Shader::LogicOperation::Xor: {
|
||||||
regs.SetRegisterToInteger(instr.gpr0, true, 0,
|
regs.SetRegisterToInteger(instr.gpr0, true, 0, '(' + op_a + " ^ " + op_b + ')',
|
||||||
'(' + op_a + " ^ " + std::to_string(imm) + ')', 1, 1);
|
1, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Tegra::Shader::LogicOperation::PassB: {
|
||||||
|
regs.SetRegisterToInteger(instr.gpr0, true, 0, op_b, 1, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue