-
Notifications
You must be signed in to change notification settings - Fork 933
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
Accept only vec3
(not vecN
) for the cross
built-in
#6171
Accept only vec3
(not vecN
) for the cross
built-in
#6171
Conversation
144288e
to
c728ede
Compare
89796ae
to
969f806
Compare
@teoxoy: Thoughts on this question in the OP?
|
969f806
to
1300c54
Compare
I don't know, I'd have to check. |
GLSL and SPIR-V say they must be |
Ah, yep, all these sources state only accepting 3-component vectors:
There seems to be some divergence in the float types accepted on these platforms, but that's orthogonal to this PR. 😀 Thanks to @teoxoy for onboarding me onto the language spec. resources I cited above. 🍻 |
Connections
Resolves #6153.
Description
Previously, we only checked that a single type of vector of floats was being used as input for the
cross
built-in. Onlyvec3
should be permitted; so, narrow our checking of the vector type to 3 elements.Testing
Tests have been added to ensure coverage of what we should and should not accept for the
cross
built-in.Open questions:
Do we need to permit more than justNope!vec3
from language frontends other than WGSL?Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.