The default bug view has changed. See this FAQ.

GLContext::fReadPixels uses format GL_BGRA on Android, causing GL_INVALID_OPERATION

RESOLVED FIXED in mozilla12

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ajuma, Assigned: jgilbert)

Tracking

Trunk
mozilla12
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
With Attachment 591529 [details] [diff], Bug 720467 applied, the WebGL demo at http://spidergl.org/example.php?id=1 on XUL Fennec on a Nexus S causes GLContext::fReadPixels to be called with format GL_BGRA and type GL_UNSIGNED_BYTE, resulting in GL_INVALID_OPERATION.

Since that patch doesn't change the logic used to choose the format for fReadPixels, we have a bug somewhere else.
(Assignee)

Comment 1

5 years ago
According to specs for ES extensions:
EXT_bgra explicitly adds support for GL_BGRA+GL_UNSIGNED_BYTE readPixels.
EXT_read_format_bgra and IMG_read_format allow for the auxiliary format discovery for BGRA+UBYTE via GL_IMPLEMENTATION_COLOR_READ_FORMAT/TYPE.
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
(Assignee)

Comment 2

5 years ago
Created attachment 591633 [details] [diff] [review]
Add correct logic for enabling BGRA readPixels for GLES
Attachment #591633 - Flags: review?(bjacob)
Attachment #591633 - Flags: review?(bjacob) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/fccccb47213e
Target Milestone: --- → mozilla12
(Reporter)

Comment 4

5 years ago
With this patch applied, I'm still seeing the same problem. GL_IMPLEMENTATION_COLOR_READ_FORMAT and TYPE are BGRA and UNSIGNED_BYTE on this device, so it still tries to use GL_BGRA and causes a GL_INVALID_OPERATION error. So we seem to be running into a driver bug.
https://hg.mozilla.org/mozilla-central/rev/fccccb47213e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Depends on: 724476
Blocks: 727311
(Assignee)

Updated

5 years ago
Blocks: 724476
No longer depends on: 724476
You need to log in before you can comment on or make changes to this bug.