Skip to content

Commit

Permalink
use const ctx for texture sampler offset
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev committed Jan 23, 2025
1 parent 11e5e8b commit 4789239
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions naga/src/front/wgsl/lower/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1626,8 +1626,7 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {
value: match case.value {
ast::SwitchValue::Expr(expr) => {
let span = ctx.ast_expressions.get_span(expr);
let expr =
self.expression(expr, &mut ctx.as_global().as_const())?;
let expr = self.expression(expr, &mut ctx.as_const())?;
match ctx.module.to_ctx().eval_expr_to_literal(expr) {
Some(crate::Literal::I32(value)) if !uint => {
crate::SwitchValue::I32(value)
Expand Down

0 comments on commit 4789239

Please sign in to comment.