mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
[wgsl-in] eagerly evaluate const-expressions
[wgsl-in] support const-expressions in attributes allow `Splat` as an evaluated const-expression type
This commit is contained in:
1 parent
c5d884fca8
commit
a730236b68
44 files changed
+2917
-2770
No files matched your search
@@ -226,7 +226,7 @@ impl<'source> ParsingContext<'source> {
|
||||
let expr = self.parse_conditional(frontend, &mut ctx, &mut stmt_ctx, None)?;
|
||||
let (root, meta) = ctx.lower_expect(stmt_ctx, frontend, expr, ExprPos::Rhs)?;
|
||||
|
||||
Ok((ctx.solve_constant(root, meta)?, meta))
|
||||
Ok((ctx.eval_constant(root, meta)?, meta))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user