agx: Generate enums from Python
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11199>
This commit is contained in:

committed by
Marge Bot

parent
223476aff3
commit
cc8fec8b74
@@ -23,6 +23,7 @@ SOFTWARE.
|
||||
|
||||
opcodes = {}
|
||||
immediates = {}
|
||||
enums = {}
|
||||
|
||||
class Opcode(object):
|
||||
def __init__(self, name, dests, srcs, imms, is_float, can_eliminate, encoding_16, encoding_32):
|
||||
@@ -67,6 +68,10 @@ def immediate(name, ctype = "uint32_t"):
|
||||
immediates[name] = imm
|
||||
return imm
|
||||
|
||||
def enum(name, value_dict):
|
||||
enums[name] = value_dict
|
||||
return immediate(name, "enum agx_" + name)
|
||||
|
||||
L = (1 << 15)
|
||||
_ = None
|
||||
|
||||
|
Reference in New Issue
Block a user