From 0622979d3b1761cfec6108ddb4b77d67518986f3 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 3 Sep 2017 16:32:37 +1000 Subject: ShaderGen: Support writing integer colors when logic op is enabled This is required for D3D to support logic op. --- Source/Core/VideoCommon/BPMemory.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Source/Core/VideoCommon/BPMemory.cpp') diff --git a/Source/Core/VideoCommon/BPMemory.cpp b/Source/Core/VideoCommon/BPMemory.cpp index 26891ba941..8c0a2ec43a 100644 --- a/Source/Core/VideoCommon/BPMemory.cpp +++ b/Source/Core/VideoCommon/BPMemory.cpp @@ -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 -- cgit v1.2.3