Skip to content

Commit

Permalink
Vertex decoder: Add fallback for non-SSE4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Oct 3, 2022
1 parent 973d043 commit 1469a32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion GPU/Common/VertexDecoderX86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,13 @@ void VertexDecoderJitCache::Jit_PosFloatThrough() {

CVTTPS2DQ(fpScratchReg, R(fpScratchReg));
// Use pack to saturate to 0,65535.
PACKUSDW(fpScratchReg, R(fpScratchReg));
if (cpu_info.bSSE4_1) {
PACKUSDW(fpScratchReg, R(fpScratchReg));
} else {
PSLLD(fpScratchReg, 16);
PSRAD(fpScratchReg, 16);
PACKSSDW(fpScratchReg, R(fpScratchReg));
}
PUNPCKLWD(fpScratchReg, R(fpScratchReg2));
CVTDQ2PS(fpScratchReg, R(fpScratchReg));

Expand Down

0 comments on commit 1469a32

Please sign in to comment.