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

Allow more WebGL2 FBO attachment formats #25852

Merged
merged 1 commit into from Mar 3, 2020

Conversation

@mmatyas
Copy link
Contributor

mmatyas commented Feb 27, 2020

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

Related format tables:

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 Feb 27, 2020

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webglframebuffer.rs, components/script/dom/webglrenderbuffer.rs
  • @KiChjang: components/script/dom/webglframebuffer.rs, components/script/dom/webglrenderbuffer.rs
@jdm
Copy link
Member

jdm commented Feb 27, 2020

@bors-servo r+
Thanks!

@bors-servo
Copy link
Contributor

bors-servo commented Feb 27, 2020

📌 Commit 1ac633e has been approved by jdm

@highfive highfive assigned jdm and unassigned paulrouget Feb 27, 2020
@bors-servo
Copy link
Contributor

bors-servo commented Feb 27, 2020

Testing commit 1ac633e with merge c286bee...

bors-servo added a commit that referenced this pull request Feb 27, 2020
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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Feb 27, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Feb 27, 2020

This seems to be affecting the WebGL1 tests in unexpected ways:

1 unexpected results that are NOT known-intermittents:
  â–¶ Unexpected subtest result in /_webgl/conformance/extensions/oes-texture-half-float.html:
  │ FAIL [expected PASS] WebGL test #88: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : readPixels should fail on incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : readPixels should fail on incomplete framebuffers. expected true got false
  │ FAIL [expected PASS] WebGL test #94: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : readPixels should fail on incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : readPixels should fail on incomplete framebuffers. expected true got false
  │ FAIL [expected PASS] WebGL test #100: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : readPixels should fail on incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was INVALID_OPERATION : readPixels should fail on incomplete framebuffers. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:5
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ runFramebufferTest/<@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:454:13
  │ runFramebufferTest@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:441:50
  │ @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:192:17
  â”” @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:194:11

  â–¶ Unexpected subtest result in /_webgl/conformance/extensions/oes-texture-half-float.html:
  │ FAIL [expected PASS] WebGL test #84: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT) should be null (of type object). Was 6408 (of type number).
  │   → assert_true: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT) should be null (of type object). Was 6408 (of type number). expected true got false
  │ FAIL [expected PASS] WebGL test #90: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT) should be null (of type object). Was 6408 (of type number).
  │   → assert_true: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT) should be null (of type object). Was 6408 (of type number). expected true got false
  │ FAIL [expected PASS] WebGL test #96: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT) should be null (of type object). Was 6408 (of type number).
  │   → assert_true: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT) should be null (of type object). Was 6408 (of type number). expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ shouldBe@http://web-platform.test:8000/_webgl/js/js-test-pre.js:406:9
  │ shouldBeNull@http://web-platform.test:8000/_webgl/js/js-test-pre.js:435:29
  │ runFramebufferTest/<@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:447:9
  │ runFramebufferTest@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:441:50
  │ @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:192:17
  â”” @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:194:11

  â–¶ Unexpected subtest result in /_webgl/conformance/extensions/oes-texture-half-float.html:
  │ FAIL [expected PASS] WebGL test #87: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_TYPE should fail for incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_TYPE should fail for incomplete framebuffers. expected true got false
  │ FAIL [expected PASS] WebGL test #93: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_TYPE should fail for incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_TYPE should fail for incomplete framebuffers. expected true got false
  │ FAIL [expected PASS] WebGL test #99: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_TYPE should fail for incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_TYPE should fail for incomplete framebuffers. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:5
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ runFramebufferTest/<@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:451:13
  │ runFramebufferTest@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:441:50
  │ @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:192:17
  â”” @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:194:11

  â–¶ Unexpected subtest result in /_webgl/conformance/extensions/oes-texture-half-float.html:
  │ FAIL [expected PASS] WebGL test #85: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_FORMAT should fail for incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_FORMAT should fail for incomplete framebuffers. expected true got false
  │ FAIL [expected PASS] WebGL test #91: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_FORMAT should fail for incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_FORMAT should fail for incomplete framebuffers. expected true got false
  │ FAIL [expected PASS] WebGL test #97: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_FORMAT should fail for incomplete framebuffers.
  │   → assert_true: getError expected: INVALID_OPERATION. Was NO_ERROR : IMPLEMENTATION_COLOR_READ_FORMAT should fail for incomplete framebuffers. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:5
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ runFramebufferTest/<@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:448:13
  │ runFramebufferTest@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:441:50
  │ @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:192:17
  â”” @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:194:11

  â–¶ Unexpected subtest result in /_webgl/conformance/extensions/oes-texture-half-float.html:
  │ FAIL [expected PASS] WebGL test #83: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053.
  │   → assert_true: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053. expected true got false
  │ FAIL [expected PASS] WebGL test #89: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053.
  │   → assert_true: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053. expected true got false
  │ FAIL [expected PASS] WebGL test #95: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053.
  │   → assert_true: gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be 36054. Was 36053. expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ shouldBe@http://web-platform.test:8000/_webgl/js/js-test-pre.js:404:9
  │ runFramebufferTest/<@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:445:9
  │ runFramebufferTest@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:441:50
  │ @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:192:17
  â”” @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:194:11

  â–¶ Unexpected subtest result in /_webgl/conformance/extensions/oes-texture-half-float.html:
  │ FAIL [expected PASS] WebGL test #86: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE) should be null (of type object). Was 5121 (of type number).
  │   → assert_true: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE) should be null (of type object). Was 5121 (of type number). expected true got false
  │ FAIL [expected PASS] WebGL test #92: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE) should be null (of type object). Was 5121 (of type number).
  │   → assert_true: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE) should be null (of type object). Was 5121 (of type number). expected true got false
  │ FAIL [expected PASS] WebGL test #98: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE) should be null (of type object). Was 5121 (of type number).
  │   → assert_true: gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE) should be null (of type object). Was 5121 (of type number). expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ shouldBe@http://web-platform.test:8000/_webgl/js/js-test-pre.js:406:9
  │ shouldBeNull@http://web-platform.test:8000/_webgl/js/js-test-pre.js:435:29
  │ runFramebufferTest/<@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:450:9
  │ runFramebufferTest@http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:441:50
  │ @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:192:17
  â”” @http://web-platform.test:8000/_webgl/conformance/extensions/oes-texture-half-float.html:194:11
3 unexpected results that are NOT known-intermittents:
  â–¶ Unexpected subtest result in /_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:
  │ FAIL [expected PASS] WebGL test #408: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was NO_ERROR : 
  │   → assert_true: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was NO_ERROR :  expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:5
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ testAttachment@http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:112:13
  â”” @http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:358:9

  â–¶ Unexpected subtest result in /_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:
  │ FAIL [expected PASS] WebGL test #407: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was NO_ERROR : 
  │   → assert_true: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was NO_ERROR :  expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:5
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ testAttachment@http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:110:13
  â”” @http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:358:9

  â–¶ Unexpected subtest result in /_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:
  │ FAIL [expected PASS] WebGL test #398: gl.checkFramebufferStatus(gl.FRAMEBUFFER) returned 36053
  │   → assert_true: gl.checkFramebufferStatus(gl.FRAMEBUFFER) returned 36053 expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ checkFramebufferForAllowedStatuses@http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:70:9
  │ testAttachment@http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:107:5
  â”” @http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:356:9

  â–¶ Unexpected subtest result in /_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:
  │ FAIL [expected PASS] WebGL test #400: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was NO_ERROR : 
  │   → assert_true: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was NO_ERROR :  expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:5
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ testAttachment@http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:112:13
  â”” @http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:356:9

  â–¶ Unexpected subtest result in /_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:
  │ FAIL [expected PASS] WebGL test #399: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was NO_ERROR : 
  │   → assert_true: getError expected: INVALID_FRAMEBUFFER_OPERATION. Was NO_ERROR :  expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ glErrorShouldBeImpl@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1679:5
  │ glErrorShouldBe@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1653:10
  │ testAttachment@http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:110:13
  â”” @http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:356:9

  â–¶ Unexpected subtest result in /_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:
  │ FAIL [expected PASS] WebGL test #406: gl.checkFramebufferStatus(gl.FRAMEBUFFER) returned 36053
  │   → assert_true: gl.checkFramebufferStatus(gl.FRAMEBUFFER) returned 36053 expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ checkFramebufferForAllowedStatuses@http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:70:9
  │ testAttachment@http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:107:5
  â”” @http://web-platform.test:8000/_webgl/conformance/renderbuffers/framebuffer-object-attachment.html:358:9


  â–¶ Unexpected subtest result in /_webgl/conformance/textures/misc/copy-tex-image-2d-formats.html:
  │ FAIL [expected PASS] WebGL test #16: Creating framebuffer from ALPHA texture succeeded even though it is not a renderable format
  │   → assert_true: Creating framebuffer from ALPHA texture succeeded even though it is not a renderable format expected true got false
  │ FAIL [expected PASS] WebGL test #17: Creating framebuffer from LUMINANCE texture succeeded even though it is not a renderable format
  │   → assert_true: Creating framebuffer from LUMINANCE texture succeeded even though it is not a renderable format expected true got false
  │ FAIL [expected PASS] WebGL test #18: Creating framebuffer from LUMINANCE_ALPHA texture succeeded even though it is not a renderable format
  │   → assert_true: Creating framebuffer from LUMINANCE_ALPHA texture succeeded even though it is not a renderable format expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ testBackbufferFormats@http://web-platform.test:8000/_webgl/conformance/textures/misc/copy-tex-image-2d-formats.html:120:9
  â”” @http://web-platform.test:8000/_webgl/conformance/textures/misc/copy-tex-image-2d-formats.html:93:1


  â–¶ Unexpected subtest result in /_webgl/conformance/textures/misc/texture-attachment-formats.html:
  │ FAIL [expected PASS] WebGL test #14: should be 63,63,63,255 with tolerance 2,2,2,0\nat (0, 0) expected: 63,63,63,255 was 64,0,0,255
  │   → assert_true: should be 63,63,63,255 with tolerance 2,2,2,0
  │   → at (0, 0) expected: 63,63,63,255 was 64,0,0,255 expected true got false
  │ FAIL [expected PASS] WebGL test #16: should be 63,63,63,63 with tolerance 2,2,2,2\nat (0, 0) expected: 63,63,63,63 was 64,0,0,64
  │   → assert_true: should be 63,63,63,63 with tolerance 2,2,2,2
  │   → at (0, 0) expected: 63,63,63,63 was 64,0,0,64 expected true got false
  │ 
  │ reportTestResultsToHarness/<@http://web-platform.test:8000/_webgl/js/js-test-pre.js:123:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1926: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:7
  │ testFailed@http://web-platform.test:8000/_webgl/js/js-test-pre.js:249:5
  │ checkCanvasRect/<@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1269:9
  │ checkCanvasRectColor@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1225:9
  │ checkCanvasRect@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1257:3
  │ checkCanvas@http://web-platform.test:8000/_webgl/js/webgl-test-utils.js:1287:3
  │ testFormat@http://web-platform.test:8000/_webgl/conformance/textures/misc/texture-attachment-formats.html:117:9
  â”” @http://web-platform.test:8000/_webgl/conformance/textures/misc/texture-attachment-formats.html:185:5

@mmatyas mmatyas force-pushed the szeged:mmatyas__webgl_fns_renderbuf_enums branch from 1ac633e to 09b0962 Mar 2, 2020
@mmatyas
Copy link
Contributor Author

mmatyas commented Mar 2, 2020

Added a workaround for that which should fix the issue. I wonder though if there's some better way to append values to the constrains.

@jdm jdm added the S-fails-tidy label Mar 2, 2020
&[constants::DEPTH_STENCIL][..],
];
let attachment_constraints = match self.webgl_version {
WebGLVersion::WebGL1 => [

This comment has been minimized.

Copy link
@jdm

jdm Mar 2, 2020

Member

If the Webgl2 constraints are a superset of the webgl1 constraints, we should be able to do:

let webgl1_attachment_constraints = &[[constants::DEPTH_COMPONENT16, ...][..], &[constants::STENCIL_INDEX8, ...][..], &[constants::DEPTH_STENCIL][..]];
let webgl2_attachment_constraints = &[[constants::DEPTH_STENCIL][..], &[constants::DEPTH_STENCIL][..], &[]];
let empty = &[];
let extra_constraints = match self.webgl_version {
    WebGLVersion::WebGL1 => empty.iter(),
    WebGLVersion::WebGL2 => webgl2_attachment_constraints.iter(),
};
let attachment_constraints = webgl1_attachment_constraints.iter().zip(extra_constraints).map(|(a, b)| a.iter().chain(b.iter()));

Then any code like check_attachment_constraints that iterates over the constraints can use impl Iterator<&'a u32>. I made a snippet at https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e0cda590f60315bf122372e123bdf318 to demonstrate.

This comment has been minimized.

Copy link
@mmatyas

mmatyas Mar 3, 2020

Author Contributor

Thanks!

@jdm
Copy link
Member

jdm commented Mar 2, 2020

@bors-servo try=wpt

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

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

bors-servo commented Mar 2, 2020

Trying commit 09b0962 with merge 5611a59...

@jdm
Copy link
Member

jdm commented Mar 2, 2020

This also needs a ./mach fmt.

@bors-servo
Copy link
Contributor

bors-servo commented Mar 2, 2020

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

@mmatyas mmatyas force-pushed the szeged:mmatyas__webgl_fns_renderbuf_enums branch from 09b0962 to 9fc8ab5 Mar 3, 2020
@mmatyas
Copy link
Contributor Author

mmatyas commented Mar 3, 2020

Updated, thanks.

@jdm
Copy link
Member

jdm commented Mar 3, 2020

Needs a mach fmt.

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
@mmatyas mmatyas force-pushed the szeged:mmatyas__webgl_fns_renderbuf_enums branch from 9fc8ab5 to 859a3a4 Mar 3, 2020
@mmatyas
Copy link
Contributor Author

mmatyas commented Mar 3, 2020

Ah sorry, fixed.

@jdm
Copy link
Member

jdm commented Mar 3, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Mar 3, 2020

📌 Commit 859a3a4 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Mar 3, 2020

Testing commit 859a3a4 with merge 9fd2afe...

bors-servo added a commit that referenced this pull request Mar 3, 2020
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. -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 3, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Mar 3, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Mar 3, 2020

Testing commit 859a3a4 with merge 386759c...

@bors-servo
Copy link
Contributor

bors-servo commented Mar 3, 2020

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing 386759c to master...

@bors-servo bors-servo merged commit 386759c into servo:master Mar 3, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
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

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