pan/va: Assert no instructions are duplicated
Caught a bug in the published PDF. Whoops! Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12025>
This commit is contained in:
parent
02e378b628
commit
c43327c049
|
@ -360,3 +360,13 @@ for child in root:
|
|||
build_instr(child)
|
||||
|
||||
instruction_dict = { ins.name: ins for ins in instructions }
|
||||
|
||||
# Validate there are no duplicated instructions
|
||||
if len(instruction_dict) != len(instructions):
|
||||
import collections
|
||||
counts = collections.Counter([i.name for i in instructions])
|
||||
for c in counts:
|
||||
if counts[c] != 1:
|
||||
print(f'{c} appeared {counts[c]} times.')
|
||||
|
||||
assert(len(instruction_dict) == len(instructions))
|
||||
|
|
Loading…
Reference in New Issue