Add support for WebGL2 read and draw buffer settings

Adds support for the `ReadBuffer` and `DrawBuffers`
WebGL2 calls and the related parameter getters.

See:

- https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
- https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.4
- https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.11
This commit is contained in:
Mátyás Mustoha 2020-02-25 10:47:59 +01:00
parent e8e0b70266
commit 0afe27ef18
17 changed files with 315 additions and 51 deletions

View file

@ -1,52 +1,46 @@
[methods-2.html]
[WebGL test #2: Property either does not exist or is not a function: readBuffer]
expected: FAIL
[WebGL test #1: Property either does not exist or is not a function: blitFramebuffer]
expected: FAIL
[WebGL test #11: Property either does not exist or is not a function: vertexAttribI4iv]
[WebGL test #7: Property either does not exist or is not a function: compressedTexImage3D]
expected: FAIL
[WebGL test #8: Property either does not exist or is not a function: compressedTexImage3D]
[WebGL test #4: Property either does not exist or is not a function: texStorage3D]
expected: FAIL
[WebGL test #13: Property either does not exist or is not a function: vertexAttribI4uiv]
[WebGL test #11: Property either does not exist or is not a function: vertexAttribI4ui]
expected: FAIL
[WebGL test #16: Property either does not exist or is not a function: drawBuffers]
[WebGL test #2: Property either does not exist or is not a function: texImage3D]
expected: FAIL
[WebGL test #3: Property either does not exist or is not a function: texImage3D]
[WebGL test #12: Property either does not exist or is not a function: vertexAttribI4uiv]
expected: FAIL
[WebGL test #10: Property either does not exist or is not a function: vertexAttribI4i]
[WebGL test #3: Property either does not exist or is not a function: texStorage2D]
expected: FAIL
[WebGL test #9: Property either does not exist or is not a function: compressedTexSubImage3D]
expected: FAIL
[WebGL test #12: Property either does not exist or is not a function: vertexAttribI4ui]
[WebGL test #8: Property either does not exist or is not a function: compressedTexSubImage3D]
expected: FAIL
[WebGL test #0: Property either does not exist or is not a function: isContextLost]
expected: FAIL
[WebGL test #7: Property either does not exist or is not a function: copyTexSubImage3D]
[WebGL test #9: Property either does not exist or is not a function: vertexAttribI4i]
expected: FAIL
[WebGL test #14: Property either does not exist or is not a function: vertexAttribIPointer]
[WebGL test #13: Property either does not exist or is not a function: vertexAttribIPointer]
expected: FAIL
[WebGL test #4: Property either does not exist or is not a function: texStorage2D]
[WebGL test #14: Property either does not exist or is not a function: drawRangeElements]
expected: FAIL
[WebGL test #15: Property either does not exist or is not a function: drawRangeElements]
[WebGL test #5: Property either does not exist or is not a function: texSubImage3D]
expected: FAIL
[WebGL test #6: Property either does not exist or is not a function: texSubImage3D]
[WebGL test #10: Property either does not exist or is not a function: vertexAttribI4iv]
expected: FAIL
[WebGL test #5: Property either does not exist or is not a function: texStorage3D]
[WebGL test #6: Property either does not exist or is not a function: copyTexSubImage3D]
expected: FAIL

View file

@ -1,5 +1,5 @@
[readbuffer.html]
expected: ERROR
expected: TIMEOUT
[WebGL test #3: gl.getParameter(gl.READ_BUFFER) should be 1029 (of type number). Was null (of type object).]
expected: FAIL

View file

@ -1,8 +1,109 @@
[blitframebuffer-srgb-and-linear-drawbuffers.html]
expected: ERROR
[WebGL test #10: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #31: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #7: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #35: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #3: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #4: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #1: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #21: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #30: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #6: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #11: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #9: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #22: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #20: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #27: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #13: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #12: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #19: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #34: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #24: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #25: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #17: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #16: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #15: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #18: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #33: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #28: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed]
expected: FAIL
[WebGL test #8: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #26: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #32: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #23: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #36: Framebuffer incomplete when setup draw framebuffer.]
expected: FAIL
[WebGL test #5: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL
[WebGL test #29: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed]
expected: FAIL

View file

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

View file

@ -1,5 +1,43 @@
[draw-buffers.html]
expected: ERROR
[WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #44: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #49: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #43: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #38: attachment 1 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #51: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #50: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #48: attachment 3 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #42: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #40: attachment 3 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #39: attachment 2 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #46: attachment 1 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #47: attachment 2 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #52: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL
[WebGL test #41: attachment 4 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0]
expected: FAIL

View file

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

View file

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

View file

@ -1,8 +1,17 @@
[read-draw-when-missing-image.html]
expected: ERROR
[WebGL test #3: getError expected: INVALID_OPERATION. Was INVALID_FRAMEBUFFER_OPERATION : Should generate INVALID_OPERATION when reading from a color buffer without image.]
expected: FAIL
[WebGL test #1: Framebuffer incomplete.]
expected: FAIL
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #4: getError expected: INVALID_OPERATION. Was INVALID_ENUM : Should generate INVALID_OPERATION when reading from a color buffer without image.]
expected: FAIL
[WebGL test #2: getError expected: INVALID_OPERATION. Was INVALID_ENUM : Should generate INVALID_OPERATION when reading from a color buffer without image.]
expected: FAIL
[WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -1,5 +1,7 @@
[rendering-sampling-feedback-loop.html]
expected: ERROR
[WebGL test #2: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #2: getError expected: INVALID_OPERATION. Was NO_ERROR : Rendering to a texture where it samples from should geneates INVALID_OPERATION. Otherwise, it should be NO_ERROR]
expected: FAIL
[WebGL test #3: getError expected: INVALID_OPERATION. Was NO_ERROR : Rendering to a texture where it samples from should geneates INVALID_OPERATION. Otherwise, it should be NO_ERROR]
expected: FAIL

View file

@ -1,7 +1,4 @@
[gl-get-calls.html]
[WebGL test #13: context.getParameter(context.READ_BUFFER) should be 1029 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #47: context.getParameter(context.MAX_FRAGMENT_INPUT_COMPONENTS) should be >= 60. Was null (of type object).]
expected: FAIL
@ -23,9 +20,6 @@
[WebGL test #56: context.getParameter(context.MAX_PROGRAM_TEXEL_OFFSET) is not an instance of Number]
expected: FAIL
[WebGL test #4: context.getParameter(context.DRAW_BUFFER0) should be 1029 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #45: context.getParameter(context.MAX_ELEMENTS_INDICES) is not an instance of Number]
expected: FAIL

View file

@ -24,6 +24,9 @@
[WebGL test #21: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #3: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #15: gl.getBufferParameter(gl.PIXEL_UNPACK_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
expected: FAIL
@ -45,9 +48,15 @@
[WebGL test #6: gl.getBufferParameter(gl.COPY_READ_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #4: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #203: gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_IMMUTABLE_LEVELS) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #5: getBufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
expected: FAIL
[WebGL test #22: gl.getBufferParameter(gl.UNIFORM_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
expected: FAIL
@ -87,12 +96,3 @@
[WebGL test #274: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #3: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE) should be 16 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #4: gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE) should be 35048 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #5: getBufferParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR]
expected: FAIL