mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 23:06:23 -05:00
Shader/F2I: Implemented the F2I_C instruction variant.
This commit is contained in:
parent
11c221cc62
commit
5ef447cc0e
1 changed files with 10 additions and 2 deletions
|
@ -1298,9 +1298,17 @@ private:
|
||||||
regs.SetRegisterToFloat(instr.gpr0, 0, op_a, 1, 1, instr.alu.saturate_d);
|
regs.SetRegisterToFloat(instr.gpr0, 0, op_a, 1, 1, instr.alu.saturate_d);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OpCode::Id::F2I_R: {
|
case OpCode::Id::F2I_R:
|
||||||
|
case OpCode::Id::F2I_C: {
|
||||||
ASSERT_MSG(instr.conversion.src_size == Register::Size::Word, "Unimplemented");
|
ASSERT_MSG(instr.conversion.src_size == Register::Size::Word, "Unimplemented");
|
||||||
std::string op_a = regs.GetRegisterAsFloat(instr.gpr20);
|
std::string op_a{};
|
||||||
|
|
||||||
|
if (instr.is_b_gpr) {
|
||||||
|
op_a = regs.GetRegisterAsFloat(instr.gpr20);
|
||||||
|
} else {
|
||||||
|
op_a = regs.GetUniform(instr.cbuf34.index, instr.cbuf34.offset,
|
||||||
|
GLSLRegister::Type::Float);
|
||||||
|
}
|
||||||
|
|
||||||
if (instr.conversion.abs_a) {
|
if (instr.conversion.abs_a) {
|
||||||
op_a = "abs(" + op_a + ')';
|
op_a = "abs(" + op_a + ')';
|
||||||
|
|
Loading…
Reference in a new issue