mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
intel/genxml: Handle field names with different spacing/hyphen
If a field name differs slightly between two generations then this change will still add the fields into the same group. For example, these will be treated as equal: * "Software Exception" and "Software Exception" * "Per Thread" and "Per-Thread" Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
973b49386c
commit
acce7d3460
1 changed files with 4 additions and 3 deletions
|
|
@ -182,12 +182,13 @@ class Container(object):
|
|||
self.length_by_gen[gen] = xml_attrs['length']
|
||||
|
||||
def get_field(self, field_name, create=False):
|
||||
if field_name not in self.fields:
|
||||
key = to_alphanum(field_name)
|
||||
if key not in self.fields:
|
||||
if create:
|
||||
self.fields[field_name] = Field(self, field_name)
|
||||
self.fields[key] = Field(self, field_name)
|
||||
else:
|
||||
return None
|
||||
return self.fields[field_name]
|
||||
return self.fields[key]
|
||||
|
||||
def has_prop(self, prop):
|
||||
if prop == 'length':
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue