mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-28 09:09:19 +01:00
[spv-in] support OpModuleProcessed (#753)
This commit is contained in:
1 parent
24eaad10fc
commit
f0cf6a6772
1 file changed
+12
@@ -2034,6 +2034,7 @@ impl<I: Iterator<Item = u32>> Parser<I> {
|
||||
Op::SourceExtension => self.parse_source_extension(inst),
|
||||
Op::Name => self.parse_name(inst),
|
||||
Op::MemberName => self.parse_member_name(inst),
|
||||
Op::ModuleProcessed => self.parse_module_processed(inst),
|
||||
Op::Decorate => self.parse_decorate(inst),
|
||||
Op::MemberDecorate => self.parse_member_decorate(inst),
|
||||
Op::TypeVoid => self.parse_type_void(inst),
|
||||
@@ -2295,6 +2296,17 @@ impl<I: Iterator<Item = u32>> Parser<I> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn parse_module_processed(&mut self, inst: Instruction) -> Result<(), Error> {
|
||||
self.switch(ModuleState::Name, inst.op)?;
|
||||
inst.expect_at_least(2)?;
|
||||
let (_info, left) = self.next_string(inst.wc - 1)?;
|
||||
//Note: string is ignored
|
||||
if left != 0 {
|
||||
return Err(Error::InvalidOperand);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn parse_decorate(&mut self, inst: Instruction) -> Result<(), Error> {
|
||||
self.switch(ModuleState::Annotation, inst.op)?;
|
||||
inst.expect_at_least(3)?;
|
||||
|
||||
Reference in new issue
Block a user