diff --git a/src/front/spv/function.rs b/src/front/spv/function.rs index 75ca695882..401c14a602 100644 --- a/src/front/spv/function.rs +++ b/src/front/spv/function.rs @@ -65,6 +65,7 @@ impl> super::Parser { pub(super) fn parse_function(&mut self, module: &mut crate::Module) -> Result<(), Error> { self.lookup_expression.clear(); self.lookup_load_override.clear(); + self.lookup_sampled_image.clear(); let result_type_id = self.next()?; let fun_id = self.next()?; @@ -391,8 +392,6 @@ impl> super::Parser { module.apply_common_default_interpolation(); - self.lookup_expression.clear(); - self.lookup_sampled_image.clear(); Ok(()) } } diff --git a/src/front/wgsl/mod.rs b/src/front/wgsl/mod.rs index 7fa77d0eea..8a9d9b3040 100644 --- a/src/front/wgsl/mod.rs +++ b/src/front/wgsl/mod.rs @@ -2245,6 +2245,10 @@ impl Parser { width, } } + "atomic" => { + let (kind, width) = lexer.next_scalar_generic()?; + crate::TypeInner::Atomic { kind, width } + } "ptr" => { lexer.expect_generic_paren('<')?; let (ident, span) = lexer.next_ident_with_span()?;