From 863730f6a7cee392600773747574a26155d9f385 Mon Sep 17 00:00:00 2001 From: aroulin Date: Wed, 19 Aug 2015 13:57:01 +0200 Subject: Shader: implement SGE, SGEI in interpreter --- src/video_core/shader/shader_interpreter.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/shader/shader_interpreter.cpp b/src/video_core/shader/shader_interpreter.cpp index 646171a19..063cc38f0 100644 --- a/src/video_core/shader/shader_interpreter.cpp +++ b/src/video_core/shader/shader_interpreter.cpp @@ -278,6 +278,20 @@ void RunInterpreter(UnitState& state) { break; } + case OpCode::Id::SGE: + case OpCode::Id::SGEI: + Record(state.debug, iteration, src1); + Record(state.debug, iteration, src2); + Record(state.debug, iteration, dest); + for (int i = 0; i < 4; ++i) { + if (!swizzle.DestComponentEnabled(i)) + continue; + + dest[i] = (src1[i] >= src2[i]) ? float24::FromFloat32(1.0f) : float24::FromFloat32(0.0f); + } + Record(state.debug, iteration, dest); + break; + case OpCode::Id::SLT: case OpCode::Id::SLTI: Record(state.debug, iteration, src1); -- cgit v1.2.3