aboutsummaryrefslogtreecommitdiff
path: root/scripts/reg.py
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-07-17 14:26:47 -0600
committerMark Lobodzinski <mark@lunarg.com>2017-07-17 17:45:22 -0600
commit5ffdab124836df520803e93ff4690a7abce4366c (patch)
treef697a3a086b11a11ae03f71851caa180862017af /scripts/reg.py
parent0b7ab68bb82ea61ccc49e5e7a0e67b25f27c3b34 (diff)
downloadusermoji-5ffdab124836df520803e93ff4690a7abce4366c.tar.xz
header: Update to version 1.0.55 of the Vulkan hdr
- updated vulkan.h - updated generator.py - updated reg.py - updated vk.xml - updated Win/Lin json files - fixed and updated vulkan.hpp - updated validation error messages and database - applied validextensionstruct fixes from 1.0.54 LVL vk.xml file - fixed parameter_validation DebugMarker prototypes - fixed unique_objects DebugMarker prototypes - fixed NV_FILL_RECTANGLE in error DB - updated error database with new covered VUs Change-Id: I4eec816a6dc9756105a357beab6af4abb303994d
Diffstat (limited to 'scripts/reg.py')
-rwxr-xr-xscripts/reg.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/reg.py b/scripts/reg.py
index 5c92d271..a591380b 100755
--- a/scripts/reg.py
+++ b/scripts/reg.py
@@ -16,6 +16,7 @@
import io,os,re,string,sys,copy
import xml.etree.ElementTree as etree
+from collections import defaultdict
# matchAPIProfile - returns whether an API and profile
# being generated matches an element's profile
@@ -201,6 +202,7 @@ class Registry:
self.apidict = {}
self.extensions = []
self.requiredextensions = [] # Hack - can remove it after validity generator goes away
+ self.validextensionstructs = defaultdict(list)
self.extdict = {}
# A default output generator, so commands prior to apiGen can report
# errors via the generator object.
@@ -388,6 +390,18 @@ class Registry:
if (addEnumInfo):
enumInfo = EnumInfo(enum)
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
+ # Construct a "validextensionstructs" list for parent structures
+ # based on "structextends" tags in child structures
+ for type in self.reg.findall('types/type'):
+ parentStructs = type.get('structextends')
+ if (parentStructs != None):
+ for parent in parentStructs.split(','):
+ # self.gen.logMsg('diag', type.get('name'), 'extends', parent)
+ self.validextensionstructs[parent].append(type.get('name'))
+ # Sort the lists so they don't depend on the XML order
+ for parent in self.validextensionstructs:
+ self.validextensionstructs[parent].sort()
+
def dumpReg(self, maxlen = 40, filehandle = sys.stdout):
"""Dump all the dictionaries constructed from the Registry object"""
write('***************************************', file=filehandle)