From 07b67ef572c9204cb85628ecf11372fe2862f628 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 24 Jan 2022 00:08:33 -0800 Subject: [PATCH] softgpu: Fix pixel ID for invalid blend factors. They should still be treated as FIX, we were accidentally using our special values. --- GPU/Software/FuncId.cpp | 4 ++-- test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/Software/FuncId.cpp b/GPU/Software/FuncId.cpp index d03195e7bf..275bbe61bd 100644 --- a/GPU/Software/FuncId.cpp +++ b/GPU/Software/FuncId.cpp @@ -155,9 +155,9 @@ void ComputePixelFuncID(PixelFuncID *id) { id->alphaBlendSrc = gstate.getBlendFuncA(); id->alphaBlendDst = gstate.getBlendFuncB(); // Special values. - if (id->alphaBlendSrc == GE_SRCBLEND_FIXA) + if (id->alphaBlendSrc >= GE_SRCBLEND_FIXA) id->alphaBlendSrc = (uint8_t)OptimizeAlphaFactor(gstate.getFixA()); - if (id->alphaBlendDst == GE_DSTBLEND_FIXB) + if (id->alphaBlendDst >= GE_DSTBLEND_FIXB) id->alphaBlendDst = (uint8_t)OptimizeAlphaFactor(gstate.getFixB()); } diff --git a/test.py b/test.py index 183e0c5c91..2516dbabf4 100755 --- a/test.py +++ b/test.py @@ -135,6 +135,7 @@ tests_good = [ "gpu/clut/shifts", "gpu/commands/basic", "gpu/commands/blend", + "gpu/commands/blend565", "gpu/commands/blocktransfer", "gpu/commands/material", "gpu/dither/dither", @@ -375,7 +376,6 @@ tests_next = [ "font/shadowglyphimageclip", "font/shadowinfo", "gpu/clipping/guardband", - "gpu/commands/blend565", "gpu/commands/cull", "gpu/commands/light", "gpu/complex/complex",