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 786568 - Build failure due to missing GL_BGRA definition on GLES2
Build failure due to missing GL_BGRA definition on GLES2
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-08-21 11:27 UTC by Mario Sánchez Prada
Modified: 2017-08-21 14:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cogl: Only do the swizzling hack for GL contexts (1.77 KB, patch)
2017-08-21 11:39 UTC, Mario Sánchez Prada
none Details | Review
cogl: Only do the swizzling hack for GL contexts (1.86 KB, patch)
2017-08-21 13:42 UTC, Mario Sánchez Prada
accepted-commit_now Details | Review

Description Mario Sánchez Prada 2017-08-21 11:27:36 UTC
On our ARM build with GLES2 enabled, we are getting this:

  driver/gl/cogl-framebuffer-gl.c: In function '_cogl_framebuffer_gl_read_pixels_into_bitmap':
  driver/gl/cogl-framebuffer-gl.c:1428:17: error: 'GL_BGRA' undeclared (first use in this function)
       gl_format = GL_BGRA;
                   ^~~~~~~
  driver/gl/cogl-framebuffer-gl.c:1428:17: note: each undeclared identifier is reported only once for each function it appears in
  Makefile:1358: recipe for target 'driver/gl/cogl-framebuffer-gl.lo' failed
  make[7]: *** [driver/gl/cogl-framebuffer-gl.lo] Error 1

Looks like the problem is that GL_BGRA is not defined on GLES2 contexts, which use GL_BGRA_EXT instead if the EXT_texture_format_BGRA8888 extension is available: https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt
Comment 1 Mario Sánchez Prada 2017-08-21 11:39:05 UTC
Created attachment 358068 [details] [review]
cogl: Only do the swizzling hack for GL contexts

Patch proposal, as discussed with Carlos on IRC
Comment 2 Mario Sánchez Prada 2017-08-21 13:42:31 UTC
Created attachment 358073 [details] [review]
cogl: Only do the swizzling hack for GL contexts

New patchm adding extra checks for the GL and GL3 drivers
Comment 3 Carlos Garnacho 2017-08-21 13:55:44 UTC
Comment on attachment 358073 [details] [review]
cogl: Only do the swizzling hack for GL contexts

Looks correct to me, thanks!
Comment 4 Mario Sánchez Prada 2017-08-21 14:32:19 UTC
Thanks, fix landed in master now:
https://git.gnome.org/browse/mutter/commit/?id=483ed987