From f52d8c1a9b345464160a29e94e53f14ed0446491 Mon Sep 17 00:00:00 2001 From: aroulin Date: Thu, 27 Aug 2015 15:21:05 +0200 Subject: Shader JIT: Fix float to integer rounding in MOVA MOVA converts new address register values from floats to integers using truncation --- src/video_core/shader/shader_jit_x64.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index cc66fc8d6..a8045d4b0 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -485,8 +485,8 @@ void JitCompiler::Compile_MOVA(Instruction instr) { Compile_SwizzleSrc(instr, 1, instr.common.src1, SRC1); - // Convert floats to integers (only care about X and Y components) - CVTPS2DQ(SRC1, R(SRC1)); + // Convert floats to integers using truncation (only care about X and Y components) + CVTTPS2DQ(SRC1, R(SRC1)); // Get result MOVQ_xmm(R(RAX), SRC1); -- cgit v1.2.3