Glamor chooses texture format that doesn't work on Nexus 4

Bug #1493596 reported by Robert Ancell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

When Glamor generates textures it does so with format=GL_RGBA and type=GL_UNSIGNED_BYTE using glTexImage2D. However when it writes to these images it does it with format=GL_BGRA and type = GL_UNSIGNED_INT_8_8_8_8_REV using glTexSubImage2D.

This works fine on a desktop (Intel) but when running on a Nexus 4 a GL_INVALID_OPERATION is generated when calling glTexSubImage2D.

There seems to be a couple of problems:
- The format is originally GL_RGBA and then changed to GL_BGRA. glTexSubImage2D says "GL_INVALID_OPERATION is generated if the texture array has not been defined by a previous glTexImage2D or glCopyTexImage2D operation whose internalformat matches the format of glTexSubImage2D."
- type GL_UNSIGNED_INT_8_8_8_8_REV is an extension and doesn't seem to be supported on the Nexus 4.

By changing the original format to GL_RGBA (in glamor/glamor_utils.h) and the glTexSubImage2D to use format=GL_RGBA type=GL_UNSIGNED_BYTE (glamor/glamor_transfer.c) we can get this to work.

The question is - is the current Glamor code to aggressive in using extensions or should it be able to better detect which method is appropriate for each driver? Are there other issues with the X format the pixmap data is in?

Tags: mako xmir
tags: added: xmir
Changed in xorg-server (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Blocked by bug 1494240 :(

tags: added: mako
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Dropped severity. Glamor is not used by default.

Changed in xorg-server (Ubuntu):
importance: High → Medium
summary: - Glamor chooses texture format that don't work on Nexus 4
+ Glamor chooses texture format that doesn't work on Nexus 4
Changed in xorg-server (Ubuntu):
importance: Medium → Low
Changed in xorg-server (Ubuntu):
assignee: Robert Ancell (robert-ancell) → nobody
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.