diff options
author | bunnei <bunneidev@gmail.com> | 2018-06-01 06:03:23 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-06-03 17:14:31 +0200 |
commit | e54ea773fcaff6f757a7170b78c7b871372bfc3b (patch) | |
tree | 717ae9888640872afc096f910e889aa4ebfffa1d /src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |
parent | Merge pull request #488 from Subv/thread_masks (diff) | |
download | yuzu-e54ea773fcaff6f757a7170b78c7b871372bfc3b.tar yuzu-e54ea773fcaff6f757a7170b78c7b871372bfc3b.tar.gz yuzu-e54ea773fcaff6f757a7170b78c7b871372bfc3b.tar.bz2 yuzu-e54ea773fcaff6f757a7170b78c7b871372bfc3b.tar.lz yuzu-e54ea773fcaff6f757a7170b78c7b871372bfc3b.tar.xz yuzu-e54ea773fcaff6f757a7170b78c7b871372bfc3b.tar.zst yuzu-e54ea773fcaff6f757a7170b78c7b871372bfc3b.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 | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 68efe74b8..cb4b68b26 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -792,8 +792,13 @@ private: 1, 1); break; } - case OpCode::Id::RRO: { - NGLOG_DEBUG(HW_GPU, "Skipping RRO instruction"); + case OpCode::Id::RRO_C: + case OpCode::Id::RRO_R: + case OpCode::Id::RRO_IMM: { + // Currently RRO is only implemented as a register move. + // Usage of `abs_b` and `negate_b` here should also be correct. + regs.SetRegisterToFloat(instr.gpr0, 0, op_b, 1, 1); + NGLOG_WARNING(HW_GPU, "RRO instruction is incomplete"); break; } default: { @@ -897,8 +902,8 @@ private: const std::string op_b = regs.GetRegisterAsFloat(instr.gpr20); const std::string sampler = GetSampler(instr.sampler); const std::string coord = "vec2 coords = vec2(" + op_a + ", " + op_b + ");"; - // Add an extra scope and declare the texture coords inside to prevent overwriting - // them in case they are used as outputs of the texs instruction. + // Add an extra scope and declare the texture coords inside to prevent + // overwriting them in case they are used as outputs of the texs instruction. shader.AddLine("{"); ++shader.scope; shader.AddLine(coord); @@ -961,8 +966,8 @@ private: '(' + predicate + ") " + combiner + " (" + second_pred + ')'); if (instr.fsetp.pred0 != static_cast<u64>(Pred::UnusedIndex)) { - // Set the secondary predicate to the result of !Predicate OP SecondPredicate, if - // enabled + // Set the secondary predicate to the result of !Predicate OP SecondPredicate, + // if enabled SetPredicate(instr.fsetp.pred0, "!(" + predicate + ") " + combiner + " (" + second_pred + ')'); } |