Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for WebGL2 read and draw buffer settings #25905

Merged

Conversation

@mmatyas
Copy link
Contributor

mmatyas commented Mar 5, 2020

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

See:

This is marked as WIP because with these functions added (but apparently not directly related to them), some tests now run into states that produces crash.

cc @jdm @zakorgy


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes
@highfive
Copy link

highfive commented Mar 5, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webglrenderingcontext.rs, components/script/dom/webidls/WebGL2RenderingContext.webidl, components/script/dom/webglframebuffer.rs, components/script/dom/webgl2renderingcontext.rs
  • @KiChjang: components/script/dom/webglrenderingcontext.rs, components/script/dom/webidls/WebGL2RenderingContext.webidl, components/script/dom/webglframebuffer.rs, components/script/dom/webgl2renderingcontext.rs
@nox
Copy link
Member

nox commented Mar 5, 2020

This needs a rebase.

@nox nox removed the S-awaiting-review label Mar 5, 2020
@mmatyas mmatyas force-pushed the szeged:mmatyas__webgl_fns_read_draw_buffers branch from d655a0c to 7537add Mar 5, 2020
@mmatyas
Copy link
Contributor Author

mmatyas commented Mar 5, 2020

Indeed, updated.

@jdm jdm removed the S-needs-rebase label Mar 5, 2020
@nox nox changed the title [WIP] Add support for WebGL2 read and draw buffer settings Add support for WebGL2 read and draw buffer settings Mar 6, 2020
@nox
Copy link
Member

nox commented Mar 6, 2020

Nice!

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Mar 6, 2020

📌 Commit 7537add has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Mar 6, 2020

Testing commit 7537add with merge 59a6468...

bors-servo added a commit that referenced this pull request Mar 6, 2020
…=nox

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

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

This is marked as WIP because with these functions added (but apparently not directly related to them), some tests now run into states that produces crash.

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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 6, 2020

💔 Test failed - status-taskcluster

@CYBAI
Copy link
Collaborator

CYBAI commented Mar 6, 2020

