diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2017-01-06 16:28:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-06 16:28:12 +0100 |
| commit | c380dceb787a167da1b76e9c241f90b8bca61a11 (patch) | |
| tree | 0ed220235f4d9c2549c8e7e5fab67d6259fc17d9 /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | c33c9532a78000224f63c4a293d031452606a8ed (diff) | |
| parent | f6c7a258ed109453e7fc8ecf90d44a9b301b07c1 (diff) | |
Merge pull request #4581 from degasus/blendstate
OGL: Move blending logic in VideoCommon.
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index 5bd1b6027f..56bce65c27 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -142,6 +142,10 @@ static void BPWritten(const BPCmd& bp) (int)bpmem.blendmode.dstfactor, (int)bpmem.blendmode.srcfactor, (int)bpmem.blendmode.subtract, (int)bpmem.blendmode.logicmode); + // Set Blending Mode + if (bp.changes) + SetBlendMode(); + // Set LogicOp Blending Mode if (bp.changes & 0xF002) // logicopenable | logicmode SetLogicOpMode(); @@ -150,10 +154,6 @@ static void BPWritten(const BPCmd& bp) if (bp.changes & 4) // dither SetDitherMode(); - // Set Blending Mode - if (bp.changes & 0xFF1) // blendenable | alphaupdate | dstfactor | srcfactor | subtract - SetBlendMode(); - // Set Color Mask if (bp.changes & 0x18) // colorupdate | alphaupdate SetColorMask(); @@ -316,7 +316,10 @@ static void BPWritten(const BPCmd& bp) if (bp.changes & 0xFFFF) PixelShaderManager::SetAlpha(); if (bp.changes) + { g_renderer->SetColorMask(); + SetBlendMode(); + } return; case BPMEM_BIAS: // BIAS PRIM_LOG("ztex bias=0x%x", bpmem.ztex1.bias); |
