Explorar o código

Merge pull request #421 from Subv/sh_pred3

Shaders: Implemented predicate condition 3 (LessEqual) in the fset and fsetp instructions.
bunnei %!s(int64=8) %!d(string=hai) anos
pai
achega
869075867b
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      src/video_core/renderer_opengl/gl_shader_decompiler.cpp

+ 7 - 0
src/video_core/renderer_opengl/gl_shader_decompiler.cpp

@@ -882,6 +882,9 @@ private:
             case PredCondition::Equal:
                 SetPredicate(instr.fsetp.pred3, '(' + op_a + ") == (" + op_b + ')');
                 break;
+            case PredCondition::LessEqual:
+                SetPredicate(instr.fsetp.pred3, '(' + op_a + ") <= (" + op_b + ')');
+                break;
             default:
                 NGLOG_CRITICAL(HW_GPU, "Unhandled predicate condition: {} (a: {}, b: {})",
                                static_cast<unsigned>(instr.fsetp.cond.Value()), op_a, op_b);
@@ -933,6 +936,10 @@ private:
                 regs.SetRegisterToFloat(instr.gpr0, 0,
                                         "((" + op_a + ") == (" + op_b + ")) ? 1.0 : 0", 1, 1);
                 break;
+            case PredCondition::LessEqual:
+                regs.SetRegisterToFloat(instr.gpr0, 0,
+                                        "((" + op_a + ") <= (" + op_b + ")) ? 1.0 : 0", 1, 1);
+                break;
             case PredCondition::GreaterThan:
                 regs.SetRegisterToFloat(instr.gpr0, 0,
                                         "((" + op_a + ") > (" + op_b + ")) ? 1.0 : 0", 1, 1);