diff options
author | Subv <subv2112@gmail.com> | 2018-08-15 16:16:35 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-08-15 16:16:35 +0200 |
commit | 5ef447cc0eecede9f6c622ac50376a1d3f15d3ee (patch) | |
tree | 69895ff02e954bd54ca8657d7554321033f33f22 /src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |
parent | Shader/F2I: Implemented the negate bit in the F2I instruction. (diff) | |
download | yuzu-5ef447cc0eecede9f6c622ac50376a1d3f15d3ee.tar yuzu-5ef447cc0eecede9f6c622ac50376a1d3f15d3ee.tar.gz yuzu-5ef447cc0eecede9f6c622ac50376a1d3f15d3ee.tar.bz2 yuzu-5ef447cc0eecede9f6c622ac50376a1d3f15d3ee.tar.lz yuzu-5ef447cc0eecede9f6c622ac50376a1d3f15d3ee.tar.xz yuzu-5ef447cc0eecede9f6c622ac50376a1d3f15d3ee.tar.zst yuzu-5ef447cc0eecede9f6c622ac50376a1d3f15d3ee.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 5bd128e4f..054b8b13d 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1298,9 +1298,17 @@ private: regs.SetRegisterToFloat(instr.gpr0, 0, op_a, 1, 1, instr.alu.saturate_d); 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"); - 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) { op_a = "abs(" + op_a + ')'; |