aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan/vk_rasterizer.cpp
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-29 05:46:59 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-29 20:49:47 -0400
commita99484f3cb6a78eed8563ac67551ab1ea0d0c0c3 (patch)
treebcaf5fce0f21fcf4b1cb18ea383a67f1396b9409 /src/video_core/renderer_vulkan/vk_rasterizer.cpp
parent77cad674e5a73cb56ba1ed5d5c97a0d99eb21159 (diff)
vulkan: dispatch to the worker every 32 draws, wake it only when it waits
Every 8 draws the GPU thread handed a command chunk to the Vulkan worker and woke it with a system call (~2% of the GPU thread at ~55,000 draws a second). Chunks now go every 32 draws (a full chunk still goes on its own), and the worker is woken only when it is waiting; a busy worker pops the queue before waiting again.
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp')
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 429b2d63ef..b5837e6a55 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -1309,8 +1309,10 @@ void RasterizerVulkan::FlushWork() {
static constexpr u32 DRAWS_TO_DISPATCH = 512;
static constexpr u32 CHECK_MASK = 3;
#else
+ // Every 32 draws (was 8): each dispatch woke the worker thread, and Switch 2 titles make
+ // ~55,000 draws a second. A full chunk is dispatched on its own (Scheduler::Record).
static constexpr u32 DRAWS_TO_DISPATCH = 4096;
- static constexpr u32 CHECK_MASK = 7;
+ static constexpr u32 CHECK_MASK = 31;
#endif // __ANDROID__
static_assert(DRAWS_TO_DISPATCH % (CHECK_MASK + 1) == 0);