Maybe need an expectation update for those new FAIL tests 👀? (there are also some CRASH tests)

  │   → assert_true: Property either does not exist or is not a function: texStorage3D expected true got false
  │ FAIL [expected PASS] WebGL test #7: Property either does not exist or is not a function: texSubImage3D
  │   → assert_true: Property either does not exist or is not a function: texSubImage3D expected true got false
  │ FAIL [expected PASS] WebGL test #8: Property either does not exist or is not a function: copyTexSubImage3D
  │   → assert_true: Property either does not exist or is not a function: copyTexSubImage3D expected true got false
  │ FAIL [expected PASS] WebGL test #9: Property either does not exist or is not a function: compressedTexImage3D
  │   → assert_true: Property either does not exist or is not a function: compressedTexImage3D expected true got false
  │ FAIL [expected PASS] WebGL test #10: Property either does not exist or is not a function: compressedTexSubImage3D
  │   → assert_true: Property either does not exist or is not a function: compressedTexSubImage3D expected true got false
  │ FAIL [expected PASS] WebGL test #11: Property either does not exist or is not a function: getFragDataLocation
  │   → assert_true: Property either does not exist or is not a function: getFragDataLocation expected true got false
  │ FAIL [expected PASS] WebGL test #12: Property either does not exist or is not a function: vertexAttribI4i
  │   → assert_true: Property either does not exist or is not a function: vertexAttribI4i expected true got false
  │ FAIL [expected PASS] WebGL test #13: Property either does not exist or is not a function: vertexAttribI4iv
  │   → assert_true: Property either does not exist or is not a function: vertexAttribI4iv expected true got false
  │ FAIL [expected PASS] WebGL test #14: Property either does not exist or is not a function: vertexAttribI4ui
  │   → assert_true: Property either does not exist or is not a function: vertexAttribI4ui expected true got false
  │ FAIL [expected PASS] WebGL test #15: Property either does not exist or is not a function: vertexAttribI4uiv
  │   → assert_true: Property either does not exist or is not a function: vertexAttribI4uiv expected true got false
  │ FAIL [expected PASS] WebGL test #16: Property either does not exist or is not a function: vertexAttribIPointer
  │   → assert_true: Property either does not exist or is not a function: vertexAttribIPointer expected true got false
  │ FAIL [expected PASS] WebGL test #17: Property either does not exist or is not a function: drawRangeElements
  │   → assert_true: Property either does not exist or is not a function: drawRangeElements expected true got false
  │ FAIL [expected PASS] WebGL test #18: Property either does not exist or is not a function: getIndexedParameter
  │   → assert_true: Property either does not exist or is not a function: getIndexedParameter expected true got false
  │ FAIL [expected PASS] WebGL test #19: Property either does not exist or is not a function: createVertexArray
  │   → assert_true: Property either does not exist or is not a function: createVertexArray expected true got false
  │ FAIL [expected PASS] WebGL test #20: Property either does not exist or is not a function: deleteVertexArray
  │   → assert_true: Property either does not exist or is not a function: deleteVertexArray expected true got false
  │ FAIL [expected PASS] WebGL test #21: Property either does not exist or is not a function: isVertexArray
  │   → assert_true: Property either does not exist or is not a function: isVertexArray expected true got false
  │ FAIL [expected PASS] WebGL test #22: Property either does not exist or is not a function: bindVertexArray
  │   → assert_true: Property either does not exist or is not a function: bindVertexArray expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ assertFunction@http://web-platform.test:8000/_webgl/conformance2/context/methods-2.html:286:17
  └ @http://web-platform.test:8000/_webgl/conformance2/context/methods-2.html:304:25
  â–¶ OK [expected ERROR] /_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:
  │ FAIL [expected PASS] WebGL test #5: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #11: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #17: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #23: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #29: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #35: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ blitframebuffer_srgb_and_linear_drawbuffers@http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:132:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:64:56

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:
  │ FAIL [expected PASS] WebGL test #6: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #12: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #18: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #24: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #30: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #36: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ blitframebuffer_srgb_and_linear_drawbuffers@http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:136:19
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:64:56

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:
  │ FAIL [expected PASS] WebGL test #2: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #8: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #14: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #20: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #26: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #32: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup draw framebuffer should succeed expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ blitframebuffer_srgb_and_linear_drawbuffers@http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:132:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:63:56

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:
  │ FAIL [expected PASS] WebGL test #7: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #13: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #19: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #25: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #31: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ blitframebuffer_srgb_and_linear_drawbuffers@http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:103:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:63:56

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:
  │ FAIL [expected PASS] WebGL test #3: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #9: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #15: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #21: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #27: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ FAIL [expected PASS] WebGL test #33: Framebuffer incomplete when setup draw framebuffer.
  │   → assert_true: Framebuffer incomplete when setup draw framebuffer. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ blitframebuffer_srgb_and_linear_drawbuffers@http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:136:19
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:63:56

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:
  │ FAIL [expected PASS] WebGL test #4: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #10: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #16: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #22: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #28: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ FAIL [expected PASS] WebGL test #34: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed
  │   → assert_true: getError expected: NO_ERROR. Was INVALID_ENUM : setup read framebuffer should succeed expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ blitframebuffer_srgb_and_linear_drawbuffers@http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:103:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/blitframebuffer-srgb-and-linear-drawbuffers.html:64:56


  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/read-draw-when-missing-image.html:
  │ FAIL [expected PASS] WebGL test #3: getError expected: INVALID_OPERATION. Was INVALID_FRAMEBUFFER_OPERATION : Should generate INVALID_OPERATION when reading from a color buffer without image.
  │   → assert_true: getError expected: INVALID_OPERATION. Was INVALID_FRAMEBUFFER_OPERATION : Should generate INVALID_OPERATION when reading from a color buffer without image. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ read@http://web-platform.test:8000/_webgl/conformance2/rendering/read-draw-when-missing-image.html:121:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/read-draw-when-missing-image.html:68:5

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/read-draw-when-missing-image.html:
  │ FAIL [expected PASS] WebGL test #2: getError expected: INVALID_OPERATION. Was INVALID_ENUM : Should generate INVALID_OPERATION when reading from a color buffer without image.
  │   → assert_true: getError expected: INVALID_OPERATION. Was INVALID_ENUM : Should generate INVALID_OPERATION when reading from a color buffer without image. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ read@http://web-platform.test:8000/_webgl/conformance2/rendering/read-draw-when-missing-image.html:116:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/read-draw-when-missing-image.html:68:5

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/read-draw-when-missing-image.html:
  │ FAIL [expected PASS] WebGL test #4: getError expected: INVALID_OPERATION. Was INVALID_ENUM : Should generate INVALID_OPERATION when reading from a color buffer without image.
  │   → assert_true: getError expected: INVALID_OPERATION. Was INVALID_ENUM : Should generate INVALID_OPERATION when reading from a color buffer without image. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ read@http://web-platform.test:8000/_webgl/conformance2/rendering/read-draw-when-missing-image.html:125:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/read-draw-when-missing-image.html:68:5

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/read-draw-when-missing-image.html:
  │ FAIL [expected PASS] WebGL test #5: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).
  │   → assert_true: successfullyParsed should be true (of type boolean). Was undefined (of type undefined). expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ shouldBe@http://web-platform.test:8000/_webgl/js/js-test-pre.js:406:19
  │ shouldBeTrue@http://web-platform.test:8000/_webgl/js/js-test-pre.js:432:37
  â”” @http://web-platform.test:8000/_webgl/js/js-test-post.js:24:13


  â–¶ CRASH [expected ERROR] /_webgl/conformance2/rendering/fs-color-type-mismatch-color-buffer-type.html
  │ 
  │ 
  │ 
  │ 
  │ DESCRIPTION: This test verifies that the color types of fragment shader's outputs should match color buffers' types.
  │ PASS WebGL context exists
  │ PASS Succeed to set up program
  │ FAIL Framebuffer incomplete.
  │ FAIL Framebuffer incomplete.
  │ FAIL Framebuffer incomplete.
  │ FAIL Framebuffer incomplete.
  │ FAIL Framebuffer incomplete.
  │ FAIL Framebuffer incomplete.
  │ [2020-03-06T14:09:49Z ERROR canvas::webgl_thread] Last GL operation failed: InitializeFramebuffer { color: true, depth: false, stencil: false }
  │ Unexpected WebGL error: 0x506 (1286) [InitializeFramebuffer { color: true, depth: false, stencil: false }] (thread WebGL thread, at components/canvas/webgl_thread.rs:2019)
  │ stack backtrace:
  │    0: servo::backtrace::print
  │    1: servo::main::{{closure}}
  │    2: std::panicking::rust_panic_with_hook
  │              at src/libstd/panicking.rs:474
  │    3: rust_begin_unwind
  │              at src/libstd/panicking.rs:378
  │    4: std::panicking::begin_panic_fmt
  │              at src/libstd/panicking.rs:332
  │    5: canvas::webgl_thread::WebGLImpl::apply
  │    6: _ZN6canvas12webgl_thread11WebGLThread10handle_msg17ha6f57803bad4a4e6E.llvm.8644076800139079754
  │    7: canvas::webgl_thread::WebGLThread::process
  │    8: std::sys_common::backtrace::__rust_begin_short_backtrace
  │    9: std::panicking::try::do_call
  │   10: __rust_maybe_catch_panic
  │              at src/libpanic_unwind/lib.rs:86
  │   11: core::ops::function::FnOnce::call_once{{vtable.shim}}
  │   12: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  │              at /rustc/4ad62488258972bdb0e2df225d100f99ef58dbad/src/liballoc/boxed.rs:1017
  │   13: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  │              at /rustc/4ad62488258972bdb0e2df225d100f99ef58dbad/src/liballoc/boxed.rs:1017
  │       std::sys_common::thread::start_thread
  │              at src/libstd/sys_common/thread.rs:13
  │       std::sys::unix::thread::Thread::new::thread_start
  │              at src/libstd/sys/unix/thread.rs:80
  │   14: start_thread
  │   15: __clone
  │ [2020-03-06T14:09:49Z ERROR servo] Unexpected WebGL error: 0x506 (1286) [InitializeFramebuffer { color: true, depth: false, stencil: false }]
  │ called `Result::unwrap()` on an `Err` value: () (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at components/script/dom/webglrenderingcontext.rs:1446)
  │ stack backtrace:
  │    0: servo::backtrace::print
  │    1: servo::main::{{closure}}
  │    2: std::panicking::rust_panic_with_hook
  │              at src/libstd/panicking.rs:474
  │    3: rust_begin_unwind
  │              at src/libstd/panicking.rs:378
  │    4: core::panicking::panic_fmt
  │              at src/libcore/panicking.rs:85
  │    5: core::option::expect_none_failed
  │              at src/libcore/option.rs:1211
  │    6: <script::dom::webglrenderingcontext::WebGLRenderingContext as script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextBinding::WebGLRenderingContextMethods>::DrawingBufferWidth
  │    7: _ZN3std9panicking3try7do_call17h5505e43e68696d49E.llvm.8562044443237619743
  │    8: __rust_maybe_catch_panic
  │              at src/libpanic_unwind/lib.rs:86
  │    9: script::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextBinding::get_drawingBufferWidth
  │   10: script::dom::bindings::utils::generic_call
  │   11: _Z12CallJSNativeP9JSContextPFbS0_jPN2JS5ValueEEN2js10CallReasonERKNS1_8CallArgsE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:456
  │       _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:548
  │   12: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:617
  │       _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EENS_10CallReasonE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:634
  │       _ZN2js10CallGetterEP9JSContextN2JS6HandleINS2_5ValueEEES5_NS2_13MutableHandleIS4_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:758
  │   13: _ZL10CallGetterP9JSContextN2JS6HandleIP8JSObjectEENS2_INS1_5ValueEEENS2_IPN2js5ShapeEEENS1_13MutableHandleIS6_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/NativeObject.cpp:2282
  │       _ZL19GetExistingPropertyILN2js7AllowGCE1EEbP9JSContextNS0_11MaybeRootedIN2JS5ValueEXT_EE10HandleTypeENS4_IPNS0_12NativeObjectEXT_EE10HandleTypeENS4_IPNS0_5ShapeEXT_EE10HandleTypeENS7_17MutableHandleTypeE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/NativeObject.cpp:2334
  │       _ZL23NativeGetPropertyInlineILN2js7AllowGCE1EEbP9JSContextNS0_11MaybeRootedIPNS0_12NativeObjectEXT_EE10HandleTypeENS4_IN2JS5ValueEXT_EE10HandleTypeENS4_INS9_11PropertyKeyEXT_EE10HandleTypeE12IsNameLookupNSB_17MutableHandleTypeE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/NativeObject.cpp:2594
  │       _ZN2js17NativeGetPropertyEP9JSContextN2JS6HandleIPNS_12NativeObjectEEENS3_INS2_5ValueEEENS3_INS2_11PropertyKeyEEENS2_13MutableHandleIS7_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/NativeObject.cpp:2631
  │   14: _ZN2js11GetPropertyEP9JSContextN2JS6HandleIP8JSObjectEENS3_INS2_5ValueEEENS3_INS2_11PropertyKeyEEENS2_13MutableHandleIS7_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/ObjectOperations-inl.h:117
  │       _ZN2jsL25GetObjectElementOperationEP9JSContext4JSOpN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEES9_NS3_13MutableHandleIS8_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter-inl.h:486
  │       _ZN2jsL19GetElementOperationEP9JSContext4JSOpN2JS6HandleINS3_5ValueEEES6_NS3_13MutableHandleIS5_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter-inl.h:600
  │       _ZN2js3jit17DoGetElemFallbackEP9JSContextPNS0_13BaselineFrameEPNS0_18ICGetElem_FallbackEN2JS6HandleINS7_5ValueEEESA_NS7_13MutableHandleIS9_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/BaselineIC.cpp:1890
  │   15: <unknown>
  │   16: <unknown>
  │   17: _ZL13EnterBaselineP9JSContextRN2js3jit12EnterJitDataE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/BaselineJIT.cpp:113
  │       _ZN2js3jit32EnterBaselineInterpreterAtBranchEP9JSContextPNS_16InterpreterFrameEPh
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/BaselineJIT.cpp:186
  │   18: <unknown>
  │ [2020-03-06T14:09:49Z ERROR servo] called `Result::unwrap()` on an `Err` value: ()
  â”” Pipeline failed in hard-fail mode.  Crashing!


  â–¶ CRASH [expected ERROR] /_webgl/conformance2/rendering/clear-func-buffer-type-match.html
  │ 
  │ 
  │ 
  │ 
  │ [2020-03-06T14:10:32Z ERROR canvas::webgl_thread] Last GL operation failed: InitializeFramebuffer { color: true, depth: false, stencil: false }
  │ Unexpected WebGL error: 0x506 (1286) [InitializeFramebuffer { color: true, depth: false, stencil: false }] (thread WebGL thread, at components/canvas/webgl_thread.rs:2019)
  │ stack backtrace:
  │    0: servo::backtrace::print
  │    1: servo::main::{{closure}}
  │    2: std::panicking::rust_panic_with_hook
  │              at src/libstd/panicking.rs:474
  │    3: rust_begin_unwind
  │              at src/libstd/panicking.rs:378
  │    4: std::panicking::begin_panic_fmt
  │              at src/libstd/panicking.rs:332
  │    5: canvas::webgl_thread::WebGLImpl::apply
  │    6: _ZN6canvas12webgl_thread11WebGLThread10handle_msg17ha6f57803bad4a4e6E.llvm.8644076800139079754
  │    7: canvas::webgl_thread::WebGLThread::process
  │    8: std::sys_common::backtrace::__rust_begin_short_backtrace
  │    9: std::panicking::try::do_call
  │   10: __rust_maybe_catch_panic
  │              at src/libpanic_unwind/lib.rs:86
  │   11: core::ops::function::FnOnce::call_once{{vtable.shim}}
  │   12: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  │              at /rustc/4ad62488258972bdb0e2df225d100f99ef58dbad/src/liballoc/boxed.rs:1017
  │   13: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  │              at /rustc/4ad62488258972bdb0e2df225d100f99ef58dbad/src/liballoc/boxed.rs:1017
  │       std::sys_common::thread::start_thread
  │              at src/libstd/sys_common/thread.rs:13
  │       std::sys::unix::thread::Thread::new::thread_start
  │              at src/libstd/sys/unix/thread.rs:80
  │   14: start_thread
  │   15: __clone
  │ [2020-03-06T14:10:33Z ERROR servo] Unexpected WebGL error: 0x506 (1286) [InitializeFramebuffer { color: true, depth: false, stencil: false }]
  │ called `Result::unwrap()` on an `Err` value: () (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at components/script/dom/webglrenderingcontext.rs:1446)
  │ stack backtrace:
  │    0: servo::backtrace::print
  │    1: servo::main::{{closure}}
  │    2: std::panicking::rust_panic_with_hook
  │              at src/libstd/panicking.rs:474
  │    3: rust_begin_unwind
  │              at src/libstd/panicking.rs:378
  │    4: core::panicking::panic_fmt
  │              at src/libcore/panicking.rs:85
  │    5: core::option::expect_none_failed
  │              at src/libcore/option.rs:1211
  │    6: <script::dom::webglrenderingcontext::WebGLRenderingContext as script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextBinding::WebGLRenderingContextMethods>::DrawingBufferWidth
  │    7: _ZN3std9panicking3try7do_call17h5505e43e68696d49E.llvm.8562044443237619743
  │    8: __rust_maybe_catch_panic
  │              at src/libpanic_unwind/lib.rs:86
  │    9: script::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextBinding::get_drawingBufferWidth
  │   10: script::dom::bindings::utils::generic_call
  │   11: _Z12CallJSNativeP9JSContextPFbS0_jPN2JS5ValueEEN2js10CallReasonERKNS1_8CallArgsE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:456
  │       _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:548
  │   12: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:617
  │       _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EENS_10CallReasonE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:634
  │       _ZN2js10CallGetterEP9JSContextN2JS6HandleINS2_5ValueEEES5_NS2_13MutableHandleIS4_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter.cpp:758
  │   13: _ZL10CallGetterP9JSContextN2JS6HandleIP8JSObjectEENS2_INS1_5ValueEEENS2_IPN2js5ShapeEEENS1_13MutableHandleIS6_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/NativeObject.cpp:2282
  │       _ZL19GetExistingPropertyILN2js7AllowGCE1EEbP9JSContextNS0_11MaybeRootedIN2JS5ValueEXT_EE10HandleTypeENS4_IPNS0_12NativeObjectEXT_EE10HandleTypeENS4_IPNS0_5ShapeEXT_EE10HandleTypeENS7_17MutableHandleTypeE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/NativeObject.cpp:2334
  │       _ZL23NativeGetPropertyInlineILN2js7AllowGCE1EEbP9JSContextNS0_11MaybeRootedIPNS0_12NativeObjectEXT_EE10HandleTypeENS4_IN2JS5ValueEXT_EE10HandleTypeENS4_INS9_11PropertyKeyEXT_EE10HandleTypeE12IsNameLookupNSB_17MutableHandleTypeE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/NativeObject.cpp:2594
  │       _ZN2js17NativeGetPropertyEP9JSContextN2JS6HandleIPNS_12NativeObjectEEENS3_INS2_5ValueEEENS3_INS2_11PropertyKeyEEENS2_13MutableHandleIS7_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/NativeObject.cpp:2631
  │   14: _ZN2js11GetPropertyEP9JSContextN2JS6HandleIP8JSObjectEENS3_INS2_5ValueEEENS3_INS2_11PropertyKeyEEENS2_13MutableHandleIS7_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/ObjectOperations-inl.h:117
  │       _ZN2jsL25GetObjectElementOperationEP9JSContext4JSOpN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEES9_NS3_13MutableHandleIS8_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter-inl.h:486
  │       _ZN2jsL19GetElementOperationEP9JSContext4JSOpN2JS6HandleINS3_5ValueEEES6_NS3_13MutableHandleIS5_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/vm/Interpreter-inl.h:600
  │       _ZN2js3jit17DoGetElemFallbackEP9JSContextPNS0_13BaselineFrameEPNS0_18ICGetElem_FallbackEN2JS6HandleINS7_5ValueEEESA_NS7_13MutableHandleIS9_EE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/BaselineIC.cpp:1890
  │   15: <unknown>
  │   16: <unknown>
  │   17: _ZL13EnterBaselineP9JSContextRN2js3jit12EnterJitDataE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/BaselineJIT.cpp:113
  │       _ZN2js3jit32EnterBaselineInterpreterAtBranchEP9JSContextPNS_16InterpreterFrameEPh
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/BaselineJIT.cpp:186
  │   18: <unknown>
  │ [2020-03-06T14:10:33Z ERROR servo] called `Result::unwrap()` on an `Err` value: ()
  â”” Pipeline failed in hard-fail mode.  Crashing!


  â–¶ OK [expected ERROR] /_webgl/conformance2/rendering/rendering-sampling-feedback-loop.html

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/rendering-sampling-feedback-loop.html:
  │ FAIL [expected PASS] 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
  │   → assert_true: 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 true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ rendering_sampling_feedback_loop@http://web-platform.test:8000/_webgl/conformance2/rendering/rendering-sampling-feedback-loop.html:136:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/rendering-sampling-feedback-loop.html:91:37

  â–¶ Unexpected subtest result in /_webgl/conformance2/rendering/rendering-sampling-feedback-loop.html:
  │ FAIL [expected PASS] 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
  │   → assert_true: 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 true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:24
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1956:25
  │ test@http://web-platform.test:8000/resources/testharness.js:548:30
  │ reportTestResultsToHarness@http://web-platform.test:8000/_webgl/js/js-test-pre.js:122:15
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:31
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:15
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ rendering_sampling_feedback_loop@http://web-platform.test:8000/_webgl/conformance2/rendering/rendering-sampling-feedback-loop.html:136:9
  â”” @http://web-platform.test:8000/_webgl/conformance2/rendering/rendering-sampling-feedback-loop.html:92:37


  â–¶ CRASH [expected ERROR] /_webgl/conformance2/renderbuffers/readbuffer.html
  │ 
  │ 
  │ 
  │ 
  │ [2020-03-06T14:13:42Z ERROR canvas::webgl_thread] Last GL operation failed: ReadBuffer(1029)
  │ Unexpected WebGL error: 0x502 (1282) [ReadBuffer(1029)] (thread WebGL thread, at components/canvas/webgl_thread.rs:2019)
  │ stack backtrace:
  │    0: servo::backtrace::print
  │    1: servo::main::{{closure}}
  │    2: std::panicking::rust_panic_with_hook
  │              at src/libstd/panicking.rs:474
  │    3: rust_begin_unwind
  │              at src/libstd/panicking.rs:378
  │    4: std::panicking::begin_panic_fmt
  │              at src/libstd/panicking.rs:332
  │    5: canvas::webgl_thread::WebGLImpl::apply
  │    6: _ZN6canvas12webgl_thread11WebGLThread10handle_msg17ha6f57803bad4a4e6E.llvm.8644076800139079754
  │    7: canvas::webgl_thread::WebGLThread::process
  │    8: std::sys_common::backtrace::__rust_begin_short_backtrace
  │    9: std::panicking::try::do_call
  │   10: __rust_maybe_catch_panic
  │              at src/libpanic_unwind/lib.rs:86
  │   11: core::ops::function::FnOnce::call_once{{vtable.shim}}
  │   12: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  │              at /rustc/4ad62488258972bdb0e2df225d100f99ef58dbad/src/liballoc/boxed.rs:1017
  │   13: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  │              at /rustc/4ad62488258972bdb0e2df225d100f99ef58dbad/src/liballoc/boxed.rs:1017
  │       std::sys_common::thread::start_thread
  │              at src/libstd/sys_common/thread.rs:13
  │       std::sys::unix::thread::Thread::new::thread_start
  │              at src/libstd/sys/unix/thread.rs:80
  │   14: start_thread
  │   15: __clone
  │ [2020-03-06T14:13:42Z ERROR servo] Unexpected WebGL error: 0x502 (1282) [ReadBuffer(1029)]
  │ called `Result::unwrap()` on an `Err` value: () (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at components/script/dom/webglrenderingcontext.rs:1446)
  │ stack backtrace:
  │    0: servo::backtrace::print
  │    1: servo::main::{{closure}}
  │    2: std::panicking::rust_panic_with_hook
  │              at src/libstd/panicking.rs:474
  │    3: rust_begin_unwind
  │              at src/libstd/panicking.rs:378
  │    4: core::panicking::panic_fmt
  │              at src/libcore/panicking.rs:85
  │    5: core::option::expect_none_failed
  │              at src/libcore/option.rs:1211
  │    6: <script::dom::webglrenderingcontext::WebGLRenderingContext as script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextBinding::WebGLRenderingContextMethods>::DrawingBufferWidth
  │    7: _ZN3std9panicking3try7do_call17h5505e43e68696d49E.llvm.8562044443237619743
  │    8: __rust_maybe_catch_panic
  │              at src/libpanic_unwind/lib.rs:86
  │    9: script::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextBinding::get_drawingBufferWidth
  │   10: script::dom::bindings::utils::generic_call
  │   11: _ZN2js3jit16CallNativeGetterEP9JSContextN2JS6HandleIP10JSFunctionEENS4_IP8JSObjectEENS3_13MutableHandleINS3_5ValueEEE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/VMFunctions.cpp:1559
  │   12: <unknown>
  │   13: <unknown>
  │   14: <unknown>
  │   15: <unknown>
  │   16: <unknown>
  │   17: _ZL8EnterJitP9JSContextRN2js8RunStateEPh
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/Jit.cpp:109
  │       _ZN2js3jit13MaybeEnterJitEP9JSContextRNS_8RunStateE
  │              at /root/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/aabcc9b/mozjs/js/src/jit/Jit.cpp:200
  │   20: <unknown>
  │ [2020-03-06T14:13:42Z ERROR servo] called `Result::unwrap()` on an `Err` value: ()
  â”” Pipeline failed in hard-fail mode.  Crashing!
