Bug 196200 - [Texmap][GStreamer]: Map video frames as early as possible and wait via GL sync meta before using texture ids
Summary: [Texmap][GStreamer]: Map video frames as early as possible and wait via GL sy...
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 196966
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-25 04:02 PDT by Víctor M. Jáquez L.
Modified: 2019-06-27 06:46 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Víctor M. Jáquez L. 2019-03-25 04:02:54 PDT
This report is inspired on https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/b5aa304f201d0805de2b33ab97d293654baa12cd?merge_request_iid=156

We should fence [1] the texture to render in its internal GL context, and wait [2] for its rendering in our application GL context, otherwise the GL pipeline could be working on the texture when painting it.

1. https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glFenceSync.xhtml
2. https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glWaitSync.xhtml
Comment 1 Víctor M. Jáquez L. 2019-04-15 11:02:54 PDT
Well, I guess this enhancement doesn't make much sense since it uses OpenGL API 3.5 while webkitgtk uses 3.0
Comment 2 Philippe Normand 2019-06-19 09:43:27 PDT
Could this be useful for WPE though?
Comment 3 Philippe Normand 2019-06-20 01:20:17 PDT
For EGL there's an equiivalent but it doesn't seem to be supported in GStreamer:

https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt
Comment 4 Víctor M. Jáquez L. 2019-06-20 02:48:52 PDT
(In reply to Philippe Normand from comment #3)
> For EGL there's an equiivalent but it doesn't seem to be supported in
> GStreamer:
> 
> https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt

If I understand correctly, at least in i915, the implementation is the same for  both 

https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/mesa/drivers/dri/i915/intel_syncobj.c#L30

And in another spec I read that the glFenceSync spec is newer, thus it is expected to cover the EGL usage.
Comment 5 Víctor M. Jáquez L. 2019-06-27 06:45:40 PDT
Reopening because it's required for other context, specially on EGL.