mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 14:00:03 +00:00
Avoid optimizing out both constant colors.
This commit is contained in:
parent
a4780f5199
commit
2df1db4c7e
@ -236,9 +236,18 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
|
||||
glstate.blendColor.set(blendColor);
|
||||
}
|
||||
}
|
||||
} else if (constantAlpha < 1.0f) {
|
||||
const float blendColor[4] = {1.0f, 1.0f, 1.0f, constantAlpha};
|
||||
glstate.blendColor.set(blendColor);
|
||||
} else {
|
||||
// We optimized both, but that's probably not necessary, so let's pick one to be constant.
|
||||
// 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) {
|
||||
const float blendColor[4] = {1.0f, 1.0f, 1.0f, constantAlpha};
|
||||
|
Loading…
Reference in New Issue
Block a user