mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
glsyncmeta: ensure that the Fence is going to be executed
Otherwise it could stay client side without being submitted to the GL server resulting in another context waiting on a Fence that will never become signalled causing a deadlock.
This commit is contained in:
parent
62c2d98c52
commit
18b9519a66
1 changed files with 1 additions and 5 deletions
|
@ -68,9 +68,8 @@ _set_sync_point (GstGLContext * context, GstGLSyncMeta * sync_meta)
|
||||||
gl->DeleteSync (sync_meta->glsync);
|
gl->DeleteSync (sync_meta->glsync);
|
||||||
sync_meta->glsync = gl->FenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
sync_meta->glsync = gl->FenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||||
GST_LOG ("setting sync object %p", sync_meta->glsync);
|
GST_LOG ("setting sync object %p", sync_meta->glsync);
|
||||||
} else {
|
|
||||||
gl->Flush ();
|
|
||||||
}
|
}
|
||||||
|
gl->Flush ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -100,9 +99,6 @@ _wait (GstGLContext * context, GstGLSyncMeta * sync_meta)
|
||||||
void
|
void
|
||||||
gst_gl_sync_meta_wait (GstGLSyncMeta * sync_meta, GstGLContext * context)
|
gst_gl_sync_meta_wait (GstGLSyncMeta * sync_meta, GstGLContext * context)
|
||||||
{
|
{
|
||||||
if (sync_meta->context == context)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (sync_meta->glsync) {
|
if (sync_meta->glsync) {
|
||||||
gst_gl_context_thread_add (context,
|
gst_gl_context_thread_add (context,
|
||||||
(GstGLContextThreadFunc) _wait, sync_meta);
|
(GstGLContextThreadFunc) _wait, sync_meta);
|
||||||
|
|
Loading…
Reference in a new issue