From 84d0e6e621aa6dc3a6eb23c972b3f023a706e7ad Mon Sep 17 00:00:00 2001 From: Mike Schuchardt Date: Wed, 21 Feb 2018 15:59:17 -0700 Subject: header: Update to 1.1.69 private header Change-Id: If9fc0f065f77ecff14123f665e603e6f2595d571 --- scripts/cgenerator.py | 256 ++-- scripts/generator.py | 124 +- scripts/reg.py | 430 +++++-- scripts/vk.xml | 3396 ++++++++++++++++++++++++++++++------------------- 4 files changed, 2686 insertions(+), 1520 deletions(-) (limited to 'scripts') diff --git a/scripts/cgenerator.py b/scripts/cgenerator.py index 5a82acf7..a3709700 100644 --- a/scripts/cgenerator.py +++ b/scripts/cgenerator.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os,re,sys +import os,re,sys,pdb from generator import * # CGeneratorOptions - subclass of GeneratorOptions. @@ -44,6 +44,7 @@ from generator import * # in typedefs, such as APIENTRY. # apientryp - string to use for the calling convention macro # in function pointer typedefs, such as APIENTRYP. +# directory - directory into which to generate include files # indentFuncProto - True if prototype declarations should put each # parameter on a separate line # indentFuncPointer - True if typedefed function pointers should put each @@ -62,6 +63,7 @@ class CGeneratorOptions(GeneratorOptions): defaultExtensions = None, addExtensions = None, removeExtensions = None, + emitExtensions = None, sortProcedure = regSortFeatures, prefixText = "", genFuncPointers = True, @@ -77,7 +79,8 @@ class CGeneratorOptions(GeneratorOptions): alignFuncParam = 0): GeneratorOptions.__init__(self, filename, directory, apiname, profile, versions, emitversions, defaultExtensions, - addExtensions, removeExtensions, sortProcedure) + addExtensions, removeExtensions, + emitExtensions, sortProcedure) self.prefixText = prefixText self.genFuncPointers = genFuncPointers self.protectFile = protectFile @@ -154,6 +157,7 @@ class COutputGenerator(OutputGenerator): # write(' * Default extensions included:', genOpts.defaultExtensions, file=self.outFile) # write(' * Additional extensions included:', genOpts.addExtensions, file=self.outFile) # write(' * Extensions removed:', genOpts.removeExtensions, file=self.outFile) + # write(' * Extensions emitted:', genOpts.emitExtensions, file=self.outFile) # write(' */', file=self.outFile) def endFile(self): # C-specific @@ -216,40 +220,48 @@ class COutputGenerator(OutputGenerator): def appendSection(self, section, text): # self.sections[section].append('SECTION: ' + section + '\n') self.sections[section].append(text) + # self.logMsg('diag', 'appendSection(section =', section, 'text =', text) # # Type generation - def genType(self, typeinfo, name): - OutputGenerator.genType(self, typeinfo, name) + def genType(self, typeinfo, name, alias): + OutputGenerator.genType(self, typeinfo, name, alias) typeElem = typeinfo.elem - # If the type is a struct type, traverse the imbedded tags - # generating a structure. Otherwise, emit the tag text. + + # Determine the category of the type, and the type section to add + # its definition to. + # 'funcpointer' is added to the 'struct' section as a workaround for + # internal issue #877, since structures and function pointer types + # can have cross-dependencies. category = typeElem.get('category') - if (category == 'struct' or category == 'union'): - self.genStruct(typeinfo, name) + if category == 'funcpointer': + section = 'struct' else: - # Replace tags with an APIENTRY-style string - # (from self.genOpts). Copy other text through unchanged. - # If the resulting text is an empty string, don't emit it. - s = noneStr(typeElem.text) - for elem in typeElem: - if (elem.tag == 'apientry'): - s += self.genOpts.apientry + noneStr(elem.tail) - else: - s += noneStr(elem.text) + noneStr(elem.tail) - if s: + section = category + + if category == 'struct' or category == 'union': + # If the type is a struct type, generate it using the + # special-purpose generator. + self.genStruct(typeinfo, name, alias) + else: + if alias: + # If the type is an alias, just emit a typedef declaration + body = 'typedef ' + alias + ' ' + name + ';\n' + else: + # Replace tags with an APIENTRY-style string + # (from self.genOpts). Copy other text through unchanged. + # If the resulting text is an empty string, don't emit it. + body = noneStr(typeElem.text) + for elem in typeElem: + if (elem.tag == 'apientry'): + body += self.genOpts.apientry + noneStr(elem.tail) + else: + body += noneStr(elem.text) + noneStr(elem.tail) + + if body: # Add extra newline after multi-line entries. - if '\n' in s: - s += '\n' - # This is a temporary workaround for internal issue #877, - # while we consider other approaches. The problem is that - # function pointer types can have dependencies on structures - # and vice-versa, so they can't be strictly separated into - # sections. The workaround is to define those types in the - # same section, in dependency order. - if (category == 'funcpointer'): - self.appendSection('struct', s) - else: - self.appendSection(category, s) + if '\n' in body[0:-1]: + body += '\n' + self.appendSection(section, body) # # Struct (e.g. C "struct" type) generation. # This is a special case of the tag where the contents are @@ -258,104 +270,148 @@ class COutputGenerator(OutputGenerator): # tags - they are a declaration of a struct or union member. # Only simple member declarations are supported (no nested # structs etc.) - def genStruct(self, typeinfo, typeName): - OutputGenerator.genStruct(self, typeinfo, typeName) - body = 'typedef ' + typeinfo.elem.get('category') + ' ' + typeName + ' {\n' - # paramdecl = self.makeCParamDecl(typeinfo.elem, self.genOpts.alignFuncParam) - targetLen = 0; - for member in typeinfo.elem.findall('.//member'): - targetLen = max(targetLen, self.getCParamTypeLength(member)) - for member in typeinfo.elem.findall('.//member'): - body += self.makeCParamDecl(member, targetLen + 4) - body += ';\n' - body += '} ' + typeName + ';\n' + # If alias != None, then this struct aliases another; just + # generate a typedef of that alias. + def genStruct(self, typeinfo, typeName, alias): + OutputGenerator.genStruct(self, typeinfo, typeName, alias) + + typeElem = typeinfo.elem + + if alias: + body = 'typedef ' + alias + ' ' + typeName + ';\n' + else: + body = 'typedef ' + typeElem.get('category') + ' ' + typeName + ' {\n' + + targetLen = 0; + for member in typeElem.findall('.//member'): + targetLen = max(targetLen, self.getCParamTypeLength(member)) + for member in typeElem.findall('.//member'): + body += self.makeCParamDecl(member, targetLen + 4) + body += ';\n' + body += '} ' + typeName + ';\n' + self.appendSection('struct', body) # # Group (e.g. C "enum" type) generation. # These are concatenated together with other types. - def genGroup(self, groupinfo, groupName): - OutputGenerator.genGroup(self, groupinfo, groupName) + # If alias != None, it is the name of another group type + # which aliases this type; just generate that alias. + def genGroup(self, groupinfo, groupName, alias = None): + OutputGenerator.genGroup(self, groupinfo, groupName, alias) groupElem = groupinfo.elem - expandName = re.sub(r'([0-9a-z_])([A-Z0-9])',r'\1_\2',groupName).upper() + if alias: + # If the group name is aliased, just emit a typedef declaration + # for the alias. + body = 'typedef ' + alias + ' ' + groupName + ';\n' + else: + self.logMsg('diag', 'CGenerator.genGroup group =', groupName, 'alias =', alias) - expandPrefix = expandName - expandSuffix = '' - expandSuffixMatch = re.search(r'[A-Z][A-Z]+$',groupName) - if expandSuffixMatch: - expandSuffix = '_' + expandSuffixMatch.group() - # Strip off the suffix from the prefix - expandPrefix = expandName.rsplit(expandSuffix, 1)[0] + # Otherwise, emit an actual enumerated type declaration + expandName = re.sub(r'([0-9a-z_])([A-Z0-9])',r'\1_\2',groupName).upper() - # Prefix - body = "\ntypedef enum " + groupName + " {\n" + expandPrefix = expandName + expandSuffix = '' + expandSuffixMatch = re.search(r'[A-Z][A-Z]+$',groupName) + if expandSuffixMatch: + expandSuffix = '_' + expandSuffixMatch.group() + # Strip off the suffix from the prefix + expandPrefix = expandName.rsplit(expandSuffix, 1)[0] - # @@ Should use the type="bitmask" attribute instead - isEnum = ('FLAG_BITS' not in expandPrefix) + # Prefix + body = "\ntypedef enum " + groupName + " {\n" - # Loop over the nested 'enum' tags. Keep track of the minimum and - # maximum numeric values, if they can be determined; but only for - # core API enumerants, not extension enumerants. This is inferred - # by looking for 'extends' attributes. - minName = None - for elem in groupElem.findall('enum'): - # Convert the value to an integer and use that to track min/max. - # Values of form -(number) are accepted but nothing more complex. - # Should catch exceptions here for more complex constructs. Not yet. - (numVal,strVal) = self.enumToValue(elem, True) - name = elem.get('name') + # @@ Should use the type="bitmask" attribute instead + isEnum = ('FLAG_BITS' not in expandPrefix) - # Check for duplicate enum values and raise an error if found. - for elem2 in groupElem.findall('enum'): - if (elem != elem2): - (numVal2,strVal2) = self.enumToValue(elem2, True) - if (numVal2 == numVal): - raise UserWarning('Duplicate enum ' + name + ' = ' + elem2.get('name') + ' = ' + strVal) + # Get a list of nested 'enum' tags. + enums = groupElem.findall('enum') - # Extension enumerants are only included if they are required - if (self.isEnumRequired(elem)): - body += " " + name + " = " + strVal + ",\n" + # Check for and report duplicates, and return a list with them + # removed. + enums = self.checkDuplicateEnums(enums) - if (isEnum and elem.get('extends') is None): - if (minName == None): - minName = maxName = name - minValue = maxValue = numVal - elif (numVal < minValue): - minName = name - minValue = numVal - elif (numVal > maxValue): - maxName = name - maxValue = numVal - # Generate min/max value tokens and a range-padding enum. Need some - # additional padding to generate correct names... - if isEnum: - body += " " + expandPrefix + "_BEGIN_RANGE" + expandSuffix + " = " + minName + ",\n" - body += " " + expandPrefix + "_END_RANGE" + expandSuffix + " = " + maxName + ",\n" - body += " " + expandPrefix + "_RANGE_SIZE" + expandSuffix + " = (" + maxName + " - " + minName + " + 1),\n" + # Loop over the nested 'enum' tags. Keep track of the minimum and + # maximum numeric values, if they can be determined; but only for + # core API enumerants, not extension enumerants. This is inferred + # by looking for 'extends' attributes. + minName = None - body += " " + expandPrefix + "_MAX_ENUM" + expandSuffix + " = 0x7FFFFFFF\n" + # Accumulate non-numeric enumerant values separately and append + # them following the numeric values, to allow for aliases. + # NOTE: this doesn't do a topological sort yet, so aliases of + # aliases can still get in the wrong order. + aliasText = "" - # Postfix - body += "} " + groupName + ";" + for elem in enums: + # Convert the value to an integer and use that to track min/max. + (numVal,strVal) = self.enumToValue(elem, True) + name = elem.get('name') + + # Extension enumerants are only included if they are required + if self.isEnumRequired(elem): + decl = " " + name + " = " + strVal + ",\n" + if numVal != None: + body += decl + else: + aliasText += decl + + # Don't track min/max for non-numbers (numVal == None) + if isEnum and numVal != None and elem.get('extends') is None: + if minName == None: + minName = maxName = name + minValue = maxValue = numVal + elif numVal < minValue: + minName = name + minValue = numVal + elif numVal > maxValue: + maxName = name + maxValue = numVal + + # Now append the non-numeric enumerant values + body += aliasText + + # Generate min/max value tokens and a range-padding enum. Need some + # additional padding to generate correct names... + if isEnum: + body += " " + expandPrefix + "_BEGIN_RANGE" + expandSuffix + " = " + minName + ",\n" + body += " " + expandPrefix + "_END_RANGE" + expandSuffix + " = " + maxName + ",\n" + body += " " + expandPrefix + "_RANGE_SIZE" + expandSuffix + " = (" + maxName + " - " + minName + " + 1),\n" + + body += " " + expandPrefix + "_MAX_ENUM" + expandSuffix + " = 0x7FFFFFFF\n" + + # Postfix + body += "} " + groupName + ";" + + # After either enumerated type or alias paths, add the declaration + # to the appropriate section for the group being defined. if groupElem.get('type') == 'bitmask': section = 'bitmask' else: section = 'group' self.appendSection(section, body) + # Enumerant generation # tags may specify their values in several ways, but are usually # just integers. - def genEnum(self, enuminfo, name): - OutputGenerator.genEnum(self, enuminfo, name) + def genEnum(self, enuminfo, name, alias): + OutputGenerator.genEnum(self, enuminfo, name, alias) (numVal,strVal) = self.enumToValue(enuminfo.elem, False) body = '#define ' + name.ljust(33) + ' ' + strVal self.appendSection('enum', body) + # # Command generation - def genCmd(self, cmdinfo, name): - OutputGenerator.genCmd(self, cmdinfo, name) - # + def genCmd(self, cmdinfo, name, alias): + OutputGenerator.genCmd(self, cmdinfo, name, alias) + + # if alias: + # prefix = '// ' + name + ' is an alias of command ' + alias + '\n' + # else: + # prefix = '' + + prefix = '' decls = self.makeCDecls(cmdinfo.elem) - self.appendSection('command', decls[0] + '\n') + self.appendSection('command', prefix + decls[0] + '\n') if (self.genOpts.genFuncPointers): self.appendSection('commandPointer', decls[1]) diff --git a/scripts/generator.py b/scripts/generator.py index c5745986..a0f79ac2 100755 --- a/scripts/generator.py +++ b/scripts/generator.py @@ -15,7 +15,7 @@ # limitations under the License. from __future__ import unicode_literals -import io,os,re,sys +import io,os,re,sys,pdb def write( *args, **kwargs ): file = kwargs.pop('file',sys.stdout) @@ -69,7 +69,7 @@ def regSortNameKey(feature): # Second sort key for regSortFeatures. # Sorts by feature version. elements all have version number "0" def regSortFeatureVersionKey(feature): - return float(feature.version) + return float(feature.versionNumber) # Tertiary sort key for regSortFeatures. # Sorts by extension number. elements all have extension number 0. @@ -99,7 +99,7 @@ def regSortFeatures(featureList): # emitversions - regex matching API versions to actually emit # interfaces for (though all requested versions are considered # when deciding which interfaces to generate). For GL 4.3 glext.h, -# this might be '1\.[2-5]|[2-4]\.[0-9]'. +# this might be '1\.[2-5]|[2-4]\.[0-9]'. # defaultExtensions - If not None, a string which must in its # entirety match the pattern in the "supported" attribute of # the . Defaults to None. Usually the same as apiname. @@ -108,6 +108,9 @@ def regSortFeatures(featureList): # removeExtensions - regex matching names of extensions to # remove (after defaultExtensions and addExtensions). Defaults # to None. +# emitExtensions - regex matching names of extensions to actually emit +# interfaces for (though all requested versions are considered when +# deciding which interfaces to generate). # sortProcedure - takes a list of FeatureInfo objects and sorts # them in place to a preferred order in the generated output. # Default is core API versions, ARB/KHR/OES extensions, all @@ -126,6 +129,7 @@ class GeneratorOptions: defaultExtensions = None, addExtensions = None, removeExtensions = None, + emitExtensions = None, sortProcedure = regSortFeatures): self.filename = filename self.directory = directory @@ -136,6 +140,7 @@ class GeneratorOptions: self.defaultExtensions = defaultExtensions self.addExtensions = self.emptyRegex(addExtensions) self.removeExtensions = self.emptyRegex(removeExtensions) + self.emitExtensions = self.emptyRegex(emitExtensions) self.sortProcedure = sortProcedure # # Substitute a regular expression which matches no version @@ -170,16 +175,16 @@ class GeneratorOptions: # interface - element for the / to generate # emit - actually write to the header only when True # endFeature() - finish an interface. -# genType(typeinfo,name) - generate interface for a type +# genType(typeinfo,name,alias) - generate interface for a type # typeinfo - TypeInfo for a type -# genStruct(typeinfo,name) - generate interface for a C "struct" type. +# genStruct(typeinfo,name,alias) - generate interface for a C "struct" type. # typeinfo - TypeInfo for a type interpreted as a struct -# genGroup(groupinfo,name) - generate interface for a group of enums (C "enum") +# genGroup(groupinfo,name,alias) - generate interface for a group of enums (C "enum") # groupinfo - GroupInfo for a group -# genEnum(enuminfo, name) - generate interface for an enum (constant) +# genEnum(enuminfo,name,alias) - generate interface for an enum (constant) # enuminfo - EnumInfo for an enum # name - enum name -# genCmd(cmdinfo) - generate interface for a command +# genCmd(cmdinfo,name,alias) - generate interface for a command # cmdinfo - CmdInfo for a command # isEnumRequired(enumElem) - return True if this element is required # elem - element to test @@ -260,6 +265,9 @@ class OutputGenerator: # typename specified by 'extends'. This requires probing # the registry database, and imbeds knowledge of the # Vulkan extension enum scheme in this function. + # A 'alias' attribute contains the name of another enum + # which this is an alias of. The other enum must be + # declared first when emitting this enum. def enumToValue(self, elem, needsNum): name = elem.get('name') numVal = None @@ -302,8 +310,66 @@ class OutputGenerator: # More logic needed! self.logMsg('diag', 'Enum', name, '-> offset [', numVal, ',', value, ']') return [numVal, value] + if 'alias' in elem.keys(): + return [None, elem.get('alias')] return [None, None] # + # checkDuplicateEnums - sanity check for enumerated values + # enums - list of Elements + # returns the list with duplicates stripped + def checkDuplicateEnums(self, enums): + # Dictionaries indexed by name and numeric value. + # Entries are [ Element, numVal, strVal ] matching name or value + + nameMap = {} + valueMap = {} + + stripped = [] + for elem in enums: + name = elem.get('name') + (numVal, strVal) = self.enumToValue(elem, True) + + if name in nameMap: + # Duplicate name found; check values + (name2, numVal2, strVal2) = nameMap[name] + + # Duplicate enum values for the same name are benign. This + # happens when defining the same enum conditionally in + # several extension blocks. + if (strVal2 == strVal or (numVal != None and + numVal == numVal2)): + True + # self.logMsg('info', 'checkDuplicateEnums: Duplicate enum (' + name + + # ') found with the same value:' + strVal) + else: + self.logMsg('warn', 'checkDuplicateEnums: Duplicate enum (' + name + + ') found with different values:' + strVal + + ' and ' + strVal2) + + # Don't add the duplicate to the returned list + continue + elif numVal in valueMap: + # Duplicate value found (such as an alias); report it, but + # still add this enum to the list. + (name2, numVal2, strVal2) = valueMap[numVal] + + try: + self.logMsg('warn', 'Two enums found with the same value: ' + + name + ' = ' + name2.get('name') + ' = ' + strVal) + except: + pdb.set_trace() + + # Track this enum to detect followon duplicates + nameMap[name] = [ elem, numVal, strVal ] + if numVal != None: + valueMap[numVal] = [ elem, numVal, strVal ] + + # Add this enum to the list + stripped.append(elem) + + # Return the list + return stripped + # def makeDir(self, path): self.logMsg('diag', 'OutputGenerator::makeDir(' + path + ')') if not (path in self.madeDirs.keys()): @@ -345,15 +411,15 @@ class OutputGenerator: # tag def validateFeature(self, featureType, featureName): if (self.featureName == None): - raise UserWarning('Attempt to generate', featureType, name, - 'when not in feature') + raise UserWarning('Attempt to generate', featureType, + featureName, 'when not in feature') # # Type generation - def genType(self, typeinfo, name): + def genType(self, typeinfo, name, alias): self.validateFeature('type', name) # # Struct (e.g. C "struct" type) generation - def genStruct(self, typeinfo, name): + def genStruct(self, typeinfo, name, alias): self.validateFeature('struct', name) # The mixed-mode tags may contain no-op tags. @@ -364,15 +430,15 @@ class OutputGenerator: member.remove(comment) # # Group (e.g. C "enum" type) generation - def genGroup(self, groupinfo, name): + def genGroup(self, groupinfo, name, alias): self.validateFeature('group', name) # # Enumerant (really, constant) generation - def genEnum(self, enuminfo, name): + def genEnum(self, enuminfo, name, alias): self.validateFeature('enum', name) # # Command generation - def genCmd(self, cmd, name): + def genCmd(self, cmd, name, alias): self.validateFeature('command', name) # # Utility functions - turn a into C-language prototype @@ -429,9 +495,31 @@ class OutputGenerator: # required, False otherwise # elem - element to test def isEnumRequired(self, elem): - return (elem.get('extname') is None or - re.match(self.genOpts.addExtensions, elem.get('extname')) is not None or - self.genOpts.defaultExtensions == elem.get('supported')) + required = elem.get('required') != None + self.logMsg('diag', 'isEnumRequired:', elem.get('name'), + '->', required) + return required + + #@@@ This code is overridden by equivalent code now run in + #@@@ Registry.generateFeature + + required = False + + extname = elem.get('extname') + if extname is not None: + # 'supported' attribute was injected when the element was + # moved into the group in Registry.parseTree() + if self.genOpts.defaultExtensions == elem.get('supported'): + required = True + elif re.match(self.genOpts.addExtensions, extname) is not None: + required = True + elif elem.get('version') is not None: + required = re.match(self.genOpts.emitversions, elem.get('version')) is not None + else: + required = True + + return required + # # makeCDecls - return C prototype and function pointer typedef for a # command, as a two-element list of strings. diff --git a/scripts/reg.py b/scripts/reg.py index afcca4e3..5a59e03f 100755 --- a/scripts/reg.py +++ b/scripts/reg.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import io,os,re,string,sys,copy +import io,os,pdb,re,string,sys,copy import xml.etree.ElementTree as etree from collections import defaultdict @@ -74,6 +74,8 @@ def matchAPIProfile(api, profile, elem): # elem - etree Element for this feature # resetState() - reset required/declared to initial values. Used # prior to generating a new API interface. +# compareElem(info) - return True if self.elem and info.elem have the +# same definition. class BaseInfo: """Represents the state of a registry feature, used during API generation""" def __init__(self, elem): @@ -83,6 +85,26 @@ class BaseInfo: def resetState(self): self.required = False self.declared = False + def compareElem(self, info): + # Just compares the tag and attributes. + # @@ This should be virtualized. In particular, comparing + # tags requires special-casing on the attributes, as 'extnumber' is + # only relevant when 'offset' is present. + selfKeys = sorted(self.elem.keys()) + infoKeys = sorted(info.elem.keys()) + + if selfKeys != infoKeys: + return False + + # Ignore value of 'extname', as this will inherently be different + # when redefining the same interface in different feature and/or + # extension blocks. + for key in selfKeys: + if (key != 'extname' and + (self.elem.get(key) != info.elem.get(key))): + return False + + return True # TypeInfo - registry information about a type. No additional state # beyond BaseInfo is required. @@ -148,12 +170,14 @@ class FeatureInfo(BaseInfo): # for elements. if (elem.tag == 'feature'): self.category = 'VERSION' - self.version = elem.get('number') + self.version = elem.get('name') + self.versionNumber = elem.get('number') self.number = "0" self.supported = None else: self.category = self.name.split('_', 2)[1] self.version = "0" + self.versionNumber = "0" self.number = elem.get('number') self.supported = elem.get('supported') self.emit = False @@ -175,10 +199,13 @@ from generator import write, GeneratorOptions, OutputGenerator # fetures to write and how to format them # emitFeatures - True to actually emit features for a version / extension, # or False to just treat them as emitted +# breakPat - regexp pattern to break on when generatng names # Public methods # loadElementTree(etree) - load registry from specified ElementTree # loadFile(filename) - load registry from XML file # setGenerator(gen) - OutputGenerator to use +# breakOnName() - specify a feature name regexp to break on when +# generating features. # parseTree() - parse the registry once loaded & create dictionaries # dumpReg(maxlen, filehandle) - diagnostic to dump the dictionaries # to specified file handle (default stdout). Truncates type / @@ -209,6 +236,8 @@ class Registry: self.gen = OutputGenerator() self.genOpts = None self.emitFeatures = False + self.breakPat = None + # self.breakPat = re.compile('VkFenceImportFlagBits.*') def loadElementTree(self, tree): """Load ElementTree into a Registry object and parse it""" self.tree = tree @@ -232,13 +261,20 @@ class Registry: # tuple (name,api). If not, the key is the name. 'name' is an # attribute of the Element def addElementInfo(self, elem, info, infoName, dictionary): + # self.gen.logMsg('diag', 'Adding ElementInfo.required =', + # info.required, 'name =', elem.get('name')) + if ('api' in elem.attrib): key = (elem.get('name'),elem.get('api')) else: key = elem.get('name') if key in dictionary: - self.gen.logMsg('warn', '*** Attempt to redefine', - infoName, 'with key:', key) + if not dictionary[key].compareElem(info): + self.gen.logMsg('warn', 'Attempt to redefine', key, + 'with different value (this may be benign)') + #else: + # self.gen.logMsg('warn', 'Benign redefinition of', key, + # 'with identical value') else: dictionary[key] = info # @@ -256,6 +292,8 @@ class Registry: return dictionary[fname] else: return None + def breakOnName(self, regexp): + self.breakPat = re.compile(regexp) def parseTree(self): """Parse the registry Element, once created""" # This must be the Element for the root @@ -300,6 +338,8 @@ class Registry: enumInfo = EnumInfo(enum) enumInfo.required = required self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) + # self.gen.logMsg('diag', 'parseTree: marked req =', + # required, 'for', enum.get('name')) # # Create dictionary of registry commands from tags # and add 'name' attribute to each tag (where missing) @@ -308,13 +348,42 @@ class Registry: # There's usually only one block; more are OK. # Required attributes: 'name' or tag contents self.cmddict = {} + # List of commands which alias others. Contains + # [ aliasName, element ] + # for each alias + cmdAlias = [] for cmd in self.reg.findall('commands/command'): # If the doesn't already have a 'name' attribute, set # it from contents of its tag. - if (cmd.get('name') == None): - cmd.attrib['name'] = cmd.find('proto/name').text + name = cmd.get('name') + if name == None: + name = cmd.attrib['name'] = cmd.find('proto/name').text ci = CmdInfo(cmd) self.addElementInfo(cmd, ci, 'command', self.cmddict) + alias = cmd.get('alias') + if alias: + cmdAlias.append([name, alias, cmd]) + # Now loop over aliases, injecting a copy of the aliased command's + # Element with the aliased prototype name replaced with the command + # name - if it exists. + for (name, alias, cmd) in cmdAlias: + if alias in self.cmddict: + #@ pdb.set_trace() + aliasInfo = self.cmddict[alias] + cmdElem = copy.deepcopy(aliasInfo.elem) + cmdElem.find('proto/name').text = name + cmdElem.attrib['name'] = name + cmdElem.attrib['alias'] = alias + ci = CmdInfo(cmdElem) + # Replace the dictionary entry for the CmdInfo element + self.cmddict[name] = ci + + #@ newString = etree.tostring(base, encoding="unicode").replace(aliasValue, aliasName) + #@elem.append(etree.fromstring(replacement)) + else: + self.gen.logMsg('warn', 'No matching found for command', + cmd.get('name'), 'alias', alias) + # # Create dictionaries of API and extension interfaces # from toplevel and tags. @@ -323,13 +392,8 @@ class Registry: for feature in self.reg.findall('feature'): featureInfo = FeatureInfo(feature) self.addElementInfo(feature, featureInfo, 'feature', self.apidict) - self.extensions = self.reg.findall('extensions/extension') - self.extdict = {} - for feature in self.extensions: - featureInfo = FeatureInfo(feature) - self.addElementInfo(feature, featureInfo, 'extension', self.extdict) - # Add additional enums defined only in tags + # Add additional enums defined only in tags # to the corresponding core type. # When seen here, the element, processed to contain the # numeric enum value, is added to the corresponding @@ -346,8 +410,8 @@ class Registry: # to the nested loop traversal of / elements # below. # - # This code also adds a 'extnumber' attribute containing the - # extension number, used for enumerant value calculation. + # This code also adds a 'version' attribute containing the + # api version. # # For tags which are actually just constants, if there's # no 'extends' tag but there is a 'value' or 'bitpos' tag, just @@ -355,24 +419,69 @@ class Registry: # output generation of constants is purely dependency-based, and # doesn't need to iterate through the XML tags. # - # Something like this will need to be done for 'feature's up - # above, if we use the same mechanism for adding to the core - # API in 1.1. + for elem in feature.findall('require'): + for enum in elem.findall('enum'): + addEnumInfo = False + groupName = enum.get('extends') + if (groupName != None): + # self.gen.logMsg('diag', 'Found extension enum', + # enum.get('name')) + # Add version number attribute to the element + enum.attrib['version'] = featureInfo.version + # Look up the GroupInfo with matching groupName + if (groupName in self.groupdict.keys()): + # self.gen.logMsg('diag', 'Matching group', + # groupName, 'found, adding element...') + gi = self.groupdict[groupName] + gi.elem.append(enum) + # Remove element from parent tag + # This should be a no-op in lxml.etree + elem.remove(enum) + else: + self.gen.logMsg('warn', 'NO matching group', + groupName, 'for enum', enum.get('name'), 'found.') + addEnumInfo = True + elif (enum.get('value') or enum.get('bitpos') or enum.get('alias')): + # self.gen.logMsg('diag', 'Adding extension constant "enum"', + # enum.get('name')) + addEnumInfo = True + if (addEnumInfo): + enumInfo = EnumInfo(enum) + self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) + + self.extensions = self.reg.findall('extensions/extension') + self.extdict = {} + for feature in self.extensions: + featureInfo = FeatureInfo(feature) + self.addElementInfo(feature, featureInfo, 'extension', self.extdict) + + # Add additional enums defined only in tags + # to the corresponding core type. + # Algorithm matches that of enums in a "feature" tag as above. + # + # This code also adds a 'extnumber' attribute containing the + # extension number, used for enumerant value calculation. # for elem in feature.findall('require'): for enum in elem.findall('enum'): addEnumInfo = False groupName = enum.get('extends') if (groupName != None): - # self.gen.logMsg('diag', '*** Found extension enum', + # self.gen.logMsg('diag', 'Found extension enum', # enum.get('name')) - # Add extension number attribute to the element - enum.attrib['extnumber'] = featureInfo.number + + # Add block's extension number attribute to + # the element unless specified explicitly, such + # as when redefining an enum in another extension. + extnumber = enum.get('extnumber') + if not extnumber: + enum.attrib['extnumber'] = featureInfo.number + enum.attrib['extname'] = featureInfo.name enum.attrib['supported'] = featureInfo.supported # Look up the GroupInfo with matching groupName if (groupName in self.groupdict.keys()): - # self.gen.logMsg('diag', '*** Matching group', + # self.gen.logMsg('diag', 'Matching group', # groupName, 'found, adding element...') gi = self.groupdict[groupName] gi.elem.append(enum) @@ -380,16 +489,17 @@ class Registry: # This should be a no-op in lxml.etree elem.remove(enum) else: - self.gen.logMsg('warn', '*** NO matching group', + self.gen.logMsg('warn', 'NO matching group', groupName, 'for enum', enum.get('name'), 'found.') addEnumInfo = True - elif (enum.get('value') or enum.get('bitpos')): - # self.gen.logMsg('diag', '*** Adding extension constant "enum"', + elif (enum.get('value') or enum.get('bitpos') or enum.get('alias')): + # self.gen.logMsg('diag', 'Adding extension constant "enum"', # enum.get('name')) addEnumInfo = True 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'): @@ -402,7 +512,7 @@ class Registry: for parent in self.validextensionstructs: self.validextensionstructs[parent].sort() - def dumpReg(self, maxlen = 40, filehandle = sys.stdout): + def dumpReg(self, maxlen = 120, filehandle = sys.stdout): """Dump all the dictionaries constructed from the Registry object""" write('***************************************', file=filehandle) write(' ** Dumping Registry contents **', file=filehandle) @@ -440,50 +550,84 @@ class Registry: # required - boolean (to tag features as required or not) def markTypeRequired(self, typename, required): """Require (along with its dependencies) or remove (but not its dependencies) a type""" - self.gen.logMsg('diag', '*** tagging type:', typename, '-> required =', required) + self.gen.logMsg('diag', 'tagging type:', typename, '-> required =', required) # Get TypeInfo object for tag corresponding to typename type = self.lookupElementInfo(typename, self.typedict) if (type != None): if (required): - # Tag type dependencies in 'required' attributes as + # Tag type dependencies in 'alias' and 'required' attributes as # required. This DOES NOT un-tag dependencies in a # tag. See comments in markRequired() below for the reason. - if ('requires' in type.elem.attrib): - depType = type.elem.get('requires') - self.gen.logMsg('diag', '*** Generating dependent type', - depType, 'for type', typename) - self.markTypeRequired(depType, required) + for attrib in [ 'requires', 'alias' ]: + depname = type.elem.get(attrib) + if depname: + self.gen.logMsg('diag', 'Generating dependent type', + depname, 'for', attrib, 'type', typename) + self.markTypeRequired(depname, required) # Tag types used in defining this type (e.g. in nested # tags) # Look for in entire tree, # not just immediate children for subtype in type.elem.findall('.//type'): - self.gen.logMsg('diag', '*** markRequired: type requires dependent ', subtype.text) + self.gen.logMsg('diag', 'markRequired: type requires dependent ', subtype.text) self.markTypeRequired(subtype.text, required) # Tag enums used in defining this type, for example in # member[MEMBER_SIZE] for subenum in type.elem.findall('.//enum'): - self.gen.logMsg('diag', '*** markRequired: type requires dependent ', subenum.text) + self.gen.logMsg('diag', 'markRequired: type requires dependent ', subenum.text) self.markEnumRequired(subenum.text, required) type.required = required else: - self.gen.logMsg('warn', '*** type:', typename , 'IS NOT DEFINED') + self.gen.logMsg('warn', 'type:', typename , 'IS NOT DEFINED') # # enumname - name of enum # required - boolean (to tag features as required or not) def markEnumRequired(self, enumname, required): - self.gen.logMsg('diag', '*** tagging enum:', enumname, '-> required =', required) + self.gen.logMsg('diag', 'tagging enum:', enumname, '-> required =', required) enum = self.lookupElementInfo(enumname, self.enumdict) if (enum != None): enum.required = required + # Tag enum dependencies in 'alias' attribute as required + depname = enum.elem.get('alias') + if depname: + self.gen.logMsg('diag', 'Generating dependent enum', + depname, 'for alias', enumname, 'required =', enum.required) + self.markEnumRequired(depname, required) else: - self.gen.logMsg('warn', '*** enum:', enumname , 'IS NOT DEFINED') + self.gen.logMsg('warn', 'enum:', enumname , 'IS NOT DEFINED') + # + # cmdname - name of command + # required - boolean (to tag features as required or not) + def markCmdRequired(self, cmdname, required): + self.gen.logMsg('diag', 'tagging command:', cmdname, '-> required =', required) + cmd = self.lookupElementInfo(cmdname, self.cmddict) + if (cmd != None): + cmd.required = required + # Tag command dependencies in 'alias' attribute as required + depname = cmd.elem.get('alias') + if depname: + self.gen.logMsg('diag', 'Generating dependent command', + depname, 'for alias', cmdname) + self.markCmdRequired(depname, required) + # Tag all parameter types of this command as required. + # This DOES NOT remove types of commands in a + # tag, because many other commands may use the same type. + # We could be more clever and reference count types, + # instead of using a boolean. + if (required): + # Look for in entire tree, + # not just immediate children + for type in cmd.elem.findall('.//type'): + self.gen.logMsg('diag', 'markRequired: command implicitly requires dependent type', type.text) + self.markTypeRequired(type.text, required) + else: + self.gen.logMsg('warn', 'command:', name, 'IS NOT DEFINED') # # features - Element for or tag # required - boolean (to tag features as required or not) def markRequired(self, features, required): """Require or remove features specified in the Element""" - self.gen.logMsg('diag', '*** markRequired (features = , required =', required, ')') + self.gen.logMsg('diag', 'markRequired (features = , required =', required, ')') # Loop over types, enums, and commands in the tag # @@ It would be possible to respect 'api' and 'profile' attributes # in individual features, but that's not done yet. @@ -492,24 +636,7 @@ class Registry: for enumElem in features.findall('enum'): self.markEnumRequired(enumElem.get('name'), required) for cmdElem in features.findall('command'): - name = cmdElem.get('name') - self.gen.logMsg('diag', '*** tagging command:', name, '-> required =', required) - cmd = self.lookupElementInfo(name, self.cmddict) - if (cmd != None): - cmd.required = required - # Tag all parameter types of this command as required. - # This DOES NOT remove types of commands in a - # tag, because many other commands may use the same type. - # We could be more clever and reference count types, - # instead of using a boolean. - if (required): - # Look for in entire tree, - # not just immediate children - for type in cmd.elem.findall('.//type'): - self.gen.logMsg('diag', '*** markRequired: command implicitly requires dependent type', type.text) - self.markTypeRequired(type.text, required) - else: - self.gen.logMsg('warn', '*** command:', name, 'IS NOT DEFINED') + self.markCmdRequired(cmdElem.get('name'), required) # # interface - Element for or , containing # and tags @@ -554,74 +681,164 @@ class Registry: # ftype - type of feature, 'type' | 'enum' | 'command' # dictionary - of *Info objects - self.{type|enum|cmd}dict def generateFeature(self, fname, ftype, dictionary): + #@ # Break to debugger on matching name pattern + #@ if self.breakPat and re.match(self.breakPat, fname): + #@ pdb.set_trace() + + self.gen.logMsg('diag', 'generateFeature: generating', ftype, fname) f = self.lookupElementInfo(fname, dictionary) if (f == None): # No such feature. This is an error, but reported earlier - self.gen.logMsg('diag', '*** No entry found for feature', fname, + self.gen.logMsg('diag', 'No entry found for feature', fname, 'returning!') return # # If feature isn't required, or has already been declared, return if (not f.required): - self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(not required)') + self.gen.logMsg('diag', 'Skipping', ftype, fname, '(not required)') return if (f.declared): - self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(already declared)') + self.gen.logMsg('diag', 'Skipping', ftype, fname, '(already declared)') return # Always mark feature declared, as though actually emitted f.declared = True + + # Determine if this is an alias, and of what, if so + alias = f.elem.get('alias') + if alias: + self.gen.logMsg('diag', fname, 'is an alias of', alias) + # # Pull in dependent declaration(s) of the feature. # For types, there may be one type in the 'required' attribute of - # the element, as well as many in imbedded and tags - # within the element. + # the element, one in the 'alias' attribute, and many in + # imbedded and tags within the element. # For commands, there may be many in tags within the element. # For enums, no dependencies are allowed (though perhaps if you # have a uint64 enum, it should require that type). genProc = None if (ftype == 'type'): genProc = self.gen.genType - if ('requires' in f.elem.attrib): - depname = f.elem.get('requires') - self.gen.logMsg('diag', '*** Generating required dependent type', - depname) - self.generateFeature(depname, 'type', self.typedict) + + # Generate type dependencies in 'alias' and 'required' attributes + if alias: + self.generateFeature(alias, 'type', self.typedict) + requires = f.elem.get('requires') + if requires: + self.generateFeature(requires, 'type', self.typedict) + + # Generate types used in defining this type (e.g. in nested + # tags) + # Look for in entire tree, + # not just immediate children for subtype in f.elem.findall('.//type'): - self.gen.logMsg('diag', '*** Generating required dependent ', + self.gen.logMsg('diag', 'Generating required dependent ', subtype.text) self.generateFeature(subtype.text, 'type', self.typedict) + + # Generate enums used in defining this type, for example in + # member[MEMBER_SIZE] for subtype in f.elem.findall('.//enum'): - self.gen.logMsg('diag', '*** Generating required dependent ', + self.gen.logMsg('diag', 'Generating required dependent ', subtype.text) self.generateFeature(subtype.text, 'enum', self.enumdict) + # If the type is an enum group, look up the corresponding # group in the group dictionary and generate that instead. if (f.elem.get('category') == 'enum'): - self.gen.logMsg('diag', '*** Type', fname, 'is an enum group, so generate that instead') + self.gen.logMsg('diag', 'Type', fname, 'is an enum group, so generate that instead') group = self.lookupElementInfo(fname, self.groupdict) - if (group == None): - # Unless this is tested for, it's probably fatal to call below - genProc = None - self.logMsg('warn', '*** NO MATCHING ENUM GROUP FOUND!!!') + if alias != None: + # An alias of another group name. + # Pass to genGroup with 'alias' parameter = aliased name + self.gen.logMsg('diag', 'Generating alias', fname, + 'for enumerated type', alias) + # Now, pass the *aliased* GroupInfo to the genGroup, but + # with an additional parameter which is the alias name. + genProc = self.gen.genGroup + f = self.lookupElementInfo(alias, self.groupdict) + elif group == None: + self.gen.logMsg('warn', 'Skipping enum type', fname, + ': No matching enumerant group') + return else: genProc = self.gen.genGroup f = group + + #@ The enum group is not ready for generation. At this + #@ point, it contains all tags injected by + #@ tags without any verification of whether + #@ they're required or not. It may also contain + #@ duplicates injected by multiple consistent + #@ definitions of an . + + #@ Pass over each enum, marking its enumdict[] entry as + #@ required or not. Mark aliases of enums as required, + #@ too. + + enums = group.elem.findall('enum') + + self.gen.logMsg('diag', 'generateFeature: checking enums for group', fname) + + # Check for required enums, including aliases + # LATER - Check for, report, and remove duplicates? + enumAliases = [] + for elem in enums: + name = elem.get('name') + + required = False + + extname = elem.get('extname') + version = elem.get('version') + if extname is not None: + # 'supported' attribute was injected when the element was + # moved into the group in Registry.parseTree() + if self.genOpts.defaultExtensions == elem.get('supported'): + required = True + elif re.match(self.genOpts.addExtensions, extname) is not None: + required = True + elif version is not None: + required = re.match(self.genOpts.emitversions, version) is not None + else: + required = True + + self.gen.logMsg('diag', '* required =', required, 'for', name) + if required: + # Mark this element as required (in the element, not the EnumInfo) + elem.attrib['required'] = 'true' + # If it's an alias, track that for later use + enumAlias = elem.get('alias') + if enumAlias: + enumAliases.append(enumAlias) + for elem in enums: + name = elem.get('name') + if name in enumAliases: + elem.attrib['required'] = 'true' + self.gen.logMsg('diag', '* also need to require alias', name) elif (ftype == 'command'): + # Generate command dependencies in 'alias' attribute + if alias: + self.generateFeature(alias, 'command', self.cmddict) + genProc = self.gen.genCmd for type in f.elem.findall('.//type'): depname = type.text - self.gen.logMsg('diag', '*** Generating required parameter type', + self.gen.logMsg('diag', 'Generating required parameter type', depname) self.generateFeature(depname, 'type', self.typedict) elif (ftype == 'enum'): + # Generate enum dependencies in 'alias' attribute + if alias: + self.generateFeature(alias, 'enum', self.enumdict) genProc = self.gen.genEnum + # Actually generate the type only if emitting declarations if self.emitFeatures: - self.gen.logMsg('diag', '*** Emitting', ftype, 'decl for', fname) - genProc(f, fname) + self.gen.logMsg('diag', 'Emitting', ftype, fname, 'declaration') + genProc(f, fname, alias) else: - self.gen.logMsg('diag', '*** Skipping', ftype, fname, - '(not emitting this feature)') + self.gen.logMsg('diag', 'Skipping', ftype, fname, + '(should not be emitted)') # # generateRequiredInterface - generate all interfaces required # by an API version or extension @@ -661,8 +878,10 @@ class Registry: regEmitVersions = re.compile(self.genOpts.emitversions) regAddExtensions = re.compile(self.genOpts.addExtensions) regRemoveExtensions = re.compile(self.genOpts.removeExtensions) + regEmitExtensions = re.compile(self.genOpts.emitExtensions) # - # Get all matching API versions & add to list of FeatureInfo + # Get all matching API feature names & add to list of FeatureInfo + # Note we used to select on feature version attributes, not names. features = [] apiMatch = False for key in self.apidict: @@ -670,26 +889,30 @@ class Registry: api = fi.elem.get('api') if (api == self.genOpts.apiname): apiMatch = True - if (regVersions.match(fi.version)): + if (regVersions.match(fi.name)): # Matches API & version #s being generated. Mark for # emission and add to the features[] list . # @@ Could use 'declared' instead of 'emit'? - fi.emit = (regEmitVersions.match(fi.version) != None) + fi.emit = (regEmitVersions.match(fi.name) != None) features.append(fi) if (not fi.emit): - self.gen.logMsg('diag', '*** NOT tagging feature api =', api, + self.gen.logMsg('diag', 'NOT tagging feature api =', api, 'name =', fi.name, 'version =', fi.version, 'for emission (does not match emitversions pattern)') + else: + self.gen.logMsg('diag', 'Including feature api =', api, + 'name =', fi.name, 'version =', fi.version, + 'for emission (matches emitversions pattern)') else: - self.gen.logMsg('diag', '*** NOT including feature api =', api, + self.gen.logMsg('diag', 'NOT including feature api =', api, 'name =', fi.name, 'version =', fi.version, '(does not match requested versions)') else: - self.gen.logMsg('diag', '*** NOT including feature api =', api, + self.gen.logMsg('diag', 'NOT including feature api =', api, 'name =', fi.name, '(does not match requested API)') if (not apiMatch): - self.gen.logMsg('warn', '*** No matching API versions found!') + self.gen.logMsg('warn', 'No matching API versions found!') # # Get all matching extensions, in order by their extension number, # and add to the list of features. @@ -708,7 +931,7 @@ class Registry: pat = '^(' + ei.elem.get('supported') + ')$' if (self.genOpts.defaultExtensions and re.match(pat, self.genOpts.defaultExtensions)): - self.gen.logMsg('diag', '*** Including extension', + self.gen.logMsg('diag', 'Including extension', extName, "(defaultExtensions matches the 'supported' attribute)") include = True # @@ -717,7 +940,7 @@ class Registry: # forcing extensions into an interface even if they're not # tagged appropriately in the registry. if (regAddExtensions.match(extName) != None): - self.gen.logMsg('diag', '*** Including extension', + self.gen.logMsg('diag', 'Including extension', extName, '(matches explicitly requested extensions to add)') include = True # Remove extensions if the name matches the regexp specified @@ -725,20 +948,25 @@ class Registry: # extensions from an interface even if they're tagged that # way in the registry. if (regRemoveExtensions.match(extName) != None): - self.gen.logMsg('diag', '*** Removing extension', + self.gen.logMsg('diag', 'Removing extension', extName, '(matches explicitly requested extensions to remove)') include = False # # If the extension is to be included, add it to the # extension features list. if (include): - ei.emit = True + ei.emit = (regEmitExtensions.match(extName) != None) features.append(ei) - + if (not ei.emit): + self.gen.logMsg('diag', 'NOT tagging extension', + extName, + 'for emission (does not match emitextensions pattern)') # Hack - can be removed when validity generator goes away + # (Jon) I'm not sure what this does, or if it should respect + # the ei.emit flag above. self.requiredextensions.append(extName) else: - self.gen.logMsg('diag', '*** NOT including extension', + self.gen.logMsg('diag', 'NOT including extension', extName, '(does not match api attribute or explicitly requested extensions)') # # Sort the extension features list, if a sort procedure is defined @@ -753,9 +981,9 @@ class Registry: # If a profile other than 'None' is being generated, it must # match the profile attribute (if any) of the and # tags. - self.gen.logMsg('diag', '*** PASS 1: TAG FEATURES ********************************************') + self.gen.logMsg('diag', '*******PASS 1: TAG FEATURES **********') for f in features: - self.gen.logMsg('diag', '*** PASS 1: Tagging required and removed features for', + self.gen.logMsg('diag', 'PASS 1: Tagging required and removed features for', f.name) self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile) self.assignAdditionalValidity(f.elem, self.genOpts.apiname, self.genOpts.profile) @@ -763,14 +991,14 @@ class Registry: # Pass 2: loop over specified API versions and extensions printing # declarations for required things which haven't already been # generated. - self.gen.logMsg('diag', '*** PASS 2: GENERATE INTERFACES FOR FEATURES ************************') + self.gen.logMsg('diag', '*******PASS 2: GENERATE INTERFACES FOR FEATURES **********') self.gen.beginFile(self.genOpts) for f in features: - self.gen.logMsg('diag', '*** PASS 2: Generating interface for', + self.gen.logMsg('diag', 'PASS 2: Generating interface for', f.name) emit = self.emitFeatures = f.emit if (not emit): - self.gen.logMsg('diag', '*** PASS 2: NOT declaring feature', + self.gen.logMsg('diag', 'PASS 2: NOT declaring feature', f.elem.get('name'), 'because it is not tagged for emission') # Generate the interface (or just tag its elements as having been # emitted, if they haven't been). @@ -798,15 +1026,15 @@ class Registry: """Validate group= attributes on and tags""" # Keep track of group names not in tags badGroup = {} - self.gen.logMsg('diag', '*** VALIDATING GROUP ATTRIBUTES ***') + self.gen.logMsg('diag', 'VALIDATING GROUP ATTRIBUTES ***') for cmd in self.reg.findall('commands/command'): proto = cmd.find('proto') funcname = cmd.find('proto/name').text if ('group' in proto.attrib.keys()): group = proto.get('group') - # self.gen.logMsg('diag', '*** Command ', funcname, ' has return group ', group) + # self.gen.logMsg('diag', 'Command ', funcname, ' has return group ', group) if (group not in self.groupdict.keys()): - # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group) + # self.gen.logMsg('diag', 'Command ', funcname, ' has UNKNOWN return group ', group) if (group not in badGroup.keys()): badGroup[group] = 1 else: @@ -820,12 +1048,12 @@ class Registry: if ('group' in param.attrib.keys()): group = param.get('group') if (group not in self.groupdict.keys()): - # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) + # self.gen.logMsg('diag', 'Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) if (group not in badGroup.keys()): badGroup[group] = 1 else: badGroup[group] = badGroup[group] + 1 if (len(badGroup.keys()) > 0): - self.gen.logMsg('diag', '*** SUMMARY OF UNRECOGNIZED GROUPS ***') + self.gen.logMsg('diag', 'SUMMARY OF UNRECOGNIZED GROUPS ***') for key in sorted(badGroup.keys()): self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times') diff --git a/scripts/vk.xml b/scripts/vk.xml index 7a6f3aea..0b65ee8a 100644 --- a/scripts/vk.xml +++ b/scripts/vk.xml @@ -34,6 +34,19 @@ private version is maintained in the 1.0 branch of the member gitlab server. + + + + + + + + + + + + + @@ -68,20 +81,34 @@ private version is maintained in the 1.0 branch of the member gitlab server. #include "vk_platform.h" WSI extensions - #include "vulkan.h" - #include <X11/Xlib.h> - #include <X11/extensions/Xrandr.h> - #include <android/native_window.h> - #include <mir_toolkit/client_types.h> - #include <wayland-client.h> - #include <windows.h> - #include <xcb/xcb.h> + + + + + + + + + In the current header structure, each platform's interfaces + are confined to a platform-specific header (vulkan_xlib.h, + vulkan_win32.h, etc.). These headers are not self-contained, + and should not include native headers (X11/Xlib.h, + windows.h, etc.). Code should either include vulkan.h after + defining the appropriate VK_USE_PLATFORM_platform_KHR + macros, or include the required native headers prior to + explicitly including the corresponding platform header. + + To accomplish this, the dependencies of native types require + native headers, but the XML defines the content for those + native headers as empty. The actual native header includes + can be restored by modifying the native header tags above + to #include the header file in the 'name' attribute. + - @@ -106,6 +133,8 @@ private version is maintained in the 1.0 branch of the member gitlab server. //#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 // Vulkan 1.0 version number #define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0 + // Vulkan 1.1 version number +#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)// Patch version should always be set to 0 // Version of this file #define VK_HEADER_VERSION 69 @@ -126,6 +155,8 @@ private version is maintained in the 1.0 branch of the member gitlab server. #define VK_NULL_HANDLE 0 + struct ANativeWindow; + typedef uint32_t VkSampleMask; typedef uint32_t VkBool32; typedef uint32_t VkFlags; @@ -163,7 +194,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. typedef VkFlags VkBufferViewCreateFlags; typedef VkFlags VkInstanceCreateFlags; typedef VkFlags VkDeviceCreateFlags; - typedef VkFlags VkDeviceQueueCreateFlags; + typedef VkFlags VkDeviceQueueCreateFlags; typedef VkFlags VkQueueFlags; typedef VkFlags VkMemoryPropertyFlags; typedef VkFlags VkMemoryHeapFlags; @@ -201,11 +232,12 @@ private version is maintained in the 1.0 branch of the member gitlab server. typedef VkFlags VkDescriptorPoolCreateFlags; typedef VkFlags VkDescriptorPoolResetFlags; typedef VkFlags VkDependencyFlags; - + typedef VkFlags VkSubgroupFeatureFlags; typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNVX; typedef VkFlags VkObjectEntryUsageFlagsNVX; - typedef VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR; + typedef VkFlags VkDescriptorUpdateTemplateCreateFlags; + WSI extensions typedef VkFlags VkCompositeAlphaFlagsKHR; @@ -223,28 +255,43 @@ private version is maintained in the 1.0 branch of the member gitlab server. typedef VkFlags VkXcbSurfaceCreateFlagsKHR; typedef VkFlags VkIOSSurfaceCreateFlagsMVK; typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; - typedef VkFlags VkPeerMemoryFeatureFlagsKHX; - typedef VkFlags VkMemoryAllocateFlagsKHX; - typedef VkFlags VkDeviceGroupPresentModeFlagsKHX; + typedef VkFlags VkPeerMemoryFeatureFlags; + + typedef VkFlags VkMemoryAllocateFlags; + + typedef VkFlags VkDeviceGroupPresentModeFlagsKHR; typedef VkFlags VkDebugReportFlagsEXT; - typedef VkFlags VkCommandPoolTrimFlagsKHR; + typedef VkFlags VkCommandPoolTrimFlags; + typedef VkFlags VkExternalMemoryHandleTypeFlagsNV; typedef VkFlags VkExternalMemoryFeatureFlagsNV; - typedef VkFlags VkExternalMemoryHandleTypeFlagsKHR; - typedef VkFlags VkExternalMemoryFeatureFlagsKHR; - typedef VkFlags VkExternalSemaphoreHandleTypeFlagsKHR; - typedef VkFlags VkExternalSemaphoreFeatureFlagsKHR; - typedef VkFlags VkSemaphoreImportFlagsKHR; - typedef VkFlags VkExternalFenceHandleTypeFlagsKHR; - typedef VkFlags VkExternalFenceFeatureFlagsKHR; - typedef VkFlags VkFenceImportFlagsKHR; + typedef VkFlags VkExternalMemoryHandleTypeFlags; + + typedef VkFlags VkExternalMemoryFeatureFlags; + + typedef VkFlags VkExternalSemaphoreHandleTypeFlags; + + typedef VkFlags VkExternalSemaphoreFeatureFlags; + + typedef VkFlags VkSemaphoreImportFlags; + + typedef VkFlags VkExternalFenceHandleTypeFlags; + + typedef VkFlags VkExternalFenceFeatureFlags; + + typedef VkFlags VkFenceImportFlags; + typedef VkFlags VkSurfaceCounterFlagsEXT; typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV; typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT; typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV; typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV; - typedef VkFlags VkValidationCacheCreateFlagsEXT; + typedef VkFlags VkValidationCacheCreateFlagsEXT; + typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT; + typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT; + typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT; + typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT; typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; Types which can be void pointers or class pointers, selected at compile time @@ -275,8 +322,10 @@ private version is maintained in the 1.0 branch of the member gitlab server. VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) - VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplateKHR) - VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversionKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) + + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) WSI extensions @@ -285,6 +334,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT) Types generated from corresponding enums tags below @@ -380,11 +430,13 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + + - + + @@ -403,28 +455,45 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + + + - - - - + + + + + + + + + + + The PFN_vk*Function types are used by VkAllocationCallbacks below typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( @@ -466,6 +535,13 @@ private version is maintained in the 1.0 branch of the member gitlab server. const char* pMessage, void* pUserData); + The PFN_vkDebugUtilsMessengerCallbackEXT type are used by the VK_EXT_debug_utils extension + typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)( + VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageType, + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, + void* pUserData); + Struct types int32_t x @@ -1516,9 +1592,9 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType - const void* pNext - VkAndroidSurfaceCreateFlagsKHR flags - ANativeWindow* window + const void* pNext + VkAndroidSurfaceCreateFlagsKHR flags + struct ANativeWindow* window VkStructureType sType @@ -1790,28 +1866,32 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkPipelineLayout pipelineLayout VkShaderStageFlags stageFlags - - VkStructureType sType + + VkStructureType sType void* pNext VkPhysicalDeviceFeatures features - - VkStructureType sType + + + VkStructureType sType void* pNext VkPhysicalDeviceProperties properties - - VkStructureType sType + + + VkStructureType sType void* pNext VkFormatProperties formatProperties - - VkStructureType sType + + + VkStructureType sType void* pNext VkImageFormatProperties imageFormatProperties - - VkStructureType sType + + + VkStructureType sType const void* pNext VkFormat format VkImageType type @@ -1819,23 +1899,27 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkImageUsageFlags usage VkImageCreateFlags flags - - VkStructureType sType + + + VkStructureType sType void* pNext VkQueueFamilyProperties queueFamilyProperties - - VkStructureType sType + + + VkStructureType sType void* pNext VkPhysicalDeviceMemoryProperties memoryProperties - - VkStructureType sType + + + VkStructureType sType void* pNext VkSparseImageFormatProperties properties - - VkStructureType sType + + + VkStructureType sType const void* pNext VkFormat format VkImageType type @@ -1843,7 +1927,8 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkImageUsageFlags usage VkImageTiling tiling - + + VkStructureType sType void* pNext uint32_t maxPushDescriptors @@ -1863,67 +1948,77 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkExtent2D extentDimensions of a rectangle that has not changed, in pixels of a presentation images uint32_t layerLayer of a swapchain's image(s), for stereoscopic-3D images - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 variablePointersStorageBuffer VkBool32 variablePointers - - VkExternalMemoryFeatureFlagsKHR externalMemoryFeatures - VkExternalMemoryHandleTypeFlagsKHR exportFromImportedHandleTypes - VkExternalMemoryHandleTypeFlagsKHR compatibleHandleTypes + + + VkExternalMemoryFeatureFlags externalMemoryFeatures + VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes + VkExternalMemoryHandleTypeFlags compatibleHandleTypes - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType - - VkStructureType sType + + + VkStructureType sType void* pNext - VkExternalMemoryPropertiesKHR externalMemoryProperties + VkExternalMemoryProperties externalMemoryProperties - - VkStructureType sType + + + VkStructureType sType const void* pNext VkBufferCreateFlags flags VkBufferUsageFlags usage - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType - - VkStructureType sType + + + VkStructureType sType void* pNext - VkExternalMemoryPropertiesKHR externalMemoryProperties + VkExternalMemoryProperties externalMemoryProperties - - VkStructureType sType + + + VkStructureType sType void* pNext uint8_t deviceUUID[VK_UUID_SIZE] uint8_t driverUUID[VK_UUID_SIZE] - uint8_t deviceLUID[VK_LUID_SIZE_KHR] + uint8_t deviceLUID[VK_LUID_SIZE] uint32_t deviceNodeMask VkBool32 deviceLUIDValid - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkExternalMemoryHandleTypeFlagsKHR handleTypes + VkExternalMemoryHandleTypeFlags handleTypes - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkExternalMemoryHandleTypeFlagsKHR handleTypes + VkExternalMemoryHandleTypeFlags handleTypes - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkExternalMemoryHandleTypeFlagsKHR handleTypes + VkExternalMemoryHandleTypeFlags handleTypes + VkStructureType sType const void* pNext - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType HANDLE handle LPCWSTR name @@ -1943,12 +2038,12 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType const void* pNext VkDeviceMemory memory - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType VkStructureType sType const void* pNext - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType int fd @@ -1960,7 +2055,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType const void* pNext VkDeviceMemory memory - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType VkStructureType sType @@ -1973,29 +2068,32 @@ private version is maintained in the 1.0 branch of the member gitlab server. const VkDeviceMemory* pReleaseSyncs const uint64_t* pReleaseKeys - - VkStructureType sType + + VkStructureType sType const void* pNext - VkExternalSemaphoreHandleTypeFlagBitsKHR handleType + VkExternalSemaphoreHandleTypeFlagBits handleType - - VkStructureType sType + + + VkStructureType sType void* pNext - VkExternalSemaphoreHandleTypeFlagsKHR exportFromImportedHandleTypes - VkExternalSemaphoreHandleTypeFlagsKHR compatibleHandleTypes - VkExternalSemaphoreFeatureFlagsKHR externalSemaphoreFeatures + VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes + VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes + VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkExternalSemaphoreHandleTypeFlagsKHR handleTypes + VkExternalSemaphoreHandleTypeFlags handleTypes + VkStructureType sType const void* pNext VkSemaphore semaphore - VkSemaphoreImportFlagsKHR flags - VkExternalSemaphoreHandleTypeFlagBitsKHR handleType + VkSemaphoreImportFlags flags + VkExternalSemaphoreHandleTypeFlagBits handleType HANDLE handle LPCWSTR name @@ -2018,45 +2116,48 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType const void* pNext VkSemaphore semaphore - VkExternalSemaphoreHandleTypeFlagBitsKHR handleType + VkExternalSemaphoreHandleTypeFlagBits handleType VkStructureType sType const void* pNext VkSemaphore semaphore - VkSemaphoreImportFlagsKHR flags - VkExternalSemaphoreHandleTypeFlagBitsKHR handleType + VkSemaphoreImportFlags flags + VkExternalSemaphoreHandleTypeFlagBits handleType int fd VkStructureType sType const void* pNext VkSemaphore semaphore - VkExternalSemaphoreHandleTypeFlagBitsKHR handleType + VkExternalSemaphoreHandleTypeFlagBits handleType - - VkStructureType sType + + VkStructureType sType const void* pNext - VkExternalFenceHandleTypeFlagBitsKHR handleType + VkExternalFenceHandleTypeFlagBits handleType - - VkStructureType sType + + + VkStructureType sType void* pNext - VkExternalFenceHandleTypeFlagsKHR exportFromImportedHandleTypes - VkExternalFenceHandleTypeFlagsKHR compatibleHandleTypes - VkExternalFenceFeatureFlagsKHR externalFenceFeatures + VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes + VkExternalFenceHandleTypeFlags compatibleHandleTypes + VkExternalFenceFeatureFlags externalFenceFeatures - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkExternalFenceHandleTypeFlagsKHR handleTypes + VkExternalFenceHandleTypeFlags handleTypes + VkStructureType sType const void* pNext VkFence fence - VkFenceImportFlagsKHR flags - VkExternalFenceHandleTypeFlagBitsKHR handleType + VkFenceImportFlags flags + VkExternalFenceHandleTypeFlagBits handleType HANDLE handle LPCWSTR name @@ -2071,37 +2172,39 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType const void* pNext VkFence fence - VkExternalFenceHandleTypeFlagBitsKHR handleType + VkExternalFenceHandleTypeFlagBits handleType VkStructureType sType const void* pNext VkFence fence - VkFenceImportFlagsKHR flags - VkExternalFenceHandleTypeFlagBitsKHR handleType + VkFenceImportFlags flags + VkExternalFenceHandleTypeFlagBits handleType int fd VkStructureType sType const void* pNext VkFence fence - VkExternalFenceHandleTypeFlagBitsKHR handleType + VkExternalFenceHandleTypeFlagBits handleType - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 multiviewMultiple views in a renderpass VkBool32 multiviewGeometryShaderMultiple views in a renderpass w/ geometry shader VkBool32 multiviewTessellationShaderMultiple views in a renderpass w/ tessellation shader - - VkStructureType sType + + + VkStructureType sType void* pNext uint32_t maxMultiviewViewCountmax number of views in a subpass uint32_t maxMultiviewInstanceIndexmax instance index for a draw in a multiview subpass - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t subpassCount const uint32_t* pViewMasks @@ -2110,6 +2213,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t correlationMaskCount const uint32_t* pCorrelationMasks + VkStructureType sType void* pNext @@ -2145,61 +2249,69 @@ private version is maintained in the 1.0 branch of the member gitlab server. const void* pNext VkSurfaceCounterFlagsEXT surfaceCounters - - VkStructureType sType + + VkStructureType sType void* pNext uint32_t physicalDeviceCount - VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE_KHX] + VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE] VkBool32 subsetAllocation - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkMemoryAllocateFlagsKHX flags + VkMemoryAllocateFlags flags uint32_t deviceMask - - VkStructureType sType + + + VkStructureType sType const void* pNext VkBuffer buffer VkDeviceMemory memory VkDeviceSize memoryOffset - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t deviceIndexCount const uint32_t* pDeviceIndices - - VkStructureType sType + + + VkStructureType sType const void* pNext VkImage image VkDeviceMemory memory VkDeviceSize memoryOffset - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t deviceIndexCount const uint32_t* pDeviceIndices - uint32_t SFRRectCount - const VkRect2D* pSFRRects + uint32_t splitInstanceBindRegionCount + const VkRect2D* pSplitInstanceBindRegions - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t deviceMask uint32_t deviceRenderAreaCount const VkRect2D* pDeviceRenderAreas - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t deviceMask - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t waitSemaphoreCount const uint32_t* pWaitSemaphoreDeviceIndices @@ -2208,31 +2320,33 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t signalSemaphoreCount const uint32_t* pSignalSemaphoreDeviceIndices - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t resourceDeviceIndex uint32_t memoryDeviceIndex - - VkStructureType sType + + + VkStructureType sType const void* pNext - uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE_KHX] - VkDeviceGroupPresentModeFlagsKHX modes + uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE] + VkDeviceGroupPresentModeFlagsKHR modes - - VkStructureType sType + + VkStructureType sType const void* pNext VkSwapchainKHR swapchain - - VkStructureType sType + + VkStructureType sType const void* pNext VkSwapchainKHR swapchain uint32_t imageIndex - - VkStructureType sType + + VkStructureType sType const void* pNext VkSwapchainKHR swapchain uint64_t timeout @@ -2240,25 +2354,26 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkFence fence uint32_t deviceMask - - VkStructureType sType + + VkStructureType sType const void* pNext uint32_t swapchainCount const uint32_t* pDeviceMasks - VkDeviceGroupPresentModeFlagBitsKHX mode + VkDeviceGroupPresentModeFlagBitsKHR mode - - VkStructureType sType + + VkStructureType sType const void* pNext uint32_t physicalDeviceCount const VkPhysicalDevice* pPhysicalDevices - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkDeviceGroupPresentModeFlagsKHX modes + VkDeviceGroupPresentModeFlagsKHR modes - + uint32_t dstBindingBinding within the destination descriptor set to write uint32_t dstArrayElementArray element within the destination binding to write uint32_t descriptorCountNumber of descriptors to write @@ -2266,18 +2381,20 @@ private version is maintained in the 1.0 branch of the member gitlab server. size_t offsetOffset into pData where the descriptors to update are stored size_t strideStride between two descriptors in pData when writing more than one descriptor - - VkStructureType sType + + + VkStructureType sType void* pNext - VkDescriptorUpdateTemplateCreateFlagsKHR flags + VkDescriptorUpdateTemplateCreateFlags flags uint32_t descriptorUpdateEntryCountNumber of descriptor update entries to use for the update template - const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntriesDescriptor update entries for the template - VkDescriptorUpdateTemplateTypeKHR templateType + const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntriesDescriptor update entries for the template + VkDescriptorUpdateTemplateType templateType VkDescriptorSetLayout descriptorSetLayout - VkPipelineBindPoint pipelineBindPoint - VkPipelineLayoutpipelineLayoutIf used for push descriptors, this is the only allowed layout - uint32_t set + VkPipelineBindPoint pipelineBindPoint + VkPipelineLayoutpipelineLayoutIf used for push descriptors, this is the only allowed layout + uint32_t set + float x float y @@ -2353,7 +2470,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t viewportCount const VkViewportSwizzleNV* pViewportSwizzles - + VkStructureType sType void* pNext uint32_t maxDiscardRectanglesmax number of active discard rectangles @@ -2366,22 +2483,24 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t discardRectangleCount const VkRect2D* pDiscardRectangles - + VkStructureType sType - void* pNext + void* pNext VkBool32 perViewPositionAllComponents - + uint32_t subpass uint32_t inputAttachmentIndex VkImageAspectFlags aspectMask - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t aspectReferenceCount - const VkInputAttachmentAspectReferenceKHR* pAspectReferences + const VkInputAttachmentAspectReference* pAspectReferences + VkStructureType sType const void* pNext @@ -2402,108 +2521,155 @@ private version is maintained in the 1.0 branch of the member gitlab server. void* pNext VkImageUsageFlags sharedPresentSupportedUsageFlagsSupported image usage flags if swapchain created using a shared present mode - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 storageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock VkBool32 uniformAndStorageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock and Block VkBool32 storagePushConstant1616-bit integer/floating-point variables supported in PushConstant VkBool32 storageInputOutput1616-bit integer/floating-point variables supported in shader inputs and outputs - - VkStructureType sType + + + VkStructureType sType + void* pNext + uint32_t subgroupSizeThe size of a subgroup for this queue. + VkShaderStageFlags supportedStagesBitfield of what shader stages support subgroup operations + VkSubgroupFeatureFlags supportedOperationsBitfield of what subgroup operations are supported. + VkBool32 quadOperationsInAllStagesFlag to specify whether quad operations are available in all stages. + + + VkStructureType sType const void* pNext VkBuffer buffer - - VkStructureType sType + + + VkStructureType sType const void* pNext VkImage image - - VkStructureType sType + + + VkStructureType sType const void* pNext VkImage image - - VkStructureType sType + + + VkStructureType sType void* pNext VkMemoryRequirements memoryRequirements - - VkStructureType sType + + + VkStructureType sType void* pNext VkSparseImageMemoryRequirements memoryRequirements - - VkStructureType sType + + + VkStructureType sType void* pNext - VkPointClippingBehaviorKHR pointClippingBehavior + VkPointClippingBehavior pointClippingBehavior - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 prefersDedicatedAllocation VkBool32 requiresDedicatedAllocation - - VkStructureType sType + + + VkStructureType sType const void* pNext VkImage imageImage that this allocation will be bound to VkBuffer bufferBuffer that this allocation will be bound to - - VkStructureType sType + + + VkStructureType sType const void* pNext VkImageUsageFlags usage - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkTessellationDomainOriginKHR domainOrigin + VkTessellationDomainOrigin domainOrigin - - VkStructureType sType + + + VkStructureType sType const void* pNext - VkSamplerYcbcrConversionKHR conversion + VkSamplerYcbcrConversion conversion - - VkStructureType sType + + + VkStructureType sType const void* pNext VkFormat format - VkSamplerYcbcrModelConversionKHR ycbcrModel - VkSamplerYcbcrRangeKHR ycbcrRange + VkSamplerYcbcrModelConversion ycbcrModel + VkSamplerYcbcrRange ycbcrRange VkComponentMapping components - VkChromaLocationKHR xChromaOffset - VkChromaLocationKHR yChromaOffset + VkChromaLocation xChromaOffset + VkChromaLocation yChromaOffset VkFilter chromaFilter VkBool32 forceExplicitReconstruction - - VkStructureType sType + + + VkStructureType sType const void* pNext VkImageAspectFlagBits planeAspect - - VkStructureType sType + + + VkStructureType sType const void* pNext VkImageAspectFlagBits planeAspect - - VkStructureType sType + + + VkStructureType sType void* pNext VkBool32 samplerYcbcrConversionSampler color conversion supported - - VkStructureType sType + + + VkStructureType sType void* pNext uint32_t combinedImageSamplerDescriptorCount - + + VkStructureType sType void* pNext VkBool32 supportsTextureGatherLODBiasAMD + + VkStructureType sType + const void* pNext + VkBool32 protectedSubmitSubmit protected command buffers + + + VkStructureType sType + void* pNext + VkBool32 protectedMemory + + + VkStructureType sType + void* pNext + VkBool32 protectedNoFault + + + VkStructureType sType + const void* pNext + VkDeviceQueueCreateFlags flags + uint32_t queueFamilyIndex + uint32_t queueIndex + VkStructureType sType const void* pNext @@ -2511,7 +2677,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkBool32 coverageToColorEnable uint32_t coverageToColorLocation - + VkStructureType sType void* pNext VkBool32 filterMinmaxSingleComponentFormats @@ -2551,7 +2717,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkBool32 sampleLocationsEnable VkSampleLocationsInfoEXT sampleLocationsInfo - + VkStructureType sType void* pNext VkSampleCountFlags sampleLocationSampleCounts @@ -2570,12 +2736,12 @@ private version is maintained in the 1.0 branch of the member gitlab server. const void* pNext VkSamplerReductionModeEXT reductionMode - + VkStructureType sType void* pNext VkBool32 advancedBlendCoherentOperations - + VkStructureType sType void* pNext uint32_t advancedBlendMaxColorAttachments @@ -2609,15 +2775,33 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType - const void* pNext - VkValidationCacheCreateFlagsEXT flags - size_t initialDataSize - const void* pInitialData + const void* pNext + VkValidationCacheCreateFlagsEXT flags + size_t initialDataSize + const void* pInitialData VkStructureType sType - const void* pNext - VkValidationCacheEXT validationCache + const void* pNext + VkValidationCacheEXT validationCache + + + VkStructureType sType + void* pNext + uint32_t maxPerSetDescriptors + VkDeviceSize maxMemoryAllocationSize + + + + VkStructureType sType + void* pNext + VkBool32 supported + + + + VkStructureType sType + void* pNext + VkBool32 shaderDrawParameters VkStructureType sType @@ -2645,13 +2829,58 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkStructureType sType - const void* pNext + const void* pNext VkQueueGlobalPriorityEXT globalPriority + + VkStructureType sType + const void* pNext + VkObjectType objectType + uint64_t objectHandle + const char* pObjectName + + + VkStructureType sType + const void* pNext + VkObjectType objectType + uint64_t objectHandle + uint64_t tagName + size_t tagSize + const void* pTag + + + VkStructureType sType + const void* pNext + const char* pLabelName + float color[4] + + + VkStructureType sType + const void* pNext + VkDebugUtilsMessengerCreateFlagsEXT flags + VkDebugUtilsMessageSeverityFlagsEXT messageSeverity + VkDebugUtilsMessageTypeFlagsEXT messageType + PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback + void* pUserData + + + VkStructureType sType + const void* pNext + VkDebugUtilsMessengerCallbackDataFlagsEXT flags + const char* pMessageIdName + int32_t messageIdNumber + const char* pMessage + uint32_t queueLabelCount + VkDebugUtilsLabelEXT* pQueueLabels + uint32_t cmdBufLabelCount + VkDebugUtilsLabelEXT* pCmdBufLabels + uint32_t objectCount + VkDebugUtilsObjectNameInfoEXT* pObjects + VkStructureType sType const void* pNext - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType void* pHostPointer @@ -2659,7 +2888,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. void* pNext uint32_t memoryTypeBits - + VkStructureType sType void* pNext VkDeviceSize minImportedHostPointerAlignment @@ -2692,7 +2921,8 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + + @@ -2705,10 +2935,12 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + + - + + @@ -2727,8 +2959,8 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + @@ -3212,47 +3444,46 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - - - - - + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + Flags @@ -3262,6 +3493,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. + @@ -3397,8 +3629,8 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + @@ -3409,8 +3641,8 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + @@ -3491,178 +3723,188 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - + + + + - - - + + + - - + + Placeholder for validation enums to be defined for VK_EXT_Validation_flags extension + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - + + - - - - - + + + + + - - - + + + - - + + - + - - - + + + - + - + - - - - - + + + + + - - + + - - - - - + + + + + - - - - - - - - + + + + + + + + @@ -3670,33 +3912,33 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + - - - + + + - - - - - - + + + + + + - - - + + + - - - + + + @@ -3713,15 +3955,26 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + - - - - + + + + + + + + + + + + + + + @@ -3806,6 +4059,10 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkDevice device const VkAllocationCallbacks* pAllocator + + VkResult vkEnumerateInstanceVersion + uint32_t* pApiVersion + VkResult vkEnumerateInstanceLayerProperties uint32_t* pPropertyCount @@ -3855,7 +4112,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. all sname:VkQueue objects created from pname:device - + VkResult vkAllocateMemory VkDevice device const VkMemoryAllocateInfo* pAllocateInfo @@ -4232,7 +4489,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. any sname:VkDescriptorSet objects allocated from pname:descriptorPool - + VkResult vkAllocateDescriptorSets VkDevice device const VkDescriptorSetAllocateInfo* pAllocateInfo @@ -5024,45 +5281,52 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkDeviceGeneratedCommandsLimitsNVX* pLimits - void vkGetPhysicalDeviceFeatures2KHR + void vkGetPhysicalDeviceFeatures2 VkPhysicalDevice physicalDevice - VkPhysicalDeviceFeatures2KHR* pFeatures + VkPhysicalDeviceFeatures2* pFeatures + - void vkGetPhysicalDeviceProperties2KHR + void vkGetPhysicalDeviceProperties2 VkPhysicalDevice physicalDevice - VkPhysicalDeviceProperties2KHR* pProperties + VkPhysicalDeviceProperties2* pProperties + - void vkGetPhysicalDeviceFormatProperties2KHR + void vkGetPhysicalDeviceFormatProperties2 VkPhysicalDevice physicalDevice VkFormat format - VkFormatProperties2KHR* pFormatProperties + VkFormatProperties2* pFormatProperties + - VkResult vkGetPhysicalDeviceImageFormatProperties2KHR + VkResult vkGetPhysicalDeviceImageFormatProperties2 VkPhysicalDevice physicalDevice - const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo - VkImageFormatProperties2KHR* pImageFormatProperties + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo + VkImageFormatProperties2* pImageFormatProperties + - void vkGetPhysicalDeviceQueueFamilyProperties2KHR + void vkGetPhysicalDeviceQueueFamilyProperties2 VkPhysicalDevice physicalDevice uint32_t* pQueueFamilyPropertyCount - VkQueueFamilyProperties2KHR* pQueueFamilyProperties + VkQueueFamilyProperties2* pQueueFamilyProperties + - void vkGetPhysicalDeviceMemoryProperties2KHR + void vkGetPhysicalDeviceMemoryProperties2 VkPhysicalDevice physicalDevice - VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties + VkPhysicalDeviceMemoryProperties2* pMemoryProperties + - void vkGetPhysicalDeviceSparseImageFormatProperties2KHR + void vkGetPhysicalDeviceSparseImageFormatProperties2 VkPhysicalDevice physicalDevice - const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo uint32_t* pPropertyCount - VkSparseImageFormatProperties2KHR* pProperties + VkSparseImageFormatProperties2* pProperties + void vkCmdPushDescriptorSetKHR VkCommandBuffer commandBuffer @@ -5073,27 +5337,29 @@ private version is maintained in the 1.0 branch of the member gitlab server. const VkWriteDescriptorSet* pDescriptorWrites - void vkTrimCommandPoolKHR + void vkTrimCommandPool VkDevice device VkCommandPool commandPool - VkCommandPoolTrimFlagsKHR flags + VkCommandPoolTrimFlags flags + - void vkGetPhysicalDeviceExternalBufferPropertiesKHR + void vkGetPhysicalDeviceExternalBufferProperties VkPhysicalDevice physicalDevice - const VkPhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo - VkExternalBufferPropertiesKHR* pExternalBufferProperties + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo + VkExternalBufferProperties* pExternalBufferProperties + VkResult vkGetMemoryWin32HandleKHR VkDevice device const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo HANDLE* pHandle - + VkResult vkGetMemoryWin32HandlePropertiesKHR VkDevice device - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType HANDLE handle VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties @@ -5103,26 +5369,27 @@ private version is maintained in the 1.0 branch of the member gitlab server. const VkMemoryGetFdInfoKHR* pGetFdInfo int* pFd - + VkResult vkGetMemoryFdPropertiesKHR VkDevice device - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType int fd VkMemoryFdPropertiesKHR* pMemoryFdProperties - void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR + void vkGetPhysicalDeviceExternalSemaphoreProperties VkPhysicalDevice physicalDevice - const VkPhysicalDeviceExternalSemaphoreInfoKHR* pExternalSemaphoreInfo - VkExternalSemaphorePropertiesKHR* pExternalSemaphoreProperties + const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo + VkExternalSemaphoreProperties* pExternalSemaphoreProperties + VkResult vkGetSemaphoreWin32HandleKHR VkDevice device const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo HANDLE* pHandle - + VkResult vkImportSemaphoreWin32HandleKHR VkDevice device const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo @@ -5133,24 +5400,25 @@ private version is maintained in the 1.0 branch of the member gitlab server. const VkSemaphoreGetFdInfoKHR* pGetFdInfo int* pFd - + VkResult vkImportSemaphoreFdKHR VkDevice device const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo - void vkGetPhysicalDeviceExternalFencePropertiesKHR + void vkGetPhysicalDeviceExternalFenceProperties VkPhysicalDevice physicalDevice - const VkPhysicalDeviceExternalFenceInfoKHR* pExternalFenceInfo - VkExternalFencePropertiesKHR* pExternalFenceProperties + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo + VkExternalFenceProperties* pExternalFenceProperties + VkResult vkGetFenceWin32HandleKHR VkDevice device const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo HANDLE* pHandle - + VkResult vkImportFenceWin32HandleKHR VkDevice device const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo @@ -5161,7 +5429,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. const VkFenceGetFdInfoKHR* pGetFdInfo int* pFd - + VkResult vkImportFenceFdKHR VkDevice device const VkImportFenceFdInfoKHR* pImportFenceFdInfo @@ -5219,55 +5487,60 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkSurfaceCapabilities2EXT* pSurfaceCapabilities - VkResult vkEnumeratePhysicalDeviceGroupsKHX + VkResult vkEnumeratePhysicalDeviceGroups VkInstance instance uint32_t* pPhysicalDeviceGroupCount - VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties + - void vkGetDeviceGroupPeerMemoryFeaturesKHX + void vkGetDeviceGroupPeerMemoryFeatures VkDevice device uint32_t heapIndex uint32_t localDeviceIndex uint32_t remoteDeviceIndex - VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures + - VkResult vkBindBufferMemory2KHR + VkResult vkBindBufferMemory2 VkDevice device uint32_t bindInfoCount - const VkBindBufferMemoryInfoKHR* pBindInfos + const VkBindBufferMemoryInfo* pBindInfos + - VkResult vkBindImageMemory2KHR + VkResult vkBindImageMemory2 VkDevice device uint32_t bindInfoCount - const VkBindImageMemoryInfoKHR* pBindInfos + const VkBindImageMemoryInfo* pBindInfos + - void vkCmdSetDeviceMaskKHX + void vkCmdSetDeviceMask VkCommandBuffer commandBuffer uint32_t deviceMask + - VkResult vkGetDeviceGroupPresentCapabilitiesKHX + VkResult vkGetDeviceGroupPresentCapabilitiesKHR VkDevice device - VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities + VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities - VkResult vkGetDeviceGroupSurfacePresentModesKHX + VkResult vkGetDeviceGroupSurfacePresentModesKHR VkDevice device VkSurfaceKHR surface - VkDeviceGroupPresentModeFlagsKHX* pModes + VkDeviceGroupPresentModeFlagsKHR* pModes - VkResult vkAcquireNextImage2KHX + VkResult vkAcquireNextImage2KHR VkDevice device - const VkAcquireNextImageInfoKHX* pAcquireInfo + const VkAcquireNextImageInfoKHR* pAcquireInfo uint32_t* pImageIndex - void vkCmdDispatchBaseKHX + void vkCmdDispatchBase VkCommandBuffer commandBuffer uint32_t baseGroupX uint32_t baseGroupY @@ -5276,37 +5549,41 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t groupCountY uint32_t groupCountZ + - VkResult vkGetPhysicalDevicePresentRectanglesKHX + VkResult vkGetPhysicalDevicePresentRectanglesKHR VkPhysicalDevice physicalDevice VkSurfaceKHR surface uint32_t* pRectCount VkRect2D* pRects - VkResult vkCreateDescriptorUpdateTemplateKHR + VkResult vkCreateDescriptorUpdateTemplate VkDevice device - const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator - VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate + - void vkDestroyDescriptorUpdateTemplateKHR + void vkDestroyDescriptorUpdateTemplate VkDevice device - VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate + VkDescriptorUpdateTemplate descriptorUpdateTemplate const VkAllocationCallbacks* pAllocator + - void vkUpdateDescriptorSetWithTemplateKHR + void vkUpdateDescriptorSetWithTemplate VkDevice device VkDescriptorSet descriptorSet - VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate + VkDescriptorUpdateTemplate descriptorUpdateTemplate const void* pData + void vkCmdPushDescriptorSetWithTemplateKHR VkCommandBuffer commandBuffer - VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate + VkDescriptorUpdateTemplate descriptorUpdateTemplate VkPipelineLayout layout uint32_t set const void* pData @@ -5389,37 +5666,48 @@ private version is maintained in the 1.0 branch of the member gitlab server. VkSurfaceFormat2KHR* pSurfaceFormats - void vkGetBufferMemoryRequirements2KHR + void vkGetBufferMemoryRequirements2 VkDevice device - const VkBufferMemoryRequirementsInfo2KHR* pInfo - VkMemoryRequirements2KHR* pMemoryRequirements + const VkBufferMemoryRequirementsInfo2* pInfo + VkMemoryRequirements2* pMemoryRequirements + - void vkGetImageMemoryRequirements2KHR + void vkGetImageMemoryRequirements2 VkDevice device - const VkImageMemoryRequirementsInfo2KHR* pInfo - VkMemoryRequirements2KHR* pMemoryRequirements + const VkImageMemoryRequirementsInfo2* pInfo + VkMemoryRequirements2* pMemoryRequirements + - void vkGetImageSparseMemoryRequirements2KHR + void vkGetImageSparseMemoryRequirements2 VkDevice device - const VkImageSparseMemoryRequirementsInfo2KHR* pInfo + const VkImageSparseMemoryRequirementsInfo2* pInfo uint32_t* pSparseMemoryRequirementCount - VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements + - VkResult vkCreateSamplerYcbcrConversionKHR + VkResult vkCreateSamplerYcbcrConversion VkDevice device - const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo + const VkSamplerYcbcrConversionCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator - VkSamplerYcbcrConversionKHR* pYcbcrConversion + VkSamplerYcbcrConversion* pYcbcrConversion + - void vkDestroySamplerYcbcrConversionKHR + void vkDestroySamplerYcbcrConversion VkDevice device - VkSamplerYcbcrConversionKHR ycbcrConversion + VkSamplerYcbcrConversion ycbcrConversion const VkAllocationCallbacks* pAllocator + + + void vkGetDeviceQueue2 + VkDevice device + const VkDeviceQueueInfo2* pQueueInfo + VkQueue* pQueue + VkResult vkCreateValidationCacheEXT VkDevice device @@ -5447,6 +5735,13 @@ private version is maintained in the 1.0 branch of the member gitlab server. uint32_t srcCacheCount const VkValidationCacheEXT* pSrcCaches + + void vkGetDescriptorSetLayoutSupport + VkDevice device + const VkDescriptorSetLayoutCreateInfo* pCreateInfo + VkDescriptorSetLayoutSupport* pSupport + + VkResult vkGetSwapchainGrallocUsageANDROID VkDevice device @@ -5479,10 +5774,68 @@ private version is maintained in the 1.0 branch of the member gitlab server. size_t* pInfoSize void* pInfo - + + VkResult vkSetDebugUtilsObjectNameEXT + VkDevice device + const VkDebugUtilsObjectNameInfoEXT* pNameInfo + + + VkResult vkSetDebugUtilsObjectTagEXT + VkDevice device + const VkDebugUtilsObjectTagInfoEXT* pTagInfo + + + void vkQueueBeginDebugUtilsLabelEXT + VkQueue queue + const VkDebugUtilsLabelEXT* pLabelInfo + + + void vkQueueEndDebugUtilsLabelEXT + VkQueue queue + + + void vkQueueInsertDebugUtilsLabelEXT + VkQueue queue + const VkDebugUtilsLabelEXT* pLabelInfo + + + void vkCmdBeginDebugUtilsLabelEXT + VkCommandBuffer commandBuffer + const VkDebugUtilsLabelEXT* pLabelInfo + + + void vkCmdEndDebugUtilsLabelEXT + VkCommandBuffer commandBuffer + + + void vkCmdInsertDebugUtilsLabelEXT + VkCommandBuffer commandBuffer + const VkDebugUtilsLabelEXT* pLabelInfo + + + VkResult vkCreateDebugUtilsMessengerEXT + VkInstance instance + const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDebugUtilsMessengerEXT* pMessenger + + + void vkDestroyDebugUtilsMessengerEXT + VkInstance instance + VkDebugUtilsMessengerEXT messenger + const VkAllocationCallbacks* pAllocator + + + void vkSubmitDebugUtilsMessageEXT + VkInstance instance + VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity + VkDebugUtilsMessageTypeFlagsEXT messageTypes + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData + + VkResult vkGetMemoryHostPointerPropertiesEXT VkDevice device - VkExternalMemoryHandleTypeFlagBitsKHR handleType + VkExternalMemoryHandleTypeFlagBits handleType const void* pHostPointer VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties @@ -5720,16 +6073,341 @@ private version is maintained in the 1.0 branch of the member gitlab server. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + offset 1 reserved for the old VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX enum + offset 2 reserved for the old VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX enum + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Additional dependent types / tokens extending enumerants, not explicitly mentioned + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Additional dependent types / tokens extending enumerants, not explicitly mentioned + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + @@ -5739,29 +6417,52 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - - - - + + + + + + + + + + This duplicates definitions in VK_KHR_device_group below + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + @@ -5782,73 +6483,74 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - + + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + + - + - - - + + + @@ -5857,10 +6559,10 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - + + + + @@ -5869,12 +6571,12 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - + + + + - + @@ -5882,81 +6584,86 @@ private version is maintained in the 1.0 branch of the member gitlab server. + + This duplicates definitions in other extensions, below + + + - - - + + + - - + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - + + - - + + - + - - - - - + + + + + @@ -5970,29 +6677,29 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - + + - - - - - + + + + + @@ -6000,102 +6707,102 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + @@ -6104,95 +6811,95 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + @@ -6203,46 +6910,46 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - + + + + - + - - - - + + + + - + - - - + + + - + - - - - - - - - - + + + + + + + + + @@ -6261,77 +6968,80 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - - offset 1 reserved for the old VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX enum - offset 2 reserved for the old VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX enum - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + - - - + + + - + - - - + + + @@ -6339,78 +7049,89 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - + + + + + + + - + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + @@ -6422,26 +7143,26 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - - + + + + + + - + - - - - - - + + + + + + @@ -6450,13 +7171,13 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - - - - + + + + + @@ -6464,25 +7185,32 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - - + + + - + - - + + + + + + + + + @@ -6491,22 +7219,23 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + + - + - - - - - - + + + + + + @@ -6517,10 +7246,10 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - + + + + @@ -6529,39 +7258,45 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + + + + + - + - - + + + + - - + + - - - + + + - - - + + + @@ -6569,37 +7304,43 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - - + + - + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -6635,10 +7376,10 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - + + + + @@ -6646,25 +7387,25 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - + - - + + - - - - + + + + @@ -6673,12 +7414,12 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - - + + + + + + @@ -6694,9 +7435,9 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + @@ -6705,45 +7446,46 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - - + + - + + + enum offset=0 was mistakenly used for the 1.1 core enum + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES + (value=1000094000). Fortunately, no conflict resulted. + - + - - + + - + - - - - - + + + + + - - - + + + @@ -6752,11 +7494,11 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - - + + + + + @@ -6766,8 +7508,8 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + @@ -6784,41 +7526,41 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + @@ -6826,57 +7568,63 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - + + - - + + - - + + - + - - - - + + + + - + - - + + + + + + + + @@ -6885,21 +7633,22 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + + - + - - - - - + + + + + @@ -6909,10 +7658,10 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - + + + + @@ -6921,44 +7670,48 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - - - - + + + + + @@ -6968,33 +7721,33 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + - - + + - + - - - + + + - + - - - + + + @@ -7002,53 +7755,75 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - + + + + + @@ -7056,87 +7831,87 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - + + + + + + + + + @@ -7151,25 +7926,21 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - - - - + - - - - - - - + + + + + + + @@ -7182,98 +7953,98 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - + + - - - + + + @@ -7281,80 +8052,80 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7363,40 +8134,56 @@ private version is maintained in the 1.0 branch of the member gitlab server. + + + + + + + + + + + + + + + + - - + + - - - + + + - - + + - - + + - - - - - + + + + + @@ -7411,119 +8198,126 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + + + + + + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - + + - - + + - - + + - - - - - - - + + + + + + + + + @@ -7539,68 +8333,68 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + -- cgit v1.2.3