From 5fc7450865fce60934f26a4321292011b5d4c434 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 2 Jun 2026 08:10:44 +0200 Subject: [PATCH] Fix uninitialized members in queue_submit_t --- rpcs3/Emu/RSX/VK/vkutils/commands.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/vkutils/commands.h b/rpcs3/Emu/RSX/VK/vkutils/commands.h index 12a414405e..81f65b3573 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/commands.h +++ b/rpcs3/Emu/RSX/VK/vkutils/commands.h @@ -32,9 +32,9 @@ namespace vk VkQueue queue = VK_NULL_HANDLE; fence* pfence = nullptr; VkCommandBuffer commands = VK_NULL_HANDLE; - std::array wait_semaphores; - std::array signal_semaphores; - std::array wait_stages; + std::array wait_semaphores {}; + std::array signal_semaphores {}; + std::array wait_stages {}; u32 wait_semaphores_count = 0; u32 signal_semaphores_count = 0; @@ -49,16 +49,14 @@ namespace vk inline queue_submit_t& wait_on(VkSemaphore semaphore, VkPipelineStageFlags stage) { - ensure(wait_semaphores_count < 4); - wait_semaphores[wait_semaphores_count] = semaphore; + ::at32(wait_semaphores, wait_semaphores_count) = semaphore; wait_stages[wait_semaphores_count++] = stage; return *this; } inline queue_submit_t& queue_signal(VkSemaphore semaphore) { - ensure(signal_semaphores_count < 4); - signal_semaphores[signal_semaphores_count++] = semaphore; + ::at32(signal_semaphores, signal_semaphores_count++) = semaphore; return *this; } };