mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
vulkan: Don't attempt to free 0 command buffers
vkFreeCommandBuffers can't be called with commandBufferCount set to 0.
This commit is contained in:
parent
9e6855cdb8
commit
2f98de06bc
@ -37,10 +37,11 @@ gsk_vulkan_command_pool_new (GdkVulkanContext *context)
|
||||
static void
|
||||
gsk_vulkan_command_pool_free_buffers (GskVulkanCommandPool *self)
|
||||
{
|
||||
vkFreeCommandBuffers (gdk_vulkan_context_get_device (self->vulkan),
|
||||
self->vk_command_pool,
|
||||
self->buffers->len,
|
||||
(VkCommandBuffer *) self->buffers->pdata);
|
||||
if (self->buffers->len != 0)
|
||||
vkFreeCommandBuffers (gdk_vulkan_context_get_device (self->vulkan),
|
||||
self->vk_command_pool,
|
||||
self->buffers->len,
|
||||
(VkCommandBuffer *) self->buffers->pdata);
|
||||
|
||||
g_ptr_array_set_size (self->buffers, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user