summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPMemory.cpp
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2017-09-03 19:26:50 -0700
committerGitHub <noreply@github.com>2017-09-03 19:26:50 -0700
commitee6930a231a7ff1b25750deb84f613bddee90379 (patch)
tree5cfee129760ba3d4747f029cd47872c0b92a7aa6 /Source/Core/VideoCommon/BPMemory.cpp
parent26e777d80bb125e12a4a93e0e727c804a0facd34 (diff)
parent90051536bf53f66ca0e4c46105e481e08f1642f3 (diff)
Merge pull request #6013 from stenzek/d3d-logic-op
D3D: Implement logic op support
Diffstat (limited to 'Source/Core/VideoCommon/BPMemory.cpp')
-rw-r--r--Source/Core/VideoCommon/BPMemory.cpp13
1 files changed, 13 insertions, 0 deletions
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