diff options
| author | degasus <wickmarkus@web.de> | 2016-12-29 18:15:41 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2017-01-06 14:01:39 +0100 |
| commit | f6c7a258ed109453e7fc8ecf90d44a9b301b07c1 (patch) | |
| tree | 0ed220235f4d9c2549c8e7e5fab67d6259fc17d9 /Source/Core/VideoCommon/RenderState.cpp | |
| parent | 23b0faeba55dae02cacb29a0f37c13535993bb0c (diff) | |
BlendState: Use masking as a fastpath for the logic op NO_OP.
Diffstat (limited to 'Source/Core/VideoCommon/RenderState.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderState.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp index 2750d43695..2e84646ce4 100644 --- a/Source/Core/VideoCommon/RenderState.cpp +++ b/Source/Core/VideoCommon/RenderState.cpp @@ -108,12 +108,21 @@ void BlendingState::Generate(const BPMemory& bp) // The logicop bit has the lowest priority else if (bp.blendmode.logicopenable) { - logicopenable = true; - logicmode = bp.blendmode.logicmode; - - if (dstalpha) + if (bp.blendmode.logicmode == BlendMode::NOOP) { - // TODO: Not supported by backends. + // 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; + + if (dstalpha) + { + // TODO: Not supported by backends. + } } } } |
