BlendState: Use masking as a fastpath for the logic op NO_OP.

This commit is contained in:
degasus 2016-12-29 18:15:41 +01:00
parent 23b0faeba5
commit f6c7a258ed

View File

@ -107,6 +107,14 @@ void BlendingState::Generate(const BPMemory& bp)
// The logicop bit has the lowest priority
else if (bp.blendmode.logicopenable)
{
if (bp.blendmode.logicmode == BlendMode::NOOP)
{
// Fast path for Kirby's Return to Dreamland, they use it with dstAlpha.
colorupdate = false;
alphaupdate = alphaupdate && dstalpha;
}
else
{
logicopenable = true;
logicmode = bp.blendmode.logicmode;
@ -117,3 +125,4 @@ void BlendingState::Generate(const BPMemory& bp)
}
}
}
}