-
Notifications
You must be signed in to change notification settings - Fork 968
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] Explicitly use global const ctx in offset #6945
Conversation
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
#[allow(dead_code)] | ||
fn as_const(&mut self) -> ExpressionContext<'source, '_, '_> { |
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.
It might make sense to remove this and add it back later.
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 agree; the PR would become a one line change then.
I think it would be fine to fold it into #6935. Or would you still like to land this separately?
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 think it would make sense to land it as it stands now.
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.
Or maybe not given how clippy/rustdoc hates me, but I would still like to land this separately. Reverted to initial version.
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.
That's fair.
afb5706
to
d0ce4e1
Compare
Connections
Preparation for #6935
Description
Most of wgsl-in assumes constants are only global. In order to fix this in #6935 this PR makes TetureSampler offset explicitly use global const ctx and removes
as_const
on expr ctx.Testing
This is tested by existing tests
Checklist
cargo fmt
.taplo format
.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.