mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
aco: don't use python 3.7+ feature in aco_opcodes.py
Use the suggestion from https://stackoverflow.com/questions/11351032/named-tuple-and-default-values-for-optional-keyword-arguments so the script works on older Python. Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28831>
This commit is contained in:
parent
fe4f6dd18f
commit
27a3880ada
1 changed files with 4 additions and 2 deletions
|
|
@ -221,8 +221,10 @@ class Format(IntEnum):
|
|||
return res
|
||||
|
||||
|
||||
Opcode = namedtuple('Opcode', ['gfx6', 'gfx7', 'gfx8', 'gfx9', 'gfx10', 'gfx11'],
|
||||
defaults=[-1, -1, -1, -1, -1, -1])
|
||||
Opcode = namedtuple('Opcode', ['gfx6', 'gfx7', 'gfx8', 'gfx9', 'gfx10', 'gfx11'])
|
||||
# namedtuple 'defaults' keyword requires python 3.7+. Use an equivalent construct
|
||||
# to support older versions.
|
||||
Opcode.__new__.__defaults__=(-1, -1, -1, -1, -1, -1)
|
||||
|
||||
class Instruction(object):
|
||||
"""Class that represents all the information we have about the opcode
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue