Fix uninitialized members in queue_submit_t

This commit is contained in:
Megamouse 2026-06-02 08:10:44 +02:00
parent 4ca0f0b11d
commit 5fc7450865

View File

@ -32,9 +32,9 @@ namespace vk
VkQueue queue = VK_NULL_HANDLE;
fence* pfence = nullptr;
VkCommandBuffer commands = VK_NULL_HANDLE;
std::array<VkSemaphore, 4> wait_semaphores;
std::array<VkSemaphore, 4> signal_semaphores;
std::array<VkPipelineStageFlags, 4> wait_stages;
std::array<VkSemaphore, 4> wait_semaphores {};
std::array<VkSemaphore, 4> signal_semaphores {};
std::array<VkPipelineStageFlags, 4> 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;
}
};