-
Notifications
You must be signed in to change notification settings - Fork 905
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
[naga const-eval] LiteralVector
and some demo builtins
#6213
base: trunk
Are you sure you want to change the base?
Conversation
LiteralVector
and some demoLiteralVector
and some demo builtins
Any thought @teoxoy @ErichDonGubler ? |
Hoo boy. This looks really involved, and I definitely haven't yet taken the time to dig into everything. I'm not sure if I'll be able to prioritize this within the week, but I will say this: Something that allows more |
I do not have CTS results yet, as I didn't handle all necessary types in dot,cross yet.
Actually this should be correct per spec, just not optimal performance wise (due to redundant checking). |
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
wgpu/naga/src/front/wgsl/lower/mod.rs Line 1369 in 0e352f5
|
Signed-off-by: sagudev <[email protected]>
results from servo's CTS run:
|
|
Connections
Implements some #4507
Description
Existing macros work for component-wise cases where return type is equal to input type. But it's hard to generalize macros further. So I present
LiteralVector
:that abstracts away at least vector obtaining logic. This makes somehow easier to implement some builtins like
dot
,cross
,any
,all
, ... although with still way to much repetition (maybe macro could fix that, although I am more inclined to use num create for number traits).Testing
TODO
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.