zero alpha if stencil op consistently says to zero for format 5551 as well

This commit is contained in:
raven02 committed 2013-12-08 22:05:31 +08:00
1 parent 68e5dbf517
commit ed07a7f411
1 file changed
+13 -1
+13 -1
View File
@@ -149,9 +149,15 @@ StencilValueType ReplaceAlphaWithStencilType() {
case GE_STENCILOP_REPLACE:
return (gstate.getStencilTestRef() & 0x80) != 0 ? STENCIL_VALUE_ONE : STENCIL_VALUE_ZERO;
case GE_STENCILOP_ZERO:
if (gstate.getStencilOpZFail() == GE_STENCILOP_ZERO) {
return STENCIL_VALUE_ZERO;
} else {
return STENCIL_VALUE_KEEP;
}
// Decrementing always zeros, since there's only one bit.
case GE_STENCILOP_DECR:
case GE_STENCILOP_ZERO:
return STENCIL_VALUE_ZERO;
// Incrementing always fills, since there's only one bit.
@@ -182,9 +188,15 @@ StencilValueType ReplaceAlphaWithStencilType() {
// Decrementing always zeros, since there's only one bit.
case GE_STENCILOP_DECR:
return STENCIL_VALUE_ZERO;
// Incrementing always fills, since there's only one bit.
case GE_STENCILOP_INCR:
return STENCIL_VALUE_ONE;
case GE_STENCILOP_INVERT:
return STENCIL_VALUE_UNKNOWN;
case GE_STENCILOP_KEEP:
return STENCIL_VALUE_KEEP;
}