[spv-in] Allow OpLine anywhere in the function

This commit is contained in:
João Capucho 2021-09-18 21:32:24 +01:00 committed by Dzmitry Malyshau
parent 9b34d503da
commit aea755fd32

View File

@ -141,6 +141,12 @@ impl<I: Iterator<Item = u32>> super::Parser<I> {
let fun_inst = self.next_inst()?; let fun_inst = self.next_inst()?;
log::debug!("{:?}", fun_inst.op); log::debug!("{:?}", fun_inst.op);
match fun_inst.op { match fun_inst.op {
spirv::Op::Line => {
fun_inst.expect(4)?;
let _file_id = self.next()?;
let _row_id = self.next()?;
let _col_id = self.next()?;
}
spirv::Op::Label => { spirv::Op::Label => {
// Read the label ID // Read the label ID
fun_inst.expect(2)?; fun_inst.expect(2)?;