[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:
teoxoy authored and Teodor Tanasoaia committed 2023-10-12 13:13:26 +02:00
1 parent c5d884fca8
commit a730236b68
44 files changed
+2917 -2770

No files matched your search

+1 -1
View File
@@ -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))
}
}