summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-08-24 01:15:39 -0300
committerGravatar Yuri Kunde Schlesner2015-08-24 01:48:37 -0300
commitd8ef20c85695f6272dd71dbde1b8d04bac012dbe (patch)
treeb93b0daf3ef8f8bf2b8e64159625d69c9d119053 /src
parentShaders: Fix multiplications between 0.0 and inf (diff)
downloadyuzu-d8ef20c85695f6272dd71dbde1b8d04bac012dbe.tar.gz
yuzu-d8ef20c85695f6272dd71dbde1b8d04bac012dbe.tar.xz
yuzu-d8ef20c85695f6272dd71dbde1b8d04bac012dbe.zip
Shader JIT: Tiny micro-optimization in DPH
Diffstat (limited to 'src')
-rw-r--r--src/video_core/shader/shader_jit_x64.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp
index ddae61cae..c8a669b51 100644
--- a/src/video_core/shader/shader_jit_x64.cpp
+++ b/src/video_core/shader/shader_jit_x64.cpp
@@ -367,10 +367,10 @@ void JitCompiler::Compile_DPH(Instruction instr) {
367 // Set 4th component to 1.0 367 // Set 4th component to 1.0
368 BLENDPS(SRC1, R(ONE), 0x8); // 0b1000 368 BLENDPS(SRC1, R(ONE), 0x8); // 0b1000
369 } else { 369 } else {
370 // Reverse to set the 4th component to 1.0 370 // Set 4th component to 1.0
371 SHUFPS(SRC1, R(SRC1), _MM_SHUFFLE(0, 1, 2, 3)); 371 MOVAPS(SCRATCH, R(SRC1));
372 MOVSS(SRC1, R(ONE)); 372 UNPCKHPS(SCRATCH, R(ONE)); // XYZW, 1111 -> Z1__
373 SHUFPS(SRC1, R(SRC1), _MM_SHUFFLE(0, 1, 2, 3)); 373 UNPCKLPD(SRC1, R(SCRATCH)); // XYZW, Z1__ -> XYZ1
374 } 374 }
375 375
376 Compile_SanitizedMul(SRC1, SRC2, SCRATCH); 376 Compile_SanitizedMul(SRC1, SRC2, SCRATCH);