For 5551 buffers, force stencil mask to 1/0.

4444 it would also be ideal to spread the bits, but that gets a bit
complicated.  5650 probably doesn't matter.
This commit is contained in:
Unknown W. Brackets 2015-02-22 19:11:11 -08:00
parent 9489f80a46
commit 9d5ae2b336

View File

@ -693,7 +693,12 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
glstate.stencilOp.set(stencilOps[gstate.getStencilOpSFail()], // stencil fail
stencilOps[gstate.getStencilOpZFail()], // depth fail
stencilOps[gstate.getStencilOpZPass()]); // depth pass
glstate.stencilMask.set(~abits);
if (gstate.FrameBufFormat() == GE_FORMAT_5551) {
glstate.stencilMask.set(abits <= 0x7f ? 0xff : 0x00);
} else {
glstate.stencilMask.set(~abits);
}
} else {
glstate.stencilTest.disable();
}