Last Comment Bug 721205 - GLContext::fReadPixels uses format GL_BGRA on Android, causing GL_INVALID_OPERATION
: GLContext::fReadPixels uses format GL_BGRA on Android, causing GL_INVALID_OPE...
Product: Core
Classification: Components
Component: Canvas: WebGL (show other bugs)
: Trunk
: ARM Android
-- normal (vote)
: mozilla12
Assigned To: Jeff Gilbert [:jgilbert]
: Milan Sreckovic [:milan]
Depends on:
Blocks: 720467 724476 727311
  Show dependency treegraph
Reported: 2012-01-25 14:14 PST by Ali Juma [:ajuma]
Modified: 2012-03-09 15:25 PST (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Add correct logic for enabling BGRA readPixels for GLES (2.91 KB, patch)
2012-01-25 15:30 PST, Jeff Gilbert [:jgilbert]
jacob.benoit.1: review+
Details | Diff | Splinter Review

Description User image Ali Juma [:ajuma] 2012-01-25 14:14:00 PST
With Attachment 591529 [details] [diff], Bug 720467 applied, the WebGL demo at 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.
Comment 1 User image Jeff Gilbert [:jgilbert] 2012-01-25 15:28:36 PST
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.
Comment 2 User image Jeff Gilbert [:jgilbert] 2012-01-25 15:30:10 PST
Created attachment 591633 [details] [diff] [review]
Add correct logic for enabling BGRA readPixels for GLES
Comment 4 User image Ali Juma [:ajuma] 2012-01-26 11:49:12 PST
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.
Comment 5 User image Marco Bonardo [::mak] 2012-01-26 16:25:56 PST

Note You need to log in before you can comment on or make changes to this bug.