Przeglądaj źródła

Pica/VertexShader: Implement MAX instructions.

Tony Wasserka 11 lat temu
rodzic
commit
cd163fb59a
1 zmienionych plików z 9 dodań i 0 usunięć
  1. 9 0
      src/video_core/vertex_shader.cpp

+ 9 - 0
src/video_core/vertex_shader.cpp

@@ -197,6 +197,15 @@ static void ProcessShaderCode(VertexShaderState& state) {
                 break;
                 break;
             }
             }
 
 
+            case Instruction::OpCode::MAX:
+                for (int i = 0; i < 4; ++i) {
+                    if (!swizzle.DestComponentEnabled(i))
+                        continue;
+
+                    dest[i] = std::max(src1[i], src2[i]);
+                }
+                break;
+
             case Instruction::OpCode::DP3:
             case Instruction::OpCode::DP3:
             case Instruction::OpCode::DP4:
             case Instruction::OpCode::DP4:
             {
             {