From 0980ae1a1c95a0d61bef3e06148275644a55784a Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 18 Feb 2015 17:25:48 -0500 Subject: [PATCH] VS: Implement FLR and SLTI instructions. --- src/video_core/vertex_shader.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index bc8c0041c..e437f83ac 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp @@ -229,6 +229,22 @@ static void ProcessShaderCode(VertexShaderState& state) { break; } + case Instruction::OpCode::FLR: + { + for (int i = 0; i < 4; ++i) + dest[i] = float24::FromFloat32(floor(src1[i].ToFloat32())); + + break; + } + + case Instruction::OpCode::SLTI: + { + for (int i = 0; i < 4; ++i) + dest[i] = float24::FromFloat32((src1[i] < src2[i]) ? 1.0f : 0.0f); + + break; + } + case Instruction::OpCode::MAX: for (int i = 0; i < 4; ++i) { if (!swizzle.DestComponentEnabled(i))