Fix uninitialized members in queue_submit_t
This commit is contained in:
@@ -32,9 +32,9 @@ namespace vk
|
|||||||
VkQueue queue = VK_NULL_HANDLE;
|
VkQueue queue = VK_NULL_HANDLE;
|
||||||
fence* pfence = nullptr;
|
fence* pfence = nullptr;
|
||||||
VkCommandBuffer commands = VK_NULL_HANDLE;
|
VkCommandBuffer commands = VK_NULL_HANDLE;
|
||||||
std::array<VkSemaphore, 4> wait_semaphores;
|
std::array<VkSemaphore, 4> wait_semaphores {};
|
||||||
std::array<VkSemaphore, 4> signal_semaphores;
|
std::array<VkSemaphore, 4> signal_semaphores {};
|
||||||
std::array<VkPipelineStageFlags, 4> wait_stages;
|
std::array<VkPipelineStageFlags, 4> wait_stages {};
|
||||||
u32 wait_semaphores_count = 0;
|
u32 wait_semaphores_count = 0;
|
||||||
u32 signal_semaphores_count = 0;
|
u32 signal_semaphores_count = 0;
|
||||||
|
|
||||||
@@ -49,16 +49,14 @@ namespace vk
|
|||||||
|
|
||||||
inline queue_submit_t& wait_on(VkSemaphore semaphore, VkPipelineStageFlags stage)
|
inline queue_submit_t& wait_on(VkSemaphore semaphore, VkPipelineStageFlags stage)
|
||||||
{
|
{
|
||||||
ensure(wait_semaphores_count < 4);
|
::at32(wait_semaphores, wait_semaphores_count) = semaphore;
|
||||||
wait_semaphores[wait_semaphores_count] = semaphore;
|
|
||||||
wait_stages[wait_semaphores_count++] = stage;
|
wait_stages[wait_semaphores_count++] = stage;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline queue_submit_t& queue_signal(VkSemaphore semaphore)
|
inline queue_submit_t& queue_signal(VkSemaphore semaphore)
|
||||||
{
|
{
|
||||||
ensure(signal_semaphores_count < 4);
|
::at32(signal_semaphores, signal_semaphores_count++) = semaphore;
|
||||||
signal_semaphores[signal_semaphores_count++] = semaphore;
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user