summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2025-04-03 21:55:41 +0200
committerGitHub <noreply@github.com>2025-04-03 21:55:41 +0200
commitdadbd2f9fb3fd032672781c23c7466231e19346b (patch)
tree10f3beb68c65d3835821d15216b036018b658b9d /Source/Core/VideoCommon
parent61ab662733b8859f1e7d0712a536190234bea03f (diff)
parentec36fce7c6b1b3920a054b3da971b84459de6179 (diff)
Merge pull request #13479 from iwubcode/mali_draw_fix
VideoCommon: fix a mali draw bug that causes crashes in some games
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp
index 7987887b86..64246df904 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.cpp
+++ b/Source/Core/VideoCommon/VertexManagerBase.cpp
@@ -644,9 +644,6 @@ void VertexManagerBase::Flush()
// Same with GPU texture decoding, which uses compute shaders.
g_texture_cache->BindTextures(used_textures, samplers);
- if (PerfQueryBase::ShouldEmulate())
- g_perf_query->EnableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
-
if (!skip)
{
UpdatePipelineConfig();
@@ -668,15 +665,9 @@ void VertexManagerBase::Flush()
}
}
- // Track the total emulated state draws
- INCSTAT(g_stats.this_frame.num_draw_calls);
-
// Even if we skip the draw, emulated state should still be impacted
OnDraw();
- if (PerfQueryBase::ShouldEmulate())
- g_perf_query->DisableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
-
// The EFB cache is now potentially stale.
g_framebuffer_manager->FlagPeekCacheAsOutOfDate();
}
@@ -1098,7 +1089,16 @@ void VertexManagerBase::RenderDrawCall(
base_vertex <<= 2;
}
+ if (PerfQueryBase::ShouldEmulate())
+ g_perf_query->EnableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
+
DrawCurrentBatch(base_index, m_index_generator.GetIndexLen(), base_vertex);
+
+ // Track the total emulated state draws
+ INCSTAT(g_stats.this_frame.num_draw_calls);
+
+ if (PerfQueryBase::ShouldEmulate())
+ g_perf_query->DisableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
}
const AbstractPipeline* VertexManagerBase::GetCustomPipeline(