mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Avoid optimizing out both constant colors.
This commit is contained in:
parent
a4780f5199
commit
2df1db4c7e
1 changed files with 12 additions and 3 deletions
|
@ -236,9 +236,18 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
|
||||||
glstate.blendColor.set(blendColor);
|
glstate.blendColor.set(blendColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (constantAlpha < 1.0f) {
|
} else {
|
||||||
const float blendColor[4] = {1.0f, 1.0f, 1.0f, constantAlpha};
|
// We optimized both, but that's probably not necessary, so let's pick one to be constant.
|
||||||
glstate.blendColor.set(blendColor);
|
// For now let's just pick whichever was fixed instead of checking error.
|
||||||
|
if (blendFuncA == GE_SRCBLEND_FIXA) {
|
||||||
|
glBlendFuncA = GL_CONSTANT_COLOR;
|
||||||
|
const float blendColor[4] = {fixA.x, fixA.y, fixA.z, constantAlpha};
|
||||||
|
glstate.blendColor.set(blendColor);
|
||||||
|
} else {
|
||||||
|
glBlendFuncB = GL_CONSTANT_COLOR;
|
||||||
|
const float blendColor[4] = {fixB.x, fixB.y, fixB.z, constantAlpha};
|
||||||
|
glstate.blendColor.set(blendColor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (constantAlpha < 1.0f) {
|
} else if (constantAlpha < 1.0f) {
|
||||||
const float blendColor[4] = {1.0f, 1.0f, 1.0f, constantAlpha};
|
const float blendColor[4] = {1.0f, 1.0f, 1.0f, constantAlpha};
|
||||||
|
|
Loading…
Add table
Reference in a new issue