mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-27 16:02:37 +00:00
graphics: count occlusion queries on the host GPU behind --occlusion-queries
This commit is contained in:
1 parent
ba0e93daac
commit
246d511568
18 files changed
+288
-14
No files matched your search
@@ -1284,6 +1284,8 @@ void RenderExecutor::ExecutePreparedDraw(uint64_t submit_id, CommandBuffer& buff
|
||||
if (!draw.IsIndexed()) {
|
||||
SetDrawDebugPhase(buffer, submit_id, draw, 0x500u);
|
||||
}
|
||||
auto& occlusion_queries = m_context.GetOcclusionQueries();
|
||||
const int32_t occlusion_query = occlusion_queries.Begin(vk_buffer);
|
||||
if (mesh_active) {
|
||||
vk_buffer.drawMeshTasksEXT(mesh_groups, draw.instance_count, 1);
|
||||
} else if (args_buffer.first == nullptr) {
|
||||
@@ -1295,6 +1297,7 @@ void RenderExecutor::ExecutePreparedDraw(uint64_t submit_id, CommandBuffer& buff
|
||||
vk_buffer.drawIndirect(args_buffer.first->Handle(), args_buffer.second,
|
||||
emit.indirect.count, emit.indirect.stride);
|
||||
}
|
||||
occlusion_queries.End(vk_buffer, occlusion_query);
|
||||
Common::DebugCounters::Add(Common::DebugCounters::Counter::Draws);
|
||||
Common::DebugCounters::Add(Common::DebugCounters::Counter::DrawInstances, draw.instance_count);
|
||||
|
||||
|
||||
Reference in new issue
Block a user