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 WebGLSampler support #24333
Add WebGLSampler support #24333
Conversation
highfive
commented
Oct 1, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Oct 1, 2019
|
|
|
Rebased to master. |
|
|
|
Looks good, with a couple questions about new test results! |
| match value { | ||
| WebGLSamplerValue::GLenum(value) => { | ||
| let allowed_values = match pname { | ||
| constants::TEXTURE_MIN_FILTER => vec![ |
This comment has been minimized.
This comment has been minimized.
jdm
Oct 2, 2019
Member
Rather than using vecs here, which requires allocation, we should be able to use slices (&[...]) instead.
This comment has been minimized.
This comment has been minimized.
mmatyas
Oct 3, 2019
Author
Contributor
Yes, that's what I tried first, but the compiler refuses it because different branches return slices with different number of elements. Perhaps we should use something like SmallVec?
This comment has been minimized.
This comment has been minimized.
| @@ -1,5 +1,5 @@ | |||
| [gl-object-get-calls.html] | |||
| expected: ERROR | |||
| expected: TIMEOUT | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mmatyas
Oct 3, 2019
Author
Contributor
Actually there are some (unrelated) buffer drawing calls in the tests that produce GL errors with my integrated GPU, yet work fine for others, including the CI. For the tests in this PR, the crash to timeout changes are due to an error message appearing while running the test, which stops executing the rest of the JS code, while the enum error happens because I've uncommented the failing drawing call during development (and forgot to remove these tests from the PR). I'd be interested if the CI reports any errors other than these, then I do plan to take a look into the buffer implementation and its issues too.
| @@ -1,2 +1,2 @@ | |||
| [sampler-uniforms.html] | |||
| expected: CRASH | |||
| expected: TIMEOUT | |||
This comment has been minimized.
This comment has been minimized.
| @@ -51,3 +51,9 @@ | |||
| [WebGL test #32: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).] | |||
| expected: FAIL | |||
|
|
|||
| [WebGL test #33: getError expected: NO_ERROR. Was INVALID_ENUM : after evaluating: gl.bindSampler(0, sampler)] | |||
This comment has been minimized.
This comment has been minimized.
|
Rebased to master. |
|
Fixed the format, updated with the array slices and removed the tests I'm not certain about. |
|
@bors-servo try=wpt |
Add WebGLSampler support Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.13 <!-- 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 - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24333) <!-- Reviewable:end -->
|
|
|
|
Interesting; for me, |
|
Is it any different if you run those tests with --headless? |
|
I've managed to reproduce the errors with headless; looking into it, they seem to be actually unrelated to samplers:
|
|
In that case, adding the new expected failures values sounds fine. Thanks for looking into the failures! |
|
Ok, updated with the test changes. |
|
@bors-servo r+ |
|
|
Add WebGLSampler support Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.13 <!-- 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 - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24333) <!-- Reviewable:end -->
|
|
mmatyas commentedOct 1, 2019
•
edited by SimonSapin
Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.13
cc @jdm @zakorgy
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is