<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>196200</bug_id>
          
          <creation_ts>2019-03-25 04:02:54 -0700</creation_ts>
          <short_desc>[Texmap][GStreamer]: Map video frames as early as possible and wait via GL sync meta before using texture ids</short_desc>
          <delta_ts>2019-06-27 06:46:02 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=132869</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>196966</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Víctor M. Jáquez L.">vjaquez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>pnormand</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1520835</commentid>
    <comment_count>0</comment_count>
    <who name="Víctor M. Jáquez L.">vjaquez</who>
    <bug_when>2019-03-25 04:02:54 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1527256</commentid>
    <comment_count>1</comment_count>
    <who name="Víctor M. Jáquez L.">vjaquez</who>
    <bug_when>2019-04-15 11:02:54 -0700</bug_when>
    <thetext>Well, I guess this enhancement doesn&apos;t make much sense since it uses OpenGL API 3.5 while webkitgtk uses 3.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1546092</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-06-19 09:43:27 -0700</bug_when>
    <thetext>Could this be useful for WPE though?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1546466</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-06-20 01:20:17 -0700</bug_when>
    <thetext>For EGL there&apos;s an equiivalent but it doesn&apos;t seem to be supported in GStreamer:

https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_fence_sync.txt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1546485</commentid>
    <comment_count>4</comment_count>
    <who name="Víctor M. Jáquez L.">vjaquez</who>
    <bug_when>2019-06-20 02:48:52 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #3)
&gt; For EGL there&apos;s an equiivalent but it doesn&apos;t seem to be supported in
&gt; GStreamer:
&gt; 
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1548467</commentid>
    <comment_count>5</comment_count>
    <who name="Víctor M. Jáquez L.">vjaquez</who>
    <bug_when>2019-06-27 06:45:40 -0700</bug_when>
    <thetext>Reopening because it&apos;s required for other context, specially on EGL.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>