diff options
author | Subv <subv2112@gmail.com> | 2018-07-12 19:00:31 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-07-12 19:00:31 +0200 |
commit | c1ae841f47e05dc084e4961e6a027d6cdb49ace2 (patch) | |
tree | 79a318f9c3e842209f82c79244c549aeae709324 /src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |
parent | Merge pull request #632 from FearlessTobi/add-discord-link (diff) | |
download | yuzu-c1ae841f47e05dc084e4961e6a027d6cdb49ace2.tar yuzu-c1ae841f47e05dc084e4961e6a027d6cdb49ace2.tar.gz yuzu-c1ae841f47e05dc084e4961e6a027d6cdb49ace2.tar.bz2 yuzu-c1ae841f47e05dc084e4961e6a027d6cdb49ace2.tar.lz yuzu-c1ae841f47e05dc084e4961e6a027d6cdb49ace2.tar.xz yuzu-c1ae841f47e05dc084e4961e6a027d6cdb49ace2.tar.zst yuzu-c1ae841f47e05dc084e4961e6a027d6cdb49ace2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index e817aca5a..c5d27ec80 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -968,6 +968,29 @@ private: regs.GetRegisterAsFloat(instr.gpr8) + " * " + GetImmediate32(instr), 1, 1); break; } + case OpCode::Id::FADD32I: { + std::string op_a = regs.GetRegisterAsFloat(instr.gpr8); + std::string op_b = GetImmediate32(instr); + + if (instr.fadd32i.abs_a) { + op_a = "abs(" + op_a + ')'; + } + + if (instr.fadd32i.negate_a) { + op_a = "-(" + op_a + ')'; + } + + if (instr.fadd32i.abs_b) { + op_b = "abs(" + op_b + ')'; + } + + if (instr.fadd32i.negate_b) { + op_b = "-(" + op_b + ')'; + } + + regs.SetRegisterToFloat(instr.gpr0, 0, op_a + " + " + op_b, 1, 1); + break; + } } break; } |