Skip to content
Snippets Groups Projects
Unverified Commit 5410b465 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #610 from Subv/mufu_8

GPU: Implemented MUFU suboperation 8, sqrt.
parents 92c71350 6e4e0b2b
No related branches found
No related tags found
No related merge requests found
...@@ -166,6 +166,7 @@ enum class SubOp : u64 { ...@@ -166,6 +166,7 @@ enum class SubOp : u64 {
Lg2 = 0x3, Lg2 = 0x3,
Rcp = 0x4, Rcp = 0x4,
Rsq = 0x5, Rsq = 0x5,
Sqrt = 0x8,
}; };
enum class F2iRoundingOp : u64 { enum class F2iRoundingOp : u64 {
......
...@@ -917,6 +917,10 @@ private: ...@@ -917,6 +917,10 @@ private:
regs.SetRegisterToFloat(instr.gpr0, 0, "inversesqrt(" + op_a + ')', 1, 1, regs.SetRegisterToFloat(instr.gpr0, 0, "inversesqrt(" + op_a + ')', 1, 1,
instr.alu.saturate_d); instr.alu.saturate_d);
break; break;
case SubOp::Sqrt:
regs.SetRegisterToFloat(instr.gpr0, 0, "sqrt(" + op_a + ')', 1, 1,
instr.alu.saturate_d);
break;
default: default:
NGLOG_CRITICAL(HW_GPU, "Unhandled MUFU sub op: {0:x}", NGLOG_CRITICAL(HW_GPU, "Unhandled MUFU sub op: {0:x}",
static_cast<unsigned>(instr.sub_op.Value())); static_cast<unsigned>(instr.sub_op.Value()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment