freedreno/registers: teach gen_header.py about a3xx_regid

This is a builtin type (treated as uint, but with special type-aware
decoding) in envytools/cffdump.  Lets teach gen_header.py about it and
drop the enum hack in the xml so I don't have to keep deleting the enum
when I sync the xml back to the freedreno envytools tree.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>
This commit is contained in:
Rob Clark
2020-02-15 15:06:44 -08:00
committed by Marge Bot
parent ecca5ef6c3
commit 4fc31e7d33
2 changed files with 2 additions and 6 deletions
@@ -280,10 +280,6 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
Common between A3xx and A4xx:
-->
<enum name="a3xx_regid">
<value name="REGID_UNUSED" value="0xfc"/>
</enum>
<enum name="a3xx_rop_code">
<value name="ROP_CLEAR" value="0"/>
<value name="ROP_NOR" value="1"/>
+2 -2
View File
@@ -39,7 +39,7 @@ class Field(object):
self.shr = shr
self.type = type
builtin_types = [ None, "boolean", "uint", "hex", "int", "fixed", "ufixed", "float", "address", "waddress" ]
builtin_types = [ None, "a3xx_regid", "boolean", "uint", "hex", "int", "fixed", "ufixed", "float", "address", "waddress" ]
if low < 0 or low > 31:
raise parser.error("low attribute out of range: %d" % low)
@@ -61,7 +61,7 @@ class Field(object):
elif self.type == "boolean":
type = "bool"
val = var_name
elif self.type == "uint" or self.type == "hex":
elif self.type == "uint" or self.type == "hex" or self.type == "a3xx_regid":
type = "uint32_t"
val = var_name
elif self.type == "int":