From 84959be150e6369db28e73f979fa77b7be633d9c Mon Sep 17 00:00:00 2001 From: aroulin Date: Mon, 31 Aug 2015 08:09:07 +0200 Subject: Shader JIT: Fix SGE/SGEI NaN behavior SGE was incorrectly emulated w.r.t. NaN behavior as the CMPSS SSE instruction was used with NLT --- src/video_core/shader/shader_jit_x64.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index d3cfe109e..c7b63a9b7 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -434,10 +434,10 @@ void JitCompiler::Compile_SGE(Instruction instr) { Compile_SwizzleSrc(instr, 2, instr.common.src2, SRC2); } - CMPPS(SRC1, R(SRC2), CMP_NLT); - ANDPS(SRC1, R(ONE)); + CMPPS(SRC2, R(SRC1), CMP_LE); + ANDPS(SRC2, R(ONE)); - Compile_DestEnable(instr, SRC1); + Compile_DestEnable(instr, SRC2); } void JitCompiler::Compile_SLT(Instruction instr) { -- cgit v1.2.3