Closed
Bug 728724
Opened 13 years ago
Closed 13 years ago
BGRA glReadPixels throws error on PowerVR SGX540
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: joe, Assigned: jgilbert)
References
Details
Attachments
(1 file, 1 obsolete file)
5.21 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
Bug 727311 discovered that WebGL in readback mode didn't work on the Nexus S and the Galaxy Nexus. The OES_read_format spec[1] says that
The preferred type and format combination returned may depend
on the read surface bound to the current GL context.
I suspect this is what is biting us; we query the preferred type and format before we've bound our offscreen framebuffer.
For now, BGRA support is disabled altogether. It'd be nice to be able to use it where it actually works, though.
1. http://www.khronos.org/registry/gles/extensions/OES/OES_read_format.txt
Assignee | ||
Comment 1•13 years ago
|
||
A note that OES_read_format is not strictly relevant to GLES2, since that behavior has been folded into core. The behavior should be the same though. (Unfortunately, the GLES2 spec is even less well worded than the extension)
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #599385 -
Flags: review?(bjacob)
Reporter | ||
Comment 3•13 years ago
|
||
Comment on attachment 599385 [details] [diff] [review]
Check valid read formats before readPixels
We should use GetOptimalReadFormats when creating framebuffers too, since we use RGBA by default all over the place when creating FBOs.
Comment 4•13 years ago
|
||
Comment on attachment 599385 [details] [diff] [review]
Check valid read formats before readPixels
Review of attachment 599385 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with this comment:
::: gfx/gl/GLContext.cpp
@@ +1707,5 @@
>
> +static void
> +GetOptimalReadFormats(GLContext* gl, GLenum& format, GLenum& type) {
> + if (gl->IsGLES2()) {
> + bool hasBGRA_UBtye = false;
Typo: Btye -> Byte. Also, a _ after 'has' would be nice.
Attachment #599385 -
Flags: review?(bjacob) → review+
Assignee | ||
Comment 5•13 years ago
|
||
Fixed and r+ carried forward.
Attachment #599385 -
Attachment is obsolete: true
Attachment #599777 -
Flags: review+
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to Joe Drew (:JOEDREW!) from comment #3)
> Comment on attachment 599385 [details] [diff] [review]
> Check valid read formats before readPixels
>
> We should use GetOptimalReadFormats when creating framebuffers too, since we
> use RGBA by default all over the place when creating FBOs.
We can do this, but it's slightly different. All this stuff is only relevant to readPixels. For FBOs, we are working with textures, so we need a different set of extensions. For textures, there is also no hint which would be faster. We could bank on BGRA always being faster, but I don't know as this is a safe bet. Perhaps this is a good thing to blocklist for?
As an aside, ANGLE uses BGRA internally even if you request RGBA.
Assignee | ||
Comment 7•13 years ago
|
||
Bug for BGRA-texture-backed FBOs is up at bug 729726.
Assignee | ||
Comment 8•13 years ago
|
||
Target Milestone: --- → mozilla13
Comment 9•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•