From cefef3b4f91b195a227449d12a1f04a0d5cdbd72 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 20 Sep 2022 14:29:33 -0700 Subject: [PATCH] softgpu: Narrow blend check for fast path further. See #15756, frame was largely black because of a full screen blend rectangle intended to brighten the screen slighty (I assume.) --- GPU/Software/RasterizerRectangle.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GPU/Software/RasterizerRectangle.cpp b/GPU/Software/RasterizerRectangle.cpp index ff5b9c85d9..8c7b4b171f 100644 --- a/GPU/Software/RasterizerRectangle.cpp +++ b/GPU/Software/RasterizerRectangle.cpp @@ -93,7 +93,10 @@ static inline bool AlphaTestIsNeedless(const PixelFuncID &pixelID) { case GE_COMP_NOTEQUAL: case GE_COMP_GREATER: case GE_COMP_GEQUAL: - return pixelID.alphaBlend && pixelID.alphaTestRef == 0 && !pixelID.hasAlphaTestMask; + if (pixelID.alphaTestRef != 0 || pixelID.hasAlphaTestMask) + return false; + // DrawSinglePixel5551 assumes it can take the src color directly if full alpha. + return pixelID.alphaBlend && pixelID.AlphaBlendSrc() == PixelBlendFactor::SRCALPHA && pixelID.AlphaBlendDst() == PixelBlendFactor::INVSRCALPHA; } return false;