vkfullscreenaud: create the vulkan command pool upfront

Allows outside to reuse the same command buffer pool much more easily.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2470>
This commit is contained in:
Matthew Waters 2022-05-23 11:24:04 +10:00 committed by GStreamer Marge Bot
parent 32487878d9
commit 53596c2fc6

View file

@ -783,11 +783,16 @@ GstVulkanFullScreenQuad *
gst_vulkan_full_screen_quad_new (GstVulkanQueue * queue)
{
GstVulkanFullScreenQuad *self;
GError *error = NULL;
g_return_val_if_fail (GST_IS_VULKAN_QUEUE (queue), NULL);
self = g_object_new (GST_TYPE_VULKAN_FULL_SCREEN_QUAD, NULL);
self->queue = gst_object_ref (queue);
self->cmd_pool = gst_vulkan_queue_create_command_pool (queue, &error);
if (!self->cmd_pool)
GST_WARNING_OBJECT (self, "Failed to create command pool: %s",
error->message);
gst_object_ref_sink (self);