Fix fallthough bugs in isAlphaTestTriviallyTrue

This commit is contained in:
Henrik Rydgard 2013-08-24 02:16:41 +02:00
parent 507050e966
commit edb6e5a54c
2 changed files with 4 additions and 6 deletions

@ -48,8 +48,7 @@ static bool IsAlphaTestTriviallyTrue() {
case GE_COMP_ALWAYS:
return true;
case GE_COMP_GEQUAL:
if (alphaTestRef == 0)
return true;
return alphaTestRef == 0;
// This breaks the trees in MotoGP, for example.
// case GE_COMP_GREATER:
@ -57,8 +56,8 @@ static bool IsAlphaTestTriviallyTrue() {
// return true;
case GE_COMP_LEQUAL:
if (alphaTestRef == 255)
return true;
return alphaTestRef == 255;
default:
return false;
}

@ -568,10 +568,9 @@ void GLES_GPU::FastRunLoop(DisplayList &list) {
for (; downcount > 0; --downcount) {
u32 op = Memory::ReadUnchecked_U32(list.pc);
u32 cmd = op >> 24;
u8 cmdFlags = commandFlags_[cmd];
u32 diff = op ^ gstate.cmdmem[cmd];
// Inlined CheckFlushOp here to get rid of the dumpThisFrame_ check.
u8 cmdFlags = commandFlags_[cmd];
if ((cmdFlags & FLAG_FLUSHBEFORE) || (diff && (cmdFlags & FLAG_FLUSHBEFOREONCHANGE))) {
transformDraw_.Flush();
}