mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
[naga] Tweak comments in ConstantEvaluator::try_eval_and_append
.
I found I needed a little bit more detail here.
This commit is contained in:
parent
bb15286df2
commit
8107f80b7f
@ -713,7 +713,10 @@ impl<'a> ConstantEvaluator<'a> {
|
||||
match self.expression_kind_tracker.type_of_with_expr(&expr) {
|
||||
ExpressionKind::Const => {
|
||||
let eval_result = self.try_eval_and_append_impl(&expr, span);
|
||||
// avoid errors on unimplemented functionality if possible
|
||||
// We should be able to evaluate `Const` expressions at this
|
||||
// point. If we failed to, then that probably means we just
|
||||
// haven't implemented that part of constant evaluation. Work
|
||||
// around this by simply emitting it as a run-time expression.
|
||||
if self.behavior.has_runtime_restrictions()
|
||||
&& matches!(
|
||||
eval_result,
|
||||
|
Loading…
Reference in New Issue
Block a user