From 875bd2976689a87930e0a068b903a8da38dcd3e3 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 22 May 2015 23:13:09 -0400 Subject: vertex_shader: Implement MIN instruction. --- src/video_core/vertex_shader.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index 4ebb42429..582712bde 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp @@ -208,6 +208,15 @@ static void ProcessShaderCode(VertexShaderState& state) { } break; + case OpCode::Id::MIN: + for (int i = 0; i < 4; ++i) { + if (!swizzle.DestComponentEnabled(i)) + continue; + + dest[i] = std::min(src1[i], src2[i]); + } + break; + case OpCode::Id::DP3: case OpCode::Id::DP4: { -- cgit v1.2.3