mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-05 19:10:38 +01:00
gfxstream: fix build after vk.xml update
This is a backport of f134cc5a1e:
("Update <type category="funcpointer"> schema to simplify")
in vulkan-docs, essentially. It changed things about how vk.xml
is parsed.
Fixes: b30f780c ("vulkan: update spec to 1.4.340")
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39502>
This commit is contained in:
parent
9e63224424
commit
ea5d69eb52
1 changed files with 12 additions and 4 deletions
|
|
@ -333,12 +333,20 @@ class Registry:
|
|||
self.typedict = {}
|
||||
for type_elem in self.reg.findall('types/type'):
|
||||
# If the <type> does not already have a 'name' attribute, set
|
||||
# it from contents of its <name> tag.
|
||||
if type_elem.get('name') is None:
|
||||
name_elem = type_elem.find('name')
|
||||
# it from contents of its <name> tag, or from the contents of
|
||||
# its <proto><name> tag for funcpointer types.
|
||||
name = type_elem.get('name')
|
||||
if name is None:
|
||||
if type_elem.get('category') == 'funcpointer':
|
||||
name_elem = type_elem.find('proto/name')
|
||||
if name_elem is None:
|
||||
name_elem = type_elem.find('name')
|
||||
else:
|
||||
name_elem = type_elem.find('name')
|
||||
if name_elem is None or not name_elem.text:
|
||||
raise RuntimeError("Type without a name!")
|
||||
type_elem.set('name', name_elem.text)
|
||||
name = name_elem.text
|
||||
type_elem.set('name', name)
|
||||
self.addElementInfo(type_elem, TypeInfo(type_elem), 'type', self.typedict)
|
||||
|
||||
# Create dictionary of registry enum groups from <enums> tags.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue