Closed Bug 747598 Opened 12 years ago Closed 12 years ago

ReadPixels supports all sorts of formats and types we should not support per spec

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bzbarsky, Unassigned)

References

Details

(Whiteboard: webgl-conformance)

Per spec, we should only support format=RGBA, type=UNSIGNED_BYTE.

Please don't fix this until I'm done with bug 745897!  I'd prefer to avoid the merge pain.
Have you tested this? It should probably be earlier in the function, but we should be checking this here:
http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/WebGLContextGL.cpp#3452
No, I hadn't tested; the bug was based on (somewhat cursory) code inspection.

I agree that the code you link to means the bug as filed is invalid.  I still think the function is confusing and we could remove a bunch of code in it if we did the check earlier; please feel free to reopen and morph if that's desired!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
This test already covers it well (see "check disallowed formats"):

https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/reading/read-pixels-test.html

We are passing it.
Whiteboard: webgl-conformance webgl-test-needed → webgl-conformance
You need to log in before you can comment on or make changes to this bug.