mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +00:00
vulkan/operation: get query only if a operation is submitted
To avoid a validation error if get query is performed before. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5591>
This commit is contained in:
parent
3464710bf0
commit
0296c8a53a
1 changed files with 4 additions and 1 deletions
|
@ -61,6 +61,7 @@ struct _GstVulkanOperationPrivate
|
|||
gsize query_data_size;
|
||||
gsize query_data_stride;
|
||||
gpointer query_data;
|
||||
gboolean op_submitted;
|
||||
|
||||
gboolean has_sync2;
|
||||
gboolean has_video;
|
||||
|
@ -548,6 +549,8 @@ gst_vulkan_operation_end (GstVulkanOperation * self, GError ** error)
|
|||
g_clear_pointer (&priv->barriers, g_array_unref);
|
||||
self->cmd_buf = NULL;
|
||||
|
||||
priv->op_submitted = TRUE;
|
||||
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
|
||||
gst_vulkan_operation_discard_dependencies (self);
|
||||
|
@ -1281,7 +1284,7 @@ gst_vulkan_operation_get_query (GstVulkanOperation * self, gpointer * result,
|
|||
g_return_val_if_fail (GST_IS_VULKAN_OPERATION (self), FALSE);
|
||||
|
||||
priv = GET_PRIV (self);
|
||||
if (!priv->query_pool || !priv->query_data)
|
||||
if (!priv->query_pool || !priv->query_data || !priv->op_submitted)
|
||||
return TRUE;
|
||||
|
||||
#if GST_VULKAN_HAVE_VIDEO_EXTENSIONS
|
||||
|
|
Loading…
Reference in a new issue