diff options
| author | 2014-12-13 21:22:55 +0100 | |
|---|---|---|
| committer | 2014-12-20 18:06:55 +0100 | |
| commit | cd163fb59ae2922d33aa931f51ef5d116c0adc3f (patch) | |
| tree | 4a3b18a64e55d95cdc2218734bd024fa06ad3737 /src | |
| parent | Pica: Add support for boolean uniforms. (diff) | |
| download | yuzu-cd163fb59ae2922d33aa931f51ef5d116c0adc3f.tar.gz yuzu-cd163fb59ae2922d33aa931f51ef5d116c0adc3f.tar.xz yuzu-cd163fb59ae2922d33aa931f51ef5d116c0adc3f.zip | |
Pica/VertexShader: Implement MAX instructions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/vertex_shader.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index fbec1bcc8..742e5a9f2 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp | |||
| @@ -197,6 +197,15 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 197 | break; | 197 | break; |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | case Instruction::OpCode::MAX: | ||
| 201 | for (int i = 0; i < 4; ++i) { | ||
| 202 | if (!swizzle.DestComponentEnabled(i)) | ||
| 203 | continue; | ||
| 204 | |||
| 205 | dest[i] = std::max(src1[i], src2[i]); | ||
| 206 | } | ||
| 207 | break; | ||
| 208 | |||
| 200 | case Instruction::OpCode::DP3: | 209 | case Instruction::OpCode::DP3: |
| 201 | case Instruction::OpCode::DP4: | 210 | case Instruction::OpCode::DP4: |
| 202 | { | 211 | { |