rjx-mirror/Ryujinx.Graphics.Vulkan/Queries
riperiperi e7cf4e6eaf
Vulkan: Reset queries on same command buffer (#4329)
* Reset queries on same command buffer

Vulkan seems to complain when the queries are reset on another command buffer. No idea why, the spec really could be written better in this regard. This fixes complaints, and hopefully any implementations that care extensively about them.

This change _guesses_ how many queries need to be reset and resets as many as possible at the same time to avoid splitting render passes. If it resets too many queries, we didn't waste too much time - if it runs out of resets it will batch reset 10 more.

The number of queries reset is the maximum number of queries in the last 3 frames. This has been worked into the AutoFlushCounter so that it only resets up to 32 if it is yet to force a command buffer submission in this attachment.

This is only done for samples passed queries right now, as they have by far the most resets.

* Address Feedback
2023-01-24 13:32:56 -03:00
..
BufferedQuery.cs Vulkan: Reset queries on same command buffer (#4329) 2023-01-24 13:32:56 -03:00
CounterQueue.cs Vulkan: Reset queries on same command buffer (#4329) 2023-01-24 13:32:56 -03:00
CounterQueueEvent.cs Vulkan: Reset queries on same command buffer (#4329) 2023-01-24 13:32:56 -03:00
Counters.cs Vulkan: Reset queries on same command buffer (#4329) 2023-01-24 13:32:56 -03:00