mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-14 08:59:47 +00:00
Merge pull request #5725 from unknownbrackets/vertexalpha
Make sure vai->flags are set while hashing
This commit is contained in:
commit
69d5c759c4
@ -71,8 +71,8 @@ static bool IsAlphaTestTriviallyTrue() {
|
||||
// Non-zero check. If we have no depth testing (and thus no depth writing), and an alpha func that will result in no change if zero alpha, get rid of the alpha test.
|
||||
// Speeds up Lumines by a LOT on PowerVR.
|
||||
case GE_COMP_NOTEQUAL:
|
||||
if ((gstate_c.vertexFullAlpha && (gstate_c.textureFullAlpha || !gstate.isTextureAlphaUsed())) && gstate.getAlphaTestRef() == 255) {
|
||||
// Likely to be rare. Let's just have the alpha test take care of this instead of adding
|
||||
if (gstate.getAlphaTestRef() == 255) {
|
||||
// Likely to be rare. Let's just skip the vertexFullAlpha optimization here instead of adding
|
||||
// complicated code to discard the draw or whatnot.
|
||||
return false;
|
||||
}
|
||||
|
@ -609,6 +609,7 @@ void TransformDrawEngine::DoFlush() {
|
||||
vai->numVerts = indexGen.VertexCount();
|
||||
vai->prim = indexGen.Prim();
|
||||
vai->maxIndex = indexGen.MaxIndex();
|
||||
vai->flags = gstate_c.vertexFullAlpha ? VAI_FLAG_VERTEXFULLALPHA : 0;
|
||||
useElements = !indexGen.SeenOnlyPurePrims();
|
||||
if (!useElements && indexGen.PureCount()) {
|
||||
vai->numVerts = indexGen.PureCount();
|
||||
@ -635,14 +636,13 @@ void TransformDrawEngine::DoFlush() {
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vai->ebo);
|
||||
useElements = vai->ebo ? true : false;
|
||||
gpuStats.numCachedVertsDrawn += vai->numVerts;
|
||||
gstate_c.vertexFullAlpha = vai->flags & VAI_FLAG_VERTEXFULLALPHA;
|
||||
}
|
||||
vbo = vai->vbo;
|
||||
ebo = vai->ebo;
|
||||
vertexCount = vai->numVerts;
|
||||
maxIndex = vai->maxIndex;
|
||||
prim = static_cast<GEPrimitiveType>(vai->prim);
|
||||
|
||||
gstate_c.vertexFullAlpha = vai->flags & VAI_FLAG_VERTEXFULLALPHA;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -849,7 +849,6 @@ void VertexDecoder::DecodeVerts(u8 *decodedptr, const void *verts, int indexLowe
|
||||
jitted_(ptr_, decoded_, count);
|
||||
} else {
|
||||
// Interpret the decode steps
|
||||
// TODO: Init gstate_c.vertexFullAlpha here? Or in Setup? When is it reset?
|
||||
for (; count; count--) {
|
||||
for (int i = 0; i < numSteps_; i++) {
|
||||
((*this).*steps_[i])();
|
||||
|
Loading…
Reference in New Issue
Block a user