Bug 92247

Summary: weston: black surfaces with mesa 11.0.2
Product: Wayland Reporter: Olivier Fourdan <fourdan>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Olivier Fourdan 2015-10-02 14:43:15 UTC
Weston 1.9.0 build with mesa 11.0.2 shows all surfaces as black squares. Reverting to mesa 11.0.1 works OK.

A bisect revealed that the problem started showing up with this commit in mesa:

    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f15a7f3

Weston uses GL_BGRA_EXT/GL_UNSIGNED_BYTE as format/type for textures and this is now rejected as invalid by mesa with this commit.

But according to GLES spec 3.0.4, section 3.8 texturing, page 127 (ie page 140 in this pdf https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.4.pdf) there is no indication of neither GL_BGRA or GL_BGRA_EXT being valid, so mesa seems right to reject it.

Using a valid GL_RGBA/GL_UNSIGNED_BYTE is not rejected but obviously does not show the right colors.
Comment 1 Link Mauve 2015-10-02 15:24:27 UTC
If GL_EXT_texture_format_BGRA8888 is enabled, then GL_BGRA_EXT is a valid format token alongside GL_UNSIGNED_BYTE type, so this would be a Mesa bug which doesn’t handle that extension in the place you pointed.
Comment 2 Pekka Paalanen 2015-10-05 06:52:59 UTC
Even though #92265 was filed after this one, it has already been reassigned to Mesa core and has some discussion going, so I'm marking this as a duplicate of that.

*** This bug has been marked as a duplicate of bug 92265 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.