mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 01:30:08 +01:00
broadcom/xml: Throw an #error in XML-based codegen for a >1bit bool
I've debugged two nasty errors now due to copy-and-pasting a bool type when writing a uint field. Make sure I don't do that again.
This commit is contained in:
parent
e2f114b32b
commit
443e1984d2
1 changed files with 3 additions and 0 deletions
|
|
@ -111,6 +111,9 @@ class Field(object):
|
|||
self.end = self.start + int(attrs["size"]) - 1
|
||||
self.type = attrs["type"]
|
||||
|
||||
if self.type == 'bool' and self.start != self.end:
|
||||
print("#error Field {} has bool type but more than one bit of size".format(self.name));
|
||||
|
||||
if "prefix" in attrs:
|
||||
self.prefix = safe_name(attrs["prefix"]).upper()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue