Add !(gstate.zmsk & 1); to depthMask and remove duplicate GE_CMD_MATERIALUPDATE (exists in line69)

This commit is contained in:
raven02 2013-02-24 13:48:09 +08:00
parent 24ff143158
commit 24debfd259
2 changed files with 7 additions and 7 deletions

View File

@ -48,9 +48,11 @@ static const u8 flushOnChangedBeforeCommandList[] = {
GE_CMD_TEXSCALEU,
GE_CMD_TEXSCALEV,
GE_CMD_CULLFACEENABLE,
GE_CMD_CULL,
GE_CMD_TEXTUREMAPENABLE,
GE_CMD_LIGHTINGENABLE,
GE_CMD_FOGENABLE,
GE_CMD_DITHERENABLE,
GE_CMD_ALPHABLENDENABLE,
GE_CMD_ALPHATESTENABLE,
GE_CMD_ALPHATEST,
@ -97,9 +99,7 @@ static const u8 flushOnChangedBeforeCommandList[] = {
GE_CMD_VIEWPORTX2,GE_CMD_VIEWPORTY2,
GE_CMD_VIEWPORTZ1,GE_CMD_VIEWPORTZ2,
GE_CMD_LIGHTENABLE0,GE_CMD_LIGHTENABLE1,GE_CMD_LIGHTENABLE2,GE_CMD_LIGHTENABLE3,
GE_CMD_CULL,
GE_CMD_PATCHDIVISION,
GE_CMD_MATERIALUPDATE,
GE_CMD_CLEARMODE,
GE_CMD_TEXMAPMODE,
GE_CMD_TEXSHADELS,
@ -523,6 +523,7 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) {
break;
case GE_CMD_CULLFACEENABLE:
case GE_CMD_CULL:
break;
case GE_CMD_TEXTUREMAPENABLE:
@ -785,9 +786,6 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) {
case GE_CMD_LIGHTENABLE3:
break;
case GE_CMD_CULL:
break;
case GE_CMD_SHADEMODE:
break;
@ -817,6 +815,8 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) {
case GE_CMD_ALPHATESTENABLE:
case GE_CMD_COLORTESTENABLE:
case GE_CMD_COLORTEST:
case GE_CMD_COLORTESTMASK:
// This is done in the shader.
break;

View File

@ -166,8 +166,8 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
if (gstate.isModeClear()) {
bool colorMask = (gstate.clearmode >> 8) & 1;
bool alphaMask = (gstate.clearmode >> 9) & 1;
bool depthMask = (gstate.clearmode >> 10) & 1;
bool depthMask = ((gstate.clearmode >> 10) & 1) || !(gstate.zmsk & 1);
glstate.colorMask.set(colorMask, colorMask, colorMask, alphaMask);
glstate.stencilTest.enable();