@jdm
Copy link
Member

jdm commented Mar 6, 2020

I suspect that was what was meant in the original description:

This is marked as WIP because with these functions added (but apparently not directly related to them), some tests now run into states that produces crash.

Removing the WIP marker and merging it may not have been the optimal choice :)

@nox
Copy link
Member

nox commented Mar 6, 2020

Ah sorry, my eyes saw the stock PR template and so my brain just skipped it.

@nox nox changed the title Add support for WebGL2 read and draw buffer settings (WIP) Add support for WebGL2 read and draw buffer settings Mar 6, 2020
@bors-servo
Copy link
Contributor

bors-servo commented Mar 9, 2020

The latest upstream changes (presumably #25915) made this pull request unmergeable. Please resolve the merge conflicts.

@mmatyas mmatyas force-pushed the szeged:mmatyas__webgl_fns_read_draw_buffers branch from 7537add to 89213bc Mar 12, 2020
@mmatyas
Copy link
Contributor Author

mmatyas commented Mar 12, 2020

I was looked into the crashes, and when the drawbuffers method is called I get a panic from validate_framebuffer:

 0:04.08 pid:20179 [2020-03-12T11:03:56Z ERROR canvas::webgl_thread] Last GL operation failed: InitializeFramebuffer { color: true, depth: false, stencil: false }
 0:04.08 pid:20179 Unexpected WebGL error: 0x506 (1286) [InitializeFramebuffer { color: true, depth: false, stencil: false }] (thread WebGL thread, at components/canvas/webgl_thread.rs:2025)

(ie. INVALID_FRAMEBUFFER_OPERATION). I'm not really sure what's the cause of that, do you have some ideas?

At first the crash happened in gl.clear so I though it might be related to a missing check there. I've implemented this check, but in a separate commit as it seems this isn't actually related to the crash, just that was the first place validate_framebuffer was called in one of the tests. If it's indeed unrelated I can move it to a separate pull request.

(Also rebased.)

@jdm
Copy link
Member

jdm commented Mar 12, 2020

I looked into fs-color-type-mismatch-color-buffer-type.html and the results make sense to me - the test is relying on creating textures that have different internal formats and formats (per the spec text just above https://www.khronos.org/registry/webgl/specs/latest/2.0/#TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE), and our texture validation code rejects that (as well as newer formats like RGBA8UI). The reason this causes a panic is that the test relies on initializing renderbuffers with these textures, and then the first attempt to call drawBuffers with a renderbuffer's color attachment attempts to clear the framebuffer, but since an incomplete renderbuffer is backing the framebuffer we hit a GL error when trying to perform the clear.

In short, I'm filing some issues and I think it's fine to mark the tests as expected to crash. Fixing those issues is unrelated to the work in this PR.

@jdm
Copy link
Member

jdm commented Mar 12, 2020

I filed #25952 and 25954.

@mmatyas mmatyas force-pushed the szeged:mmatyas__webgl_fns_read_draw_buffers branch from 89213bc to 0afe27e Mar 16, 2020
@mmatyas
Copy link
Contributor Author

mmatyas commented Mar 16, 2020

Ok, rebased, added the tests and removed the clean buffer and readpixels related stuff (will send them separately). Interestingly, after the rebase the previous crashes don't stop Servo, just cause timeouts. blitframebuffer-srgb-and-linear-drawbuffers.html also produced some new results, but the errors seem to come from texImage2D.

@jdm
Copy link
Member

jdm commented Mar 16, 2020

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Mar 16, 2020

Trying commit 0afe27e with merge ad89c27...

bors-servo added a commit that referenced this pull request Mar 16, 2020
…=<try>

(WIP) 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

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

This is marked as WIP because with these functions added (but apparently not directly related to them), some tests now run into states that produces crash.

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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 16, 2020

☀️ Test successful - status-taskcluster
State: approved= try=True

@jdm jdm changed the title (WIP) Add support for WebGL2 read and draw buffer settings Add support for WebGL2 read and draw buffer settings Mar 16, 2020
@jdm
Copy link
Member

jdm commented Mar 16, 2020

@bors-servo r=nox

@bors-servo
Copy link
Contributor

bors-servo commented Mar 16, 2020

📌 Commit 0afe27e has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Mar 16, 2020

Testing commit 0afe27e with merge 654dd04...

@bors-servo
Copy link
Contributor

bors-servo commented Mar 16, 2020

☀️ Test successful - status-taskcluster
Approved by: nox
Pushing 654dd04 to master...

@bors-servo bors-servo merged commit 654dd04 into servo:master Mar 16, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
bors-servo added a commit that referenced this pull request Mar 17, 2020
Do not try to read pixels from an FBO without read buffer

A follow up to #25905, this adds another check to the WebGL2 ReadPixels implementation to fix
an OpenGL invalid operation crash when the method is called on a bound framebuffer that has no read buffer.

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

cc @jdm @zakorgy

However, it seems there's an issue with the headless mode: when ReadBuffer is called on the default framebuffer with the value `GL_BACK`, like [here](https://github.com/servo/servo/blob/e1103176e3de8a8c0996d1d60c092cfd8f60e805/tests/wpt/webgl/tests/conformance2/renderbuffers/readbuffer.html#L77), in headless mode an invalid operation is generated. In non-headless mode the whole test completes successfully:
![sshot](https://user-images.githubusercontent.com/4354863/76845770-b0ffbd80-683f-11ea-8103-a81512188808.png)

---
<!-- 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. -->
bors-servo added a commit that referenced this pull request Mar 17, 2020
Do not try to read pixels from an FBO without read buffer

A follow up to #25905, this adds another check to the WebGL2 ReadPixels implementation to fix
an OpenGL invalid operation crash when the method is called on a bound framebuffer that has no read buffer.

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

cc @jdm @zakorgy

However, it seems there's an issue with the headless mode: when ReadBuffer is called on the default framebuffer with the value `GL_BACK`, like [here](https://github.com/servo/servo/blob/e1103176e3de8a8c0996d1d60c092cfd8f60e805/tests/wpt/webgl/tests/conformance2/renderbuffers/readbuffer.html#L77), in headless mode an invalid operation is generated. In non-headless mode the whole test completes successfully:
![sshot](https://user-images.githubusercontent.com/4354863/76845770-b0ffbd80-683f-11ea-8103-a81512188808.png)

---
<!-- 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. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.