Repository navigation
Add WebGLSampler support - #24333
Add WebGLSampler support#24333
Conversation
|
Heads up! This PR modifies the following files:
|
|
☔ The latest upstream changes (presumably #24178) made this pull request unmergeable. Please resolve the merge conflicts. |
9dff313 to
37b79d9
Compare
|
Rebased to master. |
|
☔ The latest upstream changes (presumably #24250) made this pull request unmergeable. Please resolve the merge conflicts. |
jdm
left a comment
There was a problem hiding this comment.
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![ |
There was a problem hiding this comment.
Rather than using vecs here, which requires allocation, we should be able to use slices (&[...]) instead.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Use &[FOO][..] to force slices instead of sized arrays.
| @@ -1,5 +1,5 @@ | |||
| [gl-object-get-calls.html] | |||
| expected: ERROR | |||
| expected: TIMEOUT | |||
There was a problem hiding this comment.
We should figure out why this is timing out now.
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
We should figure out why this is timing out now.
| [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)] |
37b79d9 to
21db457
Compare
|
Rebased to master. |
21db457 to
bdfcbab
Compare
|
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 -->
|
💔 Test failed - linux-rel-wpt |
|
|
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! |
bdfcbab to
26df196
Compare
|
Ok, updated with the test changes. |
|
@bors-servo r+ |
|
📌 Commit 26df196 has been approved by |
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 -->
|
☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster |
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