We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ConstantEvaluator::try_eval_and_append
1 parent 74c26a2 commit e5e625eCopy full SHA for e5e625e
naga/src/proc/constant_evaluator.rs
@@ -713,7 +713,10 @@ impl<'a> ConstantEvaluator<'a> {
713
match self.expression_kind_tracker.type_of_with_expr(&expr) {
714
ExpressionKind::Const => {
715
let eval_result = self.try_eval_and_append_impl(&expr, span);
716
- // avoid errors on unimplemented functionality if possible
+ // We should be able to evaluate `Const` expressions at this
717
+ // point. If we failed to, then that probably means we just
718
+ // haven't implemented that part of constant evaluation. Work
719
+ // around this by simply emitting it as a run-time expression.
720
if self.behavior.has_runtime_restrictions()
721
&& matches!(
722
eval_result,
0 commit comments