From a99484f3cb6a78eed8563ac67551ab1ea0d0c0c3 Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Thu, 29 Oct 2026 05:46:59 -0400 Subject: 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. --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp') 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); -- cgit v1.2.3