From 1fd26a226aea7794225a344f1857e24d63f2b0b5 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 31 Mar 2025 19:56:05 +0300 Subject: [PATCH] vk: Optimize heap check iterator - Significant boost in some scenarios --- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 04c49bc17c..85c23785c7 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -1161,9 +1161,9 @@ void VKGSRender::check_heap_status(u32 flags) else { heap_critical = false; - u32 test = 1u << std::countr_zero(flags); do { + const u32 test = 1u << std::countr_zero(flags); switch (flags & test) { case 0: @@ -1203,7 +1203,6 @@ void VKGSRender::check_heap_status(u32 flags) } flags &= ~test; - test <<= 1; } while (flags && !heap_critical); }