Commit ffabfe2a authored by Connor Abbott's avatar Connor Abbott

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 2876dfc9
...@@ -2021,13 +2021,6 @@ if __name__ == '__main__': ...@@ -2021,13 +2021,6 @@ if __name__ == '__main__':
clauses[-1].next_clause_type = clause.clause_type clauses[-1].next_clause_type = clause.clause_type
clauses.append(clause) clauses.append(clause)
if clause.end_of_shader:
for clause in clauses:
clause.dump()
clauses = []
break break
inst = clause.get_pending_instruction() inst = clause.get_pending_instruction()
...@@ -2044,6 +2037,9 @@ if __name__ == '__main__': ...@@ -2044,6 +2037,9 @@ if __name__ == '__main__':
unexpected_eof = False unexpected_eof = False
for clause in clauses:
clause.dump()
except StopIteration as e: except StopIteration as e:
if unexpected_eof: if unexpected_eof:
raise ParsingException('Unexpected EOF') from e 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