Auto merge of #25930 - mmatyas:webgl_fns_indexed_unibuf, r=jdm

Add support for WebGL2 GetIndexedParameter

Adds support for the `GetIndexedParameter` WebGL2 call.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2

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

Depends on #25915.

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-10 10:37:53 -04:00 committed by GitHub
commit 30fafdca19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 187 additions and 135 deletions

View file

@ -1,91 +0,0 @@
[bound-buffer-size-change-test.html]
[WebGL test #38: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #23: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #4: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #28: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 4. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #22: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 4. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #33: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 12. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #16: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #7: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #35: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #37: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 16. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #39: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 12. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #21: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 8. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #40: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 16. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #15: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #25: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0) should be 4. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #32: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #14: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #11: gl.getIndexedParameter(gl.UNIFORM_BUFFER_BINDING, 1) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #36: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 12. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #3: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #5: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #6: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #24: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 8. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #34: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 16. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #26: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #2: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #20: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be [object WebGLBuffer\]. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #27: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0) should be 8. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #12: gl.getIndexedParameter(gl.UNIFORM_BUFFER_SIZE, 1) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL
[WebGL test #13: gl.getIndexedParameter(gl.UNIFORM_BUFFER_START, 1) should be 0. Threw exception TypeError: gl.getIndexedParameter is not a function]
expected: FAIL

View file

@ -1,5 +0,0 @@
[buffer-overflow-test.html]
expected: ERROR
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -1,7 +1,4 @@
[methods-2.html]
[WebGL test #19: Property either does not exist or is not a function: getIndexedParameter]
expected: FAIL
[WebGL test #11: Property either does not exist or is not a function: compressedTexSubImage3D]
expected: FAIL
@ -14,33 +11,39 @@
[WebGL test #18: Property either does not exist or is not a function: drawBuffers]
expected: FAIL
[WebGL test #22: Property either does not exist or is not a function: bindVertexArray]
expected: FAIL
[WebGL test #12: Property either does not exist or is not a function: vertexAttribI4i]
expected: FAIL
[WebGL test #19: Property either does not exist or is not a function: createVertexArray]
expected: FAIL
[WebGL test #6: Property either does not exist or is not a function: texStorage2D]
expected: FAIL
[WebGL test #1: Property either does not exist or is not a function: blitFramebuffer]
expected: FAIL
[WebGL test #21: Property either does not exist or is not a function: isVertexArray]
expected: FAIL
[WebGL test #20: Property either does not exist or is not a function: deleteVertexArray]
expected: FAIL
[WebGL test #5: Property either does not exist or is not a function: texImage3D]
expected: FAIL
[WebGL test #17: Property either does not exist or is not a function: drawRangeElements]
expected: FAIL
[WebGL test #21: Property either does not exist or is not a function: deleteVertexArray]
expected: FAIL
[WebGL test #10: Property either does not exist or is not a function: compressedTexImage3D]
expected: FAIL
[WebGL test #7: Property either does not exist or is not a function: texStorage3D]
expected: FAIL
[WebGL test #22: Property either does not exist or is not a function: isVertexArray]
expected: FAIL
[WebGL test #4: Property either does not exist or is not a function: renderbufferStorageMultisample]
expected: FAIL
@ -50,12 +53,6 @@
[WebGL test #0: Property either does not exist or is not a function: isContextLost]
expected: FAIL
[WebGL test #20: Property either does not exist or is not a function: createVertexArray]
expected: FAIL
[WebGL test #23: Property either does not exist or is not a function: bindVertexArray]
expected: FAIL
[WebGL test #16: Property either does not exist or is not a function: vertexAttribIPointer]
expected: FAIL

View file

@ -1,11 +1,67 @@
[switching-objects.html]
expected: ERROR
[WebGL test #6: buffer should match expected values]
expected: FAIL
[WebGL test #23: getError expected: NO_ERROR. Was INVALID_OPERATION : begin on tf1]
expected: FAIL
[WebGL test #41: getError expected: NO_ERROR. Was INVALID_OPERATION : end while paused]
expected: FAIL
[WebGL test #26: getError expected: NO_ERROR. Was INVALID_OPERATION : end on tf1]
expected: FAIL
[WebGL test #33: getError expected: INVALID_OPERATION. Was NO_ERROR : wrong primitive mode]
expected: FAIL
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_OPERATION : begin]
expected: FAIL
[WebGL test #27: buffer should match expected values]
expected: FAIL
[WebGL test #22: getError expected: NO_ERROR. Was INVALID_OPERATION : bind while paused]
expected: FAIL
[WebGL test #34: getError expected: INVALID_OPERATION. Was NO_ERROR : switch program while active]
expected: FAIL
[WebGL test #3: getError expected: NO_ERROR. Was INVALID_OPERATION : begin TF]
expected: FAIL
[WebGL test #17: TRANSFORM_FEEDBACK_BINDING was [object WebGLTransformFeedback\], but expected [object WebGLTransformFeedback\]]
expected: FAIL
[WebGL test #39: getError expected: NO_ERROR. Was INVALID_OPERATION : pause]
expected: FAIL
[WebGL test #16: getError expected: INVALID_OPERATION. Was NO_ERROR : bind while unpaused]
expected: FAIL
[WebGL test #28: getError expected: NO_ERROR. Was INVALID_OPERATION : end on tf2]
expected: FAIL
[WebGL test #36: getError expected: INVALID_OPERATION. Was NO_ERROR : bindTransformFeedback when active]
expected: FAIL
[WebGL test #9: TRANSFORM_FEEDBACK_BUFFER_BINDING[0\] was [object WebGLBuffer\], but expected [object WebGLBuffer\]]
expected: FAIL
[WebGL test #20: getError expected: NO_ERROR. Was INVALID_OPERATION : begin on tf2]
expected: FAIL
[WebGL test #19: buffer should match expected values]
expected: FAIL
[WebGL test #32: getError expected: NO_ERROR. Was INVALID_OPERATION : transform feedback should begin successfully]
expected: FAIL
[WebGL test #18: getError expected: NO_ERROR. Was INVALID_OPERATION : transform feedback should complete successfully]
expected: FAIL
[WebGL test #5: getError expected: NO_ERROR. Was INVALID_OPERATION : end TF]
expected: FAIL
[WebGL test #38: getError expected: INVALID_OPERATION. Was NO_ERROR : bindBufferBase(TRANSFORM_FEEDBACK_BUFFER) when active]
expected: FAIL

View file

@ -2,10 +2,10 @@
[WebGL test #31: buffer should match expected values]
expected: FAIL
[WebGL test #25: buffer should match expected values]
[WebGL test #11: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be null. Was [object WebGLBuffer\].]
expected: FAIL
[WebGL test #11: gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be null. Threw exception TypeError: gl.getIndexedParameter is not a function]
[WebGL test #25: buffer should match expected values]
expected: FAIL
[WebGL test #32: buffer should match expected values]