Commit graph

16 commits

Author SHA1 Message Date
Sebastian Dröge
316c2c3418 glsyncmeta: Actually return the newly created meta from gst_buffer_add_gl_sync_meta()
gstglsyncmeta.c  -fPIC -DPIC -o .libs/libgstgl_1.0_la-gstglsyncmeta.o
gstglsyncmeta.c: In function 'gst_buffer_add_gl_sync_meta':
gstglsyncmeta.c:131:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
2017-12-09 19:32:11 +00:00
Matthew Waters
0e404ae3fc glsyncmeta: add vfuncs for all operations
there could be other ways/requirements for synchronising two GPU command
streams (whether GL or platform specific).

e.g. glfencesync/eglwaitnative/cond/etc
2017-12-09 19:32:11 +00:00
Matthew Waters
06de6998e5 gl: be consistent in gobject boilerpate
GST_GL_IS_* vs GST_IS_GL_*

git grep -l 'GST_GL_IS_' | xargs sed -i 's/GST_GL_IS_/GST_IS_GL_/g'
2017-12-09 19:32:09 +00:00
Matthew Waters
9f9e0e87cf gl/syncmeta: implement synchronisation without glFenceSync
Uses glFinish as that's the best we have for lesser OpenGL versions.
2017-12-09 19:32:07 +00:00
Hyunjun Ko
f67eb2571d glsyncmeta: transform func: return FALSE if not supported or failed
https://bugzilla.gnome.org/show_bug.cgi?id=751778
2017-12-09 19:32:05 +00:00
Jan Schmidt
f6a102c3e5 glsyncmeta: Set new sync point when copying
Set a new sync point when copying instead of
transferring the (non-refcounted) GL sync object
from the source meta.

https://bugzilla.gnome.org/show_bug.cgi?id=750279
2017-12-09 19:32:03 +00:00
Jan Schmidt
7a288b0189 glsyncmeta: Add some debug output 2017-12-09 19:32:03 +00:00
Matthew Waters
18b9519a66 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.
2017-12-09 19:32:01 +00:00
Matthew Waters
5216434678 glsyncmeta: fixup size declaration 2017-12-09 19:32:00 +00:00
Matthew Waters
93968916a4 glsyncmeta: make context to wait and set sync explicit
otherwise we may wait on a sync object in same context by accident
2017-12-09 19:31:58 +00:00
Matthew Waters
5acb75cdf4 glsyncmeta: add compat definition for gles2 2017-12-09 19:31:55 +00:00
Matthew Waters
844c0e77ee glsyncmeta: also supported with gles3 2017-12-09 19:31:55 +00:00
Matthew Waters
572265206c glsyncmeta: don't use the gst debug object variants
We are not a GObject or any inferable GstMiniObject supported by
the gst debug system.  Also fixes a segfault.
2017-12-09 19:31:54 +00:00
Matthew Waters
81a470905b glsync: fix build with desktop gl 2017-12-09 19:31:51 +00:00
Matthew Waters
3be1edc634 gl: fix various build errors without desktop gl 2017-12-09 19:31:51 +00:00
Matthew Waters
6bb113f685 gl: add a sync meta for synchronizing across GL contexts
A context can create a GLsync object that can be waited on in order
to ensure that GL resources created in one context are able to be
used in another shared context without any chance of reading invalid
data.

This meta would be placed on buffers that are known to cross from
one context to another.  The receiving element would then wait
on the sync object to ensure that the data to be used is complete.
2017-12-09 19:31:51 +00:00