Skip to content

Commit

Permalink
fixup! [wgsl-in] eagerly evaluate const-expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Oct 10, 2023
1 parent c3e23c5 commit 3d24e50
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/valid/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,10 @@ impl super::Validator {
components.iter().map(|&handle| mod_info[handle].clone()),
)?;
}
E::Splat { value, .. } => {
match *mod_info.const_expression_types[value.index()].inner_with(gctx.types) {
crate::TypeInner::Scalar { .. } => {}
_ => return Err(super::ConstExpressionError::InvalidSplatType(value)),
}
}
E::Splat { value, .. } => match *mod_info[value].inner_with(gctx.types) {
crate::TypeInner::Scalar { .. } => {}
_ => return Err(super::ConstExpressionError::InvalidSplatType(value)),
},
_ => return Err(super::ConstExpressionError::NonConst),
}

Expand Down

0 comments on commit 3d24e50

Please sign in to comment.