diff options
author | bunnei <bunneidev@gmail.com> | 2018-05-30 05:52:54 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-05-30 05:52:54 +0200 |
commit | 6fcc7e9c3612cca64b3e6878046fc08b7b327292 (patch) | |
tree | 8b7f0cb290571e3eec34c7e4abaca0559cb342b6 /src | |
parent | gl_shader_decompiler: Partially implement F2F_R instruction. (diff) | |
download | yuzu-6fcc7e9c3612cca64b3e6878046fc08b7b327292.tar yuzu-6fcc7e9c3612cca64b3e6878046fc08b7b327292.tar.gz yuzu-6fcc7e9c3612cca64b3e6878046fc08b7b327292.tar.bz2 yuzu-6fcc7e9c3612cca64b3e6878046fc08b7b327292.tar.lz yuzu-6fcc7e9c3612cca64b3e6878046fc08b7b327292.tar.xz yuzu-6fcc7e9c3612cca64b3e6878046fc08b7b327292.tar.zst yuzu-6fcc7e9c3612cca64b3e6878046fc08b7b327292.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index c17bd7d2c..70ddea643 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -853,7 +853,13 @@ private: break; } case OpCode::Id::F2F_R: { - regs.SetRegisterToFloat(instr.gpr0, 0, regs.GetRegisterAsFloat(instr.gpr20), 1, 1); + std::string op_a = regs.GetRegisterAsFloat(instr.gpr20); + + if (instr.conversion.abs_a) { + op_a = "abs(" + op_a + ')'; + } + + regs.SetRegisterToFloat(instr.gpr0, 0, op_a, 1, 1); break; } default: { |