mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[naga wgsl-in] Ensure ConstantEvaluator::cast_array() handles Constant expressions
It must call ConstantEvaluator::check_and_get() to possibly retrieve the constant expression from a separate arena, like is currently done when evaluating `As` expressions for non-array casts.
This commit is contained in:
@@ -1717,6 +1717,8 @@ impl<'a> ConstantEvaluator<'a> {
|
||||
target: crate::Scalar,
|
||||
span: Span,
|
||||
) -> Result<Handle<Expression>, ConstantEvaluatorError> {
|
||||
let expr = self.check_and_get(expr)?;
|
||||
|
||||
let Expression::Compose { ty, ref components } = self.expressions[expr] else {
|
||||
return self.cast(expr, target, span);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user