GPU: Fix skip buffer effects rendering.

Broken by blue-to-alpha changes.  Without calling SetRenderFramebuffer, we
were never reconsidering the initial SKIPDRAW_NON_DISPLAYED_FB flag and
all drawing was getting skipped.
This commit is contained in:
Unknown W. Brackets 2022-05-22 12:24:03 -07:00
parent 4c6f6b63dd
commit a60d27a4f3

View file

@ -1637,15 +1637,6 @@ void GPUCommon::Execute_Prim(u32 op, u32 diff) {
// We store it in the cache so it can be modified for blue-to-alpha, next.
gstate_c.framebufFormat = gstate.FrameBufFormat();
if (gstate_c.skipDrawReason & (SKIPDRAW_SKIPFRAME | SKIPDRAW_NON_DISPLAYED_FB)) {
// Rough estimate, not sure what's correct.
cyclesExecuted += EstimatePerVertexCost() * count;
if (gstate.isModeClear()) {
gpuStats.numClears++;
}
return;
}
if (!Memory::IsValidAddress(gstate_c.vertexAddr)) {
ERROR_LOG(G3D, "Bad vertex address %08x!", gstate_c.vertexAddr);
return;
@ -1669,6 +1660,16 @@ void GPUCommon::Execute_Prim(u32 op, u32 diff) {
vfb->usageFlags |= FB_USAGE_BLUE_TO_ALPHA;
}
// Must check this after SetRenderFrameBuffer so we know SKIPDRAW_NON_DISPLAYED_FB.
if (gstate_c.skipDrawReason & (SKIPDRAW_SKIPFRAME | SKIPDRAW_NON_DISPLAYED_FB)) {
// Rough estimate, not sure what's correct.
cyclesExecuted += EstimatePerVertexCost() * count;
if (gstate.isModeClear()) {
gpuStats.numClears++;
}
return;
}
void *verts = Memory::GetPointerUnchecked(gstate_c.vertexAddr);
void *inds = nullptr;
u32 vertexType = gstate.vertType;