mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
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:
parent
8e49fa988c
commit
5ccd3ee4dc
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue