-
Notifications
You must be signed in to change notification settings - Fork 1k
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] Support local const in ImageSample.offset #7213
Conversation
Signed-off-by: sagudev <[email protected]>
{"fail_fast": false, "matrix": [{"name": "Linux (Production, WPT)", "workflow": "linux", "wpt_layout": "2020", "profile": "production", "unit_tests": false, "build_libservo": false, "bencher": false, "wpt_args": "_webgpu"}]}
eedefed
to
2c8a3fc
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8428b4b
to
7f1b037
Compare
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.
Good stuff!
I need to recheck but I think https://github.com/sagudev/wgpu/blob/f011b1b1fba352897397e762cdc04123522e11ae/naga/src/lib.rs#L2206 is obsolete too. |
f011b1b
to
4f9fb8d
Compare
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
Signed-off-by: sagudev <[email protected]>
4f9fb8d
to
0bf1098
Compare
I updated docs and rebased, so this should be ready to land. |
This seemed to regress one of our late-running tests, parsing the dota2 shaders: https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/lazy.yml#L16-L40 |
Yeah, I noticed this before. Fix is already done in #7297 |
Connections
Continuation of #6935, fixes #7230.
Description
ImageSample.offset was assumed to be global const everywhere, so this PR changes the requirement to be an expr that is also local, this required fixing all parts of naga ir (compaction,validation,analyzer); wgsl-in to accept local const and all backends to support writing const expr that come from function expr arena (instead of global expr arena).
This PR needs to be squashed, commits are separated only for easier review.
Testing
CTS run in servo: https://github.com/sagudev/servo/actions/runs/13517257103/job/37775703718 is good and changed existing test.
Checklist
cargo fmt
.taplo format
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.