Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev committed Jan 18, 2025
1 parent 7a17c52 commit d0ce4e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion naga/src/front/wgsl/lower/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ pub struct ExpressionContext<'source, 'temp, 'out> {
}

impl<'source, 'temp, 'out> ExpressionContext<'source, 'temp, 'out> {
#[allow(dead_code)]
fn as_const(&mut self) -> ExpressionContext<'source, '_, '_> {
ExpressionContext {
globals: self.globals,
Expand Down Expand Up @@ -2917,7 +2918,7 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {

let offset = args
.next()
.map(|arg| self.expression(arg, &mut ctx.as_const()))
.map(|arg| self.expression(arg, &mut ctx.as_global().as_const()))
.ok()
.transpose()?;

Expand Down

0 comments on commit d0ce4e1

Please sign in to comment.