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
Use active uniforms data to implement gl.uniform* checks #21184
Conversation
Heads up! This PR modifies the following files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but there's also a lot of duplication of checks. It would be good to file a followup issue to figure out way to reduce the duplication, similar to https://searchfox.org/mozilla-central/source/dom/canvas/WebGLContextGL.cpp#1964-2061.
) { | ||
self.with_location(location, |location| { | ||
match location.type_() { | ||
constants::FLOAT_VEC2 => {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we want to keep handling booleans in other methods as well - https://www.khronos.org/registry/OpenGL-Refpages/es3.0/ says:
Either the i, ui or f variants may be used to provide values for uniform variables of type bool, bvec2, bvec3, bvec4,
or arrays of these. The uniform variable will be set to false if the input value is 0 or 0.0f, and it will be set to true
otherwise.
|
I reduced the duplication a tad bit but I'll file an issue later about that. I also fixed the various boolean uniforms that were missing. |
@bors-servo r=jdm |
📌 Commit 1c585c3 has been approved by |
Use active uniforms data to implement gl.uniform* checks <!-- 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/21184) <!-- Reviewable:end -->
Fixed the boolean stuff and will file an issue for the duplication.
💔 Test failed - linux-rel-css |
|
Needed to check for @bors-servo r=jdm |
📌 Commit 476640c has been approved by |
Use active uniforms data to implement gl.uniform* checks <!-- 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/21184) <!-- Reviewable:end -->
☀️ Test successful - android, android-x86, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
This change is