After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781885 - Do not rely on gl3ext.h being available when finding gl3.h
Do not rely on gl3ext.h being available when finding gl3.h
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-28 09:41 UTC by Jens Georg
Modified: 2017-05-11 10:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check for gl3ext.h existence (3.77 KB, patch)
2017-05-04 12:45 UTC, Jens Georg
none Details | Review
v2 - check for gl3ext.h existence (3.23 KB, patch)
2017-05-05 08:45 UTC, Jens Georg
needs-work Details | Review
v3 - check for gl3ext.h existence (3.22 KB, patch)
2017-05-11 08:51 UTC, Jens Georg
committed Details | Review

Description Jens Georg 2017-04-28 09:41:24 UTC
For GLES3 there is no gl3ext.h header as defined by Khronos[1]

Even though MESA is supplying an empty one, compiling gst-plugins-bad fails against OpenGL drivers that are not mesa-based and adhere to the Khronos definition to only ship gl2ext.h, even for GLES3

[1] https://www.khronos.org/registry/OpenGL/index_es.php#specs32
Comment 1 Sebastian Dröge (slomo) 2017-05-02 11:11:15 UTC
Can you propose a patch for this? And we probably still want to include a gl3ext.h header if one exists.
Comment 2 Jens Georg 2017-05-04 12:45:00 UTC
Created attachment 351045 [details] [review]
check for gl3ext.h existence
Comment 3 Matthew Waters (ystreet00) 2017-05-04 13:19:56 UTC
Review of attachment 351045 [details] [review]:

So, this could be made simpler by only checking/conditionalising for gl3ext.h and moving the GLES2/gl2ext.h out of the else.  I don't think we need to conditionalize gl2ext.h for GLES3.  It should always be there.

::: configure.ac
@@ +923,3 @@
+#   endif
+#   if $GLES3EXT2_H_DEFINE
+#     include <GLES3/gl2ext.h>

GLES2/gl2ext.h

or just remove the one below outside the #if and remove this check

@@ +1396,3 @@
+#   endif
+#   if $GST_GL_HAVE_GLES3EXT2_H
+#    include <GLES3/gl2ext.h>

ditto

::: gst-libs/gst/gl/gstglapi.h
@@ +46,3 @@
+#   endif
+#   if GST_GL_HAVE_GLES3EXT2_H
+#    include <GLES3/gl2ext.h>

ditto
Comment 4 Jens Georg 2017-05-05 07:55:17 UTC
(In reply to Matthew Waters (ystreet00) from comment #3)
> Review of attachment 351045 [details] [review] [review]:
> 
> So, this could be made simpler by only checking/conditionalising for
> gl3ext.h and moving the GLES2/gl2ext.h out of the else.  I don't think we
> need to conditionalize gl2ext.h for GLES3.  It should always be there.

Yep, I misread and didn't see that it still references GLES2, not GLES3. Will post an updated patch
Comment 5 Jens Georg 2017-05-05 08:45:17 UTC
Created attachment 351167 [details] [review]
v2 - check for gl3ext.h existence
Comment 6 Matthew Waters (ystreet00) 2017-05-05 11:40:39 UTC
Review of attachment 351167 [details] [review]:

Almost!

::: configure.ac
@@ +1383,3 @@
+#    include <GLES3/gl3ext.h>
+#   endif
+#  include <GLES2/gl2ext.h>

missing a space for indentation.

::: gst-libs/gst/gl/gstglapi.h
@@ +45,3 @@
+#    include <GLES3/gl3ext.h>
+#   endif
+#  include <GLES2/gl2ext.h>

ditto
Comment 7 Jens Georg 2017-05-11 08:51:55 UTC
Created attachment 351609 [details] [review]
v3 - check for gl3ext.h existence

I also have a patch for the meson part, but I cannot test that
Comment 8 Matthew Waters (ystreet00) 2017-05-11 10:08:44 UTC
Let's see what the buildbot's think of this.

commit 7b615e92b6be969af0ae10fb5cdf49e0f998cbda
Author: Matthew Waters <matthew@centricular.com>
Date:   Thu May 11 20:05:24 2017 +1000

    build/gl/meson: check for GLES3/gl3ext.h existence
    
    791e7522ebcb75beb31fcace271dee1342d3505d for meson
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781885

commit 791e7522ebcb75beb31fcace271dee1342d3505d
Author: Jens Georg <mail@jensge.org>
Date:   Thu May 11 10:29:58 2017 +0200

    build: Check for GLES3/gl3ext.h existence
    
    Some OpenGL drivers do not ship this but use GLES2/gl2ext.h instead.
    This is also in line with Khronos's recommendations
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781885