Special case for GL_ZERO blend factor too. Don't log on "sync".

This commit is contained in:
Henrik Rydgard 2012-11-25 17:47:33 +01:00
parent 2f39496ec5
commit c0075d8322
2 changed files with 11 additions and 5 deletions

View file

@ -152,7 +152,7 @@ namespace MIPSInt
void Int_Sync(u32 op) void Int_Sync(u32 op)
{ {
DEBUG_LOG(CPU, "sync"); //DEBUG_LOG(CPU, "sync");
PC += 4; PC += 4;
} }

View file

@ -572,11 +572,17 @@ void TransformAndDrawPrim(void *verts, void *inds, int prim, int vertexCount, Li
u32 fixA = gstate.getFixA(); u32 fixA = gstate.getFixA();
u32 fixB = gstate.getFixB(); u32 fixB = gstate.getFixB();
// Shortcut by using GL_ONE where possible, no need to set blendcolor // Shortcut by using GL_ONE where possible, no need to set blendcolor
if (!glBlendFuncA && blendFuncA == GE_SRCBLEND_FIXA && fixA == 0xFFFFFF) { if (!glBlendFuncA && blendFuncA == GE_SRCBLEND_FIXA) {
glBlendFuncA = GL_ONE; if (fixA == 0xFFFFFF)
glBlendFuncA = GL_ONE;
else if (fixA == 0)
glBlendFuncA = GL_ZERO;
} }
if (!glBlendFuncB && blendFuncB == GE_DSTBLEND_FIXB && fixB == 0xFFFFFF) { if (!glBlendFuncB && blendFuncB == GE_DSTBLEND_FIXB) {
glBlendFuncB = GL_ONE; if (fixB == 0xFFFFFF)
glBlendFuncB = GL_ONE;
else if (fixB == 0)
glBlendFuncB = GL_ZERO;
} }
if (!glBlendFuncA && glBlendFuncB) { if (!glBlendFuncA && glBlendFuncB) {
// Can use blendcolor trivially. // Can use blendcolor trivially.