From fe0b3dbd01bb8b197d9c79f6389cb2e0c3afa610 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 9 Jan 2022 11:08:46 -0800 Subject: [PATCH] samplerjit: Fix alpha for 565 in linear lookup. --- GPU/Software/SamplerX86.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/GPU/Software/SamplerX86.cpp b/GPU/Software/SamplerX86.cpp index 9c34bd7b34..9ceb2f68e6 100644 --- a/GPU/Software/SamplerX86.cpp +++ b/GPU/Software/SamplerX86.cpp @@ -3087,9 +3087,16 @@ bool SamplerJitCache::Jit_Decode5650Quad(const SamplerID &id, Rasterizer::RegCac // Now shift and mask temp2 for swizzle. PSRLD(temp2Reg, 6); PAND(temp2Reg, M(const5650Swizzle_)); - // And then OR that in too. We're done. + // And then OR that in too. Only alpha left now. POR(quadReg, R(temp2Reg)); + if (id.useTextureAlpha) { + // Just put a fixed FF in. Maybe we could even avoid this and act like it's FF later... + PCMPEQD(temp2Reg, R(temp2Reg)); + PSLLD(temp2Reg, 24); + POR(quadReg, R(temp2Reg)); + } + regCache_.Release(temp1Reg, RegCache::VEC_TEMP1); regCache_.Release(temp2Reg, RegCache::VEC_TEMP2); return true;