intel: fix gen_sort_tags.py

The script was failing for me (python 3.8), not sure if this is a recent
python version break or not as I don't know how often people have been
running this script:

    Processing ./gen9.xml... Traceback (most recent call last):
      File "./gen_sort_tags.py", line 177, in <module>
        main()
      File "./gen_sort_tags.py", line 170, in main
        genxml[:] = enums + sorted_structs.values() + instructions + registers
    TypeError: can only concatenate list (not "odict_values") to list

Turning the odict into a list fixes it for me, and the resulting xml
file are identical to before :)

Fixes: 903e142f0d ("genxml: add a sorting script")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5352>
(cherry picked from commit 981d07c74a)
This commit is contained in:
Eric Engestrom 2020-06-05 11:26:56 +02:00
parent 7416eae609
commit e9da335d70
2 changed files with 2 additions and 2 deletions

View file

@ -1093,7 +1093,7 @@
"description": "intel: fix gen_sort_tags.py",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "903e142f0d35bc550ffde321987a5b6fca1095eb"
},

View file

@ -167,7 +167,7 @@ def main():
for r in registers:
r[:] = sorted(r.getchildren(), key=get_start)
genxml[:] = enums + sorted_structs.values() + instructions + registers
genxml[:] = enums + list(sorted_structs.values()) + instructions + registers
print('<?xml version="1.0" ?>')
print_node(sys.stdout, 0, genxml)