Skip to content

Commit

Permalink
Merge pull request #10 from riperiperi/perf/query-queue
Browse files Browse the repository at this point in the history
Vulkan: Enumerate Query Pool properly
  • Loading branch information
ryzendew authored Jan 24, 2024
2 parents b751ead + 961e73f commit 5dcad74
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,18 @@ public void ResetFutureCounters(CommandBuffer cmd, int count)
lock (_queryPool)
{
count = Math.Min(count, _queryPool.Count);
for (int i = 0; i < count; i++)

if (count > 0)
{
_queryPool.ElementAt(i).PoolReset(cmd, ResetSequence);
foreach (BufferedQuery query in _queryPool)
{
query.PoolReset(cmd, ResetSequence);

if (--count == 0)
{
break;
}
}
}
}
}
Expand Down

0 comments on commit 5dcad74

Please sign in to comment.