Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for WebGL2 read and draw buffer settings #25905
Conversation
highfive
commented
Mar 5, 2020
|
Heads up! This PR modifies the following files:
|
|
This needs a rebase. |
d655a0c
to
7537add
|
Indeed, updated. |
|
Nice! @bors-servo r+ |
|
|
…=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. -->
|
|
|
Maybe need an expectation update for those new FAIL tests
|
|
I suspect that was what was meant in the original description:
Removing the WIP marker and merging it may not have been the optimal choice :) |
|
Ah sorry, my eyes saw the stock PR template and so my brain just skipped it. |
|
|
7537add
to
89213bc
|
I was looked into the crashes, and when the drawbuffers method is called I get a panic from
(ie. At first the crash happened in (Also rebased.) |
|
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. |
|
I filed #25952 and 25954. |
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
89213bc
to
0afe27e
|
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. |
|
@bors-servo try=wpt |
…=<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 r=nox |
|
|
|
|
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:  --- <!-- 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. -->
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:  --- <!-- 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. -->
mmatyas commentedMar 5, 2020
Adds support for the
ReadBufferandDrawBuffersWebGL2 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 -ddoes not report any errors./mach test-tidydoes not report any errors