mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Atomic parsing in WGSL
This commit is contained in:
committed by
Dzmitry Malyshau
parent
8cb09c24c5
commit
33db45e681
@@ -65,6 +65,7 @@ impl<I: Iterator<Item = u32>> super::Parser<I> {
|
||||
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<I: Iterator<Item = u32>> super::Parser<I> {
|
||||
|
||||
module.apply_common_default_interpolation();
|
||||
|
||||
self.lookup_expression.clear();
|
||||
self.lookup_sampled_image.clear();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()?;
|
||||
|
||||
Reference in New Issue
Block a user