From d7f8d0cdf3289991225ff82b92d7b4b2b1887a32 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 5 Apr 2024 07:44:09 -0700 Subject: [PATCH] Don't change GLSL. Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com> --- naga/src/front/glsl/parser/declarations.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/naga/src/front/glsl/parser/declarations.rs b/naga/src/front/glsl/parser/declarations.rs index 3fa4d25cc29..2d253a378d0 100644 --- a/naga/src/front/glsl/parser/declarations.rs +++ b/naga/src/front/glsl/parser/declarations.rs @@ -251,12 +251,7 @@ impl<'source> ParsingContext<'source> { init.and_then(|expr| ctx.ctx.lift_up_const_expression(expr).ok()); late_initializer = None; } else if let Some(init) = init { - if ctx.is_inside_loop - || !ctx - .ctx - .local_expression_kind_tracker - .is_const_or_override(init) - { + if ctx.is_inside_loop || !ctx.ctx.local_expression_kind_tracker.is_const(init) { decl_initializer = None; late_initializer = Some(init); } else {