Commit 7350f523 authored by Connor Abbott's avatar Connor Abbott Committed by Lyude Paul

bifrost/asm: Don't assume there are no instructions after EOS

In compute shaders with an early return, there can be more than one
clause with an eos bit set. Just parse all the clauses.
parent 3216aaac
......@@ -2021,13 +2021,6 @@ if __name__ == '__main__':
clauses[-1].next_clause_type = clause.clause_type
clauses.append(clause)
if clause.end_of_shader:
for clause in clauses:
clause.dump()
clauses = []
break
inst = clause.get_pending_instruction()
......@@ -2044,6 +2037,9 @@ if __name__ == '__main__':
unexpected_eof = False
for clause in clauses:
clause.dump()
except StopIteration as e:
if unexpected_eof:
raise ParsingException('Unexpected EOF') from e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment