Auto merge of #25852 - szeged:mmatyas__webgl_fns_renderbuf_enums, r=jdm

Allow more WebGL2 FBO attachment formats

Add support for most of the framebuffer attachment formats introduced in WebGL2 for textures and renderbuffers.

Related format tables:

- https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml
- https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glRenderbufferStorage.xhtml

<!-- Please describe your changes on the following line: -->

cc @jdm @zakorgy

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-03-03 12:42:16 -05:00 committed by GitHub
commit 386759ca90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 137 additions and 78 deletions

View file

@ -1,7 +1,7 @@
[read-pixels-from-rgb8-into-pbo-bug.html]
[WebGL test #1: framebuffer with RGB8 color buffer is incomplete]
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_OPERATION : Tests should complete without gl errors]
expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : Tests should complete without gl errors]
[WebGL test #1: Expected in pixel 0: [255,0,0,255\], got: 0,0,0,0]
expected: FAIL

View file

@ -1,34 +1,7 @@
[framebuffer-object-attachment.html]
[WebGL test #13: gl.getParameter(gl.RED_BITS) + gl.getParameter(gl.GREEN_BITS) + gl.getParameter(gl.BLUE_BITS) + gl.getParameter(gl.ALPHA_BITS) >= 16 should be true. Was false.]
[WebGL test #45: getError expected: NO_ERROR. Was INVALID_ENUM : ]
expected: FAIL
[WebGL test #10: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL
[WebGL test #20: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL
[WebGL test #21: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL
[WebGL test #17: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL
[WebGL test #9: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL
[WebGL test #11: getError expected: NO_ERROR. Was INVALID_ENUM : ]
expected: FAIL
[WebGL test #19: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL
[WebGL test #22: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL
[WebGL test #18: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL
[WebGL test #27: getError expected: NO_ERROR. Was INVALID_ENUM : ]
[WebGL test #28: checkFramebufferStatus expects [FRAMEBUFFER_COMPLETE\], was FRAMEBUFFER_INCOMPLETE_ATTACHMENT]
expected: FAIL

View file

@ -1,47 +1,35 @@
[clearbuffer-sub-source.html]
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : clearBuffer with srcOffset = 2 should succeed]
expected: FAIL
[WebGL test #5: clearBuffer fails to work. Expected: 1,2,3,4, got: 0,0,0,0]
expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : clearBuffer with no srcOffset should succeed]
expected: FAIL
[WebGL test #11: clearBuffer fails to work. Expected: 1,2,3,4, got: 0,0,0,0]
expected: FAIL
[WebGL test #13: clearBuffer fails to work. Expected: 1,2,3,4, got: 0,0,0,0]
expected: FAIL
[WebGL test #9: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36053. Was 36054.]
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_OPERATION : clearBuffer with srcOffset = 0 should succeed]
expected: FAIL
[WebGL test #10: getError expected: NO_ERROR. Was INVALID_ENUM : clearBuffer with no srcOffset should succeed]
[WebGL test #6: getError expected: NO_ERROR. Was INVALID_OPERATION : clearBuffer with srcOffset = 2 should succeed]
expected: FAIL
[WebGL test #16: getError expected: INVALID_VALUE. Was INVALID_FRAMEBUFFER_OPERATION : clearBuffer with srcOffset = 4 should fail: out of bounds]
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_OPERATION : clearBuffer with srcOffset = 0 should succeed]
expected: FAIL
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : clearBuffer with srcOffset = 0 should succeed]
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_OPERATION : clearBuffer with srcOffset = 2 should succeed]
expected: FAIL
[WebGL test #15: clearBuffer fails to work. Expected: 3,4,5,6, got: 0,0,0,0]
expected: FAIL
[WebGL test #8: getError expected: INVALID_VALUE. Was INVALID_FRAMEBUFFER_OPERATION : clearBuffer with srcOffset = 4 should fail: out of bounds]
expected: FAIL
[WebGL test #6: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : clearBuffer with srcOffset = 2 should succeed]
[WebGL test #8: getError expected: INVALID_VALUE. Was INVALID_OPERATION : clearBuffer with srcOffset = 4 should fail: out of bounds]
expected: FAIL
[WebGL test #7: clearBuffer fails to work. Expected: 3,4,5,6, got: 0,0,0,0]
expected: FAIL
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_FRAMEBUFFER_OPERATION : clearBuffer with srcOffset = 0 should succeed]
expected: FAIL
[WebGL test #1: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36053. Was 36054.]
[WebGL test #16: getError expected: INVALID_VALUE. Was INVALID_OPERATION : clearBuffer with srcOffset = 4 should fail: out of bounds]
expected: FAIL
[WebGL test #3: clearBuffer fails to work. Expected: 1,2,3,4, got: 0,0,0,0]

View file

@ -3,6 +3,3 @@
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #1: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36053. Was 36054.]
expected: FAIL