mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 15:22:45 +01:00
Shader JIT: Tiny micro-optimization in DPH
This commit is contained in:
parent
630a850d4d
commit
d8ef20c856
1 changed files with 4 additions and 4 deletions
|
@ -367,10 +367,10 @@ void JitCompiler::Compile_DPH(Instruction instr) {
|
||||||
// Set 4th component to 1.0
|
// Set 4th component to 1.0
|
||||||
BLENDPS(SRC1, R(ONE), 0x8); // 0b1000
|
BLENDPS(SRC1, R(ONE), 0x8); // 0b1000
|
||||||
} else {
|
} else {
|
||||||
// Reverse to set the 4th component to 1.0
|
// Set 4th component to 1.0
|
||||||
SHUFPS(SRC1, R(SRC1), _MM_SHUFFLE(0, 1, 2, 3));
|
MOVAPS(SCRATCH, R(SRC1));
|
||||||
MOVSS(SRC1, R(ONE));
|
UNPCKHPS(SCRATCH, R(ONE)); // XYZW, 1111 -> Z1__
|
||||||
SHUFPS(SRC1, R(SRC1), _MM_SHUFFLE(0, 1, 2, 3));
|
UNPCKLPD(SRC1, R(SCRATCH)); // XYZW, Z1__ -> XYZ1
|
||||||
}
|
}
|
||||||
|
|
||||||
Compile_SanitizedMul(SRC1, SRC2, SCRATCH);
|
Compile_SanitizedMul(SRC1, SRC2, SCRATCH);
|
||||||
|
|
Loading…
Reference in a new issue