ShaderGen: Support writing integer colors when logic op is enabled

This is required for D3D to support logic op.
This commit is contained in:
Stenzek
2017-09-03 16:32:37 +10:00
parent 3dd675e613
commit 0622979d3b
6 changed files with 68 additions and 19 deletions

View File

@ -10,6 +10,19 @@
// STATE_TO_SAVE
BPMemory bpmem;
bool BlendMode::UseLogicOp() const
{
// Logicop bit has lowest priority.
if (subtract || blendenable || !logicopenable)
return false;
// Fast path for Kirby's Return to Dreamland, they use it with dstAlpha.
if (logicmode == BlendMode::NOOP)
return false;
return true;
}
float FogParam0::GetA() const
{
// scale mantissa from 11 to 23 bits