softgpu: Fix pixel ID for invalid blend factors.

They should still be treated as FIX, we were accidentally using our
special values.
This commit is contained in:
Unknown W. Brackets 2022-01-24 00:08:33 -08:00
parent 6c723c0517
commit 07b67ef572
2 changed files with 3 additions and 3 deletions

View File

@ -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());
}

View File

@ -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",