GPU: Allow skipping discard when write disabled.

Even if we depth test, if we don't write, we can still force alpha to
zero.
This commit is contained in:
Unknown W. Brackets committed 2018-07-27 20:16:51 -07:00
1 parent 8e49fa988c
commit 5ccd3ee4dc
1 file changed
+3 -1
+3 -1
View File
@@ -115,7 +115,9 @@ bool IsAlphaTestTriviallyTrue() {
bool NeedsTestDiscard() {
// We assume this is called only when enabled and not trivially true (may also be for color testing.)
if (gstate.isStencilTestEnabled() || gstate.isDepthTestEnabled())
if (gstate.isStencilTestEnabled() && (gstate.pmska & 0xFF) != 0xFF)
return true;
if (gstate.isDepthTestEnabled() && gstate.isDepthWriteEnabled())
return true;
if (!gstate.isAlphaBlendEnabled())
return true;