GNOME Bugzilla – Bug 786568
Build failure due to missing GL_BGRA definition on GLES2
Last modified: 2017-08-21 14:32:19 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
Created attachment 358068 [details] [review] cogl: Only do the swizzling hack for GL contexts Patch proposal, as discussed with Carlos on IRC
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 on attachment 358073 [details] [review] cogl: Only do the swizzling hack for GL contexts Looks correct to me, thanks!
Thanks, fix landed in master now: https://git.gnome.org/browse/mutter/commit/?id=483ed987