diff options
| author | Mike Stroyan <stroyan@google.com> | 2016-01-07 15:35:37 -0700 |
|---|---|---|
| committer | Mike Stroyan <stroyan@google.com> | 2016-02-05 11:04:34 -0700 |
| commit | 6cfda7bab5bc9588afde7041c812256aa68ff620 (patch) | |
| tree | 4156446b41bf15aa8c92e7a5e06210ba2903f094 | |
| parent | 08f2b986d48acd3a4a21c72a9587a03e8ac40fff (diff) | |
| download | usermoji-6cfda7bab5bc9588afde7041c812256aa68ff620.tar.xz | |
layers: bring xml and scripts from documentation
These are repo git@gitlab.khronos.org:vulkan/vulkan.git
from commit 51ffe091889e08ca5196c5635363a5358c85ff82
| -rw-r--r-- | generator.py | 2184 | ||||
| -rwxr-xr-x | genvk.py | 293 | ||||
| -rwxr-xr-x | reg.py | 762 | ||||
| -rw-r--r-- | vk.xml | 5037 |
4 files changed, 8276 insertions, 0 deletions
diff --git a/generator.py b/generator.py new file mode 100644 index 00000000..b5729862 --- /dev/null +++ b/generator.py @@ -0,0 +1,2184 @@ +#!/usr/bin/python3 -i +import os,re,sys + +def write( *args, **kwargs ): + file = kwargs.pop('file',sys.stdout) + end = kwargs.pop( 'end','\n') + file.write( ' '.join([str(arg) for arg in args]) ) + file.write( end ) + +# noneStr - returns string argument, or "" if argument is None. +# Used in converting lxml Elements into text. +# str - string to convert +def noneStr(str): + if (str): + return str + else: + return "" + +# enquote - returns string argument with surrounding quotes, +# for serialization into Python code. +def enquote(str): + if (str): + return "'" + str + "'" + else: + return None + +# Primary sort key for regSortFeatures. +# Sorts by category of the feature name string: +# Core API features (those defined with a <feature> tag) +# ARB/KHR/OES (Khronos extensions) +# other (EXT/vendor extensions) +# This will need changing for Vulkan! +def regSortCategoryKey(feature): + if (feature.elem.tag == 'feature'): + return 0 + elif (feature.category == 'ARB' or + feature.category == 'KHR' or + feature.category == 'OES'): + return 1 + else: + return 2 + +# Secondary sort key for regSortFeatures. +# Sorts by extension name. +def regSortNameKey(feature): + return feature.name + +# Second sort key for regSortFeatures. +# Sorts by feature version. <extension> elements all have version number "0" +def regSortFeatureVersionKey(feature): + return float(feature.version) + +# Tertiary sort key for regSortFeatures. +# Sorts by extension number. <feature> elements all have extension number 0. +def regSortExtensionNumberKey(feature): + return int(feature.number) + +# regSortFeatures - default sort procedure for features. +# Sorts by primary key of feature category ('feature' or 'extension') +# then by version number (for features) +# then by extension number (for extensions) +def regSortFeatures(featureList): + featureList.sort(key = regSortExtensionNumberKey) + featureList.sort(key = regSortFeatureVersionKey) + featureList.sort(key = regSortCategoryKey) + +# GeneratorOptions - base class for options used during header production +# These options are target language independent, and used by +# Registry.apiGen() and by base OutputGenerator objects. +# +# Members +# filename - name of file to generate, or None to write to stdout. +# apiname - string matching <api> 'apiname' attribute, e.g. 'gl'. +# profile - string specifying API profile , e.g. 'core', or None. +# versions - regex matching API versions to process interfaces for. +# Normally '.*' or '[0-9]\.[0-9]' to match all defined versions. +# 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]'. +# defaultExtensions - If not None, a string which must in its +# entirety match the pattern in the "supported" attribute of +# the <extension>. Defaults to None. Usually the same as apiname. +# addExtensions - regex matching names of additional extensions +# to include. Defaults to None. +# removeExtensions - regex matching names of extensions to +# remove (after defaultExtensions and addExtensions). Defaults +# to None. +# 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 +# other extensions, alphabetically within each group. +# The regex patterns can be None or empty, in which case they match +# nothing. +class GeneratorOptions: + """Represents options during header production from an API registry""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures): + self.filename = filename + self.apiname = apiname + self.profile = profile + self.versions = self.emptyRegex(versions) + self.emitversions = self.emptyRegex(emitversions) + self.defaultExtensions = defaultExtensions + self.addExtensions = self.emptyRegex(addExtensions) + self.removeExtensions = self.emptyRegex(removeExtensions) + self.sortProcedure = sortProcedure + # + # Substitute a regular expression which matches no version + # or extension names for None or the empty string. + def emptyRegex(self,pat): + if (pat == None or pat == ''): + return '_nomatch_^' + else: + return pat + +# CGeneratorOptions - subclass of GeneratorOptions. +# +# Adds options used by COutputGenerator objects during C language header +# generation. +# +# Additional members +# prefixText - list of strings to prefix generated header with +# (usually a copyright statement + calling convention macros). +# protectFile - True if multiple inclusion protection should be +# generated (based on the filename) around the entire header. +# protectFeature - True if #ifndef..#endif protection should be +# generated around a feature interface in the header file. +# genFuncPointers - True if function pointer typedefs should be +# generated +# protectProto - If conditional protection should be generated +# around prototype declarations, set to either '#ifdef' +# to require opt-in (#ifdef protectProtoStr) or '#ifndef' +# to require opt-out (#ifndef protectProtoStr). Otherwise +# set to None. +# protectProtoStr - #ifdef/#ifndef symbol to use around prototype +# declarations, if protectProto is set +# apicall - string to use for the function declaration prefix, +# such as APICALL on Windows. +# apientry - string to use for the calling convention macro, +# in typedefs, such as APIENTRY. +# apientryp - string to use for the calling convention macro +# in function pointer typedefs, such as APIENTRYP. +# indentFuncProto - True if prototype declarations should put each +# parameter on a separate line +# indentFuncPointer - True if typedefed function pointers should put each +# parameter on a separate line +# alignFuncParam - if nonzero and parameters are being put on a +# separate line, align parameter names at the specified column +class CGeneratorOptions(GeneratorOptions): + """Represents options during C interface generation for headers""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures, + prefixText = "", + genFuncPointers = True, + protectFile = True, + protectFeature = True, + protectProto = None, + protectProtoStr = None, + apicall = '', + apientry = '', + apientryp = '', + indentFuncProto = True, + indentFuncPointer = False, + alignFuncParam = 0): + GeneratorOptions.__init__(self, filename, apiname, profile, + versions, emitversions, defaultExtensions, + addExtensions, removeExtensions, sortProcedure) + self.prefixText = prefixText + self.genFuncPointers = genFuncPointers + self.protectFile = protectFile + self.protectFeature = protectFeature + self.protectProto = protectProto + self.protectProtoStr = protectProtoStr + self.apicall = apicall + self.apientry = apientry + self.apientryp = apientryp + self.indentFuncProto = indentFuncProto + self.indentFuncPointer = indentFuncPointer + self.alignFuncParam = alignFuncParam + +# DocGeneratorOptions - subclass of GeneratorOptions. +# +# Shares many members with CGeneratorOptions, since +# both are writing C-style declarations: +# +# prefixText - list of strings to prefix generated header with +# (usually a copyright statement + calling convention macros). +# apicall - string to use for the function declaration prefix, +# such as APICALL on Windows. +# apientry - string to use for the calling convention macro, +# in typedefs, such as APIENTRY. +# apientryp - string to use for the calling convention macro +# in function pointer typedefs, such as APIENTRYP. +# genDirectory - 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 +# parameter on a separate line +# alignFuncParam - if nonzero and parameters are being put on a +# separate line, align parameter names at the specified column +# +# Additional members: +# +class DocGeneratorOptions(GeneratorOptions): + """Represents options during C interface generation for Asciidoc""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures, + prefixText = "", + apicall = '', + apientry = '', + apientryp = '', + genDirectory = 'gen', + indentFuncProto = True, + indentFuncPointer = False, + alignFuncParam = 0, + expandEnumerants = True): + GeneratorOptions.__init__(self, filename, apiname, profile, + versions, emitversions, defaultExtensions, + addExtensions, removeExtensions, sortProcedure) + self.prefixText = prefixText + self.apicall = apicall + self.apientry = apientry + self.apientryp = apientryp + self.genDirectory = genDirectory + self.indentFuncProto = indentFuncProto + self.indentFuncPointer = indentFuncPointer + self.alignFuncParam = alignFuncParam + self.expandEnumerants = expandEnumerants + +# OutputGenerator - base class for generating API interfaces. +# Manages basic logic, logging, and output file control +# Derived classes actually generate formatted output. +# +# ---- methods ---- +# OutputGenerator(errFile, warnFile, diagFile) +# errFile, warnFile, diagFile - file handles to write errors, +# warnings, diagnostics to. May be None to not write. +# logMsg(level, *args) - log messages of different categories +# level - 'error', 'warn', or 'diag'. 'error' will also +# raise a UserWarning exception +# *args - print()-style arguments +# setExtMap(map) - specify a dictionary map from extension names to +# numbers, used in creating values for extension enumerants. +# beginFile(genOpts) - start a new interface file +# genOpts - GeneratorOptions controlling what's generated and how +# endFile() - finish an interface file, closing it when done +# beginFeature(interface, emit) - write interface for a feature +# and tag generated features as having been done. +# interface - element for the <version> / <extension> to generate +# emit - actually write to the header only when True +# endFeature() - finish an interface. +# genType(typeinfo,name) - generate interface for a type +# typeinfo - TypeInfo for a type +# genStruct(typeinfo,name) - 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") +# groupinfo - GroupInfo for a group +# genEnum(enuminfo, name) - generate interface for an enum (constant) +# enuminfo - EnumInfo for an enum +# name - enum name +# genCmd(cmdinfo) - generate interface for a command +# cmdinfo - CmdInfo for a command +# makeCDecls(cmd) - return C prototype and function pointer typedef for a +# <command> Element, as a list of two strings +# cmd - Element for the <command> +# newline() - print a newline to the output file (utility function) +# +class OutputGenerator: + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + self.outFile = None + self.errFile = errFile + self.warnFile = warnFile + self.diagFile = diagFile + # Internal state + self.featureName = None + self.genOpts = None + self.registry = None + # Used for extension enum value generation + self.extBase = 1000000000 + self.extBlockSize = 1000 + # + # logMsg - write a message of different categories to different + # destinations. + # level - + # 'diag' (diagnostic, voluminous) + # 'warn' (warning) + # 'error' (fatal error - raises exception after logging) + # *args - print()-style arguments to direct to corresponding log + def logMsg(self, level, *args): + """Log a message at the given level. Can be ignored or log to a file""" + if (level == 'error'): + strfile = io.StringIO() + write('ERROR:', *args, file=strfile) + if (self.errFile != None): + write(strfile.getvalue(), file=self.errFile) + raise UserWarning(strfile.getvalue()) + elif (level == 'warn'): + if (self.warnFile != None): + write('WARNING:', *args, file=self.warnFile) + elif (level == 'diag'): + if (self.diagFile != None): + write('DIAG:', *args, file=self.diagFile) + else: + raise UserWarning( + '*** FATAL ERROR in Generator.logMsg: unknown level:' + level) + # + # enumToValue - parses and converts an <enum> tag into a value. + # Returns a list + # first element - integer representation of the value, or None + # if needsNum is False. The value must be a legal number + # if needsNum is True. + # second element - string representation of the value + # There are several possible representations of values. + # A 'value' attribute simply contains the value. + # A 'bitpos' attribute defines a value by specifying the bit + # position which is set in that value. + # A 'offset','extbase','extends' triplet specifies a value + # as an offset to a base value defined by the specified + # 'extbase' extension name, which is then cast to the + # typename specified by 'extends'. This requires probing + # the registry database, and imbeds knowledge of the + # Vulkan extension enum scheme in this function. + def enumToValue(self, elem, needsNum): + name = elem.get('name') + numVal = None + if ('value' in elem.keys()): + value = elem.get('value') + # print('About to translate value =', value, 'type =', type(value)) + if (needsNum): + numVal = int(value, 0) + # If there's a non-integer, numeric 'type' attribute (e.g. 'u' or + # 'ull'), append it to the string value. + # t = enuminfo.elem.get('type') + # if (t != None and t != '' and t != 'i' and t != 's'): + # value += enuminfo.type + self.logMsg('diag', 'Enum', name, '-> value [', numVal, ',', value, ']') + return [numVal, value] + if ('bitpos' in elem.keys()): + value = elem.get('bitpos') + numVal = int(value, 0) + numVal = 1 << numVal + value = '0x%08x' % numVal + self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']') + return [numVal, value] + if ('offset' in elem.keys()): + # Obtain values in the mapping from the attributes + enumNegative = False + offset = int(elem.get('offset'),0) + extnumber = int(elem.get('extnumber'),0) + extends = elem.get('extends') + if ('dir' in elem.keys()): + enumNegative = True + self.logMsg('diag', 'Enum', name, 'offset =', offset, + 'extnumber =', extnumber, 'extends =', extends, + 'enumNegative =', enumNegative) + # Now determine the actual enumerant value, as defined + # in the "Layers and Extensions" appendix of the spec. + numVal = self.extBase + (extnumber - 1) * self.extBlockSize + offset + if (enumNegative): + numVal = -numVal + value = '%d' % numVal + # More logic needed! + self.logMsg('diag', 'Enum', name, '-> offset [', numVal, ',', value, ']') + return [numVal, value] + return [None, None] + # + def beginFile(self, genOpts): + self.genOpts = genOpts + # + # Open specified output file. Not done in constructor since a + # Generator can be used without writing to a file. + if (self.genOpts.filename != None): + self.outFile = open(self.genOpts.filename, 'w') + else: + self.outFile = sys.stdout + def endFile(self): + self.errFile and self.errFile.flush() + self.warnFile and self.warnFile.flush() + self.diagFile and self.diagFile.flush() + self.outFile.flush() + if (self.outFile != sys.stdout and self.outFile != sys.stderr): + self.outFile.close() + self.genOpts = None + # + def beginFeature(self, interface, emit): + self.emit = emit + self.featureName = interface.get('name') + # If there's an additional 'protect' attribute in the feature, save it + self.featureExtraProtect = interface.get('protect') + def endFeature(self): + # Derived classes responsible for emitting feature + self.featureName = None + self.featureExtraProtect = None + # Utility method to validate we're generating something only inside a + # <feature> tag + def validateFeature(self, featureType, featureName): + if (self.featureName == None): + raise UserWarning('Attempt to generate', featureType, name, + 'when not in feature') + # + # Type generation + def genType(self, typeinfo, name): + self.validateFeature('type', name) + # + # Struct (e.g. C "struct" type) generation + def genStruct(self, typeinfo, name): + self.validateFeature('struct', name) + # + # Group (e.g. C "enum" type) generation + def genGroup(self, groupinfo, name): + self.validateFeature('group', name) + # + # Enumerant (really, constant) generation + def genEnum(self, enuminfo, name): + self.validateFeature('enum', name) + # + # Command generation + def genCmd(self, cmd, name): + self.validateFeature('command', name) + # + # Utility functions - turn a <proto> <name> into C-language prototype + # and typedef declarations for that name. + # name - contents of <name> tag + # tail - whatever text follows that tag in the Element + def makeProtoName(self, name, tail): + return self.genOpts.apientry + name + tail + def makeTypedefName(self, name, tail): + return '(' + self.genOpts.apientryp + 'PFN_' + name + tail + ')' + # + # makeCParamDecl - return a string which is an indented, formatted + # declaration for a <param> or <member> block (e.g. function parameter + # or structure/union member). + # param - Element (<param> or <member>) to format + # aligncol - if non-zero, attempt to align the nested <name> element + # at this column + def makeCParamDecl(self, param, aligncol): + paramdecl = ' ' + noneStr(param.text) + for elem in param: + text = noneStr(elem.text) + tail = noneStr(elem.tail) + if (elem.tag == 'name' and aligncol > 0): + self.logMsg('diag', 'Aligning parameter', elem.text, 'to column', self.genOpts.alignFuncParam) + # Align at specified column, if possible + paramdecl = paramdecl.rstrip() + oldLen = len(paramdecl) + paramdecl = paramdecl.ljust(aligncol) + newLen = len(paramdecl) + self.logMsg('diag', 'Adjust length of parameter decl from', oldLen, 'to', newLen, ':', paramdecl) + paramdecl += text + tail + return paramdecl + # + # getCParamTypeLength - return the length of the type field is an indented, formatted + # declaration for a <param> or <member> block (e.g. function parameter + # or structure/union member). + # param - Element (<param> or <member>) to identify + def getCParamTypeLength(self, param): + paramdecl = ' ' + noneStr(param.text) + for elem in param: + text = noneStr(elem.text) + tail = noneStr(elem.tail) + if (elem.tag == 'name'): + # Align at specified column, if possible + newLen = len(paramdecl.rstrip()) + self.logMsg('diag', 'Identifying length of', elem.text, 'as', newLen) + paramdecl += text + tail + return newLen + # + # makeCDecls - return C prototype and function pointer typedef for a + # command, as a two-element list of strings. + # cmd - Element containing a <command> tag + def makeCDecls(self, cmd): + """Generate C function pointer typedef for <command> Element""" + proto = cmd.find('proto') + params = cmd.findall('param') + # Begin accumulating prototype and typedef strings + pdecl = self.genOpts.apicall + tdecl = 'typedef ' + # + # Insert the function return type/name. + # For prototypes, add APIENTRY macro before the name + # For typedefs, add (APIENTRY *<name>) around the name and + # use the PFN_cmdnameproc naming convention. + # Done by walking the tree for <proto> element by element. + # lxml.etree has elem.text followed by (elem[i], elem[i].tail) + # for each child element and any following text + # Leading text + pdecl += noneStr(proto.text) + tdecl += noneStr(proto.text) + # For each child element, if it's a <name> wrap in appropriate + # declaration. Otherwise append its contents and tail contents. + for elem in proto: + text = noneStr(elem.text) + tail = noneStr(elem.tail) + if (elem.tag == 'name'): + pdecl += self.makeProtoName(text, tail) + tdecl += self.makeTypedefName(text, tail) + else: + pdecl += text + tail + tdecl += text + tail + # Now add the parameter declaration list, which is identical + # for prototypes and typedefs. Concatenate all the text from + # a <param> node without the tags. No tree walking required + # since all tags are ignored. + # Uses: self.indentFuncProto + # self.indentFuncPointer + # self.alignFuncParam + # Might be able to doubly-nest the joins, e.g. + # ','.join(('_'.join([l[i] for i in range(0,len(l))]) + n = len(params) + # Indented parameters + if n > 0: + indentdecl = '(\n' + for i in range(0,n): + paramdecl = self.makeCParamDecl(params[i], self.genOpts.alignFuncParam) + if (i < n - 1): + paramdecl += ',\n' + else: + paramdecl += ');' + indentdecl += paramdecl + else: + indentdecl = '(void);' + # Non-indented parameters + paramdecl = '(' + if n > 0: + for i in range(0,n): + paramdecl += ''.join([t for t in params[i].itertext()]) + if (i < n - 1): + paramdecl += ', ' + else: + paramdecl += 'void' + paramdecl += ");"; + return [ pdecl + indentdecl, tdecl + paramdecl ] + # + def newline(self): + write('', file=self.outFile) + + def setRegistry(self, registry): + self.registry = registry + # + +# COutputGenerator - subclass of OutputGenerator. +# Generates C-language API interfaces. +# +# ---- methods ---- +# COutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genType(typeinfo,name) +# genStruct(typeinfo,name) +# genGroup(groupinfo,name) +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class COutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + # This is an ordered list of sections in the header file. + TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum', + 'group', 'bitmask', 'funcpointer', 'struct'] + ALL_SECTIONS = TYPE_SECTIONS + ['commandPointer', 'command'] + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # Internal state - accumulators for different inner block text + self.sections = dict([(section, []) for section in self.ALL_SECTIONS]) + # + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + # C-specific + # + # Multiple inclusion protection & C++ wrappers. + if (genOpts.protectFile and self.genOpts.filename): + headerSym = '__' + re.sub('\.h', '_h_', os.path.basename(self.genOpts.filename)) + write('#ifndef', headerSym, file=self.outFile) + write('#define', headerSym, '1', file=self.outFile) + self.newline() + write('#ifdef __cplusplus', file=self.outFile) + write('extern "C" {', file=self.outFile) + write('#endif', file=self.outFile) + self.newline() + # + # User-supplied prefix text, if any (list of strings) + if (genOpts.prefixText): + for s in genOpts.prefixText: + write(s, file=self.outFile) + # + # Some boilerplate describing what was generated - this + # will probably be removed later since the extensions + # pattern may be very long. + # write('/* Generated C header for:', file=self.outFile) + # write(' * API:', genOpts.apiname, file=self.outFile) + # if (genOpts.profile): + # write(' * Profile:', genOpts.profile, file=self.outFile) + # write(' * Versions considered:', genOpts.versions, file=self.outFile) + # write(' * Versions emitted:', genOpts.emitversions, file=self.outFile) + # 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(' */', file=self.outFile) + def endFile(self): + # C-specific + # Finish C++ wrapper and multiple inclusion protection + self.newline() + write('#ifdef __cplusplus', file=self.outFile) + write('}', file=self.outFile) + write('#endif', file=self.outFile) + if (self.genOpts.protectFile and self.genOpts.filename): + self.newline() + write('#endif', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + # C-specific + # Accumulate includes, defines, types, enums, function pointer typedefs, + # end function prototypes separately for this feature. They're only + # printed in endFeature(). + self.sections = dict([(section, []) for section in self.ALL_SECTIONS]) + def endFeature(self): + # C-specific + # Actually write the interface to the output file. + if (self.emit): + self.newline() + if (self.genOpts.protectFeature): + write('#ifndef', self.featureName, file=self.outFile) + # If type declarations are needed by other features based on + # this one, it may be necessary to suppress the ExtraProtect, + # or move it below the 'for section...' loop. + if (self.featureExtraProtect != None): + write('#ifdef', self.featureExtraProtect, file=self.outFile) + write('#define', self.featureName, '1', file=self.outFile) + for section in self.TYPE_SECTIONS: + contents = self.sections[section] + if contents: + write('\n'.join(contents), file=self.outFile) + self.newline() + if (self.genOpts.genFuncPointers and self.sections['commandPointer']): + write('\n'.join(self.sections['commandPointer']), file=self.outFile) + self.newline() + if (self.sections['command']): + if (self.genOpts.protectProto): + write(self.genOpts.protectProto, + self.genOpts.protectProtoStr, file=self.outFile) + write('\n'.join(self.sections['command']), end='', file=self.outFile) + if (self.genOpts.protectProto): + write('#endif', file=self.outFile) + else: + self.newline() + if (self.featureExtraProtect != None): + write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile) + if (self.genOpts.protectFeature): + write('#endif /*', self.featureName, '*/', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFeature(self) + # + # Append a definition to the specified section + def appendSection(self, section, text): + # self.sections[section].append('SECTION: ' + section + '\n') + self.sections[section].append(text) + # + # Type generation + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + typeElem = typeinfo.elem + # If the type is a struct type, traverse the imbedded <member> tags + # generating a structure. Otherwise, emit the tag text. + category = typeElem.get('category') + if (category == 'struct' or category == 'union'): + self.genStruct(typeinfo, name) + else: + # Replace <apientry /> 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: + # Add extra newline after multi-line entries. + if '\n' in s: + s += '\n' + self.appendSection(category, s) + # + # Struct (e.g. C "struct" type) generation. + # This is a special case of the <type> tag where the contents are + # interpreted as a set of <member> tags instead of freeform C + # C type declarations. The <member> tags are just like <param> + # 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' + 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) + groupElem = groupinfo.elem + # See if this group needs min/max/num/padding at end + expand = 'expand' in groupElem.keys() + if (expand): + expandPrefix = groupElem.get('expand') + # 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') + body += " " + name + " = " + strVal + ",\n" + if (expand 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 (expand): + body += " " + expandPrefix + "_BEGIN_RANGE = " + minName + ",\n" + body += " " + expandPrefix + "_END_RANGE = " + maxName + ",\n" + body += " " + expandPrefix + "_RANGE_SIZE = (" + maxName + " - " + minName + " + 1),\n" + body += " " + expandPrefix + "_MAX_ENUM = 0x7FFFFFFF\n" + # Postfix + body += "} " + groupName + ";" + if groupElem.get('type') == 'bitmask': + section = 'bitmask' + else: + section = 'group' + self.appendSection(section, body) + # Enumerant generation + # <enum> tags may specify their values in several ways, but are usually + # just integers. + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + (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) + # + decls = self.makeCDecls(cmdinfo.elem) + self.appendSection('command', decls[0] + '\n') + if (self.genOpts.genFuncPointers): + self.appendSection('commandPointer', decls[1]) + +# DocOutputGenerator - subclass of OutputGenerator. +# Generates AsciiDoc includes with C-language API interfaces, for reference +# pages and the Vulkan specification. Similar to COutputGenerator, but +# each interface is written into a different file as determined by the +# options, only actual C types are emitted, and none of the boilerplate +# preprocessor code is emitted. +# +# ---- methods ---- +# DocOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genType(typeinfo,name) +# genStruct(typeinfo,name) +# genGroup(groupinfo,name) +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class DocOutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + def endFile(self): + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + def endFeature(self): + # Finish processing in superclass + OutputGenerator.endFeature(self) + # + # Generate an include file + # + # directory - subdirectory to put file in + # basename - base name of the file + # contents - contents of the file (Asciidoc boilerplate aside) + def writeInclude(self, directory, basename, contents): + # Create file + filename = self.genOpts.genDirectory + '/' + directory + '/' + basename + '.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + # Asciidoc anchor + write('[[{0},{0}]]'.format(basename), file=fp) + write('["source","{basebackend@docbook:c++:cpp}",title=""]', file=fp) + write('------------------------------------------------------------------------------', file=fp) + write(contents, file=fp) + write('------------------------------------------------------------------------------', file=fp) + fp.close() + # + # Type generation + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + typeElem = typeinfo.elem + # If the type is a struct type, traverse the imbedded <member> tags + # generating a structure. Otherwise, emit the tag text. + category = typeElem.get('category') + if (category == 'struct' or category == 'union'): + self.genStruct(typeinfo, name) + else: + # Replace <apientry /> 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 (len(s) > 0): + if (category == 'bitmask'): + self.writeInclude('flags', name, s + '\n') + elif (category == 'enum'): + self.writeInclude('enums', name, s + '\n') + elif (category == 'funcpointer'): + self.writeInclude('funcpointers', name, s+ '\n') + else: + self.logMsg('diag', '# NOT writing include file for type:', + name, 'category: ', category) + else: + self.logMsg('diag', '# NOT writing empty include file for type', name) + # + # Struct (e.g. C "struct" type) generation. + # This is a special case of the <type> tag where the contents are + # interpreted as a set of <member> tags instead of freeform C + # C type declarations. The <member> tags are just like <param> + # 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) + s = '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'): + s += self.makeCParamDecl(member, targetLen + 4) + s += ';\n' + s += '} ' + typeName + ';' + self.writeInclude('structs', typeName, s) + # + # Group (e.g. C "enum" type) generation. + # These are concatenated together with other types. + def genGroup(self, groupinfo, groupName): + OutputGenerator.genGroup(self, groupinfo, groupName) + groupElem = groupinfo.elem + # See if this group needs min/max/num/padding at end + expand = self.genOpts.expandEnumerants and ('expand' in groupElem.keys()) + if (expand): + expandPrefix = groupElem.get('expand') + # Prefix + s = "typedef enum " + groupName + " {\n" + + # Loop over the nested 'enum' tags. Keep track of the minimum and + # maximum numeric values, if they can be determined. + 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') + s += " " + name + " = " + strVal + ",\n" + if (expand 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 (expand): + s += "\n" + s += " " + expandPrefix + "_BEGIN_RANGE = " + minName + ",\n" + s += " " + expandPrefix + "_END_RANGE = " + maxName + ",\n" + s += " " + expandPrefix + "_NUM = (" + maxName + " - " + minName + " + 1),\n" + s += " " + expandPrefix + "_MAX_ENUM = 0x7FFFFFFF\n" + # Postfix + s += "} " + groupName + ";" + self.writeInclude('enums', groupName, s) + # Enumerant generation + # <enum> tags may specify their values in several ways, but are usually + # just integers. + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + (numVal,strVal) = self.enumToValue(enuminfo.elem, False) + s = '#define ' + name.ljust(33) + ' ' + strVal + self.logMsg('diag', '# NOT writing compile-time constant', name) + # self.writeInclude('consts', name, s) + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + decls = self.makeCDecls(cmdinfo.elem) + self.writeInclude('protos', name, decls[0]) + +# PyOutputGenerator - subclass of OutputGenerator. +# Generates Python data structures describing API names. +# Similar to DocOutputGenerator, but writes a single +# file. +# +# ---- methods ---- +# PyOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# genType(typeinfo,name) +# genStruct(typeinfo,name) +# genGroup(groupinfo,name) +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class PyOutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + for dict in [ 'flags', 'enums', 'structs', 'consts', 'enums', + 'consts', 'protos', 'funcpointers' ]: + write(dict, '= {}', file=self.outFile) + def endFile(self): + OutputGenerator.endFile(self) + # + # Add a name from the interface + # + # dict - type of name (see beginFile above) + # name - name to add + # value - A serializable Python value for the name + def addName(self, dict, name, value=None): + write(dict + "['" + name + "'] = ", value, file=self.outFile) + # + # Type generation + # For 'struct' or 'union' types, defer to genStruct() to + # add to the dictionary. + # For 'bitmask' types, add the type name to the 'flags' dictionary, + # with the value being the corresponding 'enums' name defining + # the acceptable flag bits. + # For 'enum' types, add the type name to the 'enums' dictionary, + # with the value being '@STOPHERE@' (because this case seems + # never to happen). + # For 'funcpointer' types, add the type name to the 'funcpointers' + # dictionary. + # For 'handle' and 'define' types, add the handle or #define name + # to the 'struct' dictionary, because that's how the spec sources + # tag these types even though they aren't structs. + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + typeElem = typeinfo.elem + # If the type is a struct type, traverse the imbedded <member> tags + # generating a structure. Otherwise, emit the tag text. + category = typeElem.get('category') + if (category == 'struct' or category == 'union'): + self.genStruct(typeinfo, name) + else: + # Extract the type name + # (from self.genOpts). Copy other text through unchanged. + # If the resulting text is an empty string, don't emit it. + count = len(noneStr(typeElem.text)) + for elem in typeElem: + count += len(noneStr(elem.text)) + len(noneStr(elem.tail)) + if (count > 0): + if (category == 'bitmask'): + requiredEnum = typeElem.get('requires') + self.addName('flags', name, enquote(requiredEnum)) + elif (category == 'enum'): + # This case never seems to come up! + # @enums C 'enum' name Dictionary of enumerant names + self.addName('enums', name, enquote('@STOPHERE@')) + elif (category == 'funcpointer'): + self.addName('funcpointers', name, None) + elif (category == 'handle' or category == 'define'): + self.addName('structs', name, None) + else: + write('# Unprocessed type:', name, 'category:', category, file=self.outFile) + else: + write('# Unprocessed type:', name, file=self.outFile) + # + # Struct (e.g. C "struct" type) generation. + # + # Add the struct name to the 'structs' dictionary, with the + # value being an ordered list of the struct member names. + def genStruct(self, typeinfo, typeName): + OutputGenerator.genStruct(self, typeinfo, typeName) + + members = [member.text for member in typeinfo.elem.findall('.//member/name')] + self.addName('structs', typeName, members) + # + # Group (e.g. C "enum" type) generation. + # These are concatenated together with other types. + # + # Add the enum type name to the 'enums' dictionary, with + # the value being an ordered list of the enumerant names. + # Add each enumerant name to the 'consts' dictionary, with + # the value being the enum type the enumerant is part of. + def genGroup(self, groupinfo, groupName): + OutputGenerator.genGroup(self, groupinfo, groupName) + groupElem = groupinfo.elem + + # @enums C 'enum' name Dictionary of enumerant names + # @consts C enumerant/const name Name of corresponding 'enums' key + + # Loop over the nested 'enum' tags. Keep track of the minimum and + # maximum numeric values, if they can be determined. + enumerants = [elem.get('name') for elem in groupElem.findall('enum')] + for name in enumerants: + self.addName('consts', name, enquote(groupName)) + self.addName('enums', groupName, enumerants) + # Enumerant generation (compile-time constants) + # + # Add the constant name to the 'consts' dictionary, with the + # value being None to indicate that the constant isn't + # an enumeration value. + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + + # @consts C enumerant/const name Name of corresponding 'enums' key + + self.addName('consts', name, None) + # + # Command generation + # + # Add the command name to the 'protos' dictionary, with the + # value being an ordered list of the parameter names. + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + + params = [param.text for param in cmdinfo.elem.findall('param/name')] + self.addName('protos', name, params) + +# ValidityOutputGenerator - subclass of OutputGenerator. +# Generates AsciiDoc includes of valid usage information, for reference +# pages and the Vulkan specification. Similar to DocOutputGenerator. +# +# ---- methods ---- +# ValidityOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genCmd(cmdinfo) +class ValidityOutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + def endFile(self): + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + def endFeature(self): + # Finish processing in superclass + OutputGenerator.endFeature(self) + + def makeParameterName(self, name): + return 'pname:' + name + + def makeStructName(self, name): + return 'sname:' + name + + def makeBaseTypeName(self, name): + return 'basetype:' + name + + def makeEnumerationName(self, name): + return 'elink:' + name + + def makeEnumerantName(self, name): + return 'ename:' + name + + def makeFLink(self, name): + return 'flink:' + name + + # + # Generate an include file + # + # directory - subdirectory to put file in + # basename - base name of the file + # contents - contents of the file (Asciidoc boilerplate aside) + def writeInclude(self, directory, basename, validity, threadsafety, commandpropertiesentry, successcodes, errorcodes): + # Create file + filename = self.genOpts.genDirectory + '/' + directory + '/' + basename + '.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + # Asciidoc anchor + + # Valid Usage + if validity is not None: + write('.Valid Usage', file=fp) + write('*' * 80, file=fp) + write(validity, file=fp, end='') + write('*' * 80, file=fp) + write('', file=fp) + + # Host Synchronization + if threadsafety is not None: + write('.Host Synchronization', file=fp) + write('*' * 80, file=fp) + write(threadsafety, file=fp, end='') + write('*' * 80, file=fp) + write('', file=fp) + + # Command Properties - contained within a block, to avoid table numbering + if commandpropertiesentry is not None: + write('.Command Properties', file=fp) + write('*' * 80, file=fp) + write('[options="header", width="100%"]', file=fp) + write('|=====================', file=fp) + write('|Command Buffer Levels|Render Pass Scope|Supported Queue Types', file=fp) + write(commandpropertiesentry, file=fp) + write('|=====================', file=fp) + write('*' * 80, file=fp) + write('', file=fp) + + # Success Codes - contained within a block, to avoid table numbering + if successcodes is not None or errorcodes is not None: + write('.Return Codes', file=fp) + write('*' * 80, file=fp) + if successcodes is not None: + write('<<fundamentals-successcodes,Success>>::', file=fp) + write(successcodes, file=fp) + if errorcodes is not None: + write('<<fundamentals-errorcodes,Failure>>::', file=fp) + write(errorcodes, file=fp) + write('*' * 80, file=fp) + write('', file=fp) + + fp.close() + + # + # Check if the parameter passed in is a pointer + def paramIsPointer(self, param): + ispointer = False + paramtype = param.find('type') + if paramtype.tail is not None and '*' in paramtype.tail: + ispointer = True + + return ispointer + + # + # Check if the parameter passed in is a static array + def paramIsStaticArray(self, param): + if param.find('name').tail is not None: + if param.find('name').tail[0] == '[': + return True + + # + # Get the length of a parameter that's been identified as a static array + def staticArrayLength(self, param): + paramname = param.find('name') + paramenumsize = param.find('enum') + + if paramenumsize is not None: + return paramenumsize.text + else: + return paramname.tail[1:-1] + + # + # Check if the parameter passed in is a pointer to an array + def paramIsArray(self, param): + return param.attrib.get('len') is not None + + # + # Get the parent of a handle object + def getHandleParent(self, typename): + types = self.registry.findall("types/type") + for elem in types: + if (elem.find("name") is not None and elem.find('name').text == typename) or elem.attrib.get('name') == typename: + return elem.attrib.get('parent') + + # + # Check if a parent object is dispatchable or not + def isHandleTypeDispatchable(self, handlename): + handle = self.registry.find("types/type/[name='" + handlename + "'][@category='handle']") + if handle is not None and handle.find('type').text == 'VK_DEFINE_HANDLE': + return True + else: + return False + + def isHandleOptional(self, param, params): + + # See if the handle is optional + isOptional = False + + # Simple, if it's optional, return true + if param.attrib.get('optional') is not None: + return True + + # If no validity is being generated, it usually means that validity is complex and not absolute, so let's say yes. + if param.attrib.get('noautovalidity') is not None: + return True + + # If the parameter is an array and we haven't already returned, find out if any of the len parameters are optional + if self.paramIsArray(param): + lengths = param.attrib.get('len').split(',') + for length in lengths: + if (length) != 'null-terminated' and (length) != '1': + for otherparam in params: + if otherparam.find('name').text == length: + if otherparam.attrib.get('optional') is not None: + return True + + return False + # + # Get the category of a type + def getTypeCategory(self, typename): + types = self.registry.findall("types/type") + for elem in types: + if (elem.find("name") is not None and elem.find('name').text == typename) or elem.attrib.get('name') == typename: + return elem.attrib.get('category') + + # + # Make a chunk of text for the end of a parameter if it is an array + def makeAsciiDocPreChunk(self, param, params): + paramname = param.find('name') + paramtype = param.find('type') + + # General pre-amble. Check optionality and add stuff. + asciidoc = '* ' + + if self.paramIsStaticArray(param): + asciidoc += 'Any given element of ' + + elif self.paramIsArray(param): + lengths = param.attrib.get('len').split(',') + + # Find all the parameters that are called out as optional, so we can document that they might be zero, and the array may be ignored + optionallengths = [] + for length in lengths: + if (length) != 'null-terminated' and (length) != '1': + for otherparam in params: + if otherparam.find('name').text == length: + if otherparam.attrib.get('optional') is not None: + if self.paramIsPointer(otherparam): + optionallengths.append('the value referenced by ' + self.makeParameterName(length)) + else: + optionallengths.append(self.makeParameterName(length)) + + # Document that these arrays may be ignored if any of the length values are 0 + if len(optionallengths) != 0 or param.attrib.get('optional') is not None: + asciidoc += 'If ' + + + if len(optionallengths) != 0: + if len(optionallengths) == 1: + + asciidoc += optionallengths[0] + asciidoc += ' is ' + + else: + asciidoc += ' or '.join(optionallengths) + asciidoc += ' are ' + + asciidoc += 'not `0`, ' + + if len(optionallengths) != 0 and param.attrib.get('optional') is not None: + asciidoc += 'and ' + + if param.attrib.get('optional') is not None: + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' is not `NULL`, ' + + elif param.attrib.get('optional') is not None: + # Don't generate this stub for bitflags + if self.getTypeCategory(paramtype.text) != 'bitmask': + if param.attrib.get('optional').split(',')[0] == 'true': + asciidoc += 'If ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' is not ' + if self.paramIsArray(param) or self.paramIsPointer(param) or self.isHandleTypeDispatchable(paramtype.text): + asciidoc += '`NULL`' + elif self.getTypeCategory(paramtype.text) == 'handle': + asciidoc += 'sname:VK_NULL_HANDLE' + else: + asciidoc += '`0`' + + asciidoc += ', ' + + return asciidoc + + # + # Make the generic asciidoc line chunk portion used for all parameters. + # May return an empty string if nothing to validate. + def createValidationLineForParameterIntroChunk(self, param, params, typetext): + asciidoc = '' + paramname = param.find('name') + paramtype = param.find('type') + + asciidoc += self.makeAsciiDocPreChunk(param, params) + + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' must: be ' + + if self.paramIsArray(param): + # Arrays. These are hard to get right, apparently + + lengths = param.attrib.get('len').split(',') + + if (lengths[0]) == 'null-terminated': + asciidoc += 'a null-terminated ' + elif (lengths[0]) == '1': + asciidoc += 'a pointer to ' + else: + asciidoc += 'a pointer to an array of ' + + # Handle equations, which are currently denoted with latex + if 'latexmath:' in lengths[0]: + asciidoc += lengths[0] + else: + asciidoc += self.makeParameterName(lengths[0]) + asciidoc += ' ' + + for length in lengths[1:]: + if (length) == 'null-terminated': # This should always be the last thing. If it ever isn't for some bizarre reason, then this will need some massaging. + asciidoc += 'null-terminated ' + elif (length) == '1': + asciidoc += 'pointers to ' + else: + asciidoc += 'pointers to arrays of ' + # Handle equations, which are currently denoted with latex + if 'latex:' in length: + asciidoc += length + else: + asciidoc += self.makeParameterName(length) + asciidoc += ' ' + + # Void pointers don't actually point at anything - remove the word "to" + if paramtype.text == 'void': + if lengths[-1] == '1': + if len(lengths) > 1: + asciidoc = asciidoc[:-5] # Take care of the extra s added by the post array chunk function. #HACK# + else: + asciidoc = asciidoc[:-4] + else: + # An array of void values is a byte array. + asciidoc += 'byte' + + elif paramtype.text == 'char': + # A null terminated array of chars is a string + if lengths[-1] == 'null-terminated': + asciidoc += 'string' + else: + # Else it's just a bunch of chars + asciidoc += 'char value' + elif param.text is not None: + # If a value is "const" that means it won't get modified, so it must be valid going into the function. + if 'const' in param.text: + typecategory = self.getTypeCategory(paramtype.text) + if (typecategory != 'struct' and typecategory != 'union' and typecategory != 'basetype' and typecategory is not None) or not self.isStructAlwaysValid(paramtype.text): + asciidoc += 'valid ' + + asciidoc += typetext + + # pluralize + if len(lengths) > 1 or (lengths[0] != '1' and lengths[0] != 'null-terminated'): + asciidoc += 's' + + elif self.paramIsPointer(param): + # Handle pointers - which are really special case arrays (i.e. they don't have a length) + pointercount = paramtype.tail.count('*') + + # Could be multi-level pointers (e.g. ppData - pointer to a pointer). Handle that. + for i in range(0, pointercount): + asciidoc += 'a pointer to ' + + if paramtype.text == 'void': + # If there's only one pointer, it's optional, and it doesn't point at anything in particular - we don't need any language. + if pointercount == 1 and param.attrib.get('optional') is not None: + return '' # early return + else: + # Pointer to nothing in particular - delete the " to " portion + asciidoc = asciidoc[:-4] + else: + # Add an article for English semantic win + asciidoc += 'a ' + + # If a value is "const" that means it won't get modified, so it must be valid going into the function. + if param.text is not None and paramtype.text != 'void': + if 'const' in param.text: + asciidoc += 'valid ' + + asciidoc += typetext + + else: + # Non-pointer, non-optional things must be valid + asciidoc += 'a valid ' + asciidoc += typetext + + if asciidoc != '': + asciidoc += '\n' + + # Add additional line for non-optional bitmasks + if self.getTypeCategory(paramtype.text) == 'bitmask': + if param.attrib.get('optional') is None: + asciidoc += '* ' + if self.paramIsArray(param): + asciidoc += 'Each element of ' + asciidoc += 'pname:' + asciidoc += paramname.text + asciidoc += ' mustnot: be `0`' + asciidoc += '\n' + + return asciidoc + + def makeAsciiDocLineForParameter(self, param, params, typetext): + if param.attrib.get('noautovalidity') is not None: + return '' + asciidoc = self.createValidationLineForParameterIntroChunk(param, params, typetext) + + return asciidoc + + # Try to do check if a structure is always considered valid (i.e. there's no rules to its acceptance) + def isStructAlwaysValid(self, structname): + + struct = self.registry.find("types/type[@name='" + structname + "']") + + params = struct.findall('member') + validity = struct.find('validity') + + if validity is not None: + return False + + for param in params: + paramname = param.find('name') + paramtype = param.find('type') + typecategory = self.getTypeCategory(paramtype.text) + + if paramname.text == 'pNext': + return False + + if paramname.text == 'sType': + return False + + if paramtype.text == 'void' or paramtype.text == 'char' or self.paramIsArray(param) or self.paramIsPointer(param): + if self.makeAsciiDocLineForParameter(param, params, '') != '': + return False + elif typecategory == 'handle' or typecategory == 'enum' or typecategory == 'bitmask' or param.attrib.get('returnedonly') == 'true': + return False + elif typecategory == 'struct' or typecategory == 'union': + if self.isStructAlwaysValid(paramtype.text) is False: + return False + + return True + + # + # Make an entire asciidoc line for a given parameter + def createValidationLineForParameter(self, param, params, typecategory): + asciidoc = '' + paramname = param.find('name') + paramtype = param.find('type') + + if paramtype.text == 'void' or paramtype.text == 'char': + # Chars and void are special cases - needs care inside the generator functions + # A null-terminated char array is a string, else it's chars. + # An array of void values is a byte array, a void pointer is just a pointer to nothing in particular + asciidoc += self.makeAsciiDocLineForParameter(param, params, '') + elif typecategory == 'bitmask': + bitsname = paramtype.text.replace('Flags', 'FlagBits') + if self.registry.find("enums[@name='" + bitsname + "']") is None: + asciidoc += '* ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' must: be `0`' + asciidoc += '\n' + else: + if self.paramIsArray(param): + asciidoc += self.makeAsciiDocLineForParameter(param, params, 'combinations of ' + self.makeEnumerationName(bitsname) + ' value') + else: + asciidoc += self.makeAsciiDocLineForParameter(param, params, 'combination of ' + self.makeEnumerationName(bitsname) + ' values') + elif typecategory == 'handle': + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeStructName(paramtype.text) + ' handle') + elif typecategory == 'enum': + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeEnumerationName(paramtype.text) + ' value') + elif typecategory == 'struct': + if (self.paramIsArray(param) or self.paramIsPointer(param)) or not self.isStructAlwaysValid(paramtype.text): + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeStructName(paramtype.text) + ' structure') + elif typecategory == 'union': + if (self.paramIsArray(param) or self.paramIsPointer(param)) or not self.isStructAlwaysValid(paramtype.text): + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeStructName(paramtype.text) + ' union') + elif self.paramIsArray(param) or self.paramIsPointer(param): + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeBaseTypeName(paramtype.text) + ' value') + + return asciidoc + + # + # Make an asciidoc validity entry for a handle's parent object + def makeAsciiDocHandleParent(self, param, params): + asciidoc = '' + paramname = param.find('name') + paramtype = param.find('type') + + # Deal with handle parents + handleparent = self.getHandleParent(paramtype.text) + if handleparent is not None: + parentreference = None + for otherparam in params: + if otherparam.find('type').text == handleparent: + parentreference = otherparam.find('name').text + if parentreference is not None: + asciidoc += '* ' + + if self.isHandleOptional(param, params): + if self.paramIsArray(param): + asciidoc += 'Each element of ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' that is a valid handle' + else: + asciidoc += 'If ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' is a valid handle, it' + else: + if self.paramIsArray(param): + asciidoc += 'Each element of ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' must: have been created, allocated or retrieved from ' + asciidoc += self.makeParameterName(parentreference) + + asciidoc += '\n' + return asciidoc + + # + # Generate an asciidoc validity line for the sType value of a struct + def makeStructureType(self, blockname, param): + asciidoc = '* ' + paramname = param.find('name') + paramtype = param.find('type') + + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' must: be ' + + structuretype = '' + for elem in re.findall(r'(([A-Z][a-z]+)|([A-Z][A-Z]+))', blockname): + if elem[0] == 'Vk': + structuretype += 'VK_STRUCTURE_TYPE_' + else: + structuretype += elem[0].upper() + structuretype += '_' + + asciidoc += self.makeEnumerantName(structuretype[:-1]) + asciidoc += '\n' + + return asciidoc + + # + # Generate an asciidoc validity line for the pNext value of a struct + def makeStructureExtensionPointer(self, param): + asciidoc = '* ' + paramname = param.find('name') + paramtype = param.find('type') + + asciidoc += self.makeParameterName(paramname.text) + + validextensionstructs = param.attrib.get('validextensionstructs') + if validextensionstructs is None: + asciidoc += ' must: be `NULL`' + else: + extensionstructs = validextensionstructs.split(',') + asciidoc += ' must: point to one of ' + extensionstructs[:-1].join(', ') + ' or ' + extensionstructs[-1] + 'if the extension that introduced them is enabled ' + + asciidoc += '\n' + + return asciidoc + + # + # Generate all the valid usage information for a given struct or command + def makeValidUsageStatements(self, cmd, blockname, params, usages): + # Start the asciidoc block for this + asciidoc = '' + + handles = [] + anyparentedhandlesoptional = False + parentdictionary = {} + arraylengths = set() + for param in params: + paramname = param.find('name') + paramtype = param.find('type') + + # Get the type's category + typecategory = self.getTypeCategory(paramtype.text) + + # Generate language to independently validate a parameter + if paramtype.text == 'VkStructureType' and paramname.text == 'sType': + asciidoc += self.makeStructureType(blockname, param) + elif paramtype.text == 'void' and paramname.text == 'pNext': + asciidoc += self.makeStructureExtensionPointer(param) + else: + asciidoc += self.createValidationLineForParameter(param, params, typecategory) + + # Ensure that any parenting is properly validated, and list that a handle was found + if typecategory == 'handle': + # Don't detect a parent for return values! + if not self.paramIsPointer(param) or (param.text is not None and 'const' in param.text): + parent = self.getHandleParent(paramtype.text) + if parent is not None: + handles.append(param) + + # If any param is optional, it affects the output + if self.isHandleOptional(param, params): + anyparentedhandlesoptional = True + + # Find the first dispatchable parent + ancestor = parent + while ancestor is not None and not self.isHandleTypeDispatchable(ancestor): + ancestor = self.getHandleParent(ancestor) + + # If one was found, add this parameter to the parent dictionary + if ancestor is not None: + if ancestor not in parentdictionary: + parentdictionary[ancestor] = [] + + if self.paramIsArray(param): + parentdictionary[ancestor].append('the elements of ' + self.makeParameterName(paramname.text)) + else: + parentdictionary[ancestor].append(self.makeParameterName(paramname.text)) + + # Get the array length for this parameter + arraylength = param.attrib.get('len') + if arraylength is not None: + for onelength in arraylength.split(','): + arraylengths.add(onelength) + + # For any vkQueue* functions, there might be queue type data + if 'vkQueue' in blockname: + # The queue type must be valid + queuetypes = cmd.attrib.get('queues') + if queuetypes is not None: + queuebits = [] + for queuetype in re.findall(r'([^,]+)', queuetypes): + queuebits.append(queuetype.replace('_',' ')) + + asciidoc += '* ' + asciidoc += 'The pname:queue must: support ' + if len(queuebits) == 1: + asciidoc += queuebits[0] + else: + asciidoc += (', ').join(queuebits[:-1]) + asciidoc += ' or ' + asciidoc += queuebits[-1] + asciidoc += ' operations' + asciidoc += '\n' + + if 'vkCmd' in blockname: + # The commandBuffer parameter must be being recorded + asciidoc += '* ' + asciidoc += 'pname:commandBuffer must: be in the recording state' + asciidoc += '\n' + + # The queue type must be valid + queuetypes = cmd.attrib.get('queues') + queuebits = [] + for queuetype in re.findall(r'([^,]+)', queuetypes): + queuebits.append(queuetype.replace('_',' ')) + + asciidoc += '* ' + asciidoc += 'The sname:VkCommandPool that pname:commandBuffer was allocated from must: support ' + if len(queuebits) == 1: + asciidoc += queuebits[0] + else: + asciidoc += (', ').join(queuebits[:-1]) + asciidoc += ' or ' + asciidoc += queuebits[-1] + asciidoc += ' operations' + asciidoc += '\n' + + # Must be called inside/outside a renderpass appropriately + renderpass = cmd.attrib.get('renderpass') + + if renderpass != 'both': + asciidoc += '* This command must: only be called ' + asciidoc += renderpass + asciidoc += ' of a render pass instance' + asciidoc += '\n' + + # Must be in the right level command buffer + cmdbufferlevel = cmd.attrib.get('cmdbufferlevel') + + if cmdbufferlevel != 'primary,secondary': + asciidoc += '* pname:commandBuffer must: be a ' + asciidoc += cmdbufferlevel + asciidoc += ' sname:VkCommandBuffer' + asciidoc += '\n' + + # Any non-optional arraylengths should specify they must be greater than 0 + for param in params: + paramname = param.find('name') + + for arraylength in arraylengths: + if paramname.text == arraylength and param.attrib.get('optional') is None: + # Get all the array dependencies + arrays = cmd.findall("param/[@len='" + arraylength + "'][@optional='true']") + + # Get all the optional array dependencies, including those not generating validity for some reason + optionalarrays = cmd.findall("param/[@len='" + arraylength + "'][@optional='true']") + optionalarrays.extend(cmd.findall("param/[@len='" + arraylength + "'][@noautovalidity='true']")) + + asciidoc += '* ' + + # Allow lengths to be arbitrary if all their dependents are optional + if len(optionalarrays) == len(arrays) and len(optionalarrays) != 0: + asciidoc += 'If ' + if len(optionalarrays) > 1: + asciidoc += 'any of ' + + for array in optionalarrays[:-1]: + asciidoc += self.makeParameterName(optionalarrays.find('name').text) + asciidoc += ', ' + + if len(optionalarrays) > 1: + asciidoc += 'and ' + asciidoc += self.makeParameterName(optionalarrays[-1].find('name').text) + asciidoc += ' are ' + else: + asciidoc += self.makeParameterName(optionalarrays[-1].find('name').text) + asciidoc += ' is ' + + asciidoc += 'not `NULL`, ' + + if self.paramIsPointer(param): + asciidoc += 'the value referenced by ' + else: + asciidoc += 'the value of ' + + elif self.paramIsPointer(param): + asciidoc += 'The value referenced by ' + else: + asciidoc += 'The value of ' + + asciidoc += self.makeParameterName(arraylength) + asciidoc += ' must: be greater than `0`' + asciidoc += '\n' + + # Find the parents of all objects referenced in this command + for param in handles: + asciidoc += self.makeAsciiDocHandleParent(param, params) + + # Find the common ancestors of objects + noancestorscount = 0 + while noancestorscount < len(parentdictionary): + noancestorscount = 0 + oldparentdictionary = parentdictionary.copy() + for parent in oldparentdictionary.items(): + ancestor = self.getHandleParent(parent[0]) + + while ancestor is not None and ancestor not in parentdictionary: + ancestor = self.getHandleParent(ancestor) + + if ancestor is not None: + parentdictionary[ancestor] += parentdictionary.pop(parent[0]) + else: + # No ancestors possible - so count it up + noancestorscount += 1 + + # Add validation language about common ancestors + for parent in parentdictionary.items(): + if len(parent[1]) > 1: + parentlanguage = '* ' + + parentlanguage += 'Each of ' + parentlanguage += ", ".join(parent[1][:-1]) + parentlanguage += ' and ' + parentlanguage += parent[1][-1] + if anyparentedhandlesoptional is True: + parentlanguage += ' that are valid handles' + parentlanguage += ' must: have been created, allocated or retrieved from the same ' + parentlanguage += self.makeStructName(parent[0]) + parentlanguage += '\n' + + # Capitalize and add to the main language + asciidoc += parentlanguage + + # Add in any plain-text validation language that's in the xml + for usage in usages: + asciidoc += '* ' + asciidoc += usage.text + asciidoc += '\n' + + # In case there's nothing to report, return None + if asciidoc == '': + return None + # Delimit the asciidoc block + return asciidoc + + def makeThreadSafetyBlock(self, cmd, paramtext): + """Generate C function pointer typedef for <command> Element""" + paramdecl = '' + + # For any vkCmd* functions, the commandBuffer parameter must be being recorded + if cmd.find('proto/name') is not None and 'vkCmd' in cmd.find('proto/name'): + paramdecl += '* ' + paramdecl += 'The sname:VkCommandPool that pname:commandBuffer was created from' + paramdecl += '\n' + + # Find and add any parameters that are thread unsafe + explicitexternsyncparams = cmd.findall(paramtext + "[@externsync]") + if (explicitexternsyncparams is not None): + for param in explicitexternsyncparams: + externsyncattribs = param.attrib.get('externsync') + paramname = param.find('name') + for externsyncattrib in externsyncattribs.split(','): + paramdecl += '* ' + paramdecl += 'Host access to ' + if externsyncattrib == 'true': + if self.paramIsArray(param): + paramdecl += 'each member of ' + self.makeParameterName(paramname.text) + elif self.paramIsPointer(param): + paramdecl += 'the object referenced by ' + self.makeParameterName(paramname.text) + else: + paramdecl += self.makeParameterName(paramname.text) + else: + paramdecl += 'pname:' + paramdecl += externsyncattrib + paramdecl += ' must: be externally synchronized\n' + + # Find and add any "implicit" parameters that are thread unsafe + implicitexternsyncparams = cmd.find('implicitexternsyncparams') + if (implicitexternsyncparams is not None): + for elem in implicitexternsyncparams: + paramdecl += '* ' + paramdecl += 'Host access to ' + paramdecl += elem.text + paramdecl += ' must: be externally synchronized\n' + + if (paramdecl == ''): + return None + else: + return paramdecl + + def makeCommandPropertiesTableEntry(self, cmd, name): + + if 'vkCmd' in name: + # Must be called inside/outside a renderpass appropriately + cmdbufferlevel = cmd.attrib.get('cmdbufferlevel') + cmdbufferlevel = (' + \n').join(cmdbufferlevel.title().split(',')) + + renderpass = cmd.attrib.get('renderpass') + renderpass = renderpass.capitalize() + + queues = cmd.attrib.get('queues') + queues = (' + \n').join(queues.upper().split(',')) + + return '|' + cmdbufferlevel + '|' + renderpass + '|' + queues + elif 'vkQueue' in name: + # Must be called inside/outside a renderpass appropriately + + queues = cmd.attrib.get('queues') + if queues is None: + queues = 'Any' + else: + queues = (' + \n').join(queues.upper().split(',')) + + return '|-|-|' + queues + + return None + + def makeSuccessCodes(self, cmd, name): + + successcodes = cmd.attrib.get('successcodes') + if successcodes is not None: + + successcodeentry = '' + successcodes = successcodes.split(',') + return '* ' + '\n* '.join(successcodes) + + return None + + def makeErrorCodes(self, cmd, name): + + errorcodes = cmd.attrib.get('errorcodes') + if errorcodes is not None: + + errorcodeentry = '' + errorcodes = errorcodes.split(',') + return '* ' + '\n* '.join(errorcodes) + + return None + + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + # Get all thh parameters + params = cmdinfo.elem.findall('param') + usages = cmdinfo.elem.findall('validity/usage') + + validity = self.makeValidUsageStatements(cmdinfo.elem, name, params, usages) + threadsafety = self.makeThreadSafetyBlock(cmdinfo.elem, 'param') + commandpropertiesentry = self.makeCommandPropertiesTableEntry(cmdinfo.elem, name) + successcodes = self.makeSuccessCodes(cmdinfo.elem, name) + errorcodes = self.makeErrorCodes(cmdinfo.elem, name) + + self.writeInclude('validity/protos', name, validity, threadsafety, commandpropertiesentry, successcodes, errorcodes) + + # + # Struct Generation + def genStruct(self, typeinfo, typename): + OutputGenerator.genStruct(self, typeinfo, typename) + + # Anything that's only ever returned can't be set by the user, so shouldn't have any validity information. + if typeinfo.elem.attrib.get('returnedonly') is None: + params = typeinfo.elem.findall('member') + usages = typeinfo.elem.findall('validity/usage') + + validity = self.makeValidUsageStatements(typeinfo.elem, typename, params, usages) + threadsafety = self.makeThreadSafetyBlock(typeinfo.elem, 'member') + + self.writeInclude('validity/structs', typename, validity, threadsafety, None, None, None) + else: + # Still generate files for return only structs, in case this state changes later + self.writeInclude('validity/structs', typename, None, None, None, None, None) + + # + # Type Generation + def genType(self, typeinfo, typename): + OutputGenerator.genType(self, typeinfo, typename) + + category = typeinfo.elem.get('category') + if (category == 'struct' or category == 'union'): + self.genStruct(typeinfo, typename) + +# HostSynchronizationOutputGenerator - subclass of OutputGenerator. +# Generates AsciiDoc includes of the externsync parameter table for the +# fundamentals chapter of the Vulkan specification. Similar to +# DocOutputGenerator. +# +# ---- methods ---- +# HostSynchronizationOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# genCmd(cmdinfo) +class HostSynchronizationOutputGenerator(OutputGenerator): + # Generate Host Synchronized Parameters in a table at the top of the spec + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + + threadsafety = {'parameters': '', 'parameterlists': '', 'implicit': ''} + + def makeParameterName(self, name): + return 'pname:' + name + + def makeFLink(self, name): + return 'flink:' + name + + # + # Generate an include file + # + # directory - subdirectory to put file in + # basename - base name of the file + # contents - contents of the file (Asciidoc boilerplate aside) + def writeInclude(self): + + if self.threadsafety['parameters'] is not None: + # Create file + filename = self.genOpts.genDirectory + '/' + self.genOpts.filename + '/parameters.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + + # Host Synchronization + write('.Externally Synchronized Parameters', file=fp) + write('*' * 80, file=fp) + write(self.threadsafety['parameters'], file=fp, end='') + write('*' * 80, file=fp) + write('', file=fp) + + if self.threadsafety['parameterlists'] is not None: + # Create file + filename = self.genOpts.genDirectory + '/' + self.genOpts.filename + '/parameterlists.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + + # Host Synchronization + write('.Externally Synchronized Parameter Lists', file=fp) + write('*' * 80, file=fp) + write(self.threadsafety['parameterlists'], file=fp, end='') + write('*' * 80, file=fp) + write('', file=fp) + + if self.threadsafety['implicit'] is not None: + # Create file + filename = self.genOpts.genDirectory + '/' + self.genOpts.filename + '/implicit.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + + # Host Synchronization + write('.Implicit Externally Synchronized Parameters', file=fp) + write('*' * 80, file=fp) + write(self.threadsafety['implicit'], file=fp, end='') + write('*' * 80, file=fp) + write('', file=fp) + + fp.close() + + # + # Check if the parameter passed in is a pointer to an array + def paramIsArray(self, param): + return param.attrib.get('len') is not None + + # Check if the parameter passed in is a pointer + def paramIsPointer(self, param): + ispointer = False + paramtype = param.find('type') + if paramtype.tail is not None and '*' in paramtype.tail: + ispointer = True + + return ispointer + + # Turn the "name[].member[]" notation into plain English. + def makeThreadDereferenceHumanReadable(self, dereference): + matches = re.findall(r"[\w]+[^\w]*",dereference) + stringval = '' + for match in reversed(matches): + if '->' in match or '.' in match: + stringval += 'member of ' + if '[]' in match: + stringval += 'each element of ' + + stringval += 'the ' + stringval += self.makeParameterName(re.findall(r"[\w]+",match)[0]) + stringval += ' ' + + stringval += 'parameter' + + return stringval[0].upper() + stringval[1:] + + def makeThreadSafetyBlocks(self, cmd, paramtext): + protoname = cmd.find('proto/name').text + + # Find and add any parameters that are thread unsafe + explicitexternsyncparams = cmd.findall(paramtext + "[@externsync]") + if (explicitexternsyncparams is not None): + for param in explicitexternsyncparams: + externsyncattribs = param.attrib.get('externsync') + paramname = param.find('name') + for externsyncattrib in externsyncattribs.split(','): + + tempstring = '* ' + if externsyncattrib == 'true': + if self.paramIsArray(param): + tempstring += 'Each element of the ' + elif self.paramIsPointer(param): + tempstring += 'The object referenced by the ' + else: + tempstring += 'The ' + + tempstring += self.makeParameterName(paramname.text) + tempstring += ' parameter' + + else: + tempstring += self.makeThreadDereferenceHumanReadable(externsyncattrib) + + tempstring += ' in ' + tempstring += self.makeFLink(protoname) + tempstring += '\n' + + + if ' element of ' in tempstring: + self.threadsafety['parameterlists'] += tempstring + else: + self.threadsafety['parameters'] += tempstring + + + # Find and add any "implicit" parameters that are thread unsafe + implicitexternsyncparams = cmd.find('implicitexternsyncparams') + if (implicitexternsyncparams is not None): + for elem in implicitexternsyncparams: + self.threadsafety['implicit'] += '* ' + self.threadsafety['implicit'] += elem.text[0].upper() + self.threadsafety['implicit'] += elem.text[1:] + self.threadsafety['implicit'] += ' in ' + self.threadsafety['implicit'] += self.makeFLink(protoname) + self.threadsafety['implicit'] += '\n' + + + # For any vkCmd* functions, the commandBuffer parameter must be being recorded + if protoname is not None and 'vkCmd' in protoname: + self.threadsafety['implicit'] += '* ' + self.threadsafety['implicit'] += 'The sname:VkCommandPool that pname:commandBuffer was allocated from, in ' + self.threadsafety['implicit'] += self.makeFLink(protoname) + + self.threadsafety['implicit'] += '\n' + + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + # Get all thh parameters + params = cmdinfo.elem.findall('param') + usages = cmdinfo.elem.findall('validity/usage') + + self.makeThreadSafetyBlocks(cmdinfo.elem, 'param') + + self.writeInclude() diff --git a/genvk.py b/genvk.py new file mode 100755 index 00000000..5421d417 --- /dev/null +++ b/genvk.py @@ -0,0 +1,293 @@ +#!/usr/bin/env python +# +# Copyright (c) 2013-2015 The Khronos Group Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and/or associated documentation files (the +# "Materials"), to deal in the Materials without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Materials, and to +# permit persons to whom the Materials are furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Materials. +# +# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +import sys, time, pdb, string, cProfile +from reg import * +from generator import write, CGeneratorOptions, COutputGenerator, DocGeneratorOptions, DocOutputGenerator, PyOutputGenerator, ValidityOutputGenerator, HostSynchronizationOutputGenerator + +# debug - start header generation in debugger +# dump - dump registry after loading +# profile - enable Python profiling +# protect - whether to use #ifndef protections +# registry <filename> - use specified XML registry instead of gl.xml +# target - string name of target header, or all targets if None +# timeit - time length of registry loading & header generation +# validate - validate return & parameter group tags against <group> +debug = False +dump = False +profile = False +protect = True +target = None +timeit = False +validate= False +# Default input / log files +errFilename = None +diagFilename = 'diag.txt' +regFilename = 'vk.xml' + +if __name__ == '__main__': + i = 1 + while (i < len(sys.argv)): + arg = sys.argv[i] + i = i + 1 + if (arg == '-debug'): + write('Enabling debug (-debug)', file=sys.stderr) + debug = True + elif (arg == '-dump'): + write('Enabling dump (-dump)', file=sys.stderr) + dump = True + elif (arg == '-noprotect'): + write('Disabling inclusion protection in output headers', file=sys.stderr) + protect = False + elif (arg == '-profile'): + write('Enabling profiling (-profile)', file=sys.stderr) + profile = True + elif (arg == '-registry'): + regFilename = sys.argv[i] + i = i+1 + write('Using registry ', regFilename, file=sys.stderr) + elif (arg == '-time'): + write('Enabling timing (-time)', file=sys.stderr) + timeit = True + elif (arg == '-validate'): + write('Enabling group validation (-validate)', file=sys.stderr) + validate = True + elif (arg[0:1] == '-'): + write('Unrecognized argument:', arg, file=sys.stderr) + exit(1) + else: + target = arg + write('Using target', target, file=sys.stderr) + +# Simple timer functions +startTime = None +def startTimer(): + global startTime + startTime = time.clock() +def endTimer(msg): + global startTime + endTime = time.clock() + if (timeit): + write(msg, endTime - startTime) + startTime = None + +# Load & parse registry +reg = Registry() + +startTimer() +tree = etree.parse(regFilename) +endTimer('Time to make ElementTree =') + +startTimer() +reg.loadElementTree(tree) +endTimer('Time to parse ElementTree =') + +if (validate): + reg.validateGroups() + +if (dump): + write('***************************************') + write('Performing Registry dump to regdump.txt') + write('***************************************') + reg.dumpReg(filehandle = open('regdump.txt','w')) + +# Turn a list of strings into a regexp string matching exactly those strings +def makeREstring(list): + return '^(' + '|'.join(list) + ')$' + +# Descriptive names for various regexp patterns used to select +# versions and extensions +allVersions = allExtensions = '.*' +noVersions = noExtensions = None + +# Copyright text prefixing all headers (list of strings). +prefixStrings = [ + '/*', + '** Copyright (c) 2015 The Khronos Group Inc.', + '**', + '** Permission is hereby granted, free of charge, to any person obtaining a', + '** copy of this software and/or associated documentation files (the', + '** "Materials"), to deal in the Materials without restriction, including', + '** without limitation the rights to use, copy, modify, merge, publish,', + '** distribute, sublicense, and/or sell copies of the Materials, and to', + '** permit persons to whom the Materials are furnished to do so, subject to', + '** the following conditions:', + '**', + '** The above copyright notice and this permission notice shall be included', + '** in all copies or substantial portions of the Materials.', + '**', + '** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,', + '** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF', + '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.', + '** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY', + '** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,', + '** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE', + '** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.', + '*/', + '' +] + +# Text specific to Vulkan headers +vkPrefixStrings = [ + '/*', + '** This header is generated from the Khronos Vulkan XML API Registry.', + '**', + '*/', + '' +] + +# Defaults for generating re-inclusion protection wrappers (or not) +protectFile = protect +protectFeature = protect +protectProto = protect + +buildList = [ + # Vulkan 1.0 - core API + extensions. To generate just the core API, + # change to 'defaultExtensions = None' below. + [ COutputGenerator, + CGeneratorOptions( + filename = '../vulkan/vulkan.h', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'vulkan', + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + vkPrefixStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = False, + protectProto = '#ifndef', + protectProtoStr = 'VK_NO_PROTOTYPES', + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48) + ], + # Vulkan 1.0 draft - core API include files for spec + # Overwrites include subdirectories in spec source tree + # The generated include files do not include the calling convention + # macros (apientry etc.), unlike the header files. + [ DocOutputGenerator, + DocGeneratorOptions( + filename = 'vulkan-docs', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'vulkan', + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + vkPrefixStrings, + apicall = '', + apientry = '', + apientryp = '*', + genDirectory = '../../doc/specs/vulkan', + alignFuncParam = 48, + expandEnumerants = False) + ], + # Vulkan 1.0 draft - API names to validate man/api spec includes & links + # filename = 'vkapi.py', + [ PyOutputGenerator, + DocGeneratorOptions( + filename = '../../doc/specs/vulkan/vkapi.py', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, + addExtensions = None, + removeExtensions = None) + ], + # Vulkan 1.0 draft - core API include files for spec + # Overwrites include subdirectories in spec source tree + [ ValidityOutputGenerator, + DocGeneratorOptions( + filename = 'validity', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + genDirectory = '../../doc/specs/vulkan') + ], + # Vulkan 1.0 draft - core API include files for spec + # Overwrites include subdirectories in spec source tree + [ HostSynchronizationOutputGenerator, + DocGeneratorOptions( + filename = 'hostsynctable', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + genDirectory = '../../doc/specs/vulkan') + ], + None +] + +# create error/warning & diagnostic files +if (errFilename): + errWarn = open(errFilename,'w') +else: + errWarn = sys.stderr +diag = open(diagFilename, 'w') + +def genHeaders(): + # Loop over targets, building each + generated = 0 + for item in buildList: + if (item == None): + break + createGenerator = item[0] + genOpts = item[1] + if (target and target != genOpts.filename): + # write('*** Skipping', genOpts.filename) + continue + write('*** Building', genOpts.filename) + generated = generated + 1 + startTimer() + gen = createGenerator(errFile=errWarn, + warnFile=errWarn, + diagFile=diag) + reg.setGenerator(gen) + reg.apiGen(genOpts) + write('** Generated', genOpts.filename) + endTimer('Time to generate ' + genOpts.filename + ' =') + if (target and generated == 0): + write('Failed to generate target:', target) + +if (debug): + pdb.run('genHeaders()') +elif (profile): + import cProfile, pstats + cProfile.run('genHeaders()', 'profile.txt') + p = pstats.Stats('profile.txt') + p.strip_dirs().sort_stats('time').print_stats(50) +else: + genHeaders() @@ -0,0 +1,762 @@ +#!/usr/bin/python3 -i +# +# Copyright (c) 2013-2015 The Khronos Group Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and/or associated documentation files (the +# "Materials"), to deal in the Materials without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Materials, and to +# permit persons to whom the Materials are furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Materials. +# +# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +import io,os,re,string,sys +from lxml import etree + +# matchAPIProfile - returns whether an API and profile +# being generated matches an element's profile +# api - string naming the API to match +# profile - string naming the profile to match +# elem - Element which (may) have 'api' and 'profile' +# attributes to match to. +# If a tag is not present in the Element, the corresponding API +# or profile always matches. +# Otherwise, the tag must exactly match the API or profile. +# Thus, if 'profile' = core: +# <remove> with no attribute will match +# <remove profile='core'> will match +# <remove profile='compatibility'> will not match +# Possible match conditions: +# Requested Element +# Profile Profile +# --------- -------- +# None None Always matches +# 'string' None Always matches +# None 'string' Does not match. Can't generate multiple APIs +# or profiles, so if an API/profile constraint +# is present, it must be asked for explicitly. +# 'string' 'string' Strings must match +# +# ** In the future, we will allow regexes for the attributes, +# not just strings, so that api="^(gl|gles2)" will match. Even +# this isn't really quite enough, we might prefer something +# like "gl(core)|gles1(common-lite)". +def matchAPIProfile(api, profile, elem): + """Match a requested API & profile name to a api & profile attributes of an Element""" + match = True + # Match 'api', if present + if ('api' in elem.attrib): + if (api == None): + raise UserWarning("No API requested, but 'api' attribute is present with value '" + + elem.get('api') + "'") + elif (api != elem.get('api')): + # Requested API doesn't match attribute + return False + if ('profile' in elem.attrib): + if (profile == None): + raise UserWarning("No profile requested, but 'profile' attribute is present with value '" + + elem.get('profile') + "'") + elif (profile != elem.get('profile')): + # Requested profile doesn't match attribute + return False + return True + +# BaseInfo - base class for information about a registry feature +# (type/group/enum/command/API/extension). +# required - should this feature be defined during header generation +# (has it been removed by a profile or version)? +# declared - has this feature been defined already? +# elem - lxml.etree Element for this feature +# resetState() - reset required/declared to initial values. Used +# prior to generating a new API interface. +class BaseInfo: + """Represents the state of a registry feature, used during API generation""" + def __init__(self, elem): + self.required = False + self.declared = False + self.elem = elem + def resetState(self): + self.required = False + self.declared = False + +# TypeInfo - registry information about a type. No additional state +# beyond BaseInfo is required. +class TypeInfo(BaseInfo): + """Represents the state of a registry type""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + +# GroupInfo - registry information about a group of related enums +# in an <enums> block, generally corresponding to a C "enum" type. +class GroupInfo(BaseInfo): + """Represents the state of a registry <enums> group""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + +# EnumInfo - registry information about an enum +# type - numeric type of the value of the <enum> tag +# ( '' for GLint, 'u' for GLuint, 'ull' for GLuint64 ) +class EnumInfo(BaseInfo): + """Represents the state of a registry enum""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.type = elem.get('type') + if (self.type == None): + self.type = '' + +# CmdInfo - registry information about a command +class CmdInfo(BaseInfo): + """Represents the state of a registry command""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + +# FeatureInfo - registry information about an API <feature> +# or <extension> +# name - feature name string (e.g. 'vk_ext_khr_surface') +# version - feature version number (e.g. 1.2). <extension> +# features are unversioned and assigned version number 0. +# ** This is confusingly taken from the 'number' attribute of <feature>. +# Needs fixing. +# number - extension number, used for ordering and for +# assigning enumerant offsets. <feature> features do +# not have extension numbers and are assigned number 0. +# category - category, e.g. VERSION or khr/vendor tag +# emit - has this feature been defined already? +class FeatureInfo(BaseInfo): + """Represents the state of an API feature (version/extension)""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.name = elem.get('name') + # Determine element category (vendor). Only works + # for <extension> elements. + if (elem.tag == 'feature'): + self.category = 'VERSION' + self.version = elem.get('number') + self.number = "0" + else: + self.category = self.name.split('_', 2)[1] + self.version = "0" + self.number = elem.get('number') + self.emit = False + +from generator import write, GeneratorOptions, OutputGenerator + +# Registry - object representing an API registry, loaded from an XML file +# Members +# tree - ElementTree containing the root <registry> +# typedict - dictionary of TypeInfo objects keyed by type name +# groupdict - dictionary of GroupInfo objects keyed by group name +# enumdict - dictionary of EnumInfo objects keyed by enum name +# cmddict - dictionary of CmdInfo objects keyed by command name +# apidict - dictionary of <api> Elements keyed by API name +# extensions - list of <extension> Elements +# extdict - dictionary of <extension> Elements keyed by extension name +# gen - OutputGenerator object used to write headers / messages +# genOpts - GeneratorOptions object used to control which +# 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 +# Public methods +# loadElementTree(etree) - load registry from specified ElementTree +# loadFile(filename) - load registry from XML file +# setGenerator(gen) - OutputGenerator to use +# parseTree() - parse the registry once loaded & create dictionaries +# dumpReg(maxlen, filehandle) - diagnostic to dump the dictionaries +# to specified file handle (default stdout). Truncates type / +# enum / command elements to maxlen characters (default 80) +# generator(g) - specify the output generator object +# apiGen(apiname, genOpts) - generate API headers for the API type +# and profile specified in genOpts, but only for the versions and +# extensions specified there. +# apiReset() - call between calls to apiGen() to reset internal state +# Private methods +# addElementInfo(elem,info,infoName,dictionary) - add feature info to dict +# lookupElementInfo(fname,dictionary) - lookup feature info in dict +class Registry: + """Represents an API registry loaded from XML""" + def __init__(self): + self.tree = None + self.typedict = {} + self.groupdict = {} + self.enumdict = {} + self.cmddict = {} + self.apidict = {} + self.extensions = [] + self.extdict = {} + # A default output generator, so commands prior to apiGen can report + # errors via the generator object. + self.gen = OutputGenerator() + self.genOpts = None + self.emitFeatures = False + def loadElementTree(self, tree): + """Load ElementTree into a Registry object and parse it""" + self.tree = tree + self.parseTree() + def loadFile(self, file): + """Load an API registry XML file into a Registry object and parse it""" + self.tree = etree.parse(file) + self.parseTree() + def setGenerator(self, gen): + """Specify output generator object. None restores the default generator""" + self.gen = gen + self.gen.setRegistry(self.tree) + + # addElementInfo - add information about an element to the + # corresponding dictionary + # elem - <type>/<enums>/<enum>/<command>/<feature>/<extension> Element + # info - corresponding {Type|Group|Enum|Cmd|Feature}Info object + # infoName - 'type' / 'group' / 'enum' / 'command' / 'feature' / 'extension' + # dictionary - self.{type|group|enum|cmd|api|ext}dict + # If the Element has an 'api' attribute, the dictionary key is the + # tuple (name,api). If not, the key is the name. 'name' is an + # attribute of the Element + def addElementInfo(self, elem, info, infoName, dictionary): + 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) + else: + dictionary[key] = info + # + # lookupElementInfo - find a {Type|Enum|Cmd}Info object by name. + # If an object qualified by API name exists, use that. + # fname - name of type / enum / command + # dictionary - self.{type|enum|cmd}dict + def lookupElementInfo(self, fname, dictionary): + key = (fname, self.genOpts.apiname) + if (key in dictionary): + # self.gen.logMsg('diag', 'Found API-specific element for feature', fname) + return dictionary[key] + elif (fname in dictionary): + # self.gen.logMsg('diag', 'Found generic element for feature', fname) + return dictionary[fname] + else: + return None + def parseTree(self): + """Parse the registry Element, once created""" + # This must be the Element for the root <registry> + self.reg = self.tree.getroot() + # + # Create dictionary of registry types from toplevel <types> tags + # and add 'name' attribute to each <type> tag (where missing) + # based on its <name> element. + # + # There's usually one <types> block; more are OK + # Required <type> attributes: 'name' or nested <name> tag contents + self.typedict = {} + for type in self.reg.findall('types/type'): + # If the <type> doesn't already have a 'name' attribute, set + # it from contents of its <name> tag. + if (type.get('name') == None): + type.attrib['name'] = type.find('name').text + self.addElementInfo(type, TypeInfo(type), 'type', self.typedict) + # + # Create dictionary of registry enum groups from <enums> tags. + # + # Required <enums> attributes: 'name'. If no name is given, one is + # generated, but that group can't be identified and turned into an + # enum type definition - it's just a container for <enum> tags. + self.groupdict = {} + for group in self.reg.findall('enums'): + self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict) + # + # Create dictionary of registry enums from <enum> tags + # + # <enums> tags usually define different namespaces for the values + # defined in those tags, but the actual names all share the + # same dictionary. + # Required <enum> attributes: 'name', 'value' + # For containing <enums> which have type="enum" or type="bitmask", + # tag all contained <enum>s are required. This is a stopgap until + # a better scheme for tagging core and extension enums is created. + self.enumdict = {} + for enums in self.reg.findall('enums'): + required = (enums.get('type') != None) + for enum in enums.findall('enum'): + enumInfo = EnumInfo(enum) + enumInfo.required = required + self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) + # + # Create dictionary of registry commands from <command> tags + # and add 'name' attribute to each <command> tag (where missing) + # based on its <proto><name> element. + # + # There's usually only one <commands> block; more are OK. + # Required <command> attributes: 'name' or <proto><name> tag contents + self.cmddict = {} + for cmd in self.reg.findall('commands/command'): + # If the <command> doesn't already have a 'name' attribute, set + # it from contents of its <proto><name> tag. + if (cmd.get('name') == None): + cmd.attrib['name'] = cmd.find('proto/name').text + ci = CmdInfo(cmd) + self.addElementInfo(cmd, ci, 'command', self.cmddict) + # + # Create dictionaries of API and extension interfaces + # from toplevel <api> and <extension> tags. + # + self.apidict = {} + 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 <extension> tags + # to the corresponding core type. + # When seen here, a copy, processed to contain the numeric enum + # value, is added to the corresponding <enums> element, as well + # as adding to the enum dictionary. Also add a 'extnumber' + # attribute containing the extension number. + # + # For <enum> tags which are actually just constants, if there's + # no 'extends' tag but there is a 'value' or 'bitpos' tag, just + # add an EnumInfo record to the dictionary. That works because + # 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 enum in feature.findall('require/enum'): + addEnumInfo = False + groupName = enum.get('extends') + if (groupName != None): + # self.gen.logMsg('diag', '*** Found extension enum', + # enum.get('name')) + # Add extension number attribute to the <enum> element + enum.attrib['extnumber'] = featureInfo.number + # 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) + 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')): + # 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) + def dumpReg(self, maxlen = 40, filehandle = sys.stdout): + """Dump all the dictionaries constructed from the Registry object""" + write('***************************************', file=filehandle) + write(' ** Dumping Registry contents **', file=filehandle) + write('***************************************', file=filehandle) + write('// Types', file=filehandle) + for name in self.typedict: + tobj = self.typedict[name] + write(' Type', name, '->', etree.tostring(tobj.elem)[0:maxlen], file=filehandle) + write('// Groups', file=filehandle) + for name in self.groupdict: + gobj = self.groupdict[name] + write(' Group', name, '->', etree.tostring(gobj.elem)[0:maxlen], file=filehandle) + write('// Enums', file=filehandle) + for name in self.enumdict: + eobj = self.enumdict[name] + write(' Enum', name, '->', etree.tostring(eobj.elem)[0:maxlen], file=filehandle) + write('// Commands', file=filehandle) + for name in self.cmddict: + cobj = self.cmddict[name] + write(' Command', name, '->', etree.tostring(cobj.elem)[0:maxlen], file=filehandle) + write('// APIs', file=filehandle) + for key in self.apidict: + write(' API Version ', key, '->', + etree.tostring(self.apidict[key].elem)[0:maxlen], file=filehandle) + write('// Extensions', file=filehandle) + for key in self.extdict: + write(' Extension', key, '->', + etree.tostring(self.extdict[key].elem)[0:maxlen], file=filehandle) + # write('***************************************', file=filehandle) + # write(' ** Dumping XML ElementTree **', file=filehandle) + # write('***************************************', file=filehandle) + # write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle) + # + # typename - name of type + # 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) + # Get TypeInfo object for <type> tag corresponding to typename + type = self.lookupElementInfo(typename, self.typedict) + if (type != None): + if (required): + # Tag type dependencies in 'required' attributes as + # required. This DOES NOT un-tag dependencies in a <remove> + # 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) + # Tag types used in defining this type (e.g. in nested + # <type> tags) + # Look for <type> in entire <command> tree, + # not just immediate children + for subtype in type.elem.findall('.//type'): + self.gen.logMsg('diag', '*** markRequired: type requires dependent <type>', subtype.text) + self.markTypeRequired(subtype.text, required) + # Tag enums used in defining this type, for example in + # <member><name>member</name>[<enum>MEMBER_SIZE</enum>]</member> + for subenum in type.elem.findall('.//enum'): + self.gen.logMsg('diag', '*** markRequired: type requires dependent <enum>', subenum.text) + self.markEnumRequired(subenum.text, required) + type.required = required + else: + 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) + enum = self.lookupElementInfo(enumname, self.enumdict) + if (enum != None): + enum.required = required + else: + self.gen.logMsg('warn', '*** enum:', enumname , 'IS NOT DEFINED') + # + # features - Element for <require> or <remove> 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 = <too long to print>, 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. + for typeElem in features.findall('type'): + self.markTypeRequired(typeElem.get('name'), required) + 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 <remove> + # 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 <type> in entire <command> 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') + # + # interface - Element for <version> or <extension>, containing + # <require> and <remove> tags + # api - string specifying API name being generated + # profile - string specifying API profile being generated + def requireAndRemoveFeatures(self, interface, api, profile): + """Process <recquire> and <remove> tags for a <version> or <extension>""" + # <require> marks things that are required by this version/profile + for feature in interface.findall('require'): + if (matchAPIProfile(api, profile, feature)): + self.markRequired(feature,True) + # <remove> marks things that are removed by this version/profile + for feature in interface.findall('remove'): + if (matchAPIProfile(api, profile, feature)): + self.markRequired(feature,False) + # + # generateFeature - generate a single type / enum group / enum / command, + # and all its dependencies as needed. + # fname - name of feature (<type>/<enum>/<command>) + # ftype - type of feature, 'type' | 'enum' | 'command' + # dictionary - of *Info objects - self.{type|enum|cmd}dict + def generateFeature(self, fname, ftype, dictionary): + 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, + '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)') + return + if (f.declared): + self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(already declared)') + return + # Always mark feature declared, as though actually emitted + f.declared = True + # + # 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 <type> and <enum> tags + # within the element. + # For commands, there may be many in <type> tags within the element. + # For enums, no dependencies are allowed (though perhaps if you + # have a uint64 enum, it should require GLuint64). + 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) + for subtype in f.elem.findall('.//type'): + self.gen.logMsg('diag', '*** Generating required dependent <type>', + subtype.text) + self.generateFeature(subtype.text, 'type', self.typedict) + for subtype in f.elem.findall('.//enum'): + self.gen.logMsg('diag', '*** Generating required dependent <enum>', + 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') + 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!!!') + else: + genProc = self.gen.genGroup + f = group + elif (ftype == 'command'): + genProc = self.gen.genCmd + for type in f.elem.findall('.//type'): + depname = type.text + self.gen.logMsg('diag', '*** Generating required parameter type', + depname) + self.generateFeature(depname, 'type', self.typedict) + elif (ftype == 'enum'): + 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) + else: + self.gen.logMsg('diag', '*** Skipping', ftype, fname, + '(not emitting this feature)') + # + # generateRequiredInterface - generate all interfaces required + # by an API version or extension + # interface - Element for <version> or <extension> + def generateRequiredInterface(self, interface): + """Generate required C interface for specified API version/extension""" + # + # Loop over all features inside all <require> tags. + # <remove> tags are ignored (handled in pass 1). + for features in interface.findall('require'): + for t in features.findall('type'): + self.generateFeature(t.get('name'), 'type', self.typedict) + for e in features.findall('enum'): + self.generateFeature(e.get('name'), 'enum', self.enumdict) + for c in features.findall('command'): + self.generateFeature(c.get('name'), 'command', self.cmddict) + # + # apiGen(genOpts) - generate interface for specified versions + # genOpts - GeneratorOptions object with parameters used + # by the Generator object. + def apiGen(self, genOpts): + """Generate interfaces for the specified API type and range of versions""" + # + self.gen.logMsg('diag', '*******************************************') + self.gen.logMsg('diag', ' Registry.apiGen file:', genOpts.filename, + 'api:', genOpts.apiname, + 'profile:', genOpts.profile) + self.gen.logMsg('diag', '*******************************************') + # + self.genOpts = genOpts + # Reset required/declared flags for all features + self.apiReset() + # + # Compile regexps used to select versions & extensions + regVersions = re.compile(self.genOpts.versions) + regEmitVersions = re.compile(self.genOpts.emitversions) + regAddExtensions = re.compile(self.genOpts.addExtensions) + regRemoveExtensions = re.compile(self.genOpts.removeExtensions) + # + # Get all matching API versions & add to list of FeatureInfo + features = [] + apiMatch = False + for key in self.apidict: + fi = self.apidict[key] + api = fi.elem.get('api') + if (api == self.genOpts.apiname): + apiMatch = True + if (regVersions.match(fi.version)): + # 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) + features.append(fi) + if (not fi.emit): + 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', '*** 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, + 'name =', fi.name, + '(does not match requested API)') + if (not apiMatch): + 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. + # Start with extensions tagged with 'api' pattern matching the API + # being generated. Add extensions matching the pattern specified in + # regExtensions, then remove extensions matching the pattern + # specified in regRemoveExtensions + for (extName,ei) in sorted(self.extdict.items(),key = lambda x : x[1].number): + extName = ei.name + include = False + # + # Include extension if defaultExtensions is not None and if the + # 'supported' attribute matches defaultExtensions. The regexp in + # 'supported' must exactly match defaultExtensions, so bracket + # it with ^(pat)$. + pat = '^(' + ei.elem.get('supported') + ')$' + if (self.genOpts.defaultExtensions and + re.match(pat, self.genOpts.defaultExtensions)): + self.gen.logMsg('diag', '*** Including extension', + extName, "(defaultExtensions matches the 'supported' attribute)") + include = True + # + # Include additional extensions if the extension name matches + # the regexp specified in the generator options. This allows + # 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', + extName, '(matches explicitly requested extensions to add)') + include = True + # Remove extensions if the name matches the regexp specified + # in generator options. This allows forcing removal of + # 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', + 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 + features.append(ei) + else: + 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 + if (self.genOpts.sortProcedure): + self.genOpts.sortProcedure(features) + # + # Pass 1: loop over requested API versions and extensions tagging + # types/commands/features as required (in an <require> block) or no + # longer required (in an <remove> block). It is possible to remove + # a feature in one version and restore it later by requiring it in + # a later version. + # If a profile other than 'None' is being generated, it must + # match the profile attribute (if any) of the <require> and + # <remove> tags. + self.gen.logMsg('diag', '*** PASS 1: TAG FEATURES ********************************************') + for f in features: + self.gen.logMsg('diag', '*** PASS 1: Tagging required and removed features for', + f.name) + self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile) + # + # 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.beginFile(self.genOpts) + for f in features: + 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', + 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). + self.gen.beginFeature(f.elem, emit) + self.generateRequiredInterface(f.elem) + self.gen.endFeature() + self.gen.endFile() + # + # apiReset - use between apiGen() calls to reset internal state + # + def apiReset(self): + """Reset type/enum/command dictionaries before generating another API""" + for type in self.typedict: + self.typedict[type].resetState() + for enum in self.enumdict: + self.enumdict[enum].resetState() + for cmd in self.cmddict: + self.cmddict[cmd].resetState() + for cmd in self.apidict: + self.apidict[cmd].resetState() + # + # validateGroups - check that group= attributes match actual groups + # + def validateGroups(self): + """Validate group= attributes on <param> and <proto> tags""" + # Keep track of group names not in <group> tags + badGroup = {} + 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) + if (group not in self.groupdict.keys()): + # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group) + if (group not in badGroup.keys()): + badGroup[group] = 1 + else: + badGroup[group] = badGroup[group] + 1 + for param in cmd.findall('param'): + pname = param.find('name') + if (pname != None): + pname = pname.text + else: + pname = type.get('name') + 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) + 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 ***') + for key in sorted(badGroup.keys()): + self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times') @@ -0,0 +1,5037 @@ +<?xml version="1.0" encoding="UTF-8"?> +<registry> + <comment> +Copyright (c) 2015 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +------------------------------------------------------------------------ + +This file, vk.xml, is the Vulkan API Registry. It is a critically important +and normative part of the Vulkan Specification, including a canonical +machine-readable definition of the API, parameter and member validation +language incorporated into the Specification and reference pages, and other +material which is registered by Khronos, such as tags used by extension and +layer authors. The only authoritative version of vk.xml is the one +maintained in the master branch of the Khronos Vulkan Github project. + </comment> + + <!-- SECTION: Vulkan vendor/author tags for extensions and layers --> + <tags> + <tag name="IMG" author="Imagination Technologies" contact="Michael Worcester @michaelworcester"/> + <tag name="AMD" author="Advanced Micro Devices, Inc." contact="Daniel Rakos @aqnuep"/> + <tag name="ARM" author="ARM Limited" contact="Jan-Harald Fredriksen @janharald"/> + <tag name="FSL" author="Freescale Semiconductor, Inc." contact="Norbert Nopper @FslNopper"/> + <tag name="BRCM" author="Broadcom Corporation" contact="Graeme Leese @gnl21"/> + <tag name="NXP" author="NXP Semiconductors N.V." contact="Norbert Nopper @FslNopper"/> + <tag name="NV" author="NVIDIA Corporation" contact="Daniel Koch @dgkoch"/> + <tag name="NVX" author="NVIDIA Corporation" contact="Daniel Koch @dgkoch"/> + <tag name="VIV" author="Vivante Corporation" contact="Yanjun Zhang @yanjunzhang"/> + <tag name="KDAB" author="KDAB" contact="Sean Harmer @seanharmer"/> + <tag name="ANDROID" author="Google, Inc." contact="Jesse Hall @jessehall"/> + <tag name="CHROMIUM" author="Google, Inc." contact="Jesse Hall @jessehall"/> + <tag name="GOOGLE" author="Google, Inc." contact="Jesse Hall @jessehall"/> + <tag name="QCOM" author="Qualcomm Technologies, Inc." contact="Maurice Ribble @mribble"/> + <tag name="LUNARG" author="LunarG, Inc." contact="Karen Ghavam @KarenGhavam"/> + <tag name="SAMSUNG" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/> + <tag name="SEC" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/> + <tag name="TIZEN" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/> + <tag name="RENDERDOC" author="RenderDoc (renderdoc.org)" contact="baldurk@baldurk.org"/> + </tags> + + <!-- SECTION: Vulkan type definitions --> + <types> + <type name="vk_platform" category="include">#include "vk_platform.h"</type> + <!-- WSI extensions --> + <type category="include">#include "<name>vulkan.h</name>"</type> + <type category="include">#include <<name>X11/Xlib.h</name>></type> + <type category="include">#include <<name>android/native_window.h</name>></type> + <type category="include">#include <<name>mir_toolkit/client_types.h</name>></type> + <type category="include">#include <<name>wayland-client.h</name>></type> + <type category="include">#include <<name>windows.h</name>></type> + <type category="include">#include <<name>xcb/xcb.h</name>></type> + + <type requires="X11/Xlib.h" name="Display"/> + <type requires="X11/Xlib.h" name="VisualID"/> + <type requires="X11/Xlib.h" name="Window"/> + <type requires="android/native_window.h" name="ANativeWindow"/> + <type requires="mir_toolkit/client_types.h" name="MirConnection"/> + <type requires="mir_toolkit/client_types.h" name="MirSurface"/> + <type requires="wayland-client.h" name="wl_display"/> + <type requires="wayland-client.h" name="wl_surface"/> + <type requires="windows.h" name="HINSTANCE"/> + <type requires="windows.h" name="HWND"/> + <type requires="xcb/xcb.h" name="xcb_connection_t"/> + <type requires="xcb/xcb.h" name="xcb_visualid_t"/> + <type requires="xcb/xcb.h" name="xcb_window_t"/> + + <type category="define">#define <name>VK_MAKE_VERSION</name>(major, minor, patch) \ + ((major << 22) | (minor << 12) | patch)</type> + + <type category="define">// Vulkan API version supported by this file +#define <name>VK_API_VERSION</name> <type>VK_MAKE_VERSION</type>(1, 0, 1)</type> + + + <type category="define"> +#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type> + + <type category="define" name="VK_DEFINE_NON_DISPATCHABLE_HANDLE"> +#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; +#else + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; +#endif + </type> + + <type category="define"> +#define <name>VK_NULL_HANDLE</name> 0 + </type> + + <type category="basetype">typedef <type>uint32_t</type> <name>VkSampleMask</name>;</type> + <type category="basetype">typedef <type>uint32_t</type> <name>VkBool32</name>;</type> + <type category="basetype">typedef <type>uint32_t</type> <name>VkFlags</name>;</type> + <type category="basetype">typedef <type>uint64_t</type> <name>VkDeviceSize</name>;</type> + <!-- Basic C types, pulled in via vk_platform.h --> + <type requires="vk_platform" name="void"/> + <type requires="vk_platform" name="char"/> + <type requires="vk_platform" name="float"/> + <type requires="vk_platform" name="uint8_t"/> + <type requires="vk_platform" name="uint32_t"/> + <type requires="vk_platform" name="uint64_t"/> + <type requires="vk_platform" name="int32_t"/> + <type requires="vk_platform" name="size_t"/> + <!-- Bitfield types --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkFramebufferCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkQueryPoolCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkRenderPassCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkSamplerCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineLayoutCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCacheCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDepthStencilStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDynamicStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineColorBlendStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineMultisampleStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineRasterizationStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineViewportStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineTessellationStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineInputAssemblyStateCreateFlags</name>;</type><!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineVertexInputStateCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineShaderStageCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorSetLayoutCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkBufferViewCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkInstanceCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceCreateFlags</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceQueueCreateFlags</name>;</type> <!-- creation flags --> + <type requires="VkQueueFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueueFlags</name>;</type> <!-- Queue capabilities --> + <type requires="VkMemoryPropertyFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryPropertyFlags</name>;</type> <!-- Memory properties passed into vkAllocateMemory(). --> + <type requires="VkMemoryHeapFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryHeapFlags</name>;</type> <!-- Memory heap flags --> + <type requires="VkAccessFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkAccessFlags</name>;</type> <!-- Memory access flags passed to barrier/dependency operations --> + <type requires="VkBufferUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkBufferUsageFlags</name>;</type> <!-- Buffer usage flags --> + <type requires="VkBufferCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkBufferCreateFlags</name>;</type> <!-- Buffer creation flags --> + <type requires="VkShaderStageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkShaderStageFlags</name>;</type> <!-- Shader stage flags --> + <type requires="VkImageUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageUsageFlags</name>;</type> <!-- Image usage flags --> + <type requires="VkImageCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageCreateFlags</name>;</type> <!-- Image creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkImageViewCreateFlags</name>;</type> <!-- Image view creation flags (no bits yet) --> + <type requires="VkPipelineCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCreateFlags</name>;</type> <!-- Pipeline creation flags --> + <type requires="VkColorComponentFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkColorComponentFlags</name>;</type> <!-- Color component flags --> + <type requires="VkFenceCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFenceCreateFlags</name>;</type> <!-- Fence creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkSemaphoreCreateFlags</name>;</type> <!-- Semaphore creation flags --> + <type requires="VkFormatFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFormatFeatureFlags</name>;</type> <!-- Format capability flags --> + <type requires="VkQueryControlFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryControlFlags</name>;</type> <!-- Query control flags --> + <type requires="VkQueryResultFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryResultFlags</name>;</type> <!-- Query result flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkShaderModuleCreateFlags</name>;</type> <!-- Shader module creation flags (no bits yet) --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkEventCreateFlags</name>;</type> <!-- Event creation flags (no bits yet) --> + <type requires="VkCommandPoolCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolCreateFlags</name>;</type> <!-- Command pool creation flags --> + <type requires="VkCommandPoolResetFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolResetFlags</name>;</type> <!-- Command pool reset flags --> + <type requires="VkCommandBufferResetFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandBufferResetFlags</name>;</type> <!-- Command buffer reset flags --> + <type requires="VkCommandBufferUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandBufferUsageFlags</name>;</type> <!-- Command buffer usage flags --> + <type requires="VkQueryPipelineStatisticFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryPipelineStatisticFlags</name>;</type> <!-- Pipeline statistics flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryMapFlags</name>;</type> <!-- Memory mapping flags (no bits yet) --> + <type requires="VkImageAspectFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageAspectFlags</name>;</type> <!-- Bitfield of image aspects --> + <type requires="VkSparseMemoryBindFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSparseMemoryBindFlags</name>;</type> <!-- Sparse memory bind flags --> + <type requires="VkSparseImageFormatFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSparseImageFormatFlags</name>;</type> <!-- Sparse image memory requirements flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkSubpassDescriptionFlags</name>;</type> <!-- Subpass description flags --> + <type requires="VkPipelineStageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineStageFlags</name>;</type> <!-- Pipeline stages --> + <type requires="VkSampleCountFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSampleCountFlags</name>;</type> <!-- Pipeline stages --> + <type requires="VkAttachmentDescriptionFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkAttachmentDescriptionFlags</name>;</type> <!-- Render pass attachment description flags --> + <type requires="VkStencilFaceFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkStencilFaceFlags</name>;</type> <!-- Stencil face flags --> + <type requires="VkCullModeFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCullModeFlags</name>;</type> <!-- Cull mode flags --> + <type requires="VkDescriptorPoolCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorPoolCreateFlags</name>;</type> <!-- Descriptor pool creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorPoolResetFlags</name>;</type> <!-- Descriptor pool reset flags --> + <type requires="VkDependencyFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDependencyFlags</name>;</type> <!-- Pipeline barrier and subpass dependency flags --> + <!-- WSI extensions --> + <type requires="VkCompositeAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkCompositeAlphaFlagsKHR</name>;</type> + <type requires="VkDisplayPlaneAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkDisplayPlaneAlphaFlagsKHR</name>;</type> + <type requires="VkSurfaceTransformFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkSurfaceTransformFlagsKHR</name>;</type> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkSwapchainCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDisplayModeCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkDisplaySurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkAndroidSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkMirSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkWaylandSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkWin32SurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkXlibSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + <type category="bitmask">typedef <type>VkFlags</type> <name>VkXcbSurfaceCreateFlagsKHR</name>;</type> <!-- creation flags --> + + <type requires="VkDebugReportFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkDebugReportFlagsEXT</name>;</type> + + <!-- Types which can be void pointers or class pointers, selected at compile time --> + <type category="handle"><type>VK_DEFINE_HANDLE</type>(<name>VkInstance</name>)</type> + <type category="handle" parent="VkInstance"><type>VK_DEFINE_HANDLE</type>(<name>VkPhysicalDevice</name>)</type> + <type category="handle" parent="VkPhysicalDevice"><type>VK_DEFINE_HANDLE</type>(<name>VkDevice</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_HANDLE</type>(<name>VkQueue</name>)</type> + <type category="handle" parent="VkCommandPool"><type>VK_DEFINE_HANDLE</type>(<name>VkCommandBuffer</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDeviceMemory</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkCommandPool</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkBuffer</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkBufferView</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkImage</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkImageView</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkShaderModule</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipeline</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipelineLayout</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSampler</name>)</type> + <type category="handle" parent="VkDescriptorPool"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorSet</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorSetLayout</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorPool</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkFence</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSemaphore</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkEvent</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkQueryPool</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkFramebuffer</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkRenderPass</name>)</type> + <type category="handle" parent="VkDevice"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipelineCache</name>)</type> + + <!-- WSI extensions --> + <type category="handle"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDisplayKHR</name>)</type> + <type category="handle" parent="VkPhysicalDevice,VkDisplayKHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDisplayModeKHR</name>)</type> + <type category="handle" parent="VkInstance"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSurfaceKHR</name>)</type> + <type category="handle" parent="VkSurfaceKHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSwapchainKHR</name>)</type> + <type category="handle" parent="VkInstance"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDebugReportCallbackEXT</name>)</type> + + <!-- Types generated from corresponding <enums> tags below --> + <type name="VkAttachmentLoadOp" category="enum"/> + <type name="VkAttachmentStoreOp" category="enum"/> + <type name="VkBlendFactor" category="enum"/> + <type name="VkBlendOp" category="enum"/> + <type name="VkBorderColor" category="enum"/> + <type name="VkFramebufferCreateFlagBits" category="enum"/> + <type name="VkQueryPoolCreateFlagBits" category="enum"/> + <type name="VkRenderPassCreateFlagBits" category="enum"/> + <type name="VkSamplerCreateFlagBits" category="enum"/> + <type name="VkPipelineCacheHeaderVersion" category="enum"/> + <type name="VkPipelineLayoutCreateFlagBits" category="enum"/> + <type name="VkPipelineCacheCreateFlagBits" category="enum"/> + <type name="VkPipelineDepthStencilStateCreateFlagBits" category="enum"/> + <type name="VkPipelineDynamicStateCreateFlagBits" category="enum"/> + <type name="VkPipelineColorBlendStateCreateFlagBits" category="enum"/> + <type name="VkPipelineMultisampleStateCreateFlagBits" category="enum"/> + <type name="VkPipelineRasterizationStateCreateFlagBits" category="enum"/> + <type name="VkPipelineViewportStateCreateFlagBits" category="enum"/> + <type name="VkPipelineTessellationStateCreateFlagBits" category="enum"/> + <type name="VkPipelineInputAssemblyStateCreateFlagBits" category="enum"/> + <type name="VkPipelineVertexInputStateCreateFlagBits" category="enum"/> + <type name="VkPipelineShaderStageCreateFlagBits" category="enum"/> + <type name="VkDescriptorSetLayoutCreateFlagBits" category="enum"/> + <type name="VkBufferViewCreateFlagBits" category="enum"/> + <type name="VkInstanceCreateFlagBits" category="enum"/> + <type name="VkDeviceQueueCreateFlagBits" category="enum"/> + <type name="VkBufferCreateFlagBits" category="enum"/> + <type name="VkBufferUsageFlagBits" category="enum"/> + <type name="VkColorComponentFlagBits" category="enum"/> + <type name="VkComponentSwizzle" category="enum"/> + <type name="VkCommandPoolCreateFlagBits" category="enum"/> + <type name="VkCommandPoolResetFlagBits" category="enum"/> + <type name="VkCommandBufferResetFlagBits" category="enum"/> + <type name="VkCommandBufferLevel" category="enum"/> + <type name="VkCommandBufferUsageFlagBits" category="enum"/> + <type name="VkCompareOp" category="enum"/> + <type name="VkCullModeFlagBits" category="enum"/> + <type name="VkDescriptorType" category="enum"/> + <type name="VkDeviceCreateFlagBits" category="enum"/> + <type name="VkDynamicState" category="enum"/> + <type name="VkFenceCreateFlagBits" category="enum"/> + <type name="VkPolygonMode" category="enum"/> + <type name="VkFormat" category="enum"/> + <type name="VkFormatFeatureFlagBits" category="enum"/> + <type name="VkFrontFace" category="enum"/> + <type name="VkImageAspectFlagBits" category="enum"/> + <type name="VkImageCreateFlagBits" category="enum"/> + <type name="VkImageLayout" category="enum"/> + <type name="VkImageTiling" category="enum"/> + <type name="VkImageType" category="enum"/> + <type name="VkImageUsageFlagBits" category="enum"/> + <type name="VkImageViewType" category="enum"/> + <type name="VkSharingMode" category="enum"/> + <type name="VkIndexType" category="enum"/> + <type name="VkLogicOp" category="enum"/> + <type name="VkMemoryHeapFlagBits" category="enum"/> + <type name="VkAccessFlagBits" category="enum"/> + <type name="VkMemoryPropertyFlagBits" category="enum"/> + <type name="VkPhysicalDeviceType" category="enum"/> + <type name="VkPipelineBindPoint" category="enum"/> + <type name="VkPipelineCreateFlagBits" category="enum"/> + <type name="VkPrimitiveTopology" category="enum"/> + <type name="VkQueryControlFlagBits" category="enum"/> + <type name="VkQueryPipelineStatisticFlagBits" category="enum"/> + <type name="VkQueryResultFlagBits" category="enum"/> + <type name="VkQueryType" category="enum"/> + <type name="VkQueueFlagBits" category="enum"/> + <type name="VkSubpassContents" category="enum"/> + <type name="VkResult" category="enum"/> + <type name="VkShaderStageFlagBits" category="enum"/> + <type name="VkSparseMemoryBindFlagBits" category="enum"/> + <type name="VkStencilFaceFlagBits" category="enum"/> + <type name="VkStencilOp" category="enum"/> + <type name="VkStructureType" category="enum"/> + <type name="VkSystemAllocationScope" category="enum"/> + <type name="VkInternalAllocationType" category="enum"/> + <type name="VkSamplerAddressMode" category="enum"/> + <type name="VkFilter" category="enum"/> + <type name="VkSamplerMipmapMode" category="enum"/> + <type name="VkVertexInputRate" category="enum"/> + <type name="VkPipelineStageFlagBits" category="enum"/> + <type name="VkSparseImageFormatFlagBits" category="enum"/> + <type name="VkSampleCountFlagBits" category="enum"/> + <type name="VkAttachmentDescriptionFlagBits" category="enum"/> + <type name="VkDescriptorPoolCreateFlagBits" category="enum"/> + <type name="VkDependencyFlagBits" category="enum"/> + <!-- WSI extensions --> + <type name="VkColorSpaceKHR" category="enum"/> + <type name="VkCompositeAlphaFlagBitsKHR" category="enum"/> + <type name="VkDisplayPlaneAlphaFlagBitsKHR" category="enum"/> + <type name="VkPresentModeKHR" category="enum"/> + <type name="VkSurfaceTransformFlagBitsKHR" category="enum"/> + <type name="VkDebugReportFlagBitsEXT" category="enum"/> + <type name="VkDebugReportObjectTypeEXT" category="enum"/> + <type name="VkDebugReportErrorEXT" category="enum"/> + + <!-- The PFN_vk*Function types are used by VkAllocationCallbacks below --> + <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkInternalAllocationNotification</name>)( + <type>void</type>* pUserData, + <type>size_t</type> size, + <type>VkInternalAllocationType</type> allocationType, + <type>VkSystemAllocationScope</type> allocationScope);</type> + <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkInternalFreeNotification</name>)( + <type>void</type>* pUserData, + <type>size_t</type> size, + <type>VkInternalAllocationType</type> allocationType, + <type>VkSystemAllocationScope</type> allocationScope);</type> + <type category="funcpointer">typedef void* (VKAPI_PTR *<name>PFN_vkReallocationFunction</name>)( + <type>void</type>* pUserData, + <type>void</type>* pOriginal, + <type>size_t</type> size, + <type>size_t</type> alignment, + <type>VkSystemAllocationScope</type> allocationScope);</type> + <type category="funcpointer">typedef void* (VKAPI_PTR *<name>PFN_vkAllocationFunction</name>)( + <type>void</type>* pUserData, + <type>size_t</type> size, + <type>size_t</type> alignment, + <type>VkSystemAllocationScope</type> allocationScope);</type> + <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkFreeFunction</name>)( + <type>void</type>* pUserData, + <type>void</type>* pMemory);</type> + + <!-- The PFN_vkVoidFunction type are used by VkGet*ProcAddr below --> + <type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkVoidFunction</name>)(void);</type> + + <!-- The PFN_vkDebugReportCallbackEXT type are used by the DEBUG_REPORT extension--> + <type category="funcpointer">typedef VkBool32 (VKAPI_PTR *<name>PFN_vkDebugReportCallbackEXT</name>)( + <type>VkDebugReportFlagsEXT</type> flags, + <type>VkDebugReportObjectTypeEXT</type> objectType, + <type>uint64_t</type> object, + <type>size_t</type> location, + <type>int32_t</type> messageCode, + const <type>char</type>* pLayerPrefix, + const <type>char</type>* pMessage, + <type>void</type>* pUserData);</type> + + <!-- Struct types --> + <type category="struct" name="VkOffset2D"> + <member><type>int32_t</type> <name>x</name></member> + <member><type>int32_t</type> <name>y</name></member> + </type> + <type category="struct" name="VkOffset3D"> + <member><type>int32_t</type> <name>x</name></member> + <member><type>int32_t</type> <name>y</name></member> + <member><type>int32_t</type> <name>z</name></member> + </type> + <type category="struct" name="VkExtent2D"> + <member><type>uint32_t</type> <name>width</name></member> + <member><type>uint32_t</type> <name>height</name></member> + </type> + <type category="struct" name="VkExtent3D"> + <member><type>uint32_t</type> <name>width</name></member> + <member><type>uint32_t</type> <name>height</name></member> + <member><type>uint32_t</type> <name>depth</name></member> + </type> + <type category="struct" name="VkViewport"> + <member><type>float</type> <name>x</name></member> + <member><type>float</type> <name>y</name></member> + <member><type>float</type> <name>width</name></member> + <member><type>float</type> <name>height</name></member> + <member><type>float</type> <name>minDepth</name></member> + <member><type>float</type> <name>maxDepth</name></member> + <validity> + <usage>pname:width must: be greater than `0.0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxViewportDimensions[0]</usage> + <usage>pname:height must: be greater than `0.0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxViewportDimensions[1]</usage> + <usage>pname:x and pname:y must: each be between pname:viewportBoundsRange[0] and pname:viewportBoundsRange[1], inclusive</usage> + <usage>pname:x + pname:width must: be less than or equal to pname:viewportBoundsRange[1]</usage> + <usage>pname:y + pname:height must: be less than or equal to pname:viewportBoundsRange[1]</usage> + <usage>pname:minDepth must: be between `0.0` and `1.0`, inclusive</usage> + <usage>pname:maxDepth must: be between `0.0` and `1.0`, inclusive</usage> + </validity> + </type> + <type category="struct" name="VkRect2D"> + <member><type>VkOffset2D</type> <name>offset</name></member> + <member><type>VkExtent2D</type> <name>extent</name></member> + </type> + <type category="struct" name="VkRect3D"> + <member><type>VkOffset3D</type> <name>offset</name></member> + <member><type>VkExtent3D</type> <name>extent</name></member> + </type> + <type category="struct" name="VkClearRect"> + <member><type>VkRect2D</type> <name>rect</name></member> + <member><type>uint32_t</type> <name>baseArrayLayer</name></member> + <member><type>uint32_t</type> <name>layerCount</name></member> + </type> + <type category="struct" name="VkComponentMapping"> + <member><type>VkComponentSwizzle</type> <name>r</name></member> + <member><type>VkComponentSwizzle</type> <name>g</name></member> + <member><type>VkComponentSwizzle</type> <name>b</name></member> + <member><type>VkComponentSwizzle</type> <name>a</name></member> + </type> + <type category="struct" name="VkPhysicalDeviceProperties" returnedonly="true"> + <member><type>uint32_t</type> <name>apiVersion</name></member> + <member><type>uint32_t</type> <name>driverVersion</name></member> + <member><type>uint32_t</type> <name>vendorID</name></member> + <member><type>uint32_t</type> <name>deviceID</name></member> + <member><type>VkPhysicalDeviceType</type> <name>deviceType</name></member> + <member><type>char</type> <name>deviceName</name>[<enum>VK_MAX_PHYSICAL_DEVICE_NAME_SIZE</enum>]</member> + <member><type>uint8_t</type> <name>pipelineCacheUUID</name>[<enum>VK_UUID_SIZE</enum>]</member> + <member><type>VkPhysicalDeviceLimits</type> <name>limits</name></member> + <member><type>VkPhysicalDeviceSparseProperties</type> <name>sparseProperties</name></member> + </type> + <type category="struct" name="VkExtensionProperties" returnedonly="true"> + <member><type>char</type> <name>extensionName</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member> <!-- extension name --> + <member><type>uint32_t</type> <name>specVersion</name></member> <!-- version of the extension specification implemented --> + </type> + <type category="struct" name="VkLayerProperties" returnedonly="true"> + <member><type>char</type> <name>layerName</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member> <!-- layer name --> + <member><type>uint32_t</type> <name>specVersion</name></member> <!-- version of the layer specification implemented --> + <member><type>uint32_t</type> <name>implementationVersion</name></member> <!-- build or release version of the layer's library --> + <member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member> <!-- Free-form description of the layer --> + </type> + <type category="struct" name="VkApplicationInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Type of structure. Should be VK_STRUCTURE_TYPE_APPLICATION_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true" len="null-terminated">const <type>char</type>* <name>pApplicationName</name></member> + <member><type>uint32_t</type> <name>applicationVersion</name></member> + <member optional="true" len="null-terminated">const <type>char</type>* <name>pEngineName</name></member> + <member><type>uint32_t</type> <name>engineVersion</name></member> + <member><type>uint32_t</type> <name>apiVersion</name></member> + <validity> + <usage>pname:apiVersion must: be a version that the implementation supports, or supports an effective substitute for</usage> + </validity> + </type> + <type category="struct" name="VkAllocationCallbacks"> + <member optional="true"><type>void</type>* <name>pUserData</name></member> + <member><type>PFN_vkAllocationFunction</type> <name>pfnAllocation</name></member> + <member><type>PFN_vkReallocationFunction</type> <name>pfnReallocation</name></member> + <member><type>PFN_vkFreeFunction</type> <name>pfnFree</name></member> + <member optional="true"><type>PFN_vkInternalAllocationNotification</type> <name>pfnInternalAllocation</name></member> + <member optional="true"><type>PFN_vkInternalFreeNotification</type> <name>pfnInternalFree</name></member> + <validity> + <usage>pname:pfnAllocation must: be a pointer to a valid user-defined PFN_vkAllocationFunction</usage> + <usage>pname:pfnReallocation must: be a pointer to a valid user-defined PFN_vkReallocationFunction</usage> + <usage>pname:pfnFree must: be a pointer to a valid user-defined PFN_vkFreeFunction</usage> + <usage>If either of pname:pfnInternalAllocatione or pname:pfnInternalFree is not `NULL`, both must: be valid callbacks</usage> + </validity> + </type> + <type category="struct" name="VkDeviceQueueCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Should be VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDeviceQueueCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>queueFamilyIndex</name></member> + <member><type>uint32_t</type> <name>queueCount</name></member> + <member len="queueCount">const <type>float</type>* <name>pQueuePriorities</name></member> + <validity> + <usage>pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties</usage> + <usage>pname:queueCount must: be less than or equal to the value of the pname:queueCount member of the sname:VkQueueFamilyProperties structure, as returned by fname:vkGetPhysicalDeviceQueueFamilyProperties in the pname:pQueueFamilyProperties[pname:queueFamilyIndex]</usage> + <usage>The value of any given element of pname:pQueuePriorities must: be between `0.0` and `1.0` inclusive</usage> + </validity> + </type> + <type category="struct" name="VkDeviceCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Should be VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDeviceCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>queueCreateInfoCount</name></member> + <member len="queueCreateInfoCount">const <type>VkDeviceQueueCreateInfo</type>* <name>pQueueCreateInfos</name></member> + <member optional="true"><type>uint32_t</type> <name>enabledLayerCount</name></member> + <member optional="true" len="enabledLayerCount,null-terminated">const <type>char</type>* const* <name>ppEnabledLayerNames</name></member> <!-- Ordered list of layer names to be enabled --> + <member optional="true"><type>uint32_t</type> <name>enabledExtensionCount</name></member> + <member optional="true" len="enabledExtensionCount,null-terminated">const <type>char</type>* const* <name>ppEnabledExtensionNames</name></member> + <member>const <type>VkPhysicalDeviceFeatures</type>* <name>pEnabledFeatures</name></member> + <validity> + <usage>Any given element of pname:ppEnabledLayerNames must: be the name of a layer present on the system, exactly matching a string returned in the sname:VkLayerProperties structure by fname:vkEnumerateDeviceLayerProperties</usage> + <usage>Any given element of pname:ppEnabledExtensionNames must: be the name of an extension present on the system, exactly matching a string returned in the sname:VkExtensionProperties structure by fname:vkEnumerateDeviceExtensionProperties</usage> + <usage>If an extension listed in pname:ppEnabledExtensionNames is provided as part of a layer, then both the layer and extension must: be enabled to enable that extension</usage> + <usage>The pname:queueFamilyIndex member of any given element of pname:pQueueCreateInfos must: be unique within pname:pQueueCreateInfos</usage> + </validity> + </type> + <type category="struct" name="VkInstanceCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Should be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkInstanceCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true">const <type>VkApplicationInfo</type>* <name>pApplicationInfo</name></member> + <member optional="true"><type>uint32_t</type> <name>enabledLayerCount</name></member> + <member len="enabledLayerCount,null-terminated">const <type>char</type>* const* <name>ppEnabledLayerNames</name></member> <!-- Ordered list of layer names to be enabled --> + <member optional="true"><type>uint32_t</type> <name>enabledExtensionCount</name></member> + <member len="enabledExtensionCount,null-terminated">const <type>char</type>* const* <name>ppEnabledExtensionNames</name></member> <!-- Extension names to be enabled --> + <validity> + <usage>Any given element of pname:ppEnabledLayerNames must: be the name of a layer present on the system, exactly matching a string returned in the sname:VkLayerProperties structure by fname:vkEnumerateInstanceLayerProperties</usage> + <usage>Any given element of pname:ppEnabledExtensionNames must: be the name of an extension present on the system, exactly matching a string returned in the sname:VkExtensionProperties structure by fname:vkEnumerateInstanceExtensionProperties</usage> + <usage>If an extension listed in pname:ppEnabledExtensionNames is provided as part of a layer, then both the layer and extension must: be enabled to enable that extension</usage> + </validity> + </type> + <type category="struct" name="VkQueueFamilyProperties" returnedonly="true"> + <member optional="true"><type>VkQueueFlags</type> <name>queueFlags</name></member> <!-- Queue flags --> + <member><type>uint32_t</type> <name>queueCount</name></member> + <member><type>uint32_t</type> <name>timestampValidBits</name></member> + <member><type>VkExtent3D</type> <name>minImageTransferGranularity</name></member> <!-- Minimum alignment requirement for image transfers --> + </type> + <type category="struct" name="VkPhysicalDeviceMemoryProperties" returnedonly="true"> + <member><type>uint32_t</type> <name>memoryTypeCount</name></member> + <member><type>VkMemoryType</type> <name>memoryTypes</name>[<enum>VK_MAX_MEMORY_TYPES</enum>]</member> + <member><type>uint32_t</type> <name>memoryHeapCount</name></member> + <member><type>VkMemoryHeap</type> <name>memoryHeaps</name>[<enum>VK_MAX_MEMORY_HEAPS</enum>]</member> + </type> + <type category="struct" name="VkMemoryAllocateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDeviceSize</type> <name>allocationSize</name></member> <!-- Size of memory allocation --> + <member><type>uint32_t</type> <name>memoryTypeIndex</name></member> <!-- Index of the of the memory type to allocate from --> + <validity> + <usage>The value of pname:allocationSize must: be less than or equal to the amount of memory available to the sname:VkMemoryHeap specified by pname:memoryTypeIndex and the calling command's sname:VkDevice</usage> + <usage>The value of pname:allocationSize must: be greater than `0`</usage> + </validity> + </type> + <type category="struct" name="VkMemoryRequirements" returnedonly="true"> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>alignment</name></member> <!-- Specified in bytes --> + <member><type>uint32_t</type> <name>memoryTypeBits</name></member> <!-- Bitfield of the allowed memory type indices into memoryTypes[] for this object --> + </type> + <type category="struct" name="VkSparseImageFormatProperties" returnedonly="true"> + <member optional="true"><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>VkExtent3D</type> <name>imageGranularity</name></member> + <member optional="true"><type>VkSparseImageFormatFlags</type> <name>flags</name></member> + </type> + <type category="struct" name="VkSparseImageMemoryRequirements" returnedonly="true"> + <member><type>VkSparseImageFormatProperties</type> <name>formatProperties</name></member> + <member><type>uint32_t</type> <name>imageMipTailFirstLod</name></member> + <member><type>VkDeviceSize</type> <name>imageMipTailSize</name></member> <!-- Specified in bytes, must be a multiple of image block size / alignment --> + <member><type>VkDeviceSize</type> <name>imageMipTailOffset</name></member> <!-- Specified in bytes, must be a multiple of image block size / alignment --> + <member><type>VkDeviceSize</type> <name>imageMipTailStride</name></member> <!-- Specified in bytes, must be a multiple of image block size / alignment --> + </type> + <type category="struct" name="VkMemoryType" returnedonly="true"> + <member optional="true"><type>VkMemoryPropertyFlags</type> <name>propertyFlags</name></member> <!-- Memory properties of this memory type --> + <member><type>uint32_t</type> <name>heapIndex</name></member> <!-- Index of the memory heap allocations of this memory type are taken from --> + </type> + <type category="struct" name="VkMemoryHeap" returnedonly="true"> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Available memory in the heap--> + <member optional="true"><type>VkMemoryHeapFlags</type> <name>flags</name></member> <!-- Flags for the heap--> + </type> + <type category="struct" name="VkMappedMemoryRange"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDeviceMemory</type> <name>memory</name></member> <!-- Mapped memory object --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Offset within the mapped memory the range starts from --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Size of the range within the mapped memory --> + <validity> + <usage>pname:memory must: currently be mapped</usage> + <usage>pname:offset must: be less than the size of the currently mapped range of pname:memory</usage> + <usage>If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:size must: be less than or equal to the size of the currently mapped range of pname:memory</usage> + <usage>pname:offset and pname:size must: each be a multiple of sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize</usage> + </validity> + </type> + <type category="struct" name="VkFormatProperties" returnedonly="true"> + <member optional="true"><type>VkFormatFeatureFlags</type> <name>linearTilingFeatures</name></member> <!-- Format features in case of linear tiling --> + <member optional="true"><type>VkFormatFeatureFlags</type> <name>optimalTilingFeatures</name></member> <!-- Format features in case of optimal tiling --> + <member optional="true"><type>VkFormatFeatureFlags</type> <name>bufferFeatures</name></member> <!-- Format features supported by buffers --> + </type> + <type category="struct" name="VkImageFormatProperties" returnedonly="true"> + <member><type>VkExtent3D</type> <name>maxExtent</name></member> <!-- max image dimensions for this resource type --> + <member><type>uint32_t</type> <name>maxMipLevels</name></member> <!-- max number of mipmap levels for this resource type --> + <member><type>uint32_t</type> <name>maxArrayLayers</name></member> <!-- max array size for this resource type --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampleCounts</name></member> <!-- supported sample counts for this resource type --> + <member><type>VkDeviceSize</type> <name>maxResourceSize</name></member> <!-- max size (in bytes) of this resource type --> + </type> + <type category="struct" name="VkDescriptorBufferInfo"> + <member><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer used for this descriptor slot when the descriptor is UNIFORM_BUFFER[_DYNAMIC] or STORAGE_BUFFER[_DYNAMIC]. VK_NULL_HANDLE otherwise. --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Base offset from buffer start in bytes to update in the descriptor set. --> + <member><type>VkDeviceSize</type> <name>range</name></member> <!-- Size in bytes of the buffer resource for this descriptor update. --> + <validity> + <usage>If pname:range is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:range must: be less than or equal to the size of pname:buffer</usage> + </validity> + </type> + <type category="struct" name="VkDescriptorImageInfo"> + <member noautovalidity="true"><type>VkSampler</type> <name>sampler</name></member> <!-- Sampler to write to the descriptor in case it's a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor. Ignored otherwise. --> + <member noautovalidity="true"><type>VkImageView</type> <name>imageView</name></member> <!-- Image view to write to the descriptor in case it's a SAMPLED_IMAGE, STORAGE_IMAGE, COMBINED_IMAGE_SAMPLER, or INPUT_ATTACHMENT descriptor. Ignored otherwise. --> + <member noautovalidity="true"><type>VkImageLayout</type> <name>imageLayout</name></member> <!-- Layout the image is expected to be in when accessed using this descriptor (only used if imageView is not VK_NULL_HANDLE). --> + </type> + <type category="struct" name="VkWriteDescriptorSet"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDescriptorSet</type> <name>dstSet</name></member> <!-- Destination descriptor set --> + <member><type>uint32_t</type> <name>dstBinding</name></member> <!-- Binding within the destination descriptor set to write --> + <member><type>uint32_t</type> <name>dstArrayElement</name></member> <!-- Array element within the destination binding to write --> + <member><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors to write (determines the size of the array pointed by pDescriptors) --> + <member><type>VkDescriptorType</type> <name>descriptorType</name></member> <!-- Descriptor type to write (determines which members of the array pointed by pDescriptors are going to be used) --> + <member noautovalidity="true" len="descriptorCount">const <type>VkDescriptorImageInfo</type>* <name>pImageInfo</name></member> <!-- Sampler, image view, and layout for SAMPLER, COMBINED_IMAGE_SAMPLER, {SAMPLED,STORAGE}_IMAGE, and INPUT_ATTACHMENT descriptor types. --> + <member noautovalidity="true" len="descriptorCount">const <type>VkDescriptorBufferInfo</type>* <name>pBufferInfo</name></member> <!-- Raw buffer, size, and offset for {UNIFORM,STORAGE}_BUFFER[_DYNAMIC] descriptor types. --> + <member noautovalidity="true" len="descriptorCount">const <type>VkBufferView</type>* <name>pTexelBufferView</name></member> <!-- Buffer view to write to the descriptor for {UNIFORM,STORAGE}_TEXEL_BUFFER descriptor types. --> + <validity> + <usage>pname:dstBinding must: be a valid binding point within pname:dstSet</usage> + <usage>pname:descriptorType must: match the type of pname:dstBinding within pname:dstSet</usage> + <usage>The sum of pname:dstArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:dstBinding, and all applicable consecutive bindings, as described by <<descriptorsets-updates-consecutive>></usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pname:pImageInfo must: be a pointer to an array of pname:descriptorCount valid sname:VkDescriptorImageInfo structures</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pname:pTexelBufferView must: be a pointer to an array of pname:descriptorCount valid sname:VkBufferView handles</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pname:pBufferInfo must: be a pointer to an array of pname:descriptorCount valid sname:VkDescriptorBufferInfo structures</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:dstSet was not created with a layout that included immutable samplers for pname:dstBinding with pname:descriptorType, the pname:sampler member of any given element of pname:pImageInfo must: be a valid sname:VkSampler object</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the pname:imageView and pname:imageLayout members of any given element of pname:pImageInfo must: be a valid sname:VkImageView and elink:VkImageLayout, respectively</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:offset member of any given element of pname:pBufferInfo must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minUniformBufferOffsetAlignment</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:offset member of any given element of pname:pBufferInfo must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:buffer member of any given element of pname:pBufferInfo must: have been created with ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT set</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:buffer member of any given element of pname:pBufferInfo must: have been created with ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT set</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:range member of any given element of pname:pBufferInfo must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxUniformBufferRange</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:range member of any given element of pname:pBufferInfo must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxStorageBufferRange</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, the sname:VkBuffer that pname:pTexelBufferView was created from must: have been created with ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT set</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the sname:VkBuffer that pname:pTexelBufferView was created from must: have been created with ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set</usage> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the pname:imageView must: have been created with identity swizzle</usage> + </validity> + </type> + <type category="struct" name="VkCopyDescriptorSet"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDescriptorSet</type> <name>srcSet</name></member> <!-- Source descriptor set --> + <member><type>uint32_t</type> <name>srcBinding</name></member> <!-- Binding within the source descriptor set to copy from --> + <member><type>uint32_t</type> <name>srcArrayElement</name></member> <!-- Array element within the source binding to copy from --> + <member><type>VkDescriptorSet</type> <name>dstSet</name></member> <!-- Destination descriptor set --> + <member><type>uint32_t</type> <name>dstBinding</name></member> <!-- Binding within the destination descriptor set to copy to --> + <member><type>uint32_t</type> <name>dstArrayElement</name></member> <!-- Array element within the destination binding to copy to --> + <member><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors to write (determines the size of the array pointed by pDescriptors) --> + <validity> + <usage>pname:srcBinding must: be a valid binding within pname:srcSet</usage> + <usage>The sum of pname:srcArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:srcBinding, and all applicable consecutive bindings, as described by <<descriptorsets-updates-consecutive>></usage> + <usage>pname:dstBinding must: be a valid binding within pname:dstSet</usage> + <usage>The sum of pname:dstArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:dstBinding, and all applicable consecutive bindings, as described by <<descriptorsets-updates-consecutive>></usage> + </validity> + </type> + <type category="struct" name="VkBufferCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkBufferCreateFlags</type> <name>flags</name></member> <!-- Buffer creation flags --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + <member><type>VkBufferUsageFlags</type> <name>usage</name></member> <!-- Buffer usage flags --> + <member><type>VkSharingMode</type> <name>sharingMode</name></member> + <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member> + <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member> + <validity> + <usage>The value of pname:size must: be greater than `0`</usage> + <usage>If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:pQueueFamilyIndices must: be a pointer to an array of pname:queueFamilyIndexCount basetype:uint32_t values</usage> + <usage>If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:queueFamilyIndexCount must: be greater than `1`</usage> + <usage>If the <<features-features-sparseBinding,sparse bindings>> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT</usage> + <usage>If the <<features-features-sparseResidencyBuffer,sparse buffer residency>> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT</usage> + <usage>If the <<features-features-sparseResidencyAliased,sparse aliased residency>> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT</usage> + <usage>If pname:flags contains ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must: also contain at least one of ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT</usage> + </validity> + </type> + <type category="struct" name="VkBufferViewCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkBufferViewCreateFlags</type><name>flags</name></member> <!-- Reserved --> + <member><type>VkBuffer</type> <name>buffer</name></member> + <member><type>VkFormat</type> <name>format</name></member> <!-- Optionally specifies format of elements --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>range</name></member> <!-- View size specified in bytes --> + <validity> + <usage>The value of pname:offset must: be a multiple of sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment</usage> + <usage>The value of pname:range must: be greater than `0`</usage> + <usage>If pname:range is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:range must: be less than or equal to the size of pname:buffer</usage> + <usage>If pname:range is not equal to ename:VK_WHOLE_SIZE, the value of pname:range must: be a multiple of the element size of pname:format</usage> + <usage>The value of pname:range, divided by the size of an element of pname:format, must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxTexelBufferElements</usage> + <usage>pname:buffer must: have been created with a pname:usage value containing at least one of ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT</usage> + <usage>If pname:buffer was created with pname:usage containing ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, pname:format must: be supported for uniform texel buffers, as specified by the ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:buffer was created with pname:usage containing ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:format must: be supported for storage texel buffers, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + </validity> + </type> + <type category="struct" name="VkImageSubresource"> + <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>uint32_t</type> <name>mipLevel</name></member> + <member><type>uint32_t</type> <name>arrayLayer</name></member> + <validity> + <usage>pname:mipLevel must: be less than the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created</usage> + <usage>pname:arrayLayer must: be less than the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created</usage> + </validity> + </type> + <type category="struct" name="VkImageSubresourceLayers"> + <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>uint32_t</type> <name>mipLevel</name></member> + <member><type>uint32_t</type> <name>baseArrayLayer</name></member> + <member><type>uint32_t</type> <name>layerCount</name></member> + <validity> + <usage>If pname:aspectMask contains ename:VK_IMAGE_ASPECT_COLOR_BIT, it mustnot: contain either of ename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT</usage> + <usage>pname:aspectMask mustnot: contain ename:VK_IMAGE_ASPECT_METADATA_BIT</usage> + <usage>pname:mipLevel must: be less than the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created</usage> + <usage>latexmath:[$(baseArrayLayer + layerCount)$] must: be less than or equal to the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created</usage> + </validity> + </type> + <type category="struct" name="VkImageSubresourceRange"> + <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>uint32_t</type> <name>baseMipLevel</name></member> + <member><type>uint32_t</type> <name>levelCount</name></member> + <member><type>uint32_t</type> <name>baseArrayLayer</name></member> + <member><type>uint32_t</type> <name>layerCount</name></member> + <validity> + <usage>latexmath:[$(baseMipLevel + levelCount)$] must: be less than or equal to the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created</usage> + <usage>latexmath:[$(baseArrayLayer + layerCount)$] must: be less than or equal to the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created</usage> + </validity> + </type> + <type category="struct" name="VkMemoryBarrier"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_MEMORY_BARRIER --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize --> + <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize --> + </type> + <type category="struct" name="VkBufferMemoryBarrier"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize --> + <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize --> + <member><type>uint32_t</type> <name>srcQueueFamilyIndex</name></member> <!-- Queue family to transition ownership from --> + <member><type>uint32_t</type> <name>dstQueueFamilyIndex</name></member> <!-- Queue family to transition ownership to --> + <member><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer to sync --> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Offset within the buffer to sync --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Amount of bytes to sync --> + <validity> + <usage>The value of pname:offset must: be less than the size of pname:buffer</usage> + <usage>The sum of pname:offset and pname:size must: be less than or equal to than the size of pname:buffer</usage> + <usage>If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_CONCURRENT, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: both be VK_QUEUE_FAMILY_IGNORED</usage> + <usage>If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see <<devsandqueues-queueprops>>)</usage> + <usage>If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex are valid queue families, at least one of them must: be the same as the family of the queue that will execute this barrier</usage> + </validity> + </type> + <type category="struct" name="VkImageMemoryBarrier"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize --> + <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize --> + <member><type>VkImageLayout</type> <name>oldLayout</name></member> <!-- Current layout of the image --> + <member><type>VkImageLayout</type> <name>newLayout</name></member> <!-- New layout to transition the image to --> + <member><type>uint32_t</type> <name>srcQueueFamilyIndex</name></member> <!-- Queue family to transition ownership from --> + <member><type>uint32_t</type> <name>dstQueueFamilyIndex</name></member> <!-- Queue family to transition ownership to --> + <member><type>VkImage</type> <name>image</name></member> <!-- Image to sync --> + <member><type>VkImageSubresourceRange</type> <name>subresourceRange</name></member> <!-- Subresource range to sync --> + <validity> + <usage>pname:oldLayout must: be ename:VK_IMAGE_LAYOUT_UNDEFINED, ename:VK_IMAGE_LAYOUT_PREINITIALIZED or the current layout of the image region affected by the barrier</usage> + <usage>pname:newLayout mustnot: be ename:VK_IMAGE_LAYOUT_UNDEFINED or ename:VK_IMAGE_LAYOUT_PREINITIALIZED</usage> + <usage>If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_CONCURRENT, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: both be VK_QUEUE_FAMILY_IGNORED</usage> + <usage>If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see <<devsandqueues-queueprops>>)</usage> + <usage>If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex are valid queue families, at least one of them must: be the same as the family of the queue that will execute this barrier</usage> + <usage>pname:subresourceRange must: be a valid subresource range for the image (see <<resources-image-views>>)</usage> + <usage>If pname:image has a depth/stencil format with both depth and stencil components, then pname:aspectMask member of pname:subresourceRange must: include both ename:VK_IMAGE_ASPECT_DEPTH_BIT and ename:VK_IMAGE_ASPECT_STENCIL_BIT</usage> + </validity> + </type> + <type category="struct" name="VkImageCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>VkImageCreateFlags</type> <name>flags</name></member> <!-- Image creation flags --> + <member><type>VkImageType</type> <name>imageType</name></member> + <member><type>VkFormat</type> <name>format</name></member> + <member><type>VkExtent3D</type> <name>extent</name></member> + <member><type>uint32_t</type> <name>mipLevels</name></member> + <member><type>uint32_t</type> <name>arrayLayers</name></member> + <member><type>VkSampleCountFlagBits</type> <name>samples</name></member> + <member><type>VkImageTiling</type> <name>tiling</name></member> + <member><type>VkImageUsageFlags</type> <name>usage</name></member> <!-- Image usage flags --> + <member><type>VkSharingMode</type> <name>sharingMode</name></member> <!-- Cross-queue-family sharing mode --> + <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member> <!-- Number of queue families to share across --> + <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member> <!-- Array of queue family indices to share across --> + <member><type>VkImageLayout</type> <name>initialLayout</name></member> <!-- Initial image layout for all subresources --> + <validity> + <usage>If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:pQueueFamilyIndices must: be a pointer to an array of pname:queueFamilyIndexCount basetype:uint32_t values</usage> + <usage>If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:queueFamilyIndexCount must: be greater than `1`</usage> + <usage>pname:format mustnot: be ename:VK_FORMAT_UNDEFINED</usage> + <usage>The values of the pname:width, pname:height and pname:depth members of pname:extent must: all be greater than `0`</usage> + <usage>The value of pname:mipLevels must: be greater than `0`</usage> + <usage>The value of pname:arrayLayers must: be greater than `0`</usage> + <usage>If pname:imageType is ename:VK_IMAGE_TYPE_1D, the value of pname:extent.width must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension1D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher</usage> + <usage>If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags does not contain ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension2D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher</usage> + <usage>If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimensionCube, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher</usage> + <usage>If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be equal</usage> + <usage>If pname:imageType is ename:VK_IMAGE_TYPE_3D, the value of pname:extent.width, pname:extent.height and pname:extent.depth must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension3D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height/depth (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher</usage> + <usage>The value of pname:mipLevels must: be less than or equal to or equal to the value of latexmath:[$\lfloor\log_2(\max(\mathit{extent.width}, \mathit{extent.height}, \mathit{extent.depth}))\rfloor + 1$]</usage> + <usage>If the values of any of pname:extent.width, pname:extent.height or pname:extent.depth are greater than the values of the equivalently named members of sname:VkPhysicalDeviceLimits::pname:maxImageDimension3D, pname:mipLevels must: be less than or equal to the value of sname:VkImageFormatProperties::pname:maxMipLevels (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure)</usage> + <usage>If the values of any of pname:extent.width, pname:extent.height or pname:extent.depth are greater than the values of the equivalently named members of sname:VkPhysicalDeviceLimits::pname:maxImageDimension3D, (pname:extent.width * pname:extent.height * pname:extent.depth) must: be less than or equal to the value of sname:VkImageFormatProperties::pname:maxResourceSize (as returned by flink:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure)</usage> + <usage>The value of pname:arrayLayers must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageArrayLayers, or the value of sname:VkImageFormatProperties::pname:maxArrayLayers (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher</usage> + <usage>The value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:sampleCounts returned by flink:vkGetPhysicalDeviceProperties, or the value of sname:VkImageFormatProperties::pname:maxExtent.sampleCounts returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, the value of pname:extent.width must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferWidth</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, the value of pname:extent.height must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferHeight</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferColorSamples</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and pname:format includes a depth aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferDepthSamples</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and pname:format includes a stencil aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferStencilSamples</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format includes a color aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageColorSamples</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format includes a depth aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageDepthSamples</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format is an integer format, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageIntegerSamples</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_STORAGE_BIT, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxStorageImageSamples</usage> + <usage>If the <<features-features-textureCompressionETC2,ETC2 texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, ename:VK_FORMAT_EAC_R11_UNORM_BLOCK, ename:VK_FORMAT_EAC_R11_SNORM_BLOCK, ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK, or ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK</usage> + <usage>If the <<features-features-textureCompressionASTC_LDR,ASTC LDR texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK, or ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK</usage> + <usage>If the <<features-features-textureCompressionBC,BC texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK, ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK, ename:VK_FORMAT_BC2_UNORM_BLOCK, ename:VK_FORMAT_BC2_SRGB_BLOCK, ename:VK_FORMAT_BC3_UNORM_BLOCK, ename:VK_FORMAT_BC3_SRGB_BLOCK, ename:VK_FORMAT_BC4_UNORM_BLOCK, ename:VK_FORMAT_BC4_SNORM_BLOCK, ename:VK_FORMAT_BC5_UNORM_BLOCK, ename:VK_FORMAT_BC5_SNORM_BLOCK, ename:VK_FORMAT_BC6H_UFLOAT_BLOCK, ename:VK_FORMAT_BC6H_SFLOAT_BLOCK, ename:VK_FORMAT_BC7_UNORM_BLOCK, or ename:VK_FORMAT_BC7_SRGB_BLOCK</usage> + <usage>If the <<features-features-shaderStorageImageMultisample,multisampled storage images>> feature is not enabled, and pname:usage contains ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:samples must: be ename:VK_SAMPLE_COUNT_1_BIT</usage> + <usage>If the <<features-features-sparseBinding,sparse bindings>> feature is not enabled, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT</usage> + <usage>If the <<features-features-sparseResidencyImage2D,sparse residency for 2D images>> feature is not enabled, and pname:imageType is VK_IMAGE_TYPE_2D, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT</usage> + <usage>If the <<features-features-sparseResidencyImage3D,sparse residency for 3D images>> feature is not enabled, and pname:imageType is VK_IMAGE_TYPE_3D, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT</usage> + <usage>If the <<features-features-sparseResidency2Samples,sparse residency for images with 2 samples>> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_2_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT</usage> + <usage>If the <<features-features-sparseResidency4Samples,sparse residency for images with 4 samples>> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_4_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT</usage> + <usage>If the <<features-features-sparseResidency8Samples,sparse residency for images with 8 samples>> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_8_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT</usage> + <usage>If the <<features-features-sparseResidency16Samples,sparse residency for images with 16 samples>> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_16_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT</usage> + <usage>If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_SAMPLED_BIT</usage> + <usage>If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_STORAGE_BIT</usage> + <usage>If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT</usage> + <usage>If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT</usage> + <usage>If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_SAMPLED_BIT</usage> + <usage>If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_STORAGE_BIT</usage> + <usage>If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT</usage> + <usage>If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT</usage> + <usage>If pname:flags contains ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must: also contain at least one of ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT or ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT</usage> + </validity> + </type> + <type category="struct" name="VkSubresourceLayout"> + <member><type>VkDeviceSize</type> <name>offset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>rowPitch</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>arrayPitch</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>depthPitch</name></member> <!-- Specified in bytes --> + </type> + <type category="struct" name="VkImageViewCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkImageViewCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkImage</type> <name>image</name></member> + <member><type>VkImageViewType</type> <name>viewType</name></member> + <member><type>VkFormat</type> <name>format</name></member> + <member><type>VkComponentMapping</type> <name>components</name></member> + <member><type>VkImageSubresourceRange</type> <name>subresourceRange</name></member> + <validity> + <usage>If pname:image was not created with ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT then pname:viewType mustnot: be ename:VK_IMAGE_VIEW_TYPE_CUBE or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY</usage> + <usage>If the <<features-features-imageCubeArray,image cubemap arrays>> feature is not enabled, pname:viewType mustnot: be ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY</usage> + <usage>If the <<features-features-textureCompressionETC2,ETC2 texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, ename:VK_FORMAT_EAC_R11_UNORM_BLOCK, ename:VK_FORMAT_EAC_R11_SNORM_BLOCK, ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK, or ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK</usage> + <usage>If the <<features-features-textureCompressionASTC_LDR,ASTC LDR texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK, or ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK</usage> + <usage>If the <<features-features-textureCompressionBC,BC texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK, ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK, ename:VK_FORMAT_BC2_UNORM_BLOCK, ename:VK_FORMAT_BC2_SRGB_BLOCK, ename:VK_FORMAT_BC3_UNORM_BLOCK, ename:VK_FORMAT_BC3_SRGB_BLOCK, ename:VK_FORMAT_BC4_UNORM_BLOCK, ename:VK_FORMAT_BC4_SNORM_BLOCK, ename:VK_FORMAT_BC5_UNORM_BLOCK, ename:VK_FORMAT_BC5_SNORM_BLOCK, ename:VK_FORMAT_BC6H_UFLOAT_BLOCK, ename:VK_FORMAT_BC6H_SFLOAT_BLOCK, ename:VK_FORMAT_BC7_UNORM_BLOCK, or ename:VK_FORMAT_BC7_SRGB_BLOCK</usage> + <usage>If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_SAMPLED_BIT, pname:format must: be supported for sampled images, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:format must: be supported for storage images, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, pname:format must: be supported for color attachments, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:format must: be supported for depth/stencil attachments, as specified by the ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_SAMPLED_BIT, pname:format must: be supported for sampled images, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:format must: be supported for storage images, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, pname:format must: be supported for color attachments, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:format must: be supported for depth/stencil attachments, as specified by the ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>pname:subresourceRange must: be a valid subresource range for pname:image (see <<resources-image-views>>)</usage> + <usage>If pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be compatible with the pname:format used to create pname:image, as defined in <<features-formats-compatibility-classes,Format Compatibility Classes>></usage> + <usage>If pname:image was not created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be identical to the pname:format used to create pname:image</usage> + <usage>pname:subResourceRange and pname:viewType must: be compatible with the image, as described in the <<resources-image-views-compatibility,table below>></usage> + </validity> + </type> + <type category="struct" name="VkBufferCopy"> + <member><type>VkDeviceSize</type> <name>srcOffset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>dstOffset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + </type> + <type category="struct" name="VkSparseMemoryBind"> + <member><type>VkDeviceSize</type> <name>resourceOffset</name></member> <!-- Specified in bytes --> + <member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes --> + <member optional="true"><type>VkDeviceMemory</type> <name>memory</name></member> + <member><type>VkDeviceSize</type> <name>memoryOffset</name></member> <!-- Specified in bytes --> + <member optional="true"><type>VkSparseMemoryBindFlags</type><name>flags</name></member> <!-- Reserved for future --> + <validity> + <usage>If pname:memory is not sname:VK_NULL_HANDLE, pname:memory and pname:memoryOffset must: match the memory requirements of the resource, as described in section <<resources-association>></usage> + <usage>If pname:memory is not sname:VK_NULL_HANDLE, pname:memory mustnot: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set</usage> + <usage>pname:resourceOffset must: be less than the size of the resource</usage> + <usage>The sum of pname:resourceOffset and pname:size must: be less than or equal to the size of the resource</usage> + <usage>pname:memoryOffset must: be less than the size of pname:memory</usage> + <usage>The sum of pname:memoryOffset and pname:size must: be less than or equal to the size of pname:memory</usage> + </validity> + </type> + <type category="struct" name="VkSparseImageMemoryBind"> + <member><type>VkImageSubresource</type> <name>subresource</name></member> + <member><type>VkOffset3D</type> <name>offset</name></member> + <member><type>VkExtent3D</type> <name>extent</name></member> + <member optional="true"><type>VkDeviceMemory</type> <name>memory</name></member> + <member><type>VkDeviceSize</type> <name>memoryOffset</name></member> <!-- Specified in bytes --> + <member optional="true"><type>VkSparseMemoryBindFlags</type><name>flags</name></member> <!-- Reserved for future --> + <validity> + <usage>If the <<features-features-sparseResidencyAliased,sparse aliased residency>> feature is not enabled, and if any other resources are bound to ranges of pname:memory, the range of pname:memory being bound mustnot: overlap with those bound ranges</usage> + <usage>pname:memory and pname:memoryOffset must: match the memory requirements of the calling command's pname:image, as described in section <<resources-association>></usage> + <usage>pname:subresource must: be a valid subresource for pname:image (see <<resources-image-views>>)</usage> + <usage>pname:offset.x must: be a multiple of the block width (sname:VkSparseImageFormatProperties::pname:imageGranularity.width) of the image</usage> + <usage>pname:extent.width must: either be a multiple of the block width of the image, or else pname:extent.width + pname:offset.x must: equal the width of the image subresource</usage> + <usage>pname:offset.y must: be a multiple of the block height (sname:VkSparseImageFormatProperties::pname:imageGranularity.height) of the image</usage> + <usage>pname:extent.height must: either be a multiple of the block height of the image, or else pname:extent.height + pname:offset.y must: equal the height of the image subresource</usage> + <usage>pname:offset.z must: be a multiple of the block depth (sname:VkSparseImageFormatProperties::pname:imageGranularity.depth) of the image</usage> + <usage>pname:extent.depth must: either be a multiple of the block depth of the image, or else pname:extent.depth + pname:offset.z must: equal the depth of the image subresource</usage> + </validity> + </type> + <type category="struct" name="VkSparseBufferMemoryBindInfo"> + <member><type>VkBuffer</type> <name>buffer</name></member> + <member><type>uint32_t</type> <name>bindCount</name></member> + <member len="bindCount">const <type>VkSparseMemoryBind</type>* <name>pBinds</name></member> + </type> + <type category="struct" name="VkSparseImageOpaqueMemoryBindInfo"> + <member><type>VkImage</type> <name>image</name></member> + <member><type>uint32_t</type> <name>bindCount</name></member> + <member len="bindCount">const <type>VkSparseMemoryBind</type>* <name>pBinds</name></member> + <validity> + <usage>For any given element of pname:pBinds, if the pname:flags member of that element contains ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT, the 'binding range' defined must: be within the mip tail region of the metadata aspect of pname:image</usage> + </validity> + </type> + <type category="struct" name="VkSparseImageMemoryBindInfo"> + <member><type>VkImage</type> <name>image</name></member> + <member><type>uint32_t</type> <name>bindCount</name></member> + <member len="bindCount">const <type>VkSparseImageMemoryBind</type>* <name>pBinds</name></member> + </type> + <type category="struct" name="VkBindSparseInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_BIND_SPARSE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. --> + <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member> + <member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member> + <member optional="true"><type>uint32_t</type> <name>bufferBindCount</name></member> + <member len="bufferBindCount">const <type>VkSparseBufferMemoryBindInfo</type>* <name>pBufferBinds</name></member> + <member optional="true"><type>uint32_t</type> <name>imageOpaqueBindCount</name></member> + <member len="imageOpaqueBindCount">const <type>VkSparseImageOpaqueMemoryBindInfo</type>* <name>pImageOpaqueBinds</name></member> + <member optional="true"><type>uint32_t</type> <name>imageBindCount</name></member> + <member len="imageBindCount">const <type>VkSparseImageMemoryBindInfo</type>* <name>pImageBinds</name></member> + <member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member> + <member len="signalSemaphoreCount">const <type>VkSemaphore</type>* <name>pSignalSemaphores</name></member> + </type> + <type category="struct" name="VkImageCopy"> + <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member> + <member><type>VkOffset3D</type> <name>srcOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member> + <member><type>VkOffset3D</type> <name>dstOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <member><type>VkExtent3D</type> <name>extent</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <validity> + <usage>The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: match</usage> + <usage>The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match</usage> + <usage>If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively</usage> + <usage>The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's pname:srcImage</usage> + <usage>The pname:aspectMask member of pname:dstSubresource must: specify aspects present in the calling command's pname:dstImage</usage> + <usage>pname:srcOffset.x and (pname:extent.width + pname:srcOffset.x) must: both be greater than or equal to `0` and less than or equal to the source image subresource width</usage> + <usage>pname:srcOffset.y and (pname:extent.height + pname:srcOffset.y) must: both be greater than or equal to `0` and less than or equal to the source image subresource height</usage> + <usage>pname:srcOffset.z and (pname:extent.depth + pname:srcOffset.z) must: both be greater than or equal to `0` and less than or equal to the source image subresource depth</usage> + <usage>pname:dstOffset.x and (pname:extent.width + pname:dstOffset.x) must: both be greater than or equal to `0` and less than or equal to the destination image subresource width</usage> + <usage>pname:dstOffset.y and (pname:extent.height + pname:dstOffset.y) must: both be greater than or equal to `0` and less than or equal to the destination image subresource height</usage> + <usage>pname:dstOffset.z and (pname:extent.depth + pname:dstOffset.z) must: both be greater than or equal to `0` and less than or equal to the destination image subresource depth</usage> + <usage>If the calling command's pname:srcImage is a compressed format image:</usage> + <usage>* all members of pname:srcOffset must: be a multiple of the block size in the relevant dimensions</usage> + <usage>* pname:extent.width must: be a multiple of the block width or (pname:extent.width + pname:srcOffset.x) must: equal the source image subresource width</usage> + <usage>* pname:extent.height must: be a multiple of the block height or (pname:extent.height + pname:srcOffset.y) must: equal the source image subresource height</usage> + <usage>* pname:extent.depth must: be a multiple of the block depth or (pname:extent.depth + pname:srcOffset.z) must: equal the source image subresource depth</usage> + <usage>If the calling command's pname:dstImage is a compressed format image:</usage> + <usage>* all members of pname:dstOffset must: be a multiple of the block size in the relevant dimensions</usage> + <usage>* pname:extent.width must: be a multiple of the block width or (pname:extent.width + pname:dstOffset.x) must: equal the destination image subresource width</usage> + <usage>* pname:extent.height must: be a multiple of the block height or (pname:extent.height + pname:dstOffset.y) must: equal the destination image subresource height</usage> + <usage>* pname:extent.depth must: be a multiple of the block depth or (pname:extent.depth + pname:dstOffset.z) must: equal the destination image subresource depth</usage> + <usage>pname:srcOffset, pname:dstOffset, and pname:extent must: respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in <<execution-physical-device-enumeration,Physical Device Enumeration>></usage> + </validity> + </type> + <type category="struct" name="VkImageBlit"> + <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member> + <member><type>VkOffset3D</type> <name>srcOffsets[2]</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member> + <member><type>VkOffset3D</type> <name>dstOffsets[2]</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <validity> + <usage>The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: match</usage> + <usage>The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match</usage> + <usage>If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively</usage> + <usage>The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's pname:srcImage</usage> + <usage>The pname:aspectMask member of pname:dstSubresource must: specify aspects present in the calling command's pname:dstImage</usage> + </validity> + </type> + <type category="struct" name="VkBufferImageCopy"> + <member><type>VkDeviceSize</type> <name>bufferOffset</name></member> <!-- Specified in bytes --> + <member><type>uint32_t</type> <name>bufferRowLength</name></member> <!-- Specified in texels --> + <member><type>uint32_t</type> <name>bufferImageHeight</name></member> + <member><type>VkImageSubresourceLayers</type> <name>imageSubresource</name></member> + <member><type>VkOffset3D</type> <name>imageOffset</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <member><type>VkExtent3D</type> <name>imageExtent</name></member> <!-- Specified in pixels for both compressed and uncompressed images --> + <validity> + <usage>pname:bufferOffset must: be a multiple of the calling command's sname:VkImage parameter's texel size</usage> + <usage>pname:bufferOffset must: be a multiple of `4`</usage> + <usage>pname:bufferRowLength must: be `0`, or greater than or equal to the pname:width member of pname:imageExtent</usage> + <usage>pname:bufferImageHeight must: be `0`, or greater than or equal to the pname:height member of pname:imageExtent</usage> + <usage>pname:imageOffset.x and (pname:imageExtent.width + pname:imageOffset.x) must: both be greater than or equal to `0` and less than or equal to the image subresource width</usage> + <usage>pname:imageOffset.y and (imageExtent.height + pname:imageOffset.y) must: both be greater than or equal to `0` and less than or equal to the image subresource height</usage> + <usage>pname:imageOffset.z and (imageExtent.depth + pname:imageOffset.z) must: both be greater than or equal to `0` and less than or equal to the image subresource depth</usage> + <usage>If the calling command's sname:VkImage parameter is a compressed format image:</usage> + <usage>* pname:bufferRowLength, pname:bufferImageHeight and all members of pname:imageOffset must: be a multiple of the block size in the relevant dimensions</usage> + <usage>* pname:bufferOffset must: be a multiple of the block size in bytes</usage> + <usage>* pname:imageExtent.width must: be a multiple of the block width or (pname:imageExtent.width + pname:imageOffset.x) must: equal the image subresource width</usage> + <usage>* pname:imageExtent.height must: be a multiple of the block height or (pname:imageExtent.height + pname:imageOffset.y) must: equal the image subresource height</usage> + <usage>* pname:imageExtent.depth must: be a multiple of the block depth or (pname:imageExtent.depth + pname:imageOffset.z) must: equal the image subresource depth</usage> + <usage>pname:bufferOffset, pname:bufferRowLength, pname:bufferImageHeight and all members of pname:imageOffset and pname:imageExtent must: respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in <<execution-physical-device-enumeration,Physical Device Enumeration>></usage> + <usage>The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's sname:VkImage parameter</usage> + <usage>The pname:aspectMask member of pname:pSubresource must: only have a single bit set</usage> + <usage>If the calling command's sname:VkImage parameter is of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively</usage> + </validity> + </type> + <type category="struct" name="VkImageResolve"> + <member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member> + <member><type>VkOffset3D</type> <name>srcOffset</name></member> + <member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member> + <member><type>VkOffset3D</type> <name>dstOffset</name></member> + <member><type>VkExtent3D</type> <name>extent</name></member> + <validity> + <usage>The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: only contain ename:VK_IMAGE_ASPECT_COLOR_BIT</usage> + <usage>The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match</usage> + <usage>If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively</usage> + </validity> + </type> + <type category="struct" name="VkShaderModuleCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkShaderModuleCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>size_t</type> <name>codeSize</name></member> <!-- Specified in bytes --> + <member len="codeSize/4">const <type>uint32_t</type>* <name>pCode</name></member> <!-- Binary code of size codeSize --> + <validity> + <usage>pname:codeSize must: be greater than 0</usage> + <usage>pname:codeSize must: be a multiple of 4</usage> + <usage>pname:pCode must: point to valid SPIR-V code, formatted and packed as described by https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html[the SPIR-V Specification v1.0]</usage> + <usage>pname:pCode must: adhere to the validation rules described by the <<spirvenv-module-validation, Validation Rules within a Module>> section of the <<spirvenv-capabilities,SPIR-V Environment>> appendix</usage> + <usage>pname:pCode must: declare the code:Shader capability</usage> + <usage>pname:pCode mustnot: declare any capability that is not supported by the API, as described by the <<spirvenv-module-validation, Capabilities>> section of the <<spirvenv-capabilities,SPIR-V Environment>> appendix</usage> + <usage>If pname:pCode declares any of the capabilities that are listed as not required by the implementation, the relevant feature must: be enabled, as listed in the <<spirvenv-capabilities-table,SPIR-V Environment>> appendix</usage> + </validity> + </type> + <type category="struct" name="VkDescriptorSetLayoutBinding"> + <member><type>uint32_t</type> <name>binding</name></member> <!-- Binding number for this entry --> + <member><type>VkDescriptorType</type> <name>descriptorType</name></member> <!-- Type of the descriptors in this binding --> + <member optional="true"><type>uint32_t</type> <name>descriptorCount</name></member> <!-- Number of descriptors in this binding --> + <member noautovalidity="true"><type>VkShaderStageFlags</type> <name>stageFlags</name></member> <!-- Shader stages this binding is visible to --> + <member noautovalidity="true" optional="true" len="descriptorCount">const <type>VkSampler</type>* <name>pImmutableSamplers</name></member> <!-- Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains count number of elements) --> + <validity> + <usage>If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:descriptorCount is not `0` and pname:pImmutableSamplers is not `NULL`, pname:pImmutableSamplers must: be a pointer to an array of pname:descriptorCount valid sname:VkSampler handles</usage> + <usage>If pname:descriptorCount is not `0`, pname:stageFlags must: be a valid combination of elink:VkShaderStageFlagBits values</usage> + </validity> + </type> + <type category="struct" name="VkDescriptorSetLayoutCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDescriptorSetLayoutCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>uint32_t</type> <name>bindingCount</name></member> <!-- Number of bindings in the descriptor set layout --> + <member len="bindingCount">const <type>VkDescriptorSetLayoutBinding</type>* <name>pBindings</name></member> <!-- Array of descriptor set layout bindings --> + </type> + <type category="struct" name="VkDescriptorPoolSize"> + <member><type>VkDescriptorType</type> <name>type</name></member> + <member><type>uint32_t</type> <name>descriptorCount</name></member> + <validity> + <usage>The value of pname:descriptorCount must: be greater than `0`</usage> + </validity> + </type> + <type category="struct" name="VkDescriptorPoolCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDescriptorPoolCreateFlags</type> <name>flags</name></member> + <member><type>uint32_t</type> <name>maxSets</name></member> + <member><type>uint32_t</type> <name>poolSizeCount</name></member> + <member len="poolSizeCount">const <type>VkDescriptorPoolSize</type>* <name>pPoolSizes</name></member> + <validity> + <usage>The value of pname:maxSets must: be greater than `0`</usage> + </validity> + </type> + <type category="struct" name="VkDescriptorSetAllocateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDescriptorPool</type> <name>descriptorPool</name></member> + <member><type>uint32_t</type> <name>descriptorSetCount</name></member> + <member len="descriptorSetCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member> + <validity> + <usage>The value of pname:descriptorSetCount mustnot: be greater than the number of sets that are currently available for allocation in pname:descriptorPool</usage> + </validity> + </type> + <type category="struct" name="VkSpecializationMapEntry"> + <member><type>uint32_t</type> <name>constantID</name></member> <!-- The SpecConstant ID specified in the BIL --> + <member><type>uint32_t</type> <name>offset</name></member> <!-- Offset of the value in the data block --> + <member><type>size_t</type> <name>size</name></member> <!-- Size in bytes of the SpecConstant --> + </type> + <type category="struct" name="VkSpecializationInfo"> + <member optional="true"><type>uint32_t</type> <name>mapEntryCount</name></member> <!-- Number of entries in the map --> + <member len="mapEntryCount">const <type>VkSpecializationMapEntry</type>* <name>pMapEntries</name></member> <!-- Array of map entries --> + <member optional="true"><type>size_t</type> <name>dataSize</name></member> <!-- Size in bytes of pData --> + <member len="dataSize">const <type>void</type>* <name>pData</name></member> <!-- Pointer to SpecConstant data --> + <validity> + <usage>The pname:offset member of any given element of pname:pMapEntries must: be less than pname:dataSize</usage> + <usage>The sum of the pname:offset and pname:size members of any given element of pname:pMapEntries must: be less than or equal to pname:dataSize</usage> + </validity> + </type> + <type category="struct" name="VkPipelineShaderStageCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineShaderStageCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkShaderStageFlagBits</type> <name>stage</name></member> <!-- Shader stage --> + <member><type>VkShaderModule</type> <name>module</name></member> <!-- Module containing entry point --> + <member len="null-terminated">const <type>char</type>* <name>pName</name></member> <!-- Null-terminated entry point name --> + <member optional="true">const <type>VkSpecializationInfo</type>* <name>pSpecializationInfo</name></member> + <validity> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:stage mustnot: be pname:VK_SHADER_STAGE_GEOMETRY_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:stage mustnot: be pname:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or pname:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT</usage> + <usage>pname:stage mustnot: be ename:VK_SHADER_STAGE_ALL_GRAPHICS, or ename:VK_SHADER_STAGE_ALL</usage> + <usage>pname:pName must: be the name of an code:OpEntryPoint in pname:module with an execution model that matches pname:stage</usage> + <usage>If the identified entry point includes any variable in its interface that is declared with the code:ClipDistance code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxClipDistances</usage> + <usage>If the identified entry point includes any variable in its interface that is declared with the code:CullDistance code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxCullDistances</usage> + <usage>If the identified entry point includes any variables in its interface that are declared with the code:ClipDistance or code:CullDistance code:BuiltIn decoration, those variables mustnot: have array sizes which sum to more than sname:VkPhysicalDeviceLimits::pname:maxCombinedClipAndCullDistances</usage> + <usage>If the identified entry point includes any variable in its interface that is declared with the code:SampleMask code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxSampleMaskWords</usage> + <usage>If pname:stage is ename:VK_SHADER_STAGE_VERTEX_BIT, the identified entry point mustnot: include any input variable in its interface that is decorated with code:CullDistance</usage> + <usage>If pname:stage is ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified entry point has an code:OpExecutionMode instruction that specifies a patch size with code:OutputVertices, the patch size must: be greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize</usage> + <usage>If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must: have an code:OpExecutionMode instruction that specifies a maximum output vertex count that is greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxGeometryOutputVertices</usage> + <usage>If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must: have an code:OpExecutionMode instruction that specifies an invocation count that is greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxGeometryShaderInvocations</usage> + <usage>If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to code:Layer for any primitive, it must: write the same value to code:Layer for all vertices of a given primitive</usage> + <usage>If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to code:ViewportIndex for any primitive, it must: write the same value to code:ViewportIndex for all vertices of a given primitive</usage> + <usage>If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, the identified entry point mustnot: include any output variables in its interface decorated with code:CullDistance</usage> + <usage>If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to code:FragDepth in any execution path, it must: write to code:FragDepth in all execution paths</usage> + </validity> + </type> + <type category="struct" name="VkComputePipelineCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name></member> <!-- Pipeline creation flags --> + <member><type>VkPipelineShaderStageCreateInfo</type> <name>stage</name></member> + <member><type>VkPipelineLayout</type> <name>layout</name></member> <!-- Interface layout of the pipeline --> + <member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of --> + <member><type>int32_t</type> <name>basePipelineIndex</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of --> + <validity> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, pname:basePipelineHandle must: be sname:VK_NULL_HANDLE</usage> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, it must: be a valid index into the calling command's pname:pCreateInfos parameter</usage> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineIndex must: be `-1`</usage> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineHandle must: be a valid sname:VkPipeline handle</usage> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, it must: be a valid handle to a compute sname:VkPipeline</usage> + <usage>The pname:stage member of pname:stage must: be ename:VK_SHADER_STAGE_COMPUTE_BIT</usage> + <usage>The shader code for the entry point identified by pname:stage and the rest of the state identified by this structure must: adhere to the pipeline linking rules described in the <<interfaces,Shader Interfaces>> chapter</usage> + <usage>pname:layout must: be <<descriptorsets-pipelinelayout-consistency,consistent>> with all shaders specified in pname:pStages</usage> + </validity> + </type> + <type category="struct" name="VkVertexInputBindingDescription"> + <member><type>uint32_t</type> <name>binding</name></member> <!-- Vertex buffer binding id --> + <member><type>uint32_t</type> <name>stride</name></member> <!-- Distance between vertices in bytes (0 = no advancement) --> + <member><type>VkVertexInputRate</type> <name>inputRate</name></member> <!-- The rate at which the vertex data is consumed --> + <validity> + <usage>pname:binding must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings</usage> + <usage>pname:stride must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindingStride</usage> + </validity> + </type> + <type category="struct" name="VkVertexInputAttributeDescription"> + <member><type>uint32_t</type> <name>location</name></member> <!-- location of the shader vertex attrib --> + <member><type>uint32_t</type> <name>binding</name></member> <!-- Vertex buffer binding id --> + <member><type>VkFormat</type> <name>format</name></member> <!-- format of source data --> + <member><type>uint32_t</type> <name>offset</name></member> <!-- Offset of first element in bytes from base of vertex --> + <validity> + <usage>pname:binding must: be less than sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings</usage> + <usage>pname:offset must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputAttributeOffset</usage> + <usage>pname:format must: be allowed as a vertex buffer format, as specified by the ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + </validity> + </type> + <type category="struct" name="VkPipelineVertexInputStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Should be VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineVertexInputStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>uint32_t</type> <name>vertexBindingDescriptionCount</name></member> <!-- number of bindings --> + <member len="vertexBindingDescriptionCount">const <type>VkVertexInputBindingDescription</type>* <name>pVertexBindingDescriptions</name></member> + <member optional="true"><type>uint32_t</type> <name>vertexAttributeDescriptionCount</name></member> <!-- number of attributes --> + <member len="vertexAttributeDescriptionCount">const <type>VkVertexInputAttributeDescription</type>* <name>pVertexAttributeDescriptions</name></member> + <validity> + <usage>pname:vertexBindingDescriptionCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings</usage> + <usage>pname:vertexAttributeDescriptionCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputAttributes</usage> + <usage>For every value of pname:binding specified by any given element of pname:pVertexAttributeDescriptions, a sname:VkVertexInputBindingDescription must: exist in pname:pVertexBindingDescriptions with the same value of pname:binding</usage> + <usage>All elements of pname:pVertexBindingDescriptions must: describe distinct binding numbers</usage> + <usage>All elements of pname:pVertexAttributeDescriptions must: describe distinct attribute locations</usage> + + </validity> + </type> + <type category="struct" name="VkPipelineInputAssemblyStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_IINPUT_ASSEMBLY_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineInputAssemblyStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkPrimitiveTopology</type> <name>topology</name></member> + <member><type>VkBool32</type> <name>primitiveRestartEnable</name></member> + <validity> + <usage>If pname:topology is ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST, ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, the value of pname:primitiveRestartEnable must: be ename:VK_FALSE</usage> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:topology mustnot: be any of ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:topology mustnot: be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST</usage> + </validity> + </type> + <type category="struct" name="VkPipelineTessellationStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineTessellationStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>patchControlPoints</name></member> + <validity> + <usage>pname:patchControlPoints must: be greater than zero and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize</usage> + </validity> + </type> + <type category="struct" name="VkPipelineViewportStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineViewportStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>viewportCount</name></member> + <member noautovalidity="true" optional="true" len="viewportCount">const <type>VkViewport</type>* <name>pViewports</name></member> + <member><type>uint32_t</type> <name>scissorCount</name></member> + <member noautovalidity="true" optional="true" len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></member> + <validity> + <usage>If the <<features-features-multiViewport,multiple viewports>> feature is not enabled, pname:viewportCount must: be `1`</usage> + <usage>If the <<features-features-multiViewport,multiple viewports>> feature is not enabled, pname:scissorCount must: be `1`</usage> + <usage>pname:viewportCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive</usage> + <usage>pname:scissorCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive</usage> + <usage>The values of pname:scissorCount and pname:viewportCount must: be identical</usage> + </validity> + </type> + <type category="struct" name="VkPipelineRasterizationStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineRasterizationStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkBool32</type> <name>depthClampEnable</name></member> + <member><type>VkBool32</type> <name>rasterizerDiscardEnable</name></member> + <member><type>VkPolygonMode</type> <name>polygonMode</name></member> <!-- optional (GL45) --> + <member optional="true"><type>VkCullModeFlags</type> <name>cullMode</name></member> + <member><type>VkFrontFace</type> <name>frontFace</name></member> + <member><type>VkBool32</type> <name>depthBiasEnable</name></member> + <member><type>float</type> <name>depthBiasConstantFactor</name></member> + <member><type>float</type> <name>depthBiasClamp</name></member> + <member><type>float</type> <name>depthBiasSlopeFactor</name></member> + <member><type>float</type> <name>lineWidth</name></member> + <validity> + <usage>If the <<features-features-depthClamp,depth clamping>> feature is not enabled, the value of pname:depthClampEnable must: be ename:VK_FALSE</usage> + <usage>If the <<features-features-fillModeNonSolid,non-solid fill modes>> feature is not enabled, the value of pname:fillMode must: be ename:VK_POLYGON_MODE_FILL</usage> + </validity> + </type> + <type category="struct" name="VkPipelineMultisampleStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineMultisampleStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkSampleCountFlagBits</type> <name>rasterizationSamples</name></member> <!-- Number of samples used for rasterization --> + <member><type>VkBool32</type> <name>sampleShadingEnable</name></member> <!-- optional (GL45) --> + <member><type>float</type> <name>minSampleShading</name></member> <!-- optional (GL45) --> + <member optional="true" len="latexmath:[$\lceil{\mathit{rasterizationSamples} \over 32}\rceil$]">const <type>VkSampleMask</type>* <name>pSampleMask</name></member> <!-- Array of sampleMask words, containing ceil(rasterSamples/32) words --> + <member><type>VkBool32</type> <name>alphaToCoverageEnable</name></member> + <member><type>VkBool32</type> <name>alphaToOneEnable</name></member> + <validity> + <usage>If the <<features-features-sampleRateShading,sample rate shading>> feature is not enabled, pname:sampleShadingEnable must: be ename:VK_FALSE</usage> + <usage>If the <<features-features-alphaToOne,alpha to one>> feature is not enabled, pname:alphaToOneEnable must: be ename:VK_FALSE</usage> + </validity> + </type> + <type category="struct" name="VkPipelineColorBlendAttachmentState"> + <member><type>VkBool32</type> <name>blendEnable</name></member> + <member><type>VkBlendFactor</type> <name>srcColorBlendFactor</name></member> + <member><type>VkBlendFactor</type> <name>dstColorBlendFactor</name></member> + <member><type>VkBlendOp</type> <name>colorBlendOp</name></member> + <member><type>VkBlendFactor</type> <name>srcAlphaBlendFactor</name></member> + <member><type>VkBlendFactor</type> <name>dstAlphaBlendFactor</name></member> + <member><type>VkBlendOp</type> <name>alphaBlendOp</name></member> + <member optional="true"><type>VkColorComponentFlags</type> <name>colorWriteMask</name></member> + <validity> + <usage>If the <<features-features-dualSrcBlend,dual source blending>> feature is not enabled, pname:srcColorBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA</usage> + <usage>If the <<features-features-dualSrcBlend,dual source blending>> feature is not enabled, pname:dstColorBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA</usage> + <usage>If the <<features-features-dualSrcBlend,dual source blending>> feature is not enabled, pname:srcAlphaBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA</usage> + <usage>If the <<features-features-dualSrcBlend,dual source blending>> feature is not enabled, pname:dstAlphaBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA</usage> + </validity> + </type> + <type category="struct" name="VkPipelineColorBlendStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineColorBlendStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkBool32</type> <name>logicOpEnable</name></member> + <member noautovalidity="true"><type>VkLogicOp</type> <name>logicOp</name></member> + <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member> <!-- # of pAttachments --> + <member len="attachmentCount">const <type>VkPipelineColorBlendAttachmentState</type>* <name>pAttachments</name></member> + <member><type>float</type> <name>blendConstants</name>[4]</member> + <validity> + <usage>If the <<features-features-independentBlend,independent blending>> feature is not enabled, all elements of pname:pAttachments must: be identical</usage> + <usage>If the <<features-features-logicOp,logic operations>> feature is not enabled, pname:logicOpEnable must: be ename:VK_FALSE</usage> + <usage>If pname:logicOpEnable is ename:VK_TRUE, pname:logicOp must: be a valid elink:VkLogicOp value</usage> + </validity> + </type> + <type category="struct" name="VkPipelineDynamicStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineDynamicStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>uint32_t</type> <name>dynamicStateCount</name></member> + <member len="dynamicStateCount">const <type>VkDynamicState</type>* <name>pDynamicStates</name></member> + </type> + <type category="struct" name="VkStencilOpState"> + <member><type>VkStencilOp</type> <name>failOp</name></member> + <member><type>VkStencilOp</type> <name>passOp</name></member> + <member><type>VkStencilOp</type> <name>depthFailOp</name></member> + <member><type>VkCompareOp</type> <name>compareOp</name></member> + <member><type>uint32_t</type> <name>compareMask</name></member> + <member><type>uint32_t</type> <name>writeMask</name></member> + <member><type>uint32_t</type> <name>reference</name></member> + </type> + <type category="struct" name="VkPipelineDepthStencilStateCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineDepthStencilStateCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkBool32</type> <name>depthTestEnable</name></member> + <member><type>VkBool32</type> <name>depthWriteEnable</name></member> + <member><type>VkCompareOp</type> <name>depthCompareOp</name></member> + <member><type>VkBool32</type> <name>depthBoundsTestEnable</name></member> <!-- optional (depth_bounds_test) --> + <member><type>VkBool32</type> <name>stencilTestEnable</name></member> + <member><type>VkStencilOpState</type> <name>front</name></member> + <member><type>VkStencilOpState</type> <name>back</name></member> + <member><type>float</type> <name>minDepthBounds</name></member> + <member><type>float</type> <name>maxDepthBounds</name></member> + <validity> + <usage>If the <<features-features-depthBounds,depth bounds testing>> feature is not enabled, the value of pname:depthBoundsTestEnable must: be ename:VK_FALSE</usage> + </validity> + </type> + <type category="struct" name="VkGraphicsPipelineCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name></member> <!-- Pipeline creation flags --> + <member><type>uint32_t</type> <name>stageCount</name></member> + <member len="stageCount">const <type>VkPipelineShaderStageCreateInfo</type>* <name>pStages</name></member> <!-- One entry for each active shader stage --> + <member>const <type>VkPipelineVertexInputStateCreateInfo</type>* <name>pVertexInputState</name></member> + <member>const <type>VkPipelineInputAssemblyStateCreateInfo</type>* <name>pInputAssemblyState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineTessellationStateCreateInfo</type>* <name>pTessellationState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineViewportStateCreateInfo</type>* <name>pViewportState</name></member> + <member>const <type>VkPipelineRasterizationStateCreateInfo</type>* <name>pRasterizationState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineMultisampleStateCreateInfo</type>* <name>pMultisampleState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineDepthStencilStateCreateInfo</type>* <name>pDepthStencilState</name></member> + <member noautovalidity="true" optional="true">const <type>VkPipelineColorBlendStateCreateInfo</type>* <name>pColorBlendState</name></member> + <member optional="true">const <type>VkPipelineDynamicStateCreateInfo</type>* <name>pDynamicState</name></member> + <member><type>VkPipelineLayout</type> <name>layout</name></member> <!-- Interface layout of the pipeline --> + <member><type>VkRenderPass</type> <name>renderPass</name></member> + <member><type>uint32_t</type> <name>subpass</name></member> + <member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of --> + <member><type>int32_t</type> <name>basePipelineIndex</name></member> <!-- If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of --> + <validity> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, pname:basePipelineHandle must: be sname:VK_NULL_HANDLE</usage> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, it must: be a valid index into the calling command's pname:pCreateInfos parameter</usage> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineIndex must: be `-1`</usage> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineHandle must: be a valid sname:VkPipeline handle</usage> + <usage>If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, it must: be a valid handle to a graphics sname:VkPipeline</usage> + <usage>pname:stageCount must: be greater than or equal to `1`</usage> + <usage>The pname:stage member of each element of pname:pStages must: be unique</usage> + <usage>The pname:stage member of one element of pname:pStages must: be ename:VK_SHADER_STAGE_VERTEX_BIT</usage> + <usage>The pname:stage member of any given element of pname:pStages mustnot: be ename:VK_SHADER_STAGE_COMPUTE_BIT</usage> + <usage>If pname:pStages includes a tessellation control shader stage, it must: include a tessellation evaluation shader stage</usage> + <usage>If pname:pStages includes a tessellation evaluation shader stage, it must: include a tessellation control shader stage</usage> + <usage>If pname:pStages includes a tessellation control shader stage and a tessellation evaluation shader stage, pname:pTessellationState mustnot: be `NULL`</usage> + <usage>If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, the shader code of at least one must: contain an code:OpExecutionMode instruction that specifies the type of subdivision in the pipeline</usage> + <usage>If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, and the shader code of both contain an code:OpExecutionMode instruction that specifies the type of subdivision in the pipeline, they must: both specify the same subdivision mode</usage> + <usage>If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, the shader code of at least one must: contain an code:OpExecutionMode instruction that specifies the output patch size in the pipeline</usage> + <usage>If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, and the shader code of both contain an code:OpExecutionMode instruction that specifies the out patch size in the pipeline, they must: both specify the same patch size</usage> + <usage>If pname:pStages includes tessellation shader stages, the pname:topology member of pname:pInputAssembly must: be ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST</usage> + <usage>If pname:pStages includes a geometry shader stage, and doesn't include any tessellation shader stages, its shader code must: contain an code:OpExecutionMode instruction that specifies an input primitive type that is <<shaders-geometry-execution, compatible>> with the primitive topology specified in pname:pInputAssembly</usage> + <usage>If pname:pStages includes a geometry shader stage, and also includes tessellation shader stages, its shader code must: contain an code:OpExecutionMode instruction that specifies an input primitive type that is <<shaders-geometry-execution, compatible>> with the primitive topology that is output by the tessellation stages</usage> + <usage>If pname:pStages includes a fragment shader stage and a geometry shader stage, and the fragment shader code reads from an input variable that is decorated with code:PrimitiveID, then the geometry shader code must: write to a matching output variable, decorated with code:PrimitiveID, in all execution paths</usage> + <usage>If pname:pStages includes a fragment shader stage, its shader code mustnot: read from any input attachment that is defined as ename:VK_ATTACHMENT_UNUSED in pname:subpass</usage> + <usage>The shader code for the entry points identified by pname:pStages, and the rest of the state identified by this structure must: adhere to the pipeline linking rules described in the <<interfaces,Shader Interfaces>> chapter</usage> + <usage>If pname:subpass uses a depth/stencil attachment in pname:renderpass that has a layout of ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the sname:VkAttachmentReference defined by pname:subpass, and pname:pDepthStencilState is not `NULL`, the pname:depthWriteEnable member of pname:pDepthStencilState must: be ename:VK_FALSE</usage> + <usage>If pname:subpass uses a depth/stencil attachment in pname:renderpass that has a layout of ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the sname:VkAttachmentReference defined by pname:subpass, and pname:pDepthStencilState is not `NULL`, the value of the pname:failOp, pname:passOp and pname:depthFailOp members of each of the pname:front and pname:back members of pname:pDepthStencilState must: be ename:VK_STENCIL_OP_KEEP</usage> + <usage>If pname:pColorBlendState is not `NULL`, the value of the pname:blendEnable member of each element of the pname:pAttachment member of pname:pColorBlendState must: be ename:VK_FALSE if the pname:format of the attachment referred to in pname:subpass of pname:renderPass does not support color blend operations, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures or sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:pColorBlendState is not `NULL`, The pname:attachmentCount member of pname:pColorBlendState must: be equal to the value of pname:colorAttachmentCount used to create pname:subpass</usage> + <usage>If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_VIEWPORT, the pname:pViewports member of pname:pViewportState must: be a pointer to an array of pname:pViewportState->viewportCount sname:VkViewport structures</usage> + <usage>If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_SCISSOR, the pname:pScissors member of pname:pViewportState must: be a pointer to an array of pname:pViewportState->scissorCount sname:VkRect2D structures</usage> + <usage>If the wide lines feature is not enabled, and no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_LINE_WIDTH, the pname:lineWidth member of pname:pRasterizationState must: be `1.0`</usage> + <usage>If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, pname:pViewportState must: be a pointer to a valid sname:VkPipelineViewportStateCreateInfo structure</usage> + <usage>If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, pname:pMultisampleState must: be a pointer to a valid sname:VkPipelineMultisampleStateCreateInfo structure</usage> + <usage>If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, and pname:subpass uses a depth/stencil attachment, pname:pDepthStencilState must: be a pointer to a valid sname:VkPipelineDepthStencilStateCreateInfo structure</usage> + <usage>If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, and pname:subpass uses color attachments, pname:pColorBlendState must: be a pointer to a valid sname:VkPipelineColorBlendStateCreateInfo structure</usage> + <usage>If the depth bias clamping feature is not enabled, no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_DEPTH_BIAS, and the pname:depthBiasEnable member of pname:pDepthStencil is ename:VK_TRUE, the pname:depthBiasClamp member of pname:pDepthStencil must: be `0.0`</usage> + <usage>If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the pname:depthBoundsTestEnable member of pname:pDepthStencil is ename:VK_TRUE, the value of the pname:minDepthBounds and pname:maxDepthBounds members of pname:pDepthStencil must: be between `0.0` and `1.0`, inclusive</usage> + <usage>pname:layout must: be <<descriptorsets-pipelinelayout-consistency,consistent>> with all shaders specified in pname:pStages</usage> + <usage>If pname:subpass uses color and/or depth/stencil attachments, then the pname:rasterizationSamples member of pname:pMultisampleState must: be the same as the sample count for those subpass attachments</usage> + <usage>If pname:subpass does not use any color and/or depth/stencil attachments, then the pname:rasterizationSamples member of pname:pMultisampleState must: follow the rules for a <<renderpass-noattachments, zero-attachment subpass>></usage> + <usage>pname:subpass must: be a valid subpass within pname:renderpass</usage> + </validity> + </type> + <type category="struct" name="VkPipelineCacheCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineCacheCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>size_t</type> <name>initialDataSize</name></member> <!-- Size of initial data to populate cache, in bytes --> + <member len="initialDataSize">const <type>void</type>* <name>pInitialData</name></member> <!-- Initial data to populate cache --> + <validity> + <usage>If pname:initialDataSize is not `0`, it must: be equal to the size of pname:pInitialData, as returned by fname:vkGetPipelineCacheData when pname:pInitialData was originally retrieved</usage> + <usage>If pname:initialDataSize is not `0`, pname:pInitialData must: have been retrieved from a previous call to fname:vkGetPipelineCacheData</usage> + </validity> + </type> + <type category="struct" name="VkPushConstantRange"> + <member><type>VkShaderStageFlags</type> <name>stageFlags</name></member> <!-- Which stages use the range --> + <member><type>uint32_t</type> <name>offset</name></member> <!-- Start of the range, in bytes --> + <member><type>uint32_t</type> <name>size</name></member> <!-- Size of the range, in bytes --> + <validity> + <usage>The sum of pname:offset and pname:size must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPushConstantsSize</usage> + <usage>The value of pname:size must: be greater than `0`</usage> + <usage>The value of pname:size must: be a multiple of `4`</usage> + </validity> + </type> + <type category="struct" name="VkPipelineLayoutCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkPipelineLayoutCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>uint32_t</type> <name>setLayoutCount</name></member> <!-- Number of descriptor sets interfaced by the pipeline --> + <member len="setLayoutCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member> <!-- Array of setCount number of descriptor set layout objects defining the layout of the --> + <member optional="true"><type>uint32_t</type> <name>pushConstantRangeCount</name></member> <!-- Number of push-constant ranges used by the pipeline --> + <member len="pushConstantRangeCount">const <type>VkPushConstantRange</type>* <name>pPushConstantRanges</name></member> <!-- Array of pushConstantRangeCount number of ranges used by various shader stages --> + <validity> + <usage>pname:setLayoutCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxBoundDescriptorSets</usage> + <usage>The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_SAMPLER and ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorSamplers</usage> + <usage>The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorUniformBuffers</usage> + <usage>The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorStorageBuffers</usage> + <usage>The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorSampledImages</usage> + <usage>The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorStorageImages</usage> + </validity> + </type> + <type category="struct" name="VkSamplerCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkSamplerCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkFilter</type> <name>magFilter</name></member> <!-- Filter mode for magnification --> + <member><type>VkFilter</type> <name>minFilter</name></member> <!-- Filter mode for minifiation --> + <member><type>VkSamplerMipmapMode</type> <name>mipmapMode</name></member> <!-- Mipmap selection mode --> + <member><type>VkSamplerAddressMode</type> <name>addressModeU</name></member> + <member><type>VkSamplerAddressMode</type> <name>addressModeV</name></member> + <member><type>VkSamplerAddressMode</type> <name>addressModeW</name></member> + <member><type>float</type> <name>mipLodBias</name></member> + <member><type>VkBool32</type> <name>anisotropyEnable</name></member> + <member><type>float</type> <name>maxAnisotropy</name></member> + <member><type>VkBool32</type> <name>compareEnable</name></member> + <member noautovalidity="true"><type>VkCompareOp</type> <name>compareOp</name></member> + <member><type>float</type> <name>minLod</name></member> + <member><type>float</type> <name>maxLod</name></member> + <member noautovalidity="true"><type>VkBorderColor</type> <name>borderColor</name></member> + <member><type>VkBool32</type> <name>unnormalizedCoordinates</name></member> + <validity> + <usage>The absolute value of pname:mipLodBias must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxSamplerLodBias</usage> + <usage>If the <<features-features-samplerAnisotropy,anisotropic sampling>> feature is not enabled, pname:anisotropyEnable must: be ename:VK_FALSE</usage> + <usage>If pname:anisotropyEnable is ename:VK_TRUE, the value of pname:maxAnisotropy must: be between `1.0` and sname:VkPhysicalDeviceLimits::pname:maxSamplerAnisotropy, inclusive</usage> + <usage>If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:minFilter and pname:magFilter must: be equal</usage> + <usage>If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:mipmapMode must: be ename:VK_SAMPLER_MIPMAP_MODE_NEAREST</usage> + <usage>If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:minLod and pname:maxLod must: be zero</usage> + <usage>If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:addressModeU and pname:addressModeV must: each be either ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER</usage> + <usage>If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:anisotropyEnable must: be ename:VK_FALSE</usage> + <usage>If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:compareEnable must: be ename:VK_FALSE</usage> + <usage>If any of pname:addressModeU, pname:addressModeV or pname:addressModeW are ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, pname:borderColor must: be a valid elink:VkBorderColor value</usage> + <usage>If pname:compareEnable is ename:VK_TRUE, pname:compareOp must: be a valid elink:VkCompareOp value</usage> + </validity> + </type> + <type category="struct" name="VkCommandPoolCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkCommandPoolCreateFlags</type> <name>flags</name></member> <!-- Command pool creation flags --> + <member><type>uint32_t</type> <name>queueFamilyIndex</name></member> + <validity> + <usage>pname:queueFamilyIndex must: be the index of a queue family available in the calling command's pname:device parameter</usage> + </validity> + </type> + <type category="struct" name="VkCommandBufferAllocateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkCommandPool</type> <name>commandPool</name></member> + <member><type>VkCommandBufferLevel</type> <name>level</name></member> + <member><type>uint32_t</type> <name>commandBufferCount</name></member> + </type> + <type category="struct" name="VkCommandBufferInheritanceInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true" noautovalidity="true"><type>VkRenderPass</type> <name>renderPass</name></member> <!-- Render pass for secondary command buffers --> + <member><type>uint32_t</type> <name>subpass</name></member> + <member optional="true" noautovalidity="true"><type>VkFramebuffer</type> <name>framebuffer</name></member> <!-- Framebuffer for secondary command buffers --> + <member><type>VkBool32</type> <name>occlusionQueryEnable</name></member> <!-- Whether this secondary command buffer may be executed during an occlusion query --> + <member optional="true" noautovalidity="true"><type>VkQueryControlFlags</type> <name>queryFlags</name></member> <!-- Query flags used by this secondary command buffer, if executed during an occlusion query --> + <member optional="true" noautovalidity="true"><type>VkQueryPipelineStatisticFlags</type> <name>pipelineStatistics</name></member> <!-- Pipeline statistics that may be counted for this secondary command buffer --> + <validity> + <usage>If the <<features-features-inheritedQueries,inherited queries>> feature is not enabled, pname:occlusionQueryEnable must: be ename:VK_FALSE</usage> + <usage>If the <<features-features-inheritedQueries,inherited queries>> feature is enabled, pname:queryFlags must: be a valid combination of elink:VkQueryControlFlagBits values</usage> + <usage>If the <<features-features-pipelineStatisticsQuery,pipeline statistics queries>> feature is not enabled, pname:pipelineStatistics must: be code:0</usage> + </validity> + </type> + <type category="struct" name="VkCommandBufferBeginInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkCommandBufferUsageFlags</type> <name>flags</name></member> <!-- Command buffer usage flags --> + <member optional="true" noautovalidity="true">const <type>VkCommandBufferInheritanceInfo</type>* <name>pInheritanceInfo</name></member> <!-- Pointer to inheritance info for secondary command buffers --> + <validity> + <usage>If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:renderPass member of pname:pInheritanceInfo must: be a valid sname:VkRenderPass</usage> + <usage>If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:subpass member of pname:pInheritanceInfo must: be a valid subpass index within the pname:renderPass member of pname:pInheritanceInfo</usage> + <usage>If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:framebuffer member of pname:pInheritanceInfo must: be either sname:VK_NULL_HANDLE, or a valid sname:VkFramebuffer that is compatible with the pname:renderPass member of pname:pInheritanceInfo</usage> + </validity> + </type> + <type category="struct" name="VkRenderPassBeginInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkRenderPass</type> <name>renderPass</name></member> + <member><type>VkFramebuffer</type> <name>framebuffer</name></member> + <member><type>VkRect2D</type> <name>renderArea</name></member> + <member optional="true"><type>uint32_t</type> <name>clearValueCount</name></member> + <member len="clearValueCount">const <type>VkClearValue</type>* <name>pClearValues</name></member> + <validity> + <usage>The value of pname:clearValueCount must: be greater than or equal to the number of attachments in pname:renderPass that specify a pname:loadOp of ename:VK_ATTACHMENT_LOAD_OP_CLEAR</usage> + </validity> + </type> + <type category="union" name="VkClearColorValue" comment="// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared."> + <member><type>float</type> <name>float32</name>[4]</member> + <member><type>int32_t</type> <name>int32</name>[4]</member> + <member><type>uint32_t</type> <name>uint32</name>[4]</member> + </type> + <type category="struct" name="VkClearDepthStencilValue"> + <member><type>float</type> <name>depth</name></member> + <member><type>uint32_t</type> <name>stencil</name></member> + </type> + <type category="union" name="VkClearValue" comment="// Union allowing specification of color or depth and stencil values. Actual value selected is based on attachment being cleared."> + <member><type>VkClearColorValue</type> <name>color</name></member> + <member><type>VkClearDepthStencilValue</type> <name>depthStencil</name></member> + </type> + <type category="struct" name="VkClearAttachment"> + <member><type>VkImageAspectFlags</type> <name>aspectMask</name></member> + <member><type>uint32_t</type> <name>colorAttachment</name></member> + <member><type>VkClearValue</type> <name>clearValue</name></member> + <validity> + <usage>If pname:aspectMask includes ename:VK_IMAGE_ASPECT_COLOR_BIT, it mustnot: include ename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT</usage> + <usage>pname:aspectMask mustnot: include ename:VK_IMAGE_ASPECT_METADATA_BIT</usage> + </validity> + </type> + <type category="struct" name="VkAttachmentDescription"> + <member optional="true"><type>VkAttachmentDescriptionFlags</type> <name>flags</name></member> + <member><type>VkFormat</type> <name>format</name></member> + <member><type>VkSampleCountFlagBits</type> <name>samples</name></member> + <member><type>VkAttachmentLoadOp</type> <name>loadOp</name></member> <!-- Load operation for color or depth data --> + <member><type>VkAttachmentStoreOp</type> <name>storeOp</name></member> <!-- Store operation for color or depth data --> + <member><type>VkAttachmentLoadOp</type> <name>stencilLoadOp</name></member> <!-- Load operation for stencil data --> + <member><type>VkAttachmentStoreOp</type> <name>stencilStoreOp</name></member> <!-- Store operation for stencil data --> + <member><type>VkImageLayout</type> <name>initialLayout</name></member> + <member><type>VkImageLayout</type> <name>finalLayout</name></member> + </type> + <type category="struct" name="VkAttachmentReference"> + <member><type>uint32_t</type> <name>attachment</name></member> + <member><type>VkImageLayout</type> <name>layout</name></member> + </type> + <type category="struct" name="VkSubpassDescription"> + <member optional="true"><type>VkSubpassDescriptionFlags</type> <name>flags</name></member> + <member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member> <!-- Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now --> + <member optional="true"><type>uint32_t</type> <name>inputAttachmentCount</name></member> + <member len="inputAttachmentCount">const <type>VkAttachmentReference</type>* <name>pInputAttachments</name></member> + <member optional="true"><type>uint32_t</type> <name>colorAttachmentCount</name></member> + <member len="colorAttachmentCount">const <type>VkAttachmentReference</type>* <name>pColorAttachments</name></member> + <member optional="true" len="colorAttachmentCount">const <type>VkAttachmentReference</type>* <name>pResolveAttachments</name></member> + <member optional="true">const <type>VkAttachmentReference</type>* <name>pDepthStencilAttachment</name></member> + <member optional="true"><type>uint32_t</type> <name>preserveAttachmentCount</name></member> + <member len="preserveAttachmentCount">const <type>uint32_t</type>* <name>pPreserveAttachments</name></member> + <validity> + <usage>pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_GRAPHICS</usage> + <usage>The value of pname:colorCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxColorAttachments</usage> + <usage>If the first use of an attachment in this render pass is as an input attachment, and the attachment is not also used as a color or depth/stencil attachment in the same subpass, then pname:loadOp mustnot: be ename:VK_ATTACHMENT_LOAD_OP_CLEAR</usage> + <usage>If pname:pResolveAttachments is not `NULL`, for each resolve attachment that does not have the value ename:VK_ATTACHMENT_UNUSED, the corresponding color attachment mustnot: have the value ename:VK_ATTACHMENT_UNUSED</usage> + <usage>If pname:pResolveAttachments is not `NULL`, the sample count of each element of pname:pColorAttachments must: be anything other than ename:VK_SAMPLE_COUNT_1_BIT</usage> + <usage>Any given element of pname:pResolveAttachments must: have a sample count of ename:VK_SAMPLE_COUNT_1_BIT</usage> + <usage>Any given element of pname:pResolveAttachments must: have the same elink:VkFormat as its corresponding color attachment</usage> + <usage>All attachments in pname:pColorAttachments and pname:pDepthStencilAttachment that are not ename:VK_ATTACHMENT_UNUSED must: have the same sample count</usage> + <usage>If any input attachments are ename:VK_ATTACHMENT_UNUSED, then any pipelines bound during the subpass mustnot: accesss those input attachments from the fragment shader</usage> + <usage>The pname:attachment member of any element of pname:pPreserveAttachments mustnot: be ename:VK_ATTACHMENT_UNUSED</usage> + <usage>Any given element of pname:pPreserveAttachments mustnot: also be an element of any other member of the subpass description</usage> + <usage>If any attachment is used as both an input attachment and a color or depth/stencil attachment, then each use must use the same pname:layout</usage> + </validity> + </type> + <type category="struct" name="VkSubpassDependency"> + <member><type>uint32_t</type> <name>srcSubpass</name></member> + <member><type>uint32_t</type> <name>dstSubpass</name></member> + <member><type>VkPipelineStageFlags</type> <name>srcStageMask</name></member> + <member><type>VkPipelineStageFlags</type> <name>dstStageMask</name></member> + <member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member> <!-- Memory accesses from the source of the dependency to synchronize --> + <member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member> <!-- Memory accesses from the destination of the dependency to synchronize --> + <member optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></member> + <validity> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + <usage>The value of pname:srcSubpass must: be less than or equal to pname:dstSubpass, unless one of them is ename:VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution order</usage> + <usage>The values of pname:srcSubpass and pname:dstSubpass mustnot: both be equal to ename:VK_SUBPASS_EXTERNAL</usage> + </validity> + </type> + <type category="struct" name="VkRenderPassCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkRenderPassCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member> + <member len="attachmentCount">const <type>VkAttachmentDescription</type>* <name>pAttachments</name></member> + <member><type>uint32_t</type> <name>subpassCount</name></member> + <member len="subpassCount">const <type>VkSubpassDescription</type>* <name>pSubpasses</name></member> + <member optional="true"><type>uint32_t</type> <name>dependencyCount</name></member> + <member len="dependencyCount">const <type>VkSubpassDependency</type>* <name>pDependencies</name></member> + <validity> + <usage>If any two subpasses operate on attachments with overlapping ranges of the same sname:VkDeviceMemory object, and at least one subpass writes to that area of sname:VkDeviceMemory, a subpass dependency must: be included (either directly or via some intermediate subpasses) between them</usage> + <usage>If the pname:attachment member of any element of pname:pInputAttachments, pname:pColorAttachments, pname:pResolveAttachments or pname:pDepthStencilAttachment, or the attachment indexed by any element of pname:pPreserveAttachments in any given element of pname:pSubpasses is bound to a range of a sname:VkDeviceMemory object that overlaps with any other attachment in any subpass (including the same subpass), the sname:VkAttachmentReference structures describing them must: include ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT in pname:flags</usage> + <usage>If the pname:attachment member of any element of pname:pInputAttachments, pname:pColorAttachments, pname:pResolveAttachments or pname:pDepthStencilAttachment, or the value of any element of pname:pPreserveAttachments in any given element of pname:pSubpasses is not ename:VK_ATTACHMENT_UNUSED, it must: be less than the value of pname:attachmentCount</usage> + <usage>The value of any element of the pname:pPreserveAttachments member in any given element of pname:pSubpasses mustnot: be ename:VK_ATTACHMENT_UNUSED</usage> + </validity> + </type> + <type category="struct" name="VkEventCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_EVENT_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkEventCreateFlags</type> <name>flags</name></member> <!-- Event creation flags --> + </type> + <type category="struct" name="VkFenceCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_FENCE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkFenceCreateFlags</type> <name>flags</name></member> <!-- Fence creation flags --> + </type> + <type category="struct" name="VkPhysicalDeviceFeatures"> + <member><type>VkBool32</type> <name>robustBufferAccess</name></member> <!-- out of bounds buffer accesses are well defined --> + <member><type>VkBool32</type> <name>fullDrawIndexUint32</name></member> <!-- full 32-bit range of indices for indexed draw calls --> + <member><type>VkBool32</type> <name>imageCubeArray</name></member> <!-- image views which are arrays of cube maps --> + <member><type>VkBool32</type> <name>independentBlend</name></member> <!-- blending operations are controlled per-attachment --> + <member><type>VkBool32</type> <name>geometryShader</name></member> <!-- geometry stage --> + <member><type>VkBool32</type> <name>tessellationShader</name></member> <!-- tessellation control and evaluation stage --> + <member><type>VkBool32</type> <name>sampleRateShading</name></member> <!-- per-sample shading and interpolation --> + <member><type>VkBool32</type> <name>dualSrcBlend</name></member> <!-- blend operations which take two sources --> + <member><type>VkBool32</type> <name>logicOp</name></member> <!-- logic operations --> + <member><type>VkBool32</type> <name>multiDrawIndirect</name></member> <!-- multi draw indirect --> + <member><type>VkBool32</type> <name>drawIndirectFirstInstance</name></member> <!-- indirect draws can use non-zero firstInstance --> + <member><type>VkBool32</type> <name>depthClamp</name></member> <!-- depth clamping --> + <member><type>VkBool32</type> <name>depthBiasClamp</name></member> <!-- depth bias clamping --> + <member><type>VkBool32</type> <name>fillModeNonSolid</name></member> <!-- point and wireframe fill modes --> + <member><type>VkBool32</type> <name>depthBounds</name></member> <!-- depth bounds test --> + <member><type>VkBool32</type> <name>wideLines</name></member> <!-- lines with width greater than 1 --> + <member><type>VkBool32</type> <name>largePoints</name></member> <!-- points with size greater than 1 --> + <member><type>VkBool32</type> <name>alphaToOne</name></member> <!-- the fragment alpha component can be forced to maximum representable alpha value --> + <member><type>VkBool32</type> <name>multiViewport</name></member> <!-- viewport arrays --> + <member><type>VkBool32</type> <name>samplerAnisotropy</name></member> <!-- anisotropic sampler filtering --> + <member><type>VkBool32</type> <name>textureCompressionETC2</name></member> <!-- ETC texture compression formats --> + <member><type>VkBool32</type> <name>textureCompressionASTC_LDR</name></member> <!-- ASTC LDR texture compression formats --> + <member><type>VkBool32</type> <name>textureCompressionBC</name></member> <!-- BC1-7 texture compressed formats --> + <member><type>VkBool32</type> <name>occlusionQueryPrecise</name></member> <!-- precise occlusion queries returning actual sample counts --> + <member><type>VkBool32</type> <name>pipelineStatisticsQuery</name></member> <!-- pipeline statistics query --> + <member><type>VkBool32</type> <name>vertexPipelineStoresAndAtomics</name></member> <!-- stores and atomic ops on storage buffers and images are supported in vertex, tessellation, and geometry stages --> + <member><type>VkBool32</type> <name>fragmentStoresAndAtomics</name></member> <!-- stores and atomic ops on storage buffers and images are supported in the fragment stage --> + <member><type>VkBool32</type> <name>shaderTessellationAndGeometryPointSize</name></member><!-- tessellation and geometry stages can export point size --> + <member><type>VkBool32</type> <name>shaderImageGatherExtended</name></member> <!-- image gather with run-time values and independent offsets --> + <member><type>VkBool32</type> <name>shaderStorageImageExtendedFormats</name></member> <!-- the extended set of formats can be used for storage images --> + <member><type>VkBool32</type> <name>shaderStorageImageMultisample</name></member> <!-- multisample images can be used for storage images --> + <member><type>VkBool32</type> <name>shaderStorageImageReadWithoutFormat</name></member> <!-- read from storage image does not require format qualifier --> + <member><type>VkBool32</type> <name>shaderStorageImageWriteWithoutFormat</name></member> <!-- write to storage image does not require format qualifier --> + <member><type>VkBool32</type> <name>shaderUniformBufferArrayDynamicIndexing</name></member> <!-- arrays of uniform buffers can be accessed with dynamically uniform indices --> + <member><type>VkBool32</type> <name>shaderSampledImageArrayDynamicIndexing</name></member> <!-- arrays of sampled images can be accessed with dynamically uniform indices --> + <member><type>VkBool32</type> <name>shaderStorageBufferArrayDynamicIndexing</name></member> <!-- arrays of storage buffers can be accessed with dynamically uniform indices --> + <member><type>VkBool32</type> <name>shaderStorageImageArrayDynamicIndexing</name></member> <!-- arrays of storage images can be accessed with dynamically uniform indices --> + <member><type>VkBool32</type> <name>shaderClipDistance</name></member> <!-- clip distance in shaders --> + <member><type>VkBool32</type> <name>shaderCullDistance</name></member> <!-- cull distance in shaders --> + <member><type>VkBool32</type> <name>shaderFloat64</name></member> <!-- 64-bit floats (doubles) in shaders --> + <member><type>VkBool32</type> <name>shaderInt64</name></member> <!-- 64-bit integers in shaders --> + <member><type>VkBool32</type> <name>shaderInt16</name></member> <!-- 16-bit integers in shaders --> + <member><type>VkBool32</type> <name>shaderResourceResidency</name></member> <!-- shader can use texture operations that return resource residency information (requires sparseNonResident support) --> + <member><type>VkBool32</type> <name>shaderResourceMinLod</name></member> <!-- shader can use texture operations that specify minimum resource level of detail --> + <member><type>VkBool32</type> <name>sparseBinding</name></member> <!-- Sparse resources support: Resource memory can be managed at opaque page level rather than object level --> + <member><type>VkBool32</type> <name>sparseResidencyBuffer</name></member> <!-- Sparse resources support: GPU can access partially resident buffers --> + <member><type>VkBool32</type> <name>sparseResidencyImage2D</name></member> <!-- Sparse resources support: GPU can access partially resident 2D (non-MSAA non-depth/stencil) images --> + <member><type>VkBool32</type> <name>sparseResidencyImage3D</name></member> <!-- Sparse resources support: GPU can access partially resident 3D images --> + <member><type>VkBool32</type> <name>sparseResidency2Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples --> + <member><type>VkBool32</type> <name>sparseResidency4Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples --> + <member><type>VkBool32</type> <name>sparseResidency8Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples --> + <member><type>VkBool32</type> <name>sparseResidency16Samples</name></member> <!-- Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples --> + <member><type>VkBool32</type> <name>sparseResidencyAliased</name></member> <!-- Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in) --> + <member><type>VkBool32</type> <name>variableMultisampleRate</name></member> <!-- multisample rate must be the same for all pipelines in a subpass --> + <member><type>VkBool32</type> <name>inheritedQueries</name></member> <!-- Queries may be inherited from primary to secondary command buffers --> + <validity> + <usage>If the value of any member of this structure is ename:VK_FALSE, as returned by flink:vkGetPhysicalDeviceFeatures, then it must: be ename:VK_FALSE when passed as part of the sname:VkDeviceCreateInfo struct when creating a device</usage> + </validity> + </type> + <type category="struct" name="VkPhysicalDeviceSparseProperties" returnedonly="true"> + <member><type>VkBool32</type> <name>residencyStandard2DBlockShape</name></member> <!-- Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard block shapes (based on pixel format) --> + <member><type>VkBool32</type> <name>residencyStandard2DMultisampleBlockShape</name></member> <!-- Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard block shapes (based on pixel format) --> + <member><type>VkBool32</type> <name>residencyStandard3DBlockShape</name></member> <!-- Sparse resources support: GPU will access all 3D sparse resources using the standard block shapes (based on pixel format) --> + <member><type>VkBool32</type> <name>residencyAlignedMipSize</name></member> <!-- Sparse resources support: Images with mip-level dimensions that are NOT a multiple of the block size will be placed in the mip tail --> + <member><type>VkBool32</type> <name>residencyNonResidentStrict</name></member> <!-- Sparse resources support: GPU can consistently access non-resident regions of a resource, all reads return as if data is 0, writes are discarded --> + </type> + <type category="struct" name="VkPhysicalDeviceLimits" returnedonly="true"> + <!-- resource maximum sizes --> + <member><type>uint32_t</type> <name>maxImageDimension1D</name></member> <!-- max 1D image dimension --> + <member><type>uint32_t</type> <name>maxImageDimension2D</name></member> <!-- max 2D image dimension --> + <member><type>uint32_t</type> <name>maxImageDimension3D</name></member> <!-- max 3D image dimension --> + <member><type>uint32_t</type> <name>maxImageDimensionCube</name></member> <!-- max cubemap image dimension --> + <member><type>uint32_t</type> <name>maxImageArrayLayers</name></member> <!-- max layers for image arrays --> + <member><type>uint32_t</type> <name>maxTexelBufferElements</name></member> <!-- max texel buffer size (fstexels) --> + <member><type>uint32_t</type> <name>maxUniformBufferRange</name></member> <!-- max uniform buffer range (bytes) --> + <member><type>uint32_t</type> <name>maxStorageBufferRange</name></member> <!-- max storage buffer range (bytes) --> + <member><type>uint32_t</type> <name>maxPushConstantsSize</name></member> <!-- max size of the push constants pool (bytes) --> + <!-- memory limits --> + <member><type>uint32_t</type> <name>maxMemoryAllocationCount</name></member> <!-- max number of device memory allocations supported --> + <member><type>uint32_t</type> <name>maxSamplerAllocationCount</name></member> <!-- max number of samplers that can be allocated on a device --> + <member><type>VkDeviceSize</type> <name>bufferImageGranularity</name></member> <!-- Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage --> + <member><type>VkDeviceSize</type> <name>sparseAddressSpaceSize</name></member> <!-- Total address space available for sparse allocations (bytes) --> + <!-- descriptor set limits --> + <member><type>uint32_t</type> <name>maxBoundDescriptorSets</name></member> <!-- max number of descriptors sets that can be bound to a pipeline --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorSamplers</name></member> <!-- max number of samplers allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorUniformBuffers</name></member> <!-- max number of uniform buffers allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorStorageBuffers</name></member> <!-- max number of storage buffers allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorSampledImages</name></member> <!-- max number of sampled images allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorStorageImages</name></member> <!-- max number of storage images allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageDescriptorInputAttachments</name></member> <!-- max number of input attachments allowed per-stage in a descriptor set --> + <member><type>uint32_t</type> <name>maxPerStageResources</name></member> <!-- max number of resources allowed by a single stage --> + <member><type>uint32_t</type> <name>maxDescriptorSetSamplers</name></member> <!-- max number of samplers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetUniformBuffers</name></member> <!-- max number of uniform buffers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetUniformBuffersDynamic</name></member> <!-- max number of dynamic uniform buffers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetStorageBuffers</name></member> <!-- max number of storage buffers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetStorageBuffersDynamic</name></member> <!-- max number of dynamic storage buffers allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetSampledImages</name></member> <!-- max number of sampled images allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetStorageImages</name></member> <!-- max number of storage images allowed in all stages in a descriptor set --> + <member><type>uint32_t</type> <name>maxDescriptorSetInputAttachments</name></member> <!-- max number of input attachments allowed in all stages in a descriptor set --> + <!-- vertex stage limits --> + <member><type>uint32_t</type> <name>maxVertexInputAttributes</name></member> <!-- max number of vertex input attribute slots --> + <member><type>uint32_t</type> <name>maxVertexInputBindings</name></member> <!-- max number of vertex input binding slots --> + <member><type>uint32_t</type> <name>maxVertexInputAttributeOffset</name></member> <!-- max vertex input attribute offset added to vertex buffer offset --> + <member><type>uint32_t</type> <name>maxVertexInputBindingStride</name></member> <!-- max vertex input binding stride --> + <member><type>uint32_t</type> <name>maxVertexOutputComponents</name></member> <!-- max number of output components written by vertex shader --> + <!-- tessellation control stage limits --> + <member><type>uint32_t</type> <name>maxTessellationGenerationLevel</name></member> <!-- max level supported by tessellation primitive generator --> + <member><type>uint32_t</type> <name>maxTessellationPatchSize</name></member> <!-- max patch size (vertices) --> + <member><type>uint32_t</type> <name>maxTessellationControlPerVertexInputComponents</name></member> <!-- max number of input components per-vertex in TCS --> + <member><type>uint32_t</type> <name>maxTessellationControlPerVertexOutputComponents</name></member> <!-- max number of output components per-vertex in TCS --> + <member><type>uint32_t</type> <name>maxTessellationControlPerPatchOutputComponents</name></member> <!-- max number of output components per-patch in TCS --> + <member><type>uint32_t</type> <name>maxTessellationControlTotalOutputComponents</name></member> <!-- max total number of per-vertex and per-patch output components in TCS --> + <!-- tessellation evaluation stage limits --> + <member><type>uint32_t</type> <name>maxTessellationEvaluationInputComponents</name></member> <!-- max number of input components per vertex in TES --> + <member><type>uint32_t</type> <name>maxTessellationEvaluationOutputComponents</name></member> <!-- max number of output components per vertex in TES --> + <!-- geometry stage limits --> + <member><type>uint32_t</type> <name>maxGeometryShaderInvocations</name></member> <!-- max invocation count supported in geometry shader --> + <member><type>uint32_t</type> <name>maxGeometryInputComponents</name></member> <!-- max number of input components read in geometry stage --> + <member><type>uint32_t</type> <name>maxGeometryOutputComponents</name></member> <!-- max number of output components written in geometry stage --> + <member><type>uint32_t</type> <name>maxGeometryOutputVertices</name></member> <!-- max number of vertices that can be emitted in geometry stage --> + <member><type>uint32_t</type> <name>maxGeometryTotalOutputComponents</name></member> <!-- max total number of components (all vertices) written in geometry stage --> + <!-- fragment stage limits --> + <member><type>uint32_t</type> <name>maxFragmentInputComponents</name></member> <!-- max number of input compontents read in fragment stage --> + <member><type>uint32_t</type> <name>maxFragmentOutputAttachments</name></member> <!-- max number of output attachments written in fragment stage --> + <member><type>uint32_t</type> <name>maxFragmentDualSrcAttachments</name></member> <!-- max number of output attachments written when using dual source blending --> + <member><type>uint32_t</type> <name>maxFragmentCombinedOutputResources</name></member><!-- max total number of storage buffers, storage images and output buffers --> + <!-- compute stage limits --> + <member><type>uint32_t</type> <name>maxComputeSharedMemorySize</name></member> <!-- max total storage size of work group local storage (bytes) --> + <member><type>uint32_t</type> <name>maxComputeWorkGroupCount</name>[3]</member> <!-- max num of compute work groups that may be dispatched + by a single command (x,y,z) --> + <member><type>uint32_t</type> <name>maxComputeWorkGroupInvocations</name></member> <!-- max total compute invocations in a single local work group --> + <member><type>uint32_t</type> <name>maxComputeWorkGroupSize</name>[3]</member> <!-- max local size of a compute work group (x,y,z) --> + + <member><type>uint32_t</type> <name>subPixelPrecisionBits</name></member> <!-- number bits of subpixel precision in screen x and y--> + <member><type>uint32_t</type> <name>subTexelPrecisionBits</name></member> <!-- number bits of precision for selecting texel weights--> + <member><type>uint32_t</type> <name>mipmapPrecisionBits</name></member> <!-- number bits of precision for selecting mipmap weights --> + + <member><type>uint32_t</type> <name>maxDrawIndexedIndexValue</name></member> <!-- max index value for indexed draw calls (for 32-bit indices) --> + <member><type>uint32_t</type> <name>maxDrawIndirectCount</name></member> <!-- max draw count for indirect draw calls --> + + <member><type>float</type> <name>maxSamplerLodBias</name></member> <!-- max absolute sampler level of detail bias --> + <member><type>float</type> <name>maxSamplerAnisotropy</name></member> <!-- max degree of sampler anisotropy --> + + <member><type>uint32_t</type> <name>maxViewports</name></member> <!-- max number of active viewports --> + <member><type>uint32_t</type> <name>maxViewportDimensions</name>[2]</member> <!-- max viewport dimensions (x,y) --> + <member><type>float</type> <name>viewportBoundsRange</name>[2]</member> <!-- viewport bounds range (min,max) --> + <member><type>uint32_t</type> <name>viewportSubPixelBits</name></member> <!-- number bits of subpixel precision for viewport --> + + <member><type>size_t</type> <name>minMemoryMapAlignment</name></member> <!-- min required alignment of pointers returned by MapMemory (bytes) --> + <member><type>VkDeviceSize</type> <name>minTexelBufferOffsetAlignment</name></member> <!-- min required alignment for texel buffer offsets (bytes) --> + <member><type>VkDeviceSize</type> <name>minUniformBufferOffsetAlignment</name></member> <!-- min required alignment for uniform buffer sizes and offsets (bytes) --> + <member><type>VkDeviceSize</type> <name>minStorageBufferOffsetAlignment</name></member> <!-- min required alignment for storage buffer offsets (bytes) --> + + <member><type>int32_t</type> <name>minTexelOffset</name></member> <!-- min texel offset for OpTextureSampleOffset --> + <member><type>uint32_t</type> <name>maxTexelOffset</name></member> <!-- max texel offset for OpTextureSampleOffset --> + <member><type>int32_t</type> <name>minTexelGatherOffset</name></member> <!-- min texel offset for OpTextureGatherOffset --> + <member><type>uint32_t</type> <name>maxTexelGatherOffset</name></member> <!-- max texel offset for OpTextureGatherOffset --> + <member><type>float</type> <name>minInterpolationOffset</name></member> <!-- furthest negative offset for interpolateAtOffset --> + <member><type>float</type> <name>maxInterpolationOffset</name></member> <!-- furthest positive offset for interpolateAtOffset --> + <member><type>uint32_t</type> <name>subPixelInterpolationOffsetBits</name></member> <!-- number of subpixel bits for interpolateAtOffset --> + + <member><type>uint32_t</type> <name>maxFramebufferWidth</name></member> <!-- max width for a framebuffer --> + <member><type>uint32_t</type> <name>maxFramebufferHeight</name></member> <!-- max height for a framebuffer --> + <member><type>uint32_t</type> <name>maxFramebufferLayers</name></member> <!-- max layer count for a layered framebuffer --> + <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferColorSampleCounts</name></member> <!-- supported color sample counts for a framebuffer --> + <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferDepthSampleCounts</name></member> <!-- supported depth sample counts for a framebuffer --> + <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferStencilSampleCounts</name></member> <!-- supported stencil sample counts for a framebuffer --> + <member optional="true"><type>VkSampleCountFlags</type> <name>framebufferNoAttachmentsSampleCounts</name></member> <!-- supported sample counts for a framebuffer with no attachments --> + <member><type>uint32_t</type> <name>maxColorAttachments</name></member> <!-- max number of color attachments per subpass --> + + <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageColorSampleCounts</name></member> <!-- supported color sample counts for a non-integer sampled image --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageIntegerSampleCounts</name></member> <!-- supported sample counts for an integer image --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageDepthSampleCounts</name></member> <!-- supported depth sample counts for a sampled image --> + <member optional="true"><type>VkSampleCountFlags</type> <name>sampledImageStencilSampleCounts</name></member> <!-- supported stencil sample counts for a sampled image --> + <member optional="true"><type>VkSampleCountFlags</type> <name>storageImageSampleCounts</name></member> <!-- supported sample counts for a storage image --> + <member><type>uint32_t</type> <name>maxSampleMaskWords</name></member> <!-- max number of sample mask words --> + + <member><type>VkBool32</type> <name>timestampComputeAndGraphics</name></member> <!-- timestamps on graphics and compute queues --> + <member><type>float</type> <name>timestampPeriod</name></member> <!-- number of nanoseconds it takes for timestamp query value to increment by 1 --> + + <member><type>uint32_t</type> <name>maxClipDistances</name></member> <!-- max number of clip distances --> + <member><type>uint32_t</type> <name>maxCullDistances</name></member> <!-- max number of cull distances --> + <member><type>uint32_t</type> <name>maxCombinedClipAndCullDistances</name></member> <!-- max combined number of user clipping --> + + <member><type>uint32_t</type> <name>discreteQueuePriorities</name></member> <!-- distinct queue priorities available --> + + <member><type>float</type> <name>pointSizeRange</name>[2]</member> <!-- range (min,max) of supported point sizes --> + <member><type>float</type> <name>lineWidthRange</name>[2]</member> <!-- range (min,max) of supported line widths --> + <member><type>float</type> <name>pointSizeGranularity</name></member> <!-- granularity of supported point sizes --> + <member><type>float</type> <name>lineWidthGranularity</name></member> <!-- granularity of supported line widths --> + <member><type>VkBool32</type> <name>strictLines</name></member> <!-- line rasterization follows preferred rules --> + <member><type>VkBool32</type> <name>standardSampleLocations</name></member> <!-- supports standard sample locations for all supported sample counts --> + <member><type>VkDeviceSize</type> <name>optimalBufferCopyOffsetAlignment</name></member> <!-- optimal offset of buffer copies --> + <member><type>VkDeviceSize</type> <name>optimalBufferCopyRowPitchAlignment</name></member><!-- optimal pitch of buffer copies --> + <member><type>VkDeviceSize</type> <name>nonCoherentAtomSize</name></member> <!-- minimum size and alignment for non-coherent host-mapped device memory access --> + </type> + <type category="struct" name="VkSemaphoreCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkSemaphoreCreateFlags</type> <name>flags</name></member> <!-- Semaphore creation flags --> + </type> + <type category="struct" name="VkQueryPoolCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkQueryPoolCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkQueryType</type> <name>queryType</name></member> + <member><type>uint32_t</type> <name>queryCount</name></member> + <member optional="true" noautovalidity="true"><type>VkQueryPipelineStatisticFlags</type> <name>pipelineStatistics</name></member> <!-- Optional --> + <validity> + <usage>If the <<features-features-pipelineStatisticsQuery,pipeline statistics queries>> feature is not enabled, pname:queryType mustnot: be ename:VK_QUERY_TYPE_PIPELINE_STATISTICS</usage> + <usage>If pname:queryType is ename:VK_QUERY_TYPE_PIPELINE_STATISTICS, pname:pipelineStatistics must: be a valid combination of elink:VkQueryPipelineStatisticFlagBits values</usage> + </validity> + </type> + <type category="struct" name="VkFramebufferCreateInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkFramebufferCreateFlags</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkRenderPass</type> <name>renderPass</name></member> + <member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member> + <member len="attachmentCount">const <type>VkImageView</type>* <name>pAttachments</name></member> + <member><type>uint32_t</type> <name>width</name></member> + <member><type>uint32_t</type> <name>height</name></member> + <member><type>uint32_t</type> <name>layers</name></member> + <validity> + <usage>The value of pname:attachmentCount must: be equal to the attachment count specified in pname:renderPass</usage> + <usage>Any given element of pname:pAttachments that is used as a color attachment or resolve attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT</usage> + <usage>Any given element of pname:pAttachments that is used as a depth/stencil attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT</usage> + <usage>Any given element of pname:pAttachments that is used as an input attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT</usage> + <usage>Any given element of pname:pAttachments must: have been created with an elink:VkFormat value that matches the elink:VkFormat specified by the corresponding sname:VkAttachmentDescription in pname:renderPass</usage> + <usage>Any given element of pname:pAttachments must: have been created with a pname:samples value that matches the pname:samples value specified by the corresponding sname:VkAttachmentDescription in pname:renderPass</usage> + <usage>Any given element of pname:pAttachments must: have dimensions at least as large as the corresponding framebuffer dimension</usage> + <usage>Any given element of pname:pAttachments must: only specify a single mip-level</usage> + <usage>Any given element of pname:pAttachments must: have been created with identity swizzle</usage> + <usage>The value of pname:width must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferWidth</usage> + <usage>The value of pname:height must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferHeight</usage> + <usage>The value of pname:layers must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferLayers</usage> + </validity> + </type> + <type category="struct" name="VkDrawIndirectCommand"> + <member><type>uint32_t</type> <name>vertexCount</name></member> + <member><type>uint32_t</type> <name>instanceCount</name></member> + <member><type>uint32_t</type> <name>firstVertex</name></member> + <member><type>uint32_t</type> <name>firstInstance</name></member> + <validity> + <usage>For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <<fxvertex-input>></usage> + <usage>If the <<features-features-drawIndirectFirstInstance,drawIndirectFirstInstance>> feature is not enabled, pname:firstInstance must: be code:0</usage> + </validity> + </type> + <type category="struct" name="VkDrawIndexedIndirectCommand"> + <member><type>uint32_t</type> <name>indexCount</name></member> + <member><type>uint32_t</type> <name>instanceCount</name></member> + <member><type>uint32_t</type> <name>firstIndex</name></member> + <member><type>int32_t</type> <name>vertexOffset</name></member> + <member><type>uint32_t</type> <name>firstInstance</name></member> + <validity> + <usage>For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <<fxvertex-input>></usage> + <usage>The total value of (pname:indexSize * (pname:firstIndex + pname:indexCount) + pname:offset) must: be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by pname:indexType, where the index buffer, pname:indexType, and pname:offset are specified via fname:vkCmdBindIndexBuffer</usage> + <usage>If the <<features-features-drawIndirectFirstInstance,drawIndirectFirstInstance>> feature is not enabled, pname:firstInstance must: be code:0</usage> + </validity> + </type> + <type category="struct" name="VkDispatchIndirectCommand"> + <member><type>uint32_t</type> <name>x</name></member> + <member><type>uint32_t</type> <name>y</name></member> + <member><type>uint32_t</type> <name>z</name></member> + <validity> + <usage>pname:x must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[0]</usage> + <usage>pname:y must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[1]</usage> + <usage>pname:z must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[2]</usage> + </validity> + </type> + <type category="struct" name="VkSubmitInfo"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Type of structure. Should be VK_STRUCTURE_TYPE_SUBMIT_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member> + <member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member> + <member len="waitSemaphoreCount">const <type>VkPipelineStageFlags</type>* <name>pWaitDstStageMask</name></member> + <member optional="true"><type>uint32_t</type> <name>commandBufferCount</name></member> + <member len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></member> + <member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member> + <member len="signalSemaphoreCount">const <type>VkSemaphore</type>* <name>pSignalSemaphores</name></member> + <validity> + <usage>Any given element of pname:pSignalSemaphores must: currently be unsignalled</usage> + <usage>Any given element of pname:pCommandBuffers must: either have been recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, or not currently be executing on the device</usage> + <usage>Any given element of pname:pCommandBuffers must: be in the executable state</usage> + <usage>If any given element of pname:pCommandBuffers contains commands that execute secondary command buffers, those secondary command buffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, or not currently be executing on the device</usage> + <usage>If any given element of pname:pCommandBuffers was created with ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, it mustnot: have been previously submitted without re-recording that command buffer</usage> + <usage>Any given element of pname:pCommandBuffers mustnot: contain commands that execute a secondary command buffer, if that secondary command buffer has been recorded in another primary command buffer after it was recorded into this sname:VkCommandBuffer</usage> + <usage>Any given element of pname:pCommandBuffers must: have been created on a sname:VkCommandPool that was created for the same queue family that the calling command's pname:queue belongs to</usage> + <usage>Any given element of pname:pCommandBuffers mustnot: have been created with ename:VK_COMMAND_BUFFER_LEVEL_SECONDARY</usage> + <usage>Any given element of sname:VkSemaphore in pname:pWaitSemaphores must: refer to a prior signal of that sname:VkSemaphore that won't be consumed by any other wait on that semaphore</usage> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, any given element of pname:pWaitDstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, any given element of pname:pWaitDstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + </validity> + </type> + <!-- WSI extensions --> + <type category="struct" name="VkDisplayPropertiesKHR"> + <member><type>VkDisplayKHR</type> <name>display</name></member> <!-- Handle of the display object --> + <member len="null-terminated">const <type>char</type>* <name>displayName</name></member> <!-- Name of the display --> + <member><type>VkExtent2D</type> <name>physicalDimensions</name></member> <!-- In millimeters? --> + <member><type>VkExtent2D</type> <name>physicalResolution</name></member> <!-- Max resolution for CRT? --> + <member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name></member> <!-- one or more bits from VkSurfaceTransformFlagsKHR --> + <member><type>VkBool32</type> <name>planeReorderPossible</name></member> <!-- VK_TRUE if the overlay plane's z-order can be changed on this display. --> + <member><type>VkBool32</type> <name>persistentContent</name></member> <!-- VK_TRUE if this is a "smart" display that supports self-refresh/internal buffering. --> + </type> + <type category="struct" name="VkDisplayPlanePropertiesKHR"> + <member><type>VkDisplayKHR</type> <name>currentDisplay</name></member> <!-- Display the plane is currently associated with. Will be VK_NULL_HANDLE if the plane is not in use. --> + <member><type>uint32_t</type> <name>currentStackIndex</name></member> <!-- Current z-order of the plane. --> + </type> + <type category="struct" name="VkDisplayModeParametersKHR"> + <member><type>VkExtent2D</type> <name>visibleRegion</name></member> <!-- Visible scannout region. --> + <member><type>uint32_t</type> <name>refreshRate</name></member> <!-- Number of times per second the display is updated. --> + </type> + <type category="struct" name="VkDisplayModePropertiesKHR"> + <member><type>VkDisplayModeKHR</type> <name>displayMode</name></member> <!-- Handle of this display mode. --> + <member><type>VkDisplayModeParametersKHR</type> <name>parameters</name></member> <!-- The parameters this mode uses. --> + </type> + <type category="struct" name="VkDisplayModeCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDisplayModeCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkDisplayModeParametersKHR</type> <name>parameters</name></member> <!-- The parameters this mode uses. --> + <validity> + <usage>The pname:width and pname:height members of the pname:visibleRegion member of pname:parameters must be greater than `0`</usage> + <usage>The pname:refreshRate member of pname:parameters must be greater than `0`</usage> + </validity> + </type> + <type category="struct" name="VkDisplayPlaneCapabilitiesKHR"> + <member optional="true"><type>VkDisplayPlaneAlphaFlagsKHR</type> <name>supportedAlpha</name></member> <!-- Types of alpha blending supported, if any. --> + <member><type>VkOffset2D</type> <name>minSrcPosition</name></member> <!-- Does the plane have any position and extent restrictions? --> + <member><type>VkOffset2D</type> <name>maxSrcPosition</name></member> + <member><type>VkExtent2D</type> <name>minSrcExtent</name></member> + <member><type>VkExtent2D</type> <name>maxSrcExtent</name></member> + <member><type>VkOffset2D</type> <name>minDstPosition</name></member> + <member><type>VkOffset2D</type> <name>maxDstPosition</name></member> + <member><type>VkExtent2D</type> <name>minDstExtent</name></member> + <member><type>VkExtent2D</type> <name>maxDstExtent</name></member> + </type> + <type category="struct" name="VkDisplaySurfaceCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkDisplaySurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkDisplayModeKHR</type> <name>displayMode</name></member> <!-- The mode to use when displaying this surface --> + <member><type>uint32_t</type> <name>planeIndex</name></member> <!-- The plane on which this surface appears. Must be between 0 and the value returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR() in pPropertyCount. --> + <member><type>uint32_t</type> <name>planeStackIndex</name></member> <!-- The z-order of the plane. --> + <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>transform</name></member> <!-- Transform to apply to the images as part of the scannout operation --> + <member><type>float</type> <name>globalAlpha</name></member> <!-- Global alpha value. Must be between 0 and 1, inclusive. Ignored if alphaMode is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR --> + <member><type>VkDisplayPlaneAlphaFlagBitsKHR</type> <name>alphaMode</name></member> <!-- What type of alpha blending to use. Must be a bit from vkGetDisplayPlanePropertiesKHR::supportedAlpha. --> + <member><type>VkExtent2D</type> <name>imageExtent</name></member> <!-- size of the images to use with this surface --> + <validity> + <usage>pname:planeIndex must: be less than the number of display planes supported by the device as determined by calling fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR</usage> + <usage>If the pname:planeReorderPossible member of the sname:VkDisplayPropertiesKHR structure returned by fname:vkGetPhysicalDeviceDisplayPropertiesKHR for the display corresponding to pname:displayMode is ename:VK_TRUE then pname:planeStackIndex must: be less than the number of display planes supported by the device as determined by calling fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR; otherwise pname:planeStackIndex must: equal the pname:currentStackIndex member of sname:VkDisplayPlanePropertiesKHR returned by fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR for the display plane corresponding to pname:displayMode</usage> + <usage>If pname:alphaMode is ename:VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then pname:globalAlpha must: be between `0` and `1`, inclusive</usage> + <usage>pname:alphaMode must: be `0` or one of the bits present in the pname:supportedAlpha member of sname:VkDisplayPlaneCapabilitiesKHR returned by fname:vkGetDisplayPlaneCapabilitiesKHR for the display plane corresponding to pname:displayMode</usage> + <usage>The pname:width and pname:height members of pname:imageExtent must be greater than `0`</usage> + </validity> + </type> + <type category="struct" name="VkDisplayPresentInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkRect2D</type> <name>srcRect</name></member> <!-- Rectangle within the presentable image to read pixel data from when presenting to the display. --> + <member><type>VkRect2D</type> <name>dstRect</name></member> <!-- Rectangle within the current display mode's visible region to display srcRectangle in. --> + <member><type>VkBool32</type> <name>persistent</name></member> <!-- For smart displays, use buffered mode. If the display properties member "persistentMode" is VK_FALSE, this member must always be VK_FALSE. --> + <validity> + <usage>pname:srcRect must: specify a rectangular region that is a subset of the image being presented</usage> + <usage>pname:dstRect must: specify a rectangular region that is a subset of the pname:visibleRegion parameter of the display mode the swapchain being presented uses</usage> + <usage>If the pname:persistentContent member of the sname:VkDisplayPropertiesKHR structure returned by fname:vkGetPhysicalDeviceDisplayPropertiesKHR for the display the present operation targets then pname:persistent must: be ename:VK_FALSE</usage> + </validity> + </type> + <type category="struct" name="VkSurfaceCapabilitiesKHR"> + <member><type>uint32_t</type> <name>minImageCount</name></member> <!-- Supported minimum number of images for the surface --> + <member><type>uint32_t</type> <name>maxImageCount</name></member> <!-- Supported maximum number of images for the surface, 0 for unlimited --> + <member><type>VkExtent2D</type> <name>currentExtent</name></member> <!-- Current image width and height for the surface, (0, 0) if undefined --> + <member><type>VkExtent2D</type> <name>minImageExtent</name></member> <!-- Supported minimum image width and height for the surface --> + <member><type>VkExtent2D</type> <name>maxImageExtent</name></member> <!-- Supported maximum image width and height for the surface --> + <member><type>uint32_t</type> <name>maxImageArrayLayers</name></member> <!-- Supported maximum number of image layers for the surface --> + <member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name></member> <!-- 1 or more bits representing the transforms supported --> + <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>currentTransform</name></member> <!-- The surface's current transform relative to the device's natural orientation --> + <member optional="true"><type>VkCompositeAlphaFlagsKHR</type> <name>supportedCompositeAlpha</name></member> <!-- 1 or more bits representing the alpha compositing modes supported --> + <member optional="true"><type>VkImageUsageFlags</type> <name>supportedUsageFlags</name></member> <!-- Supported image usage flags for the surface --> + </type> + <type category="struct" name="VkAndroidSurfaceCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkAndroidSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>ANativeWindow</type>* <name>window</name></member> + <validity> + <usage>pname:window mustnot: be in a connected state</usage> + </validity> + </type> + <type category="struct" name="VkMirSurfaceCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkMirSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>MirConnection</type>* <name>connection</name></member> + <member><type>MirSurface</type>* <name>mirSurface</name></member> + </type> + <type category="struct" name="VkWaylandSurfaceCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkWaylandSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member>struct <type>wl_display</type>* <name>display</name></member> + <member>struct <type>wl_surface</type>* <name>surface</name></member> + </type> + <type category="struct" name="VkWin32SurfaceCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkWin32SurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>HINSTANCE</type> <name>hinstance</name></member> + <member><type>HWND</type> <name>hwnd</name></member> + </type> + <type category="struct" name="VkXlibSurfaceCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkXlibSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>Display</type>* <name>dpy</name></member> + <member><type>Window</type> <name>window</name></member> + </type> + <type category="struct" name="VkXcbSurfaceCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkXcbSurfaceCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>xcb_connection_t</type>* <name>connection</name></member> + <member><type>xcb_window_t</type> <name>window</name></member> + </type> + <type category="struct" name="VkSurfaceFormatKHR"> + <member><type>VkFormat</type> <name>format</name></member> <!-- Supported pair of rendering format --> + <member><type>VkColorSpaceKHR</type> <name>colorSpace</name></member> <!-- and colorspace for the surface --> + </type> + <type category="struct" name="VkSwapchainCreateInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member optional="true"><type>VkSwapchainCreateFlagsKHR</type> <name>flags</name></member> <!-- Reserved --> + <member><type>VkSurfaceKHR</type> <name>surface</name></member> <!-- The swapchain's target surface --> + <member><type>uint32_t</type> <name>minImageCount</name></member> <!-- Minimum number of presentation images the application needs --> + <member><type>VkFormat</type> <name>imageFormat</name></member> <!-- Format of the presentation images --> + <member><type>VkColorSpaceKHR</type> <name>imageColorSpace</name></member> <!-- Colorspace of the presentation images --> + <member><type>VkExtent2D</type> <name>imageExtent</name></member> <!-- Dimensions of the presentation images --> + <member><type>uint32_t</type> <name>imageArrayLayers</name></member> <!-- Determines the number of views for multiview/stereo presentation --> + <member><type>VkImageUsageFlags</type> <name>imageUsage</name></member> <!-- Bits indicating how the presentation images will be used --> + <member><type>VkSharingMode</type> <name>imageSharingMode</name></member> <!-- Sharing mode used for the presentation images --> + <member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member> <!-- Number of queue families having access to the images in case of concurrent sharing mode --> + <member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member> <!-- Array of queue family indices having access to the images in case of concurrent sharing mode --> + <member><type>VkSurfaceTransformFlagBitsKHR</type> <name>preTransform</name></member> <!-- The transform, relative to the device's natural orientation, applied to the image content prior to presentation --> + <member><type>VkCompositeAlphaFlagBitsKHR</type> <name>compositeAlpha</name></member> <!-- The alpha blending mode used when compositing this surface with other surfaces in the window system --> + <member><type>VkPresentModeKHR</type> <name>presentMode</name></member> <!-- Which presentation mode to use for presents on this swap chain --> + <member><type>VkBool32</type> <name>clipped</name></member> <!-- Specifies whether presentable images may be affected by window clip regions --> + <member optional="true"><type>VkSwapchainKHR</type> <name>oldSwapchain</name></member> <!-- Existing swap chain to replace, if any --> + <validity> + <usage>pname:surface must: be a surface that is supported by the device as determined using fname:vkGetPhysicalDeviceSurfaceSupportKHR</usage> + <usage>pname:minImageCount must: be greater than or equal to the value returned in the pname:minImageCount member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface</usage> + <usage>pname:minImageCount must: be less than or equal to the value returned in the pname:maxImageCount member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface if the returned value of pname:maxImageCount is not zero</usage> + <usage>pname:imageFormat and pname:imageColorspace must: match the pname:format and pname:colorSpace members, respectively, of one of the sname:VkSurfaceFormatKHR structures returned by fname:vkGetPhysicalDeviceSurfaceFormatsKHR for the surface</usage> + <usage>pname:imageExtent must: be between pname:minImageExtent and pname:maxImageExtent, inclusive, where pname:minImageExtent and pname:maxImageExtent are members of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface</usage> + <usage>pname:imageArrayLayers must: be greater than `0` and less than or equal to the pname:maxImageArrayLayers member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface</usage> + <usage>pname:imageUsage must: be a subset of the supported usage flags present in the pname:supportedUsageFlags member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface</usage> + <usage>If pname:imageSharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:pQueueFamilyIndices must: be a pointer to an array of pname:queueFamilyIndexCount basetype:uint32_t values</usage> + <usage>If pname:imageSharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:queueFamilyIndexCount must: be greater than `1`</usage> + <usage>pname:preTransform must: be one of the bits present in the pname:supportedTransforms member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface</usage> + <usage>pname:compositeAlpha must: be one of the bits present in the pname:supportedCompositeAlpha member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface</usage> + <usage>pname:presentMode must: be one of the ename:VkPresentModeKHR values returned by fname:vkGetPhysicalDeviceSurfacePresentModesKHR for the surface</usage> + </validity> + </type> + <type category="struct" name="VkPresentInfoKHR"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_PRESENT_INFO_KHR --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>uint32_t</type> <name>waitSemaphoreCount</name></member> <!-- Number of semaphores to wait for before presenting --> + <member optional="true" len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member> <!-- Semaphores to wait for before presenting --> + <member><type>uint32_t</type> <name>swapchainCount</name></member> <!-- Number of swap chains to present in this call --> + <member len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name></member> <!-- Swapchains to present an image from --> + <member len="swapchainCount">const <type>uint32_t</type>* <name>pImageIndices</name></member> <!-- Indices of which swapchain images to present --> + <member optional="true" len="swapchainCount"><type>VkResult</type>* <name>pResults</name></member> <!-- Optional (i.e. if non-NULL) VkResult for each swapchain --> + <validity> + <usage>Any given element of pname:pImageIndices must: be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pname:pSwapchains array that is owned by the application</usage> + <usage>Any given element of sname:VkSemaphore in pname:pWaitSemaphores must: refer to a prior signal of that sname:VkSemaphore that won't be consumed by any other wait on that semaphore</usage> + </validity> + </type> + <type category="struct" name="VkDebugReportCallbackCreateInfoEXT"> + <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO --> + <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> + <member><type>VkDebugReportFlagsEXT</type> <name>flags</name></member> <!-- Indicates which events call this callback--> + <member><type>PFN_vkDebugReportCallbackEXT</type> <name>pfnCallback</name></member> <!-- Function pointer of a callback function--> + <member optional="true"><type>void</type>* <name>pUserData</name></member> <!-- User data provided to callback function --> + </type> + </types> + + <!-- SECTION: Vulkan enumerant (token) definitions. --> + + <enums name="API Constants" comment="Misc. hardcoded constants - not an enumerated type"> + <!-- This is part of the header boilerplate --> + <enum value="256" name="VK_MAX_PHYSICAL_DEVICE_NAME_SIZE"/> + <enum value="16" name="VK_UUID_SIZE"/> + <enum value="256" name="VK_MAX_EXTENSION_NAME_SIZE"/> + <enum value="256" name="VK_MAX_DESCRIPTION_SIZE"/> + <enum value="32" name="VK_MAX_MEMORY_TYPES"/> + <enum value="16" name="VK_MAX_MEMORY_HEAPS"/> <!-- The maximum number of unique memory heaps, each of which supporting 1 or more memory types. --> + <enum value="1000.0f" name="VK_LOD_CLAMP_NONE"/> + <enum value="(~0U)" name="VK_REMAINING_MIP_LEVELS"/> + <enum value="(~0U)" name="VK_REMAINING_ARRAY_LAYERS"/> + <enum value="(~0ULL)" name="VK_WHOLE_SIZE"/> + <enum value="(~0U)" name="VK_ATTACHMENT_UNUSED"/> + <enum value="1" name="VK_TRUE"/> + <enum value="0" name="VK_FALSE"/> + <enum value="(~0U)" name="VK_QUEUE_FAMILY_IGNORED"/> + <enum value="(~0U)" name="VK_SUBPASS_EXTERNAL"/> + </enums> + + <!-- Unlike OpenGL, most tokens in Vulkan are actual typed enumerants in + their own numeric namespaces. The "name" attribute is the C enum + type name, and is pulled in from a <type> definition above + (slightly clunky, but retains the type / enum distinction). "type" + attributes of "enum" or "bitmask" indicate that these values should + be generated inside an appropriate definition. --> + + <enums name="VkImageLayout" type="enum" expand="VK_IMAGE_LAYOUT"> + <enum value="0" name="VK_IMAGE_LAYOUT_UNDEFINED" comment="Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)"/> + <enum value="1" name="VK_IMAGE_LAYOUT_GENERAL" comment="General layout when image can be used for any kind of access"/> + <enum value="2" name="VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL" comment="Optimal layout when image is only used for color attachment read/write"/> + <enum value="3" name="VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL" comment="Optimal layout when image is only used for depth/stencil attachment read/write"/> + <enum value="4" name="VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL" comment="Optimal layout when image is used for read only depth/stencil attachment and shader access"/> + <enum value="5" name="VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL" comment="Optimal layout when image is used for read only shader access"/> + <enum value="6" name="VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL" comment="Optimal layout when image is used only as source of transfer operations"/> + <enum value="7" name="VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL" comment="Optimal layout when image is used only as destination of transfer operations"/> + <enum value="8" name="VK_IMAGE_LAYOUT_PREINITIALIZED" comment="Initial layout used when the data is populated by the CPU"/> + </enums> + <enums name="VkAttachmentLoadOp" type="enum" expand="VK_ATTACHMENT_LOAD_OP"> + <enum value="0" name="VK_ATTACHMENT_LOAD_OP_LOAD"/> + <enum value="1" name="VK_ATTACHMENT_LOAD_OP_CLEAR"/> + <enum value="2" name="VK_ATTACHMENT_LOAD_OP_DONT_CARE"/> + </enums> + <enums name="VkAttachmentStoreOp" type="enum" expand="VK_ATTACHMENT_STORE_OP"> + <enum value="0" name="VK_ATTACHMENT_STORE_OP_STORE"/> + <enum value="1" name="VK_ATTACHMENT_STORE_OP_DONT_CARE"/> + </enums> + <enums name="VkImageType" type="enum" expand="VK_IMAGE_TYPE"> + <enum value="0" name="VK_IMAGE_TYPE_1D"/> + <enum value="1" name="VK_IMAGE_TYPE_2D"/> + <enum value="2" name="VK_IMAGE_TYPE_3D"/> + </enums> + <enums name="VkImageTiling" type="enum" expand="VK_IMAGE_TILING"> + <enum value="0" name="VK_IMAGE_TILING_OPTIMAL"/> + <enum value="1" name="VK_IMAGE_TILING_LINEAR"/> + </enums> + <enums name="VkImageViewType" type="enum" expand="VK_IMAGE_VIEW_TYPE"> + <enum value="0" name="VK_IMAGE_VIEW_TYPE_1D"/> + <enum value="1" name="VK_IMAGE_VIEW_TYPE_2D"/> + <enum value="2" name="VK_IMAGE_VIEW_TYPE_3D"/> + <enum value="3" name="VK_IMAGE_VIEW_TYPE_CUBE"/> + <enum value="4" name="VK_IMAGE_VIEW_TYPE_1D_ARRAY"/> + <enum value="5" name="VK_IMAGE_VIEW_TYPE_2D_ARRAY"/> + <enum value="6" name="VK_IMAGE_VIEW_TYPE_CUBE_ARRAY"/> + </enums> + <enums name="VkCommandBufferLevel" type="enum" expand="VK_COMMAND_BUFFER_LEVEL"> + <enum value="0" name="VK_COMMAND_BUFFER_LEVEL_PRIMARY"/> + <enum value="1" name="VK_COMMAND_BUFFER_LEVEL_SECONDARY"/> + </enums> + <enums name="VkComponentSwizzle" type="enum" expand="VK_COMPONENT_SWIZZLE"> + <enum value="0" name="VK_COMPONENT_SWIZZLE_IDENTITY"/> + <enum value="1" name="VK_COMPONENT_SWIZZLE_ZERO"/> + <enum value="2" name="VK_COMPONENT_SWIZZLE_ONE"/> + <enum value="3" name="VK_COMPONENT_SWIZZLE_R"/> + <enum value="4" name="VK_COMPONENT_SWIZZLE_G"/> + <enum value="5" name="VK_COMPONENT_SWIZZLE_B"/> + <enum value="6" name="VK_COMPONENT_SWIZZLE_A"/> + </enums> + <enums name="VkDescriptorType" type="enum" expand="VK_DESCRIPTOR_TYPE"> + <enum value="0" name="VK_DESCRIPTOR_TYPE_SAMPLER"/> + <enum value="1" name="VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER"/> + <enum value="2" name="VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE"/> + <enum value="3" name="VK_DESCRIPTOR_TYPE_STORAGE_IMAGE"/> + <enum value="4" name="VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER"/> + <enum value="5" name="VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER"/> + <enum value="6" name="VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER"/> + <enum value="7" name="VK_DESCRIPTOR_TYPE_STORAGE_BUFFER"/> + <enum value="8" name="VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC"/> + <enum value="9" name="VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC"/> + <enum value="10" name="VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT"/> + </enums> + <enums name="VkQueryType" type="enum" expand="VK_QUERY_TYPE"> + <enum value="0" name="VK_QUERY_TYPE_OCCLUSION"/> + <enum value="1" name="VK_QUERY_TYPE_PIPELINE_STATISTICS" comment="Optional"/> + <enum value="2" name="VK_QUERY_TYPE_TIMESTAMP"/> + </enums> + <enums name="VkBorderColor" type="enum" expand="VK_BORDER_COLOR"> + <enum value="0" name="VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK"/> + <enum value="1" name="VK_BORDER_COLOR_INT_TRANSPARENT_BLACK"/> + <enum value="2" name="VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK"/> + <enum value="3" name="VK_BORDER_COLOR_INT_OPAQUE_BLACK"/> + <enum value="4" name="VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE"/> + <enum value="5" name="VK_BORDER_COLOR_INT_OPAQUE_WHITE"/> + </enums> + <enums name="VkPipelineBindPoint" type="enum" expand="VK_PIPELINE_BIND_POINT"> + <enum value="0" name="VK_PIPELINE_BIND_POINT_GRAPHICS"/> + <enum value="1" name="VK_PIPELINE_BIND_POINT_COMPUTE"/> + </enums> + <enums name="VkPipelineCacheHeaderVersion" type="enum" expand="VK_PIPELINE_CACHE_HEADER_VERSION"> + <enum value="1" name="VK_PIPELINE_CACHE_HEADER_VERSION_ONE"/> + </enums> + <enums name="VkPrimitiveTopology" type="enum" expand="VK_PRIMITIVE_TOPOLOGY"> + <enum value="0" name="VK_PRIMITIVE_TOPOLOGY_POINT_LIST"/> + <enum value="1" name="VK_PRIMITIVE_TOPOLOGY_LINE_LIST"/> + <enum value="2" name="VK_PRIMITIVE_TOPOLOGY_LINE_STRIP"/> + <enum value="3" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST"/> + <enum value="4" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP"/> + <enum value="5" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN"/> + <enum value="6" name="VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY"/> + <enum value="7" name="VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY"/> + <enum value="8" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY"/> + <enum value="9" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY"/> + <enum value="10" name="VK_PRIMITIVE_TOPOLOGY_PATCH_LIST"/> + </enums> + <enums name="VkSharingMode" type="enum" expand="VK_SHARING_MODE"> + <enum value="0" name="VK_SHARING_MODE_EXCLUSIVE"/> + <enum value="1" name="VK_SHARING_MODE_CONCURRENT"/> + </enums> + <enums name="VkIndexType" type="enum" expand="VK_INDEX_TYPE"> + <enum value="0" name="VK_INDEX_TYPE_UINT16"/> + <enum value="1" name="VK_INDEX_TYPE_UINT32"/> + </enums> + <enums name="VkFilter" type="enum" expand="VK_FILTER"> + <enum value="0" name="VK_FILTER_NEAREST"/> + <enum value="1" name="VK_FILTER_LINEAR"/> + </enums> + <enums name="VkSamplerMipmapMode" type="enum" expand="VK_SAMPLER_MIPMAP_MODE"> + <enum value="0" name="VK_SAMPLER_MIPMAP_MODE_NEAREST" comment="Choose nearest mip level"/> + <enum value="1" name="VK_SAMPLER_MIPMAP_MODE_LINEAR" comment="Linear filter between mip levels"/> + </enums> + <enums name="VkSamplerAddressMode" type="enum" expand="VK_SAMPLER_ADDRESS_MODE"> + <enum value="0" name="VK_SAMPLER_ADDRESS_MODE_REPEAT"/> + <enum value="1" name="VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT"/> + <enum value="2" name="VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE"/> + <enum value="3" name="VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER"/> + <enum value="4" name="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE"/> + </enums> + <enums name="VkCompareOp" type="enum" expand="VK_COMPARE_OP"> + <enum value="0" name="VK_COMPARE_OP_NEVER"/> + <enum value="1" name="VK_COMPARE_OP_LESS"/> + <enum value="2" name="VK_COMPARE_OP_EQUAL"/> + <enum value="3" name="VK_COMPARE_OP_LESS_OR_EQUAL"/> + <enum value="4" name="VK_COMPARE_OP_GREATER"/> + <enum value="5" name="VK_COMPARE_OP_NOT_EQUAL"/> + <enum value="6" name="VK_COMPARE_OP_GREATER_OR_EQUAL"/> + <enum value="7" name="VK_COMPARE_OP_ALWAYS"/> + </enums> + <enums name="VkPolygonMode" type="enum" expand="VK_POLYGON_MODE"> + <enum value="0" name="VK_POLYGON_MODE_FILL"/> + <enum value="1" name="VK_POLYGON_MODE_LINE"/> + <enum value="2" name="VK_POLYGON_MODE_POINT"/> + </enums> + <enums name="VkCullModeFlagBits" type="bitmask"> + <enum value="0" name="VK_CULL_MODE_NONE"/> + <enum bitpos="0" name="VK_CULL_MODE_FRONT_BIT"/> + <enum bitpos="1" name="VK_CULL_MODE_BACK_BIT"/> + <enum value="0x3" name="VK_CULL_MODE_FRONT_AND_BACK"/> + </enums> + <enums name="VkFrontFace" type="enum" expand="VK_FRONT_FACE"> + <enum value="0" name="VK_FRONT_FACE_COUNTER_CLOCKWISE"/> + <enum value="1" name="VK_FRONT_FACE_CLOCKWISE"/> + </enums> + <enums name="VkBlendFactor" type="enum" expand="VK_BLEND_FACTOR"> + <enum value="0" name="VK_BLEND_FACTOR_ZERO"/> + <enum value="1" name="VK_BLEND_FACTOR_ONE"/> + <enum value="2" name="VK_BLEND_FACTOR_SRC_COLOR"/> + <enum value="3" name="VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR"/> + <enum value="4" name="VK_BLEND_FACTOR_DST_COLOR"/> + <enum value="5" name="VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR"/> + <enum value="6" name="VK_BLEND_FACTOR_SRC_ALPHA"/> + <enum value="7" name="VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA"/> + <enum value="8" name="VK_BLEND_FACTOR_DST_ALPHA"/> + <enum value="9" name="VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA"/> + <enum value="10" name="VK_BLEND_FACTOR_CONSTANT_COLOR"/> + <enum value="11" name="VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR"/> + <enum value="12" name="VK_BLEND_FACTOR_CONSTANT_ALPHA"/> + <enum value="13" name="VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA"/> + <enum value="14" name="VK_BLEND_FACTOR_SRC_ALPHA_SATURATE"/> + <enum value="15" name="VK_BLEND_FACTOR_SRC1_COLOR"/> + <enum value="16" name="VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR"/> + <enum value="17" name="VK_BLEND_FACTOR_SRC1_ALPHA"/> + <enum value="18" name="VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA"/> + </enums> + <enums name="VkBlendOp" type="enum" expand="VK_BLEND_OP"> + <enum value="0" name="VK_BLEND_OP_ADD"/> + <enum value="1" name="VK_BLEND_OP_SUBTRACT"/> + <enum value="2" name="VK_BLEND_OP_REVERSE_SUBTRACT"/> + <enum value="3" name="VK_BLEND_OP_MIN"/> + <enum value="4" name="VK_BLEND_OP_MAX"/> + </enums> + <enums name="VkStencilOp" type="enum" expand="VK_STENCIL_OP"> + <enum value="0" name="VK_STENCIL_OP_KEEP"/> + <enum value="1" name="VK_STENCIL_OP_ZERO"/> + <enum value="2" name="VK_STENCIL_OP_REPLACE"/> + <enum value="3" name="VK_STENCIL_OP_INCREMENT_AND_CLAMP"/> + <enum value="4" name="VK_STENCIL_OP_DECREMENT_AND_CLAMP"/> + <enum value="5" name="VK_STENCIL_OP_INVERT"/> + <enum value="6" name="VK_STENCIL_OP_INCREMENT_AND_WRAP"/> + <enum value="7" name="VK_STENCIL_OP_DECREMENT_AND_WRAP"/> + </enums> + <enums name="VkLogicOp" type="enum" expand="VK_LOGIC_OP"> + <enum value="0" name="VK_LOGIC_OP_CLEAR"/> + <enum value="1" name="VK_LOGIC_OP_AND"/> + <enum value="2" name="VK_LOGIC_OP_AND_REVERSE"/> + <enum value="3" name="VK_LOGIC_OP_COPY"/> + <enum value="4" name="VK_LOGIC_OP_AND_INVERTED"/> + <enum value="5" name="VK_LOGIC_OP_NO_OP"/> + <enum value="6" name="VK_LOGIC_OP_XOR"/> + <enum value="7" name="VK_LOGIC_OP_OR"/> + <enum value="8" name="VK_LOGIC_OP_NOR"/> + <enum value="9" name="VK_LOGIC_OP_EQUIVALENT"/> + <enum value="10" name="VK_LOGIC_OP_INVERT"/> + <enum value="11" name="VK_LOGIC_OP_OR_REVERSE"/> + <enum value="12" name="VK_LOGIC_OP_COPY_INVERTED"/> + <enum value="13" name="VK_LOGIC_OP_OR_INVERTED"/> + <enum value="14" name="VK_LOGIC_OP_NAND"/> + <enum value="15" name="VK_LOGIC_OP_SET"/> + </enums> + <enums name="VkInternalAllocationType" type="enum" expand="VK_INTERNAL_ALLOCATION_TYPE"> + <enum value="0" name="VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE"/> + </enums> + <enums name="VkSystemAllocationScope" type="enum" expand="VK_SYSTEM_ALLOCATION_SCOPE"> + <enum value="0" name="VK_SYSTEM_ALLOCATION_SCOPE_COMMAND"/> + <enum value="1" name="VK_SYSTEM_ALLOCATION_SCOPE_OBJECT"/> + <enum value="2" name="VK_SYSTEM_ALLOCATION_SCOPE_CACHE"/> + <enum value="3" name="VK_SYSTEM_ALLOCATION_SCOPE_DEVICE"/> + <enum value="4" name="VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE"/> + </enums> + <enums name="VkPhysicalDeviceType" type="enum" expand="VK_PHYSICAL_DEVICE_TYPE"> + <enum value="0" name="VK_PHYSICAL_DEVICE_TYPE_OTHER"/> + <enum value="1" name="VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU"/> + <enum value="2" name="VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU"/> + <enum value="3" name="VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU"/> + <enum value="4" name="VK_PHYSICAL_DEVICE_TYPE_CPU"/> + </enums> + <enums name="VkVertexInputRate" type="enum" expand="VK_VERTEX_INPUT_RATE"> + <enum value="0" name="VK_VERTEX_INPUT_RATE_VERTEX"/> + <enum value="1" name="VK_VERTEX_INPUT_RATE_INSTANCE"/> + </enums> + <enums name="VkFormat" type="enum" expand="VK_FORMAT" comment="Vulkan format definitions"> + <enum value="0" name="VK_FORMAT_UNDEFINED"/> + <enum value="1" name="VK_FORMAT_R4G4_UNORM_PACK8"/> + <enum value="2" name="VK_FORMAT_R4G4B4A4_UNORM_PACK16"/> + <enum value="3" name="VK_FORMAT_B4G4R4A4_UNORM_PACK16"/> + <enum value="4" name="VK_FORMAT_R5G6B5_UNORM_PACK16"/> + <enum value="5" name="VK_FORMAT_B5G6R5_UNORM_PACK16"/> + <enum value="6" name="VK_FORMAT_R5G5B5A1_UNORM_PACK16"/> + <enum value="7" name="VK_FORMAT_B5G5R5A1_UNORM_PACK16"/> + <enum value="8" name="VK_FORMAT_A1R5G5B5_UNORM_PACK16"/> + <enum value="9" name="VK_FORMAT_R8_UNORM"/> + <enum value="10" name="VK_FORMAT_R8_SNORM"/> + <enum value="11" name="VK_FORMAT_R8_USCALED"/> + <enum value="12" name="VK_FORMAT_R8_SSCALED"/> + <enum value="13" name="VK_FORMAT_R8_UINT"/> + <enum value="14" name="VK_FORMAT_R8_SINT"/> + <enum value="15" name="VK_FORMAT_R8_SRGB"/> + <enum value="16" name="VK_FORMAT_R8G8_UNORM"/> + <enum value="17" name="VK_FORMAT_R8G8_SNORM"/> + <enum value="18" name="VK_FORMAT_R8G8_USCALED"/> + <enum value="19" name="VK_FORMAT_R8G8_SSCALED"/> + <enum value="20" name="VK_FORMAT_R8G8_UINT"/> + <enum value="21" name="VK_FORMAT_R8G8_SINT"/> + <enum value="22" name="VK_FORMAT_R8G8_SRGB"/> + <enum value="23" name="VK_FORMAT_R8G8B8_UNORM"/> + <enum value="24" name="VK_FORMAT_R8G8B8_SNORM"/> + <enum value="25" name="VK_FORMAT_R8G8B8_USCALED"/> + <enum value="26" name="VK_FORMAT_R8G8B8_SSCALED"/> + <enum value="27" name="VK_FORMAT_R8G8B8_UINT"/> + <enum value="28" name="VK_FORMAT_R8G8B8_SINT"/> + <enum value="29" name="VK_FORMAT_R8G8B8_SRGB"/> + <enum value="30" name="VK_FORMAT_B8G8R8_UNORM"/> + <enum value="31" name="VK_FORMAT_B8G8R8_SNORM"/> + <enum value="32" name="VK_FORMAT_B8G8R8_USCALED"/> + <enum value="33" name="VK_FORMAT_B8G8R8_SSCALED"/> + <enum value="34" name="VK_FORMAT_B8G8R8_UINT"/> + <enum value="35" name="VK_FORMAT_B8G8R8_SINT"/> + <enum value="36" name="VK_FORMAT_B8G8R8_SRGB"/> + <enum value="37" name="VK_FORMAT_R8G8B8A8_UNORM"/> + <enum value="38" name="VK_FORMAT_R8G8B8A8_SNORM"/> + <enum value="39" name="VK_FORMAT_R8G8B8A8_USCALED"/> + <enum value="40" name="VK_FORMAT_R8G8B8A8_SSCALED"/> + <enum value="41" name="VK_FORMAT_R8G8B8A8_UINT"/> + <enum value="42" name="VK_FORMAT_R8G8B8A8_SINT"/> + <enum value="43" name="VK_FORMAT_R8G8B8A8_SRGB"/> + <enum value="44" name="VK_FORMAT_B8G8R8A8_UNORM"/> + <enum value="45" name="VK_FORMAT_B8G8R8A8_SNORM"/> + <enum value="46" name="VK_FORMAT_B8G8R8A8_USCALED"/> + <enum value="47" name="VK_FORMAT_B8G8R8A8_SSCALED"/> + <enum value="48" name="VK_FORMAT_B8G8R8A8_UINT"/> + <enum value="49" name="VK_FORMAT_B8G8R8A8_SINT"/> + <enum value="50" name="VK_FORMAT_B8G8R8A8_SRGB"/> + <enum value="51" name="VK_FORMAT_A8B8G8R8_UNORM_PACK32"/> + <enum value="52" name="VK_FORMAT_A8B8G8R8_SNORM_PACK32"/> + <enum value="53" name="VK_FORMAT_A8B8G8R8_USCALED_PACK32"/> + <enum value="54" name="VK_FORMAT_A8B8G8R8_SSCALED_PACK32"/> + <enum value="55" name="VK_FORMAT_A8B8G8R8_UINT_PACK32"/> + <enum value="56" name="VK_FORMAT_A8B8G8R8_SINT_PACK32"/> + <enum value="57" name="VK_FORMAT_A8B8G8R8_SRGB_PACK32"/> + <enum value="58" name="VK_FORMAT_A2R10G10B10_UNORM_PACK32"/> + <enum value="59" name="VK_FORMAT_A2R10G10B10_SNORM_PACK32"/> + <enum value="60" name="VK_FORMAT_A2R10G10B10_USCALED_PACK32"/> + <enum value="61" name="VK_FORMAT_A2R10G10B10_SSCALED_PACK32"/> + <enum value="62" name="VK_FORMAT_A2R10G10B10_UINT_PACK32"/> + <enum value="63" name="VK_FORMAT_A2R10G10B10_SINT_PACK32"/> + <enum value="64" name="VK_FORMAT_A2B10G10R10_UNORM_PACK32"/> + <enum value="65" name="VK_FORMAT_A2B10G10R10_SNORM_PACK32"/> + <enum value="66" name="VK_FORMAT_A2B10G10R10_USCALED_PACK32"/> + <enum value="67" name="VK_FORMAT_A2B10G10R10_SSCALED_PACK32"/> + <enum value="68" name="VK_FORMAT_A2B10G10R10_UINT_PACK32"/> + <enum value="69" name="VK_FORMAT_A2B10G10R10_SINT_PACK32"/> + <enum value="70" name="VK_FORMAT_R16_UNORM"/> + <enum value="71" name="VK_FORMAT_R16_SNORM"/> + <enum value="72" name="VK_FORMAT_R16_USCALED"/> + <enum value="73" name="VK_FORMAT_R16_SSCALED"/> + <enum value="74" name="VK_FORMAT_R16_UINT"/> + <enum value="75" name="VK_FORMAT_R16_SINT"/> + <enum value="76" name="VK_FORMAT_R16_SFLOAT"/> + <enum value="77" name="VK_FORMAT_R16G16_UNORM"/> + <enum value="78" name="VK_FORMAT_R16G16_SNORM"/> + <enum value="79" name="VK_FORMAT_R16G16_USCALED"/> + <enum value="80" name="VK_FORMAT_R16G16_SSCALED"/> + <enum value="81" name="VK_FORMAT_R16G16_UINT"/> + <enum value="82" name="VK_FORMAT_R16G16_SINT"/> + <enum value="83" name="VK_FORMAT_R16G16_SFLOAT"/> + <enum value="84" name="VK_FORMAT_R16G16B16_UNORM"/> + <enum value="85" name="VK_FORMAT_R16G16B16_SNORM"/> + <enum value="86" name="VK_FORMAT_R16G16B16_USCALED"/> + <enum value="87" name="VK_FORMAT_R16G16B16_SSCALED"/> + <enum value="88" name="VK_FORMAT_R16G16B16_UINT"/> + <enum value="89" name="VK_FORMAT_R16G16B16_SINT"/> + <enum value="90" name="VK_FORMAT_R16G16B16_SFLOAT"/> + <enum value="91" name="VK_FORMAT_R16G16B16A16_UNORM"/> + <enum value="92" name="VK_FORMAT_R16G16B16A16_SNORM"/> + <enum value="93" name="VK_FORMAT_R16G16B16A16_USCALED"/> + <enum value="94" name="VK_FORMAT_R16G16B16A16_SSCALED"/> + <enum value="95" name="VK_FORMAT_R16G16B16A16_UINT"/> + <enum value="96" name="VK_FORMAT_R16G16B16A16_SINT"/> + <enum value="97" name="VK_FORMAT_R16G16B16A16_SFLOAT"/> + <enum value="98" name="VK_FORMAT_R32_UINT"/> + <enum value="99" name="VK_FORMAT_R32_SINT"/> + <enum value="100" name="VK_FORMAT_R32_SFLOAT"/> + <enum value="101" name="VK_FORMAT_R32G32_UINT"/> + <enum value="102" name="VK_FORMAT_R32G32_SINT"/> + <enum value="103" name="VK_FORMAT_R32G32_SFLOAT"/> + <enum value="104" name="VK_FORMAT_R32G32B32_UINT"/> + <enum value="105" name="VK_FORMAT_R32G32B32_SINT"/> + <enum value="106" name="VK_FORMAT_R32G32B32_SFLOAT"/> + <enum value="107" name="VK_FORMAT_R32G32B32A32_UINT"/> + <enum value="108" name="VK_FORMAT_R32G32B32A32_SINT"/> + <enum value="109" name="VK_FORMAT_R32G32B32A32_SFLOAT"/> + <enum value="110" name="VK_FORMAT_R64_UINT"/> + <enum value="111" name="VK_FORMAT_R64_SINT"/> + <enum value="112" name="VK_FORMAT_R64_SFLOAT"/> + <enum value="113" name="VK_FORMAT_R64G64_UINT"/> + <enum value="114" name="VK_FORMAT_R64G64_SINT"/> + <enum value="115" name="VK_FORMAT_R64G64_SFLOAT"/> + <enum value="116" name="VK_FORMAT_R64G64B64_UINT"/> + <enum value="117" name="VK_FORMAT_R64G64B64_SINT"/> + <enum value="118" name="VK_FORMAT_R64G64B64_SFLOAT"/> + <enum value="119" name="VK_FORMAT_R64G64B64A64_UINT"/> + <enum value="120" name="VK_FORMAT_R64G64B64A64_SINT"/> + <enum value="121" name="VK_FORMAT_R64G64B64A64_SFLOAT"/> + <enum value="122" name="VK_FORMAT_B10G11R11_UFLOAT_PACK32"/> + <enum value="123" name="VK_FORMAT_E5B9G9R9_UFLOAT_PACK32"/> + <enum value="124" name="VK_FORMAT_D16_UNORM"/> + <enum value="125" name="VK_FORMAT_X8_D24_UNORM_PACK32"/> + <enum value="126" name="VK_FORMAT_D32_SFLOAT"/> + <enum value="127" name="VK_FORMAT_S8_UINT"/> + <enum value="128" name="VK_FORMAT_D16_UNORM_S8_UINT"/> + <enum value="129" name="VK_FORMAT_D24_UNORM_S8_UINT"/> + <enum value="130" name="VK_FORMAT_D32_SFLOAT_S8_UINT"/> + <enum value="131" name="VK_FORMAT_BC1_RGB_UNORM_BLOCK"/> + <enum value="132" name="VK_FORMAT_BC1_RGB_SRGB_BLOCK"/> + <enum value="133" name="VK_FORMAT_BC1_RGBA_UNORM_BLOCK"/> + <enum value="134" name="VK_FORMAT_BC1_RGBA_SRGB_BLOCK"/> + <enum value="135" name="VK_FORMAT_BC2_UNORM_BLOCK"/> + <enum value="136" name="VK_FORMAT_BC2_SRGB_BLOCK"/> + <enum value="137" name="VK_FORMAT_BC3_UNORM_BLOCK"/> + <enum value="138" name="VK_FORMAT_BC3_SRGB_BLOCK"/> + <enum value="139" name="VK_FORMAT_BC4_UNORM_BLOCK"/> + <enum value="140" name="VK_FORMAT_BC4_SNORM_BLOCK"/> + <enum value="141" name="VK_FORMAT_BC5_UNORM_BLOCK"/> + <enum value="142" name="VK_FORMAT_BC5_SNORM_BLOCK"/> + <enum value="143" name="VK_FORMAT_BC6H_UFLOAT_BLOCK"/> + <enum value="144" name="VK_FORMAT_BC6H_SFLOAT_BLOCK"/> + <enum value="145" name="VK_FORMAT_BC7_UNORM_BLOCK"/> + <enum value="146" name="VK_FORMAT_BC7_SRGB_BLOCK"/> + <enum value="147" name="VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK"/> + <enum value="148" name="VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK"/> + <enum value="149" name="VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK"/> + <enum value="150" name="VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK"/> + <enum value="151" name="VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK"/> + <enum value="152" name="VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK"/> + <enum value="153" name="VK_FORMAT_EAC_R11_UNORM_BLOCK"/> + <enum value="154" name="VK_FORMAT_EAC_R11_SNORM_BLOCK"/> + <enum value="155" name="VK_FORMAT_EAC_R11G11_UNORM_BLOCK"/> + <enum value="156" name="VK_FORMAT_EAC_R11G11_SNORM_BLOCK"/> + <enum value="157" name="VK_FORMAT_ASTC_4x4_UNORM_BLOCK"/> + <enum value="158" name="VK_FORMAT_ASTC_4x4_SRGB_BLOCK"/> + <enum value="159" name="VK_FORMAT_ASTC_5x4_UNORM_BLOCK"/> + <enum value="160" name="VK_FORMAT_ASTC_5x4_SRGB_BLOCK"/> + <enum value="161" name="VK_FORMAT_ASTC_5x5_UNORM_BLOCK"/> + <enum value="162" name="VK_FORMAT_ASTC_5x5_SRGB_BLOCK"/> + <enum value="163" name="VK_FORMAT_ASTC_6x5_UNORM_BLOCK"/> + <enum value="164" name="VK_FORMAT_ASTC_6x5_SRGB_BLOCK"/> + <enum value="165" name="VK_FORMAT_ASTC_6x6_UNORM_BLOCK"/> + <enum value="166" name="VK_FORMAT_ASTC_6x6_SRGB_BLOCK"/> + <enum value="167" name="VK_FORMAT_ASTC_8x5_UNORM_BLOCK"/> + <enum value="168" name="VK_FORMAT_ASTC_8x5_SRGB_BLOCK"/> + <enum value="169" name="VK_FORMAT_ASTC_8x6_UNORM_BLOCK"/> + <enum value="170" name="VK_FORMAT_ASTC_8x6_SRGB_BLOCK"/> + <enum value="171" name="VK_FORMAT_ASTC_8x8_UNORM_BLOCK"/> + <enum value="172" name="VK_FORMAT_ASTC_8x8_SRGB_BLOCK"/> + <enum value="173" name="VK_FORMAT_ASTC_10x5_UNORM_BLOCK"/> + <enum value="174" name="VK_FORMAT_ASTC_10x5_SRGB_BLOCK"/> + <enum value="175" name="VK_FORMAT_ASTC_10x6_UNORM_BLOCK"/> + <enum value="176" name="VK_FORMAT_ASTC_10x6_SRGB_BLOCK"/> + <enum value="177" name="VK_FORMAT_ASTC_10x8_UNORM_BLOCK"/> + <enum value="178" name="VK_FORMAT_ASTC_10x8_SRGB_BLOCK"/> + <enum value="179" name="VK_FORMAT_ASTC_10x10_UNORM_BLOCK"/> + <enum value="180" name="VK_FORMAT_ASTC_10x10_SRGB_BLOCK"/> + <enum value="181" name="VK_FORMAT_ASTC_12x10_UNORM_BLOCK"/> + <enum value="182" name="VK_FORMAT_ASTC_12x10_SRGB_BLOCK"/> + <enum value="183" name="VK_FORMAT_ASTC_12x12_UNORM_BLOCK"/> + <enum value="184" name="VK_FORMAT_ASTC_12x12_SRGB_BLOCK"/> + </enums> + <enums name="VkStructureType" type="enum" expand="VK_STRUCTURE_TYPE" comment="Structure type enumerant"> + <enum value="0" name="VK_STRUCTURE_TYPE_APPLICATION_INFO"/> + <enum value="1" name="VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO"/> + <enum value="2" name="VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO"/> + <enum value="3" name="VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO"/> + <enum value="4" name="VK_STRUCTURE_TYPE_SUBMIT_INFO"/> + <enum value="5" name="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO"/> + <enum value="6" name="VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE"/> + <enum value="7" name="VK_STRUCTURE_TYPE_BIND_SPARSE_INFO"/> + <enum value="8" name="VK_STRUCTURE_TYPE_FENCE_CREATE_INFO"/> + <enum value="9" name="VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO"/> + <enum value="10" name="VK_STRUCTURE_TYPE_EVENT_CREATE_INFO"/> + <enum value="11" name="VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO"/> + <enum value="12" name="VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO"/> + <enum value="13" name="VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO"/> + <enum value="14" name="VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO"/> + <enum value="15" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO"/> + <enum value="16" name="VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO"/> + <enum value="17" name="VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO"/> + <enum value="18" name="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO"/> + <enum value="19" name="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO"/> + <enum value="20" name="VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO"/> + <enum value="21" name="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO"/> + <enum value="22" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO"/> + <enum value="23" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO"/> + <enum value="24" name="VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"/> + <enum value="25" name="VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO"/> + <enum value="26" name="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO"/> + <enum value="27" name="VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO"/> + <enum value="28" name="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO"/> + <enum value="29" name="VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO"/> + <enum value="30" name="VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO"/> + <enum value="31" name="VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO"/> + <enum value="32" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO"/> + <enum value="33" name="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO"/> + <enum value="34" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO"/> + <enum value="35" name="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET"/> + <enum value="36" name="VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET"/> + <enum value="37" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO"/> + <enum value="38" name="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO"/> + <enum value="39" name="VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO"/> + <enum value="40" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO"/> + <enum value="41" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO"/> + <enum value="42" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO"/> + <enum value="43" name="VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO"/> + <enum value="44" name="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER"/> + <enum value="45" name="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER"/> + <enum value="46" name="VK_STRUCTURE_TYPE_MEMORY_BARRIER"/> + <enum value="47" name="VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO"/> <!-- Reserved for internal use by the loader, layers, and ICDs --> + <enum value="48" name="VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO"/> <!-- Reserved for internal use by the loader, layers, and ICDs --> + </enums> + <enums name="VkSubpassContents" type="enum" expand="VK_SUBPASS_CONTENTS"> + <enum value="0" name="VK_SUBPASS_CONTENTS_INLINE"/> + <enum value="1" name="VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS"/> + </enums> + <enums name="VkResult" type="enum" expand="VK_RESULT" comment="Error and return codes"> + <!-- Return codes for successful operation execution (positive values) --> + <enum value="0" name="VK_SUCCESS" comment="Command completed successfully"/> + <enum value="1" name="VK_NOT_READY" comment="A fence or query has not yet completed"/> + <enum value="2" name="VK_TIMEOUT" comment="A wait operation has not completed in the specified time"/> + <enum value="3" name="VK_EVENT_SET" comment="An event is signaled"/> + <enum value="4" name="VK_EVENT_RESET" comment="An event is unsignalled"/> + <enum value="5" name="VK_INCOMPLETE" comment="A return array was too small for the resul"/> + <!-- Error codes (negative values) --> + <enum value="-1" name="VK_ERROR_OUT_OF_HOST_MEMORY" comment="A host memory allocation has failed"/> + <enum value="-2" name="VK_ERROR_OUT_OF_DEVICE_MEMORY" comment="A device memory allocation has failed"/> + <enum value="-3" name="VK_ERROR_INITIALIZATION_FAILED" comment="The logical device has been lost. See <<devsandqueues-lost-device>>"/> + <enum value="-4" name="VK_ERROR_DEVICE_LOST" comment="Initialization of a object has failed"/> + <enum value="-5" name="VK_ERROR_MEMORY_MAP_FAILED" comment="Mapping of a memory object has failed"/> + <enum value="-6" name="VK_ERROR_LAYER_NOT_PRESENT" comment="Layer specified does not exist"/> + <enum value="-7" name="VK_ERROR_EXTENSION_NOT_PRESENT" comment="Extension specified does not exist"/> + <enum value="-8" name="VK_ERROR_FEATURE_NOT_PRESENT" comment="Requested feature is not available on this device"/> + <enum value="-9" name="VK_ERROR_INCOMPATIBLE_DRIVER" comment="Unable to find a Vulkan driver"/> + <enum value="-10" name="VK_ERROR_TOO_MANY_OBJECTS" comment="Too many objects of the type have already been created"/> + <enum value="-11" name="VK_ERROR_FORMAT_NOT_SUPPORTED" comment="Requested format is not supported on this device"/> + <unused start="-12"/> + </enums> + <enums name="VkDynamicState" type="enum" expand="VK_DYNAMIC_STATE"> + <enum value="0" name="VK_DYNAMIC_STATE_VIEWPORT"/> + <enum value="1" name="VK_DYNAMIC_STATE_SCISSOR"/> + <enum value="2" name="VK_DYNAMIC_STATE_LINE_WIDTH"/> + <enum value="3" name="VK_DYNAMIC_STATE_DEPTH_BIAS"/> + <enum value="4" name="VK_DYNAMIC_STATE_BLEND_CONSTANTS"/> + <enum value="5" name="VK_DYNAMIC_STATE_DEPTH_BOUNDS"/> + <enum value="6" name="VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK"/> + <enum value="7" name="VK_DYNAMIC_STATE_STENCIL_WRITE_MASK"/> + <enum value="8" name="VK_DYNAMIC_STATE_STENCIL_REFERENCE"/> + </enums> + + <!-- Flags --> + <enums name="VkQueueFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_QUEUE_GRAPHICS_BIT" comment="Queue supports graphics operations"/> + <enum bitpos="1" name="VK_QUEUE_COMPUTE_BIT" comment="Queue supports compute operations"/> + <enum bitpos="2" name="VK_QUEUE_TRANSFER_BIT" comment="Queue supports transfer operations"/> + <enum bitpos="3" name="VK_QUEUE_SPARSE_BINDING_BIT" comment="Queue supports sparse resource memory management operations"/> + </enums> + <enums name="VkMemoryPropertyFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT" comment="If otherwise stated, then allocate memory on device"/> + <enum bitpos="1" name="VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT" comment="Memory is mappable by host"/> + <enum bitpos="2" name="VK_MEMORY_PROPERTY_HOST_COHERENT_BIT" comment="Memory will have i/o coherency. If not set, application may need to use vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges to flush/invalidate host cache"/> + <enum bitpos="3" name="VK_MEMORY_PROPERTY_HOST_CACHED_BIT" comment="Memory will be cached by the host"/> + <enum bitpos="4" name="VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT" comment="Memory may be allocated by the driver when it is required"/> + </enums> + <enums name="VkMemoryHeapFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_MEMORY_HEAP_DEVICE_LOCAL_BIT" comment="If set, heap represents device memory"/> + </enums> + <enums name="VkAccessFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_ACCESS_INDIRECT_COMMAND_READ_BIT" comment="Controls coherency of indirect command reads"/> + <enum bitpos="1" name="VK_ACCESS_INDEX_READ_BIT" comment="Controls coherency of index reads"/> + <enum bitpos="2" name="VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT" comment="Controls coherency of vertex attribute reads"/> + <enum bitpos="3" name="VK_ACCESS_UNIFORM_READ_BIT" comment="Controls coherency of uniform buffer reads"/> + <enum bitpos="4" name="VK_ACCESS_INPUT_ATTACHMENT_READ_BIT" comment="Controls coherency of input attachment reads"/> + <enum bitpos="5" name="VK_ACCESS_SHADER_READ_BIT" comment="Controls coherency of shader reads"/> + <enum bitpos="6" name="VK_ACCESS_SHADER_WRITE_BIT" comment="Controls coherency of shader writes"/> + <enum bitpos="7" name="VK_ACCESS_COLOR_ATTACHMENT_READ_BIT" comment="Controls coherency of color attachment reads"/> + <enum bitpos="8" name="VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT" comment="Controls coherency of color attachment writes"/> + <enum bitpos="9" name="VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT" comment="Controls coherency of depth/stencil attachment reads"/> + <enum bitpos="10" name="VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT" comment="Controls coherency of depth/stencil attachment writes"/> + <enum bitpos="11" name="VK_ACCESS_TRANSFER_READ_BIT" comment="Controls coherency of transfer reads"/> + <enum bitpos="12" name="VK_ACCESS_TRANSFER_WRITE_BIT" comment="Controls coherency of transfer writes"/> + <enum bitpos="13" name="VK_ACCESS_HOST_READ_BIT" comment="Controls coherency of host reads"/> + <enum bitpos="14" name="VK_ACCESS_HOST_WRITE_BIT" comment="Controls coherency of host writes"/> + <enum bitpos="15" name="VK_ACCESS_MEMORY_READ_BIT" comment="Controls coherency of memory reads"/> + <enum bitpos="16" name="VK_ACCESS_MEMORY_WRITE_BIT" comment="Controls coherency of memory writes"/> + </enums> + <enums name="VkBufferUsageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_BUFFER_USAGE_TRANSFER_SRC_BIT" comment="Can be used as a source of transfer operations"/> + <enum bitpos="1" name="VK_BUFFER_USAGE_TRANSFER_DST_BIT" comment="Can be used as a destination of transfer operations"/> + <enum bitpos="2" name="VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT" comment="Can be used as TBO"/> + <enum bitpos="3" name="VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT" comment="Can be used as IBO"/> + <enum bitpos="4" name="VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT" comment="Can be used as UBO"/> + <enum bitpos="5" name="VK_BUFFER_USAGE_STORAGE_BUFFER_BIT" comment="Can be used as SSBO"/> + <enum bitpos="6" name="VK_BUFFER_USAGE_INDEX_BUFFER_BIT" comment="Can be used as source of fixed-function index fetch (index buffer)"/> + <enum bitpos="7" name="VK_BUFFER_USAGE_VERTEX_BUFFER_BIT" comment="Can be used as source of fixed-function vertex fetch (VBO)"/> + <enum bitpos="8" name="VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT" comment="Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)"/> + </enums> + <enums name="VkBufferCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_BUFFER_CREATE_SPARSE_BINDING_BIT" comment="Buffer should support sparse backing"/> + <enum bitpos="1" name="VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT" comment="Buffer should support sparse backing with partial residency"/> + <enum bitpos="2" name="VK_BUFFER_CREATE_SPARSE_ALIASED_BIT" comment="Buffer should support constent data access to physical memory blocks mapped into multiple locations of sparse buffers"/> + </enums> + <enums name="VkShaderStageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_SHADER_STAGE_VERTEX_BIT"/> + <enum bitpos="1" name="VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT"/> + <enum bitpos="2" name="VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT"/> + <enum bitpos="3" name="VK_SHADER_STAGE_GEOMETRY_BIT"/> + <enum bitpos="4" name="VK_SHADER_STAGE_FRAGMENT_BIT"/> + <enum bitpos="5" name="VK_SHADER_STAGE_COMPUTE_BIT"/> + <enum value="0x1F" name="VK_SHADER_STAGE_ALL_GRAPHICS"/> + <enum value="0x7FFFFFFF" name="VK_SHADER_STAGE_ALL"/> + </enums> + <enums name="VkImageUsageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_IMAGE_USAGE_TRANSFER_SRC_BIT" comment="Can be used as a source of transfer operations"/> + <enum bitpos="1" name="VK_IMAGE_USAGE_TRANSFER_DST_BIT" comment="Can be used as a destination of transfer operations"/> + <enum bitpos="2" name="VK_IMAGE_USAGE_SAMPLED_BIT" comment="Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"/> + <enum bitpos="3" name="VK_IMAGE_USAGE_STORAGE_BIT" comment="Can be used as storage image (STORAGE_IMAGE descriptor type)"/> + <enum bitpos="4" name="VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT" comment="Can be used as framebuffer color attachment"/> + <enum bitpos="5" name="VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" comment="Can be used as framebuffer depth/stencil attachment"/> + <enum bitpos="6" name="VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT" comment="Image data not needed outside of rendering"/> + <enum bitpos="7" name="VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT" comment="Can be used as framebuffer input attachment"/> + </enums> + <enums name="VkImageCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_IMAGE_CREATE_SPARSE_BINDING_BIT" comment="Image should support sparse backing"/> + <enum bitpos="1" name="VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" comment="Image should support sparse backing with partial residency"/> + <enum bitpos="2" name="VK_IMAGE_CREATE_SPARSE_ALIASED_BIT" comment="Image should support constent data access to physical memory blocks mapped into multiple locations of sparse images"/> + <enum bitpos="3" name="VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT" comment="Allows image views to have different format than the base image"/> + <enum bitpos="4" name="VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT" comment="Allows creating image views with cube type from the created image"/> + </enums> + <enums name="VkPipelineCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT"/> + <enum bitpos="1" name="VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT"/> + <enum bitpos="2" name="VK_PIPELINE_CREATE_DERIVATIVE_BIT"/> + </enums> + <enums name="VkColorComponentFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COLOR_COMPONENT_R_BIT"/> + <enum bitpos="1" name="VK_COLOR_COMPONENT_G_BIT"/> + <enum bitpos="2" name="VK_COLOR_COMPONENT_B_BIT"/> + <enum bitpos="3" name="VK_COLOR_COMPONENT_A_BIT"/> + </enums> + <enums name="VkFenceCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_FENCE_CREATE_SIGNALED_BIT"/> + </enums> + <enums name="VkFormatFeatureFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT" comment="Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"/> + <enum bitpos="1" name="VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" comment="Format can be used for storage images (STORAGE_IMAGE descriptor type)"/> + <enum bitpos="2" name="VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT" comment="Format supports atomic operations in case it's used for storage images"/> + <enum bitpos="3" name="VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT" comment="Format can be used for uniform texel buffers (TBOs)"/> + <enum bitpos="4" name="VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT" comment="Format can be used for storage texel buffers (IBOs)"/> + <enum bitpos="5" name="VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" comment="Format supports atomic operations in case it's used for storage texel buffers"/> + <enum bitpos="6" name="VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" comment="Format can be used for vertex buffers (VBOs)"/> + <enum bitpos="7" name="VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT" comment="Format can be used for color attachment images"/> + <enum bitpos="8" name="VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" comment="Format supports blending in case it's used for color attachment images"/> + <enum bitpos="9" name="VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT" comment="Format can be used for depth/stencil attachment images"/> + <enum bitpos="10" name="VK_FORMAT_FEATURE_BLIT_SRC_BIT" comment="Format can be used as the source image of blits with vkCmdBlitImage"/> + <enum bitpos="11" name="VK_FORMAT_FEATURE_BLIT_DST_BIT" comment="Format can be used as the destination image of blits with vkCmdBlitImage"/> + </enums> + <enums name="VkQueryControlFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_QUERY_CONTROL_PRECISE_BIT" comment="Require precise results to be collected by the query"/> + </enums> + <enums name="VkQueryResultFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_QUERY_RESULT_64_BIT" comment="Results of the queries are written to the destination buffer as 64-bit values"/> + <enum bitpos="1" name="VK_QUERY_RESULT_WAIT_BIT" comment="Results of the queries are waited on before proceeding with the result copy"/> + <enum bitpos="2" name="VK_QUERY_RESULT_WITH_AVAILABILITY_BIT" comment="Besides the results of the query, the availability of the results is also written"/> + <enum bitpos="3" name="VK_QUERY_RESULT_PARTIAL_BIT" comment="Copy the partial results of the query even if the final results aren't available"/> + </enums> + <enums name="VkCommandBufferUsageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT"/> + <enum bitpos="1" name="VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT"/> + <enum bitpos="2" name="VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT" comment="Command buffer may be submitted/executed more than once simultaneously"/> + </enums> + <enums name="VkQueryPipelineStatisticFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT" comment="Optional"/> + <enum bitpos="1" name="VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT" comment="Optional"/> + <enum bitpos="2" name="VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="3" name="VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="4" name="VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT" comment="Optional"/> + <enum bitpos="5" name="VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="6" name="VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT" comment="Optional"/> + <enum bitpos="7" name="VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="8" name="VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT" comment="Optional"/> + <enum bitpos="9" name="VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT" comment="Optional"/> + <enum bitpos="10" name="VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT" comment="Optional"/> + </enums> + <enums name="VkImageAspectFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_IMAGE_ASPECT_COLOR_BIT"/> + <enum bitpos="1" name="VK_IMAGE_ASPECT_DEPTH_BIT"/> + <enum bitpos="2" name="VK_IMAGE_ASPECT_STENCIL_BIT"/> + <enum bitpos="3" name="VK_IMAGE_ASPECT_METADATA_BIT"/> + </enums> + <enums name="VkSparseImageFormatFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT" comment="Image uses a single miptail region for all array layers"/> + <enum bitpos="1" name="VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT" comment="Image requires mip levels to be an exact multiple of the sparse image block size for non-miptail levels."/> + <enum bitpos="2" name="VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT" comment="Image uses a non-standard sparse block size"/> + </enums> + <enums name="VkSparseMemoryBindFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_SPARSE_MEMORY_BIND_METADATA_BIT" comment="Operation binds resource metadata to memory"/> + </enums> + <enums name="VkPipelineStageFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT" comment="Before subsequent commands are processed"/> + <enum bitpos="1" name="VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT" comment="Draw/DispatchIndirect command fetch"/> + <enum bitpos="2" name="VK_PIPELINE_STAGE_VERTEX_INPUT_BIT" comment="Vertex/index fetch"/> + <enum bitpos="3" name="VK_PIPELINE_STAGE_VERTEX_SHADER_BIT" comment="Vertex shading"/> + <enum bitpos="4" name="VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT" comment="Tessellation control shading"/> + <enum bitpos="5" name="VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" comment="Tessellation evaluation shading"/> + <enum bitpos="6" name="VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" comment="Geometry shading"/> + <enum bitpos="7" name="VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT" comment="Fragment shading"/> + <enum bitpos="8" name="VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT" comment="Early fragment (depth and stencil) tests"/> + <enum bitpos="9" name="VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT" comment="Late fragment (depth and stencil) tests"/> + <enum bitpos="10" name="VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT" comment="Color attachment writes"/> + <enum bitpos="11" name="VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT" comment="Compute shading"/> + <enum bitpos="12" name="VK_PIPELINE_STAGE_TRANSFER_BIT" comment="Transfer/copy operations"/> + <enum bitpos="13" name="VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT" comment="After previous commands have completed"/> + <enum bitpos="14" name="VK_PIPELINE_STAGE_HOST_BIT" comment="Indicates host (CPU) is a source/sink of the dependency"/> + <enum bitpos="15" name="VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT" comment="All stages of the graphics pipeline"/> + <enum bitpos="16" name="VK_PIPELINE_STAGE_ALL_COMMANDS_BIT" comment="All stages supported on the queue"/> + </enums> + <enums name="VkCommandPoolCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COMMAND_POOL_CREATE_TRANSIENT_BIT" comment="Command buffers have a short lifetime"/> + <enum bitpos="1" name="VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT" comment="Command buffers may release their memory individually"/> + </enums> + <enums name="VkCommandPoolResetFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT" comment="Release resources owned by the pool"/> + </enums> + <enums name="VkCommandBufferResetFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT" comment="Release resources owned by the buffer"/> + </enums> + <enums name="VkSampleCountFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_SAMPLE_COUNT_1_BIT" comment="Sample count 1 supported"/> + <enum bitpos="1" name="VK_SAMPLE_COUNT_2_BIT" comment="Sample count 2 supported"/> + <enum bitpos="2" name="VK_SAMPLE_COUNT_4_BIT" comment="Sample count 4 supported"/> + <enum bitpos="3" name="VK_SAMPLE_COUNT_8_BIT" comment="Sample count 8 supported"/> + <enum bitpos="4" name="VK_SAMPLE_COUNT_16_BIT" comment="Sample count 16 supported"/> + <enum bitpos="5" name="VK_SAMPLE_COUNT_32_BIT" comment="Sample count 32 supported"/> + <enum bitpos="6" name="VK_SAMPLE_COUNT_64_BIT" comment="Sample count 64 supported"/> + </enums> + <enums name="VkAttachmentDescriptionFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT" comment="The attachment may alias physical memory of another attachment in the same render pass"/> + </enums> + <enums name="VkStencilFaceFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_STENCIL_FACE_FRONT_BIT" comment="Front face"/> + <enum bitpos="1" name="VK_STENCIL_FACE_BACK_BIT" comment="Back face"/> + <enum value="0x3" name="VK_STENCIL_FRONT_AND_BACK" comment="Front and back faces"/> + </enums> + <enums name="VkDescriptorPoolCreateFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT" comment="Descriptor sets may be freed individually"/> + </enums> + <enums name="VkDependencyFlagBits" type="bitmask"> + <enum bitpos="0" name="VK_DEPENDENCY_BY_REGION_BIT" comment="Dependency is per pixel region "/> + </enums> + <!-- WSI extensions --> + <enums name="VkPresentModeKHR" type="enum" expand="VK_PRESENT_MODE"> + <enum value="0" name="VK_PRESENT_MODE_IMMEDIATE_KHR"/> + <enum value="1" name="VK_PRESENT_MODE_MAILBOX_KHR"/> + <enum value="2" name="VK_PRESENT_MODE_FIFO_KHR"/> + <enum value="3" name="VK_PRESENT_MODE_FIFO_RELAXED_KHR"/> + </enums> + <enums name="VkColorSpaceKHR" type="enum" expand="VK_COLORSPACE"> + <enum value="0" name="VK_COLORSPACE_SRGB_NONLINEAR_KHR"/> + </enums> + <enums name="VkDisplayPlaneAlphaFlagBitsKHR" type="bitmask"> + <enum bitpos="0" name="VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR"/> + <enum bitpos="1" name="VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR"/> + <enum bitpos="2" name="VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR"/> + <enum bitpos="3" name="VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR"/> + </enums> + <enums name="VkCompositeAlphaFlagBitsKHR" type="bitmask"> + <enum bitpos="0" name="VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR"/> + <enum bitpos="1" name="VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR"/> + <enum bitpos="2" name="VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR"/> + <enum bitpos="3" name="VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR"/> + </enums> + <enums name="VkSurfaceTransformFlagBitsKHR" type="bitmask"> + <enum bitpos="0" name="VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR"/> + <enum bitpos="1" name="VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR"/> + <enum bitpos="2" name="VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR"/> + <enum bitpos="3" name="VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR"/> + <enum bitpos="4" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR"/> + <enum bitpos="5" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR"/> + <enum bitpos="6" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR"/> + <enum bitpos="7" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR"/> + <enum bitpos="8" name="VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR"/> + </enums> + <enums namespace="VK" name="VkDebugReportFlagBitsEXT" type="bitmask"> + <enum bitpos="0" name="VK_DEBUG_REPORT_INFO_BIT_EXT"/> + <enum bitpos="1" name="VK_DEBUG_REPORT_WARN_BIT_EXT"/> + <enum bitpos="2" name="VK_DEBUG_REPORT_PERF_WARN_BIT_EXT"/> + <enum bitpos="3" name="VK_DEBUG_REPORT_ERROR_BIT_EXT"/> + <enum bitpos="4" name="VK_DEBUG_REPORT_DEBUG_BIT_EXT"/> + </enums> + <enums namespace="VK" name="VkDebugReportObjectTypeEXT" type="enum"> + <enum value="0" name="VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT"/> + <enum value="1" name="VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT"/> + <enum value="2" name="VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT"/> + <enum value="3" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT"/> + <enum value="4" name="VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT"/> + <enum value="5" name="VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT"/> + <enum value="6" name="VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT"/> + <enum value="7" name="VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT"/> + <enum value="8" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT"/> + <enum value="9" name="VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT"/> + <enum value="10" name="VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT"/> + <enum value="11" name="VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT"/> + <enum value="12" name="VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT"/> + <enum value="13" name="VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT"/> + <enum value="14" name="VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT"/> + <enum value="15" name="VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT"/> + <enum value="16" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT"/> + <enum value="17" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT"/> + <enum value="18" name="VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT"/> + <enum value="19" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT"/> + <enum value="20" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT"/> + <enum value="21" name="VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT"/> + <enum value="22" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT"/> + <enum value="23" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT"/> + <enum value="24" name="VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT"/> + <enum value="25" name="VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT"/> + <enum value="26" name="VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT"/> + <enum value="27" name="VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT"/> + <enum value="28" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT"/> + </enums> + <enums namespace="VK" name="VkDebugReportErrorEXT" type="enum"> + <enum value="0" name="VK_DEBUG_REPORT_ERROR_NONE_EXT"/> <!-- Used for INFO & other non-error messages --> + <enum value="1" name="VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT"/> <!-- Callbacks were not destroyed prior to calling DestroyInstance --> + </enums> + + <!-- SECTION: Vulkan command definitions --> + <commands> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_LAYER_NOT_PRESENT,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_INCOMPATIBLE_DRIVER"> + <proto><type>VkResult</type> <name>vkCreateInstance</name></proto> + <param>const <type>VkInstanceCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkInstance</type>* <name>pInstance</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyInstance</name></proto> + <param optional="true" externsync="true"><type>VkInstance</type> <name>instance</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All child objects created using pname:instance must: have been destroyed prior to destroying pname:instance</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:instance was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:instance was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED"> + <proto><type>VkResult</type> <name>vkEnumeratePhysicalDevices</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPhysicalDeviceCount</name></param> + <param optional="true" len="pPhysicalDeviceCount"><type>VkPhysicalDevice</type>* <name>pPhysicalDevices</name></param> + </command> + <command> + <proto><type>PFN_vkVoidFunction</type> <name>vkGetDeviceProcAddr</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param len="null-terminated">const <type>char</type>* <name>pName</name></param> + <validity> + <usage>pname:pName must: be the name of a supported command that has a first parameter of type sname:VkDevice, sname:VkQueue or sname:VkCommandBuffer, either in the core API or an enabled extension</usage> + </validity> + </command> + <command> + <proto><type>PFN_vkVoidFunction</type> <name>vkGetInstanceProcAddr</name></proto> + <param optional="true"><type>VkInstance</type> <name>instance</name></param> + <param len="null-terminated">const <type>char</type>* <name>pName</name></param> + <validity> + <usage>If pname:instance is `NULL`, pname:pName must: be one of: fname:vkEnumerateInstanceExtensionProperties, fname:vkEnumerateInstanceLayerProperties or fname:vkCreateInstance</usage> + <usage>If pname:instance is not `NULL`, pname:pName must: be the name of a core command or a command from an enabled extension, other than: fname:vkEnumerateInstanceExtensionProperties, fname:vkEnumerateInstanceLayerProperties or fname:vkCreateInstance</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceProperties</type>* <name>pProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceQueueFamilyProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pQueueFamilyPropertyCount</name></param> + <param optional="true" len="pQueueFamilyPropertyCount"><type>VkQueueFamilyProperties</type>* <name>pQueueFamilyProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceMemoryProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceMemoryProperties</type>* <name>pMemoryProperties</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceFeatures</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkPhysicalDeviceFeatures</type>* <name>pFeatures</name></param> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceFormatProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkFormat</type> <name>format</name></param> + <param><type>VkFormatProperties</type>* <name>pFormatProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceImageFormatProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkFormat</type> <name>format</name></param> + <param><type>VkImageType</type> <name>type</name></param> + <param><type>VkImageTiling</type> <name>tiling</name></param> + <param><type>VkImageUsageFlags</type> <name>usage</name></param> + <param optional="true"><type>VkImageCreateFlags</type> <name>flags</name></param> + <param><type>VkImageFormatProperties</type>* <name>pImageFormatProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_LAYER_NOT_PRESENT,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_FEATURE_NOT_PRESENT,VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkCreateDevice</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param>const <type>VkDeviceCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDevice</type>* <name>pDevice</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyDevice</name></proto> + <param optional="true" externsync="true"><type>VkDevice</type> <name>device</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All child objects created on pname:device must: have been destroyed prior to destroying pname:device</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:device was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:device was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkEnumerateInstanceLayerProperties</name></proto> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkLayerProperties</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkEnumerateInstanceExtensionProperties</name></proto> + <param optional="true" len="null-terminated">const <type>char</type>* <name>pLayerName</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkExtensionProperties</type>* <name>pProperties</name></param> + <validity> + <usage>If pname:pLayerName is not `NULL`, it must: be the name of a layer available on the system</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkEnumerateDeviceLayerProperties</name></proto> + <param optional="false,true"><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkLayerProperties</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkEnumerateDeviceExtensionProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="true" len="null-terminated">const <type>char</type>* <name>pLayerName</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkExtensionProperties</type>* <name>pProperties</name></param> + <validity> + <usage>If pname:pLayerName is not `NULL`, it must: be the name of a layer available on the system</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetDeviceQueue</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>uint32_t</type> <name>queueIndex</name></param> + <param><type>VkQueue</type>* <name>pQueue</name></param> + <validity> + <usage>pname:queueFamilyIndex must: be one of the queue family indexes specified when pname:device was created, via the sname:VkDeviceQueueCreateInfo structure</usage> + <usage>pname:queueIndex must: be less than the number of queues created for the specified queue family index when pname:device was created, via the pname:queueCount member of the sname:VkDeviceQueueCreateInfo structure</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkQueueSubmit</name></proto> + <param externsync="true"><type>VkQueue</type> <name>queue</name></param> + <param optional="true"><type>uint32_t</type> <name>submitCount</name></param> + <param len="submitCount" externsync="pSubmits[].pWaitSemaphores[],pSubmits[].pSignalSemaphores[]">const <type>VkSubmitInfo</type>* <name>pSubmits</name></param> + <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param> + <validity> + <usage>pname:fence must: be unsignalled</usage> + <usage>pname:fence mustnot: be associated with any other queue command that has not yet completed execution on that queue</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkQueueWaitIdle</name></proto> + <param><type>VkQueue</type> <name>queue</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkDeviceWaitIdle</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <implicitexternsyncparams> + <param>all sname:VkQueue objects created from pname:device</param> + </implicitexternsyncparams> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS"> + <proto><type>VkResult</type> <name>vkAllocateMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkMemoryAllocateInfo</type>* <name>pAllocateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDeviceMemory</type>* <name>pMemory</name></param> + <validity> + <usage>The number of currently valid memory objects, allocated from pname:device, must: be less than sname:VkPhysicalDeviceLimits::pname:maxMemoryAllocationCount</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkFreeMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:memory (via images or buffers) must: have completed execution</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_MEMORY_MAP_FAILED"> + <proto><type>VkResult</type> <name>vkMapMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>VkDeviceSize</type> <name>size</name></param> + <param optional="true"><type>VkMemoryMapFlags</type> <name>flags</name></param> + <param><type>void</type>** <name>ppData</name></param> + <validity> + <usage>pname:memory mustnot: currently be mapped</usage> + <usage>pname:offset must: be less than the size of pname:memory</usage> + <usage>If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:size must: be less than or equal to the pname:size of the pname:memory</usage> + <usage>pname:memory must: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkUnmapMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param> + <validity> + <usage>pname:memory must: currently be mapped</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkFlushMappedMemoryRanges</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>memoryRangeCount</name></param> + <param len="memoryRangeCount">const <type>VkMappedMemoryRange</type>* <name>pMemoryRanges</name></param> + <validity> + <usage>The memory ranges specified by pname:pMemoryRanges must: all currently be mapped</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkInvalidateMappedMemoryRanges</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>memoryRangeCount</name></param> + <param len="memoryRangeCount">const <type>VkMappedMemoryRange</type>* <name>pMemoryRanges</name></param> + <validity> + <usage>The memory ranges specified by pname:pMemoryRanges must: all currently be mapped</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetDeviceMemoryCommitment</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkDeviceSize</type>* <name>pCommittedMemoryInBytes</name></param> + <validity> + <usage>pname:memory must: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetBufferMemoryRequirements</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkBindBufferMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkDeviceSize</type> <name>memoryOffset</name></param> + <validity> + <usage>pname:buffer mustnot: already be backed by a memory object</usage> + <usage>pname:buffer mustnot: have been created with any sparse memory binding flags</usage> + <usage>pname:memoryOffset must: be less than the size of pname:memory</usage> + <usage>If pname:buffer was created with the ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment</usage> + <usage>If pname:buffer was created with the ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minUniformBufferOffsetAlignment</usage> + <usage>If pname:buffer was created with the ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment</usage> + <usage>pname:memory must: have been allocated using one of the memory types allowed in the pname:memoryTypeBits member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer</usage> + <usage>The sum of pname:memoryOffset and the size of pname:buffer must: be less than or equal to the size of pname:memory</usage> + <usage>pname:memoryOffset must: be an integer multiple of the pname:alignment member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetImageMemoryRequirements</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkBindImageMemory</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkImage</type> <name>image</name></param> + <param><type>VkDeviceMemory</type> <name>memory</name></param> + <param><type>VkDeviceSize</type> <name>memoryOffset</name></param> + <validity> + <usage>pname:image mustnot: already be backed by a memory object</usage> + <usage>pname:image mustnot: have been created with any sparse memory binding flags</usage> + <usage>pname:memoryOffset must: be less than the size of pname:memory</usage> + <usage>pname:memory must: have been allocated using one of the memory types allowed in the pname:memoryTypeBits member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image</usage> + <usage>pname:memoryOffset must: be an integer multiple of the pname:alignment member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image</usage> + <usage>pname:memory must: have storage from pname:memoryOffset onwards equal to or greater than the pname:size member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetImageSparseMemoryRequirements</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param><type>uint32_t</type>* <name>pSparseMemoryRequirementCount</name></param> + <param optional="true" len="pSparseMemoryRequirementCount"><type>VkSparseImageMemoryRequirements</type>* <name>pSparseMemoryRequirements</name></param> + <validity> + <usage>pname:image must: have been created with the ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetPhysicalDeviceSparseImageFormatProperties</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkFormat</type> <name>format</name></param> + <param><type>VkImageType</type> <name>type</name></param> + <param><type>VkSampleCountFlagBits</type> <name>samples</name></param> + <param><type>VkImageUsageFlags</type> <name>usage</name></param> + <param><type>VkImageTiling</type> <name>tiling</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkSparseImageFormatProperties</type>* <name>pProperties</name></param> + <validity> + <usage>If pname:format is an integer format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageIntegerSampleCounts</usage> + <usage>If pname:format is a non-integer color format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageColorSampleCounts</usage> + <usage>If pname:format is a depth format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageDepthSampleCounts</usage> + <usage>If pname:format is a stencil format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageStencilSampleCounts</usage> + <usage>If pname:usage includes ename:VK_IMAGE_USAGE_STORAGE_BIT, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:storageImageSampleCounts</usage> + </validity> + </command> + <command queues="sparse_binding" successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkQueueBindSparse</name></proto> + <param externsync="true"><type>VkQueue</type> <name>queue</name></param> + <param optional="true"><type>uint32_t</type> <name>bindInfoCount</name></param> + <param len="bindInfoCount" externsync="pBindInfo[].pWaitSemaphores[],pBindInfo[].pSignalSemaphores[],pBindInfo[].pBufferBinds[].buffer,pBindInfo[].pImageOpaqueBinds[].image,pBindInfo[].pImageBinds[].image">const <type>VkBindSparseInfo</type>* <name>pBindInfo</name></param> + <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param> + <validity> + <usage>pname:fence must: be unsignalled</usage> + <usage>pname:fence mustnot: be associated with any other queue command that has not yet completed execution on that queue</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateFence</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkFenceCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkFence</type>* <name>pFence</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyFence</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>pname:fence mustnot: be associated with any queue command that has not yet completed execution on that queue</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:fence was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:fence was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetFences</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>fenceCount</name></param> + <param len="fenceCount" externsync="true">const <type>VkFence</type>* <name>pFences</name></param> + <validity> + <usage>Any given element of pname:pFences mustnot: currently be associated with any queue command that has not yet completed execution on that queue</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS,VK_NOT_READY" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkGetFenceStatus</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkFence</type> <name>fence</name></param> + </command> + <command successcodes="VK_SUCCESS,VK_TIMEOUT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkWaitForFences</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>fenceCount</name></param> + <param len="fenceCount">const <type>VkFence</type>* <name>pFences</name></param> + <param><type>VkBool32</type> <name>waitAll</name></param> + <param><type>uint64_t</type> <name>timeout</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateSemaphore</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkSemaphoreCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSemaphore</type>* <name>pSemaphore</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroySemaphore</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>pname:semaphore mustnot: be associated with any queue command that has not yet completed execution on that queue</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:semaphore was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:semaphore was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateEvent</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkEventCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkEvent</type>* <name>pEvent</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyEvent</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkEvent</type> <name>event</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:event must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:event was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:event was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS,VK_EVENT_SET,VK_EVENT_RESET" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkGetEventStatus</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkEvent</type> <name>event</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkSetEvent</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkEvent</type> <name>event</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetEvent</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkEvent</type> <name>event</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateQueryPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkQueryPoolCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkQueryPool</type>* <name>pQueryPool</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyQueryPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkQueryPool</type> <name>queryPool</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:queryPool must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:queryPool was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:queryPool was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS,VK_NOT_READY" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST"> + <proto><type>VkResult</type> <name>vkGetQueryPoolResults</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>firstQuery</name></param> + <param><type>uint32_t</type> <name>queryCount</name></param> + <param><type>size_t</type> <name>dataSize</name></param> + <param len="dataSize"><type>void</type>* <name>pData</name></param> + <param><type>VkDeviceSize</type> <name>stride</name></param> + <param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param> + <validity> + <usage>pname:firstQuery must: be less than the number of queries in pname:queryPool</usage> + <usage>If ename:VK_QUERY_RESULT_64_BIT is not set in pname:flags then pname:pData and pname:stride must be multiples of `4`</usage> + <usage>If ename:VK_QUERY_RESULT_64_BIT is set in pname:flags then pname:pData and pname:stride must be multiples of `8`</usage> + <usage>The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool</usage> + <usage>pname:dataSize must: be large enough to contain the result of each query, as described <<queries-operation-memorylayout,here>></usage> + <usage>If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_TIMESTAMP, pname:flags mustnot: contain ename:VK_QUERY_RESULT_PARTIAL_BIT</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateBuffer</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkBufferCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkBuffer</type>* <name>pBuffer</name></param> + <validity> + <usage>If the pname:flags member of pname:pCreateInfo includes ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, creating this sname:VkBuffer mustnot: cause the total required sparse memory for all currently valid sparse resources on the device to exceed sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkDestroyBuffer</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkBuffer</type> <name>buffer</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:buffer, either directly or via a sname:VkBufferView, must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:buffer was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:buffer was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateBufferView</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkBufferViewCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkBufferView</type>* <name>pView</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyBufferView</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkBufferView</type> <name>bufferView</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:bufferView must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:bufferView was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:bufferView was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateImage</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkImageCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkImage</type>* <name>pImage</name></param> + <validity> + <usage>If the pname:flags member of pname:pCreateInfo includes ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT or ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, creating this sname:VkImage mustnot: cause the total required sparse memory for all currently valid sparse resources on the device to exceed sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkDestroyImage</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkImage</type> <name>image</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:image, either directly or via a sname:VkImageView, must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:image was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:image was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetImageSubresourceLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param>const <type>VkImageSubresource</type>* <name>pSubresource</name></param> + <param><type>VkSubresourceLayout</type>* <name>pLayout</name></param> + <validity> + <usage>pname:image must: have been created with pname:tiling equal to ename:VK_IMAGE_TILING_LINEAR</usage> + <usage>The pname:aspectMask member of pname:pSubresource must: only have a single bit set</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateImageView</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkImageViewCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkImageView</type>* <name>pView</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyImageView</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkImageView</type> <name>imageView</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:imageView must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:imageView was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:imageView was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateShaderModule</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkShaderModuleCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkShaderModule</type>* <name>pShaderModule</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyShaderModule</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkShaderModule</type> <name>shaderModule</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>If sname:VkAllocationCallbacks were provided when pname:shaderModule was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:shaderModule was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreatePipelineCache</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkPipelineCacheCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkPipelineCache</type>* <name>pPipelineCache</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyPipelineCache</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>If sname:VkAllocationCallbacks were provided when pname:pipelineCache was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:pipelineCache was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPipelineCacheData</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkPipelineCache</type> <name>pipelineCache</name></param> + <param optional="false,true"><type>size_t</type>* <name>pDataSize</name></param> + <param optional="true" len="pDataSize"><type>void</type>* <name>pData</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkMergePipelineCaches</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkPipelineCache</type> <name>dstCache</name></param> + <param><type>uint32_t</type> <name>srcCacheCount</name></param> + <param len="srcCacheCount">const <type>VkPipelineCache</type>* <name>pSrcCaches</name></param> + <validity> + <usage>pname:dstCache mustnot: appear in the list of source caches</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateGraphicsPipelines</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param> + <param><type>uint32_t</type> <name>createInfoCount</name></param> + <param len="createInfoCount">const <type>VkGraphicsPipelineCreateInfo</type>* <name>pCreateInfos</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param> + <validity> + <usage>If the value of the pname:flags member of any given element of pname:pCreateInfos contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the pname:basePipelineIndex member of that same element is not `-1`, the value of pname:basePipelineIndex must: be less than the index into pname:pCreateInfos that corresponds to that element</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateComputePipelines</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param> + <param><type>uint32_t</type> <name>createInfoCount</name></param> + <param len="createInfoCount">const <type>VkComputePipelineCreateInfo</type>* <name>pCreateInfos</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param> + <validity> + <usage>If the value of the pname:flags member of any given element of pname:pCreateInfos contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the pname:basePipelineIndex member of that same element is not `-1`, the value of pname:basePipelineIndex must: be less than the index into pname:pCreateInfos that corresponds to that element</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkDestroyPipeline</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkPipeline</type> <name>pipeline</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:pipeline must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:pipeline was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:pipeline was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreatePipelineLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkPipelineLayoutCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkPipelineLayout</type>* <name>pPipelineLayout</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyPipelineLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkPipelineLayout</type> <name>pipelineLayout</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>If sname:VkAllocationCallbacks were provided when pname:pipelineLayout was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:pipelineLayout was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS"> + <proto><type>VkResult</type> <name>vkCreateSampler</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkSamplerCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSampler</type>* <name>pSampler</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroySampler</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkSampler</type> <name>sampler</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:sampler must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:sampler was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:sampler was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateDescriptorSetLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkDescriptorSetLayoutCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDescriptorSetLayout</type>* <name>pSetLayout</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyDescriptorSetLayout</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkDescriptorSetLayout</type> <name>descriptorSetLayout</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>If sname:VkAllocationCallbacks were provided when pname:descriptorSetLayout was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:descriptorSetLayout was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateDescriptorPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkDescriptorPoolCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDescriptorPool</type>* <name>pDescriptorPool</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyDescriptorPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:descriptorPool (via any allocated descriptor sets) must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:descriptorPool was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:descriptorPool was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetDescriptorPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param> + <param optional="true"><type>VkDescriptorPoolResetFlags</type> <name>flags</name></param> + <implicitexternsyncparams> + <param>any sname:VkDescriptorSet objects allocated from pname:descriptorPool</param> + </implicitexternsyncparams> + <validity> + <usage>All uses of pname:descriptorPool (via any allocated descriptor sets) must: have completed execution</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkAllocateDescriptorSets</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="pAllocateInfo->descriptorPool">const <type>VkDescriptorSetAllocateInfo</type>* <name>pAllocateInfo</name></param> + <param len="pAllocateInfo->descriptorSetCount"><type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkFreeDescriptorSets</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param> + <param><type>uint32_t</type> <name>descriptorSetCount</name></param> + <param noautovalidity="true" externsync="true" len="descriptorSetCount">const <type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param> + <validity> + <usage>All submitted commands that refer to any element of pname:pDesciptorSets must: have completed execution</usage> + <usage>pname:pDescriptorSets must: be a pointer to an array of pname:descriptorSetCount sname:VkDescriptorSet handles, each element of which must: either be a valid handle or sname:VK_NULL_HANDLE</usage> + <usage>pname:descriptorPool must: have been created with the ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkUpdateDescriptorSets</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true"><type>uint32_t</type> <name>descriptorWriteCount</name></param> + <param len="descriptorWriteCount" externsync="pDescriptorWrites[].dstSet">const <type>VkWriteDescriptorSet</type>* <name>pDescriptorWrites</name></param> + <param optional="true"><type>uint32_t</type> <name>descriptorCopyCount</name></param> + <param len="descriptorCopyCount" externsync="pDescriptorCopies[].dstSet">const <type>VkCopyDescriptorSet</type>* <name>pDescriptorCopies</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateFramebuffer</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkFramebufferCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkFramebuffer</type>* <name>pFramebuffer</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyFramebuffer</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkFramebuffer</type> <name>framebuffer</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:framebuffer must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:framebuffer was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:framebuffer was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateRenderPass</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkRenderPassCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkRenderPass</type>* <name>pRenderPass</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyRenderPass</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkRenderPass</type> <name>renderPass</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All submitted commands that refer to pname:renderPass must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:renderPass was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:renderPass was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command> + <proto><type>void</type> <name>vkGetRenderAreaGranularity</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkRenderPass</type> <name>renderPass</name></param> + <param><type>VkExtent2D</type>* <name>pGranularity</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateCommandPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkCommandPoolCreateInfo</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkCommandPool</type>* <name>pCommandPool</name></param> + </command> + <command> + <proto><type>void</type> <name>vkDestroyCommandPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All sname:VkCommandBuffer objects allocated from pname:commandPool mustnot: be pending execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:commandPool was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:commandPool was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetCommandPool</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param> + <param optional="true"><type>VkCommandPoolResetFlags</type> <name>flags</name></param> + <validity> + <usage>All sname:VkCommandBuffer objects allocated from pname:commandPool mustnot: currently be pending execution</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkAllocateCommandBuffers</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="pAllocateInfo->commandPool">const <type>VkCommandBufferAllocateInfo</type>* <name>pAllocateInfo</name></param> + <param len="pAllocateInfo->commandBufferCount"><type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param> + </command> + <command> + <proto><type>void</type> <name>vkFreeCommandBuffers</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param> + <param><type>uint32_t</type> <name>commandBufferCount</name></param> + <param noautovalidity="true" externsync="true" len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param> + <validity> + <usage>All elements of pname:pCommandBuffers mustnot: be pending execution</usage> + <usage>pname:pCommandBuffers must: be a pointer to an array of pname:commandBufferCount sname:VkCommandBuffer handles, each element of which must: either be a valid handle or sname:VK_NULL_HANDLE</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkBeginCommandBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param>const <type>VkCommandBufferBeginInfo</type>* <name>pBeginInfo</name></param> + <validity> + <usage>pname:commandBuffer mustnot: be in the recording state</usage> + <usage>If pname:commandBuffer was allocated from a sname:VkCommandPool which did not have the ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, pname:commandBuffer must: be in the initial state.</usage> + <usage>If pname:commandBuffer is a secondary command buffer, the pname:pInheritanceInfo member of pname:pBeginInfo must: be a valid sname:VkCommandBufferInheritanceInfo structure</usage> + <usage>If pname:commandBuffer is a secondary command buffer and either the pname:occlusionQueryEnable member of the pname:pInheritanceInfo member of pname:pBeginInfo is ename:VK_FALSE, or the precise occlusion queries feature is not enabled, the pname:queryFlags member of the pname:pInheritanceInfo member pname:pBeginInfo mustnot: contain ename:VK_QUERY_CONTROL_PRECISE_BIT</usage> + + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkEndCommandBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <validity> + <usage>pname:commandBuffer must: be in the recording state</usage> + <usage>fname:vkEndCommandBuffer mustnot: be called inside a render pass instance</usage> + <usage>All queries made <<queries-operation-active,active>> during the recording of pname:commandBuffer must: have been made inactive</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkResetCommandBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param optional="true"><type>VkCommandBufferResetFlags</type> <name>flags</name></param> + <validity> + <usage>pname:commandBuffer mustnot: currently be pending execution</usage> + <usage>pname:commandBuffer must: have been allocated from a pool that was created with the ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBindPipeline</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param> + <param><type>VkPipeline</type> <name>pipeline</name></param> + <validity> + <usage>If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, the sname:VkCommandPool that pname:commandBuffer was allocated from must: support compute operations</usage> + <usage>If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, the sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations</usage> + <usage>If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, pname:pipeline must: be a compute pipeline</usage> + <usage>If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, pname:pipeline must: be a graphics pipeline</usage> + <usage>If the <<features-features-variableMultisampleRate,variable multisample rate>> feature is not supported, pname:pipeline is a graphics pipeline, the current subpass has no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must: match that set in the previous pipeline</usage> + </validity> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetViewport</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>firstViewport</name></param> + <param><type>uint32_t</type> <name>viewportCount</name></param> + <param len="viewportCount">const <type>VkViewport</type>* <name>pViewports</name></param> + <validity> + <usage>pname:firstViewport must: be less than sname:VkPhysicalDeviceLimits::pname:maxViewports</usage> + <usage>The sum of pname:firstViewport and pname:viewportCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive</usage> + </validity> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetScissor</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>firstScissor</name></param> + <param><type>uint32_t</type> <name>scissorCount</name></param> + <param len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></param> + <validity> + <usage>pname:firstScissor must: be less than sname:VkPhysicalDeviceLimits::pname:maxViewports</usage> + <usage>The sum of pname:firstScissor and pname:scissorCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive</usage> + <usage>The pname:x and pname:y members of pname:offset must: be greater than or equal to `0`</usage> + <usage>Evaluation of (pname:offset.x + pname:extent.width) mustnot: cause a signed integer addition overflow</usage> + <usage>Evaluation of (pname:offset.y + pname:extent.height) mustnot: cause a signed integer addition overflow</usage> + </validity> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetLineWidth</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>float</type> <name>lineWidth</name></param> + <validity> + <usage>If the <<features-features-wideLines,wide lines>> feature is not enabled, the value of pname:lineWidth must: be `1.0`</usage> + </validity> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetDepthBias</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>float</type> <name>depthBiasConstantFactor</name></param> + <param><type>float</type> <name>depthBiasClamp</name></param> + <param><type>float</type> <name>depthBiasSlopeFactor</name></param> + <validity> + <usage>If the <<features-features-depthBiasClamp,depth bias clamping>> feature is not enabled, the value of pname:depthBiasClamp must: be code:0.0</usage> + </validity> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetBlendConstants</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param>const <type>float</type> <name>blendConstants</name>[4]</param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetDepthBounds</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>float</type> <name>minDepthBounds</name></param> + <param><type>float</type> <name>maxDepthBounds</name></param> + <validity> + <usage>The value of pname:minDepthBounds must: be between `0.0` and `1.0`, inclusive</usage> + <usage>The value of pname:maxDepthBounds must: be between `0.0` and `1.0`, inclusive</usage> + </validity> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetStencilCompareMask</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param> + <param><type>uint32_t</type> <name>compareMask</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetStencilWriteMask</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param> + <param><type>uint32_t</type> <name>writeMask</name></param> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetStencilReference</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkStencilFaceFlags</type> <name>faceMask</name></param> + <param><type>uint32_t</type> <name>reference</name></param> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBindDescriptorSets</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param> + <param><type>VkPipelineLayout</type> <name>layout</name></param> + <param><type>uint32_t</type> <name>firstSet</name></param> + <param><type>uint32_t</type> <name>descriptorSetCount</name></param> + <param len="descriptorSetCount">const <type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param> + <param optional="true"><type>uint32_t</type> <name>dynamicOffsetCount</name></param> + <param len="dynamicOffsetCount">const <type>uint32_t</type>* <name>pDynamicOffsets</name></param> + <validity> + <usage>Any given element of pname:pDescriptorSets must: have been created with a sname:VkDescriptorSetLayout that matches the sname:VkDescriptorSetLayout at set _n_ in pname:layout, where _n_ is the sum of the index into pname:pDescriptorSets and pname:firstSet</usage> + <usage>pname:dynamicOffsetCount must: be equal to the total number of dynamic descriptors in pname:pDescriptorSets</usage> + <usage>pname:pipelineBindPoint must: be supported by the pname:commandBuffer's parent sname:VkCommandPool's queue family</usage> + <usage>Any given element of pname:pDynamicOffsets must: satisfy the required alignment for the corresponding descriptor binding's descriptor type</usage> + </validity> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBindIndexBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>VkIndexType</type> <name>indexType</name></param> + <validity> + <usage>The value of pname:offset must: be less than the size of pname:buffer</usage> + <usage>The sum of pname:offset, and the address of the range of sname:VkDeviceMemory object that's backing pname:buffer, must: be a multiple of the type indicated by pname:indexType</usage> + <usage>pname:buffer must: have been created with the ename:VK_BUFFER_USAGE_INDEX_BUFFER_BIT flag</usage> + </validity> + </command> + <command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBindVertexBuffers</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>firstBinding</name></param> + <param><type>uint32_t</type> <name>bindingCount</name></param> + <param len="bindingCount">const <type>VkBuffer</type>* <name>pBuffers</name></param> + <param len="bindingCount">const <type>VkDeviceSize</type>* <name>pOffsets</name></param> + <validity> + <usage>pname:firstBinding must: be less than sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings</usage> + <usage>The sum of pname:firstBinding and pname:bindingCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings</usage> + <usage>All elements of pname:pOffsets must: be less than the size of the corresponding element in pname:pBuffers</usage> + <usage>All elements of pname:pBuffers must: have been created with the ename:VK_BUFFER_USAGE_VERTEX_BUFFER_BIT flag</usage> + </validity> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDraw</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>vertexCount</name></param> + <param><type>uint32_t</type> <name>instanceCount</name></param> + <param><type>uint32_t</type> <name>firstVertex</name></param> + <param><type>uint32_t</type> <name>firstInstance</name></param> + <validity> + <usage>For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline</usage> + <usage>All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound</usage> + <usage>For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <<fxvertex-input>></usage> + <usage>A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS</usage> + <usage>If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer</usage> + <usage>Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with "ImplicitLod", "Dref" or "Proj" in their name, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + </validity> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDrawIndexed</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>indexCount</name></param> + <param><type>uint32_t</type> <name>instanceCount</name></param> + <param><type>uint32_t</type> <name>firstIndex</name></param> + <param><type>int32_t</type> <name>vertexOffset</name></param> + <param><type>uint32_t</type> <name>firstInstance</name></param> + <validity> + <usage>For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline</usage> + <usage>All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound</usage> + <usage>For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <<fxvertex-input>></usage> + <usage>A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS</usage> + <usage>If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer</usage> + <usage>The total value of (pname:indexSize * (pname:firstIndex + pname:indexCount) + pname:offset) must: be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by pname:indexType, where the index buffer, pname:indexType, and pname:offset are specified via fname:vkCmdBindIndexBuffer</usage> + <usage>Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with "ImplicitLod", "Dref" or "Proj" in their name, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + </validity> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDrawIndirect</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>uint32_t</type> <name>drawCount</name></param> + <param><type>uint32_t</type> <name>stride</name></param> + <validity> + <usage>The value of pname:offset must: be a multiple of `4`</usage> + <usage>If the <<features-features-multiDrawIndirect,multi-draw indirect>> feature is not enabled, the value of pname:drawCount must: be `0` or `1`</usage> + <usage>If the <<features-features-drawIndirectFirstInstance,drawIndirectFirstInstance>> feature is not enabled, all the pname:firstInstance members of the sname:VkDrawIndirectCommand structures accessed by this command must: be code:0</usage> + <usage>For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline</usage> + <usage>All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound</usage> + <usage>A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS</usage> + <usage>If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer</usage> + <usage>If pname:drawCount is greater than `0`, the total value of (pname:stride * (pname:drawCount - 1) + pname:offset + sizeof(sname:VkDrawIndirectCommand)) must: be less than or equal to the size of pname:buffer</usage> + <usage>pname:drawCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxDrawIndirectCount</usage> + <usage>Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with "ImplicitLod", "Dref" or "Proj" in their name, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + </validity> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDrawIndexedIndirect</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <param><type>uint32_t</type> <name>drawCount</name></param> + <param><type>uint32_t</type> <name>stride</name></param> + <validity> + <usage>The value of pname:offset must: be a multiple of `4`</usage> + <usage>If the <<features-features-multiDrawIndirect,multi-draw indirect>> feature is not enabled, the value of pname:drawCount must: be `0` or `1`</usage> + <usage>If the <<features-features-drawIndirectFirstInstance,drawIndirectFirstInstance>> feature is not enabled, all the pname:firstInstance members of the sname:VkDrawIndexedIndirectCommand structures accessed by this command must: be code:0</usage> + <usage>For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline</usage> + <usage>All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound</usage> + <usage>A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS</usage> + <usage>If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer</usage> + <usage>If pname:drawCount is greater than `0`, the total value of (pname:stride * (pname:drawCount - 1) + pname:offset + sizeof(sname:VkDrawIndexedIndirectCommand)) must: be less than or equal to the size of pname:buffer</usage> + <usage>pname:drawCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxDrawIndirectCount</usage> + <usage>Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with "ImplicitLod", "Dref" or "Proj" in their name, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + </validity> + </command> + <command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDispatch</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>x</name></param> + <param><type>uint32_t</type> <name>y</name></param> + <param><type>uint32_t</type> <name>z</name></param> + <validity> + <usage>pname:x must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[0]</usage> + <usage>pname:y must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[1]</usage> + <usage>pname:z must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[2]</usage> + <usage>For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline</usage> + <usage>A valid compute pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_COMPUTE</usage> + <usage>For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for push constants with the one used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with "ImplicitLod", "Dref" or "Proj" in their name, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + </validity> + </command> + <command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdDispatchIndirect</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>buffer</name></param> + <param><type>VkDeviceSize</type> <name>offset</name></param> + <validity> + <usage>For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline</usage> + <usage>A valid compute pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_COMPUTE</usage> + <usage>pname:buffer must: have been created with the ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set</usage> + <usage>The value of pname:offset must: be a multiple of `4`</usage> + <usage>The sum of pname:offset and the size of sname:VkDispatchIndirectCommand must: be less than or equal to the size of pname:buffer</usage> + <usage>For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for push constants with the one used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>></usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with "ImplicitLod", "Dref" or "Proj" in their name, in any shader stage</usage> + <usage>If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + <usage>If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set</usage> + </validity> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdCopyBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>srcBuffer</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkBufferCopy</type>* <name>pRegions</name></param> + <validity> + <usage>The sum of the pname:srcOffset and pname:copySize members of a given element of pname:pRegions must: be less than or equal to the size of pname:srcBuffer</usage> + <usage>The sum of the pname:dstOffset and pname:copySize members of a given element of pname:pRegions must: be less than or equal to the size of pname:dstBuffer</usage> + <usage>The union of the source regions, and the union of the destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory</usage> + <usage>pname:srcBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag</usage> + <usage>pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag</usage> + </validity> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdCopyImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>srcImage</name></param> + <param><type>VkImageLayout</type> <name>srcImageLayout</name></param> + <param><type>VkImage</type> <name>dstImage</name></param> + <param><type>VkImageLayout</type> <name>dstImageLayout</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkImageCopy</type>* <name>pRegions</name></param> + <validity> + <usage>The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage</usage> + <usage>The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage</usage> + <usage>The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory</usage> + <usage>pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag</usage> + <usage>pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag</usage> + <usage>pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>The elink:VkFormat of each of pname:srcImage and pname:dstImage must: be compatible, as defined <<copies-images-format-compatibility, below>></usage> + <usage>The sample count of pname:srcImage and pname:dstImage must: match</usage> + </validity> + </command> + <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBlitImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>srcImage</name></param> + <param><type>VkImageLayout</type> <name>srcImageLayout</name></param> + <param><type>VkImage</type> <name>dstImage</name></param> + <param><type>VkImageLayout</type> <name>dstImageLayout</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkImageBlit</type>* <name>pRegions</name></param> + <param><type>VkFilter</type> <name>filter</name></param> + <validity> + <usage>The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage</usage> + <usage>The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage</usage> + <usage>The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory</usage> + <usage>pname:srcImage must: use a format that supports ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT, which is indicated by sname:VkFormatProperties::pname:linearTilingFeatures (for linear tiled images) or sname:VkFormatProperties::pname:optimalTilingFeatures (for optimally tiled images) - as returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag</usage> + <usage>pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>pname:dstImage must: use a format that supports ename:VK_FORMAT_FEATURE_BLIT_DST_BIT, which is indicated by sname:VkFormatProperties::pname:linearTilingFeatures (for linear tiled images) or sname:VkFormatProperties::pname:optimalTilingFeatures (for optimally tiled images) - as returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag</usage> + <usage>pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>The sample count of pname:srcImage and pname:dstImage must: both be equal to ename:VK_SAMPLE_COUNT_1_BIT</usage> + <usage>If either of pname:srcImage or pname:dstImage was created with a signed integer elink:VkFormat, the other must: also have been created with a signed integer elink:VkFormat</usage> + <usage>If either of pname:srcImage or pname:dstImage was created with an unsigned integer elink:VkFormat, the other must: also have been created with an unsigned integer elink:VkFormat</usage> + <usage>If either of pname:srcImage or pname:dstImage was created with a depth/stencil format, the other must: have exactly the same format</usage> + <usage>If pname:srcImage was created with a depth/stencil format, pname:filter must: be ename:VK_FILTER_NEAREST</usage> + </validity> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdCopyBufferToImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>srcBuffer</name></param> + <param><type>VkImage</type> <name>dstImage</name></param> + <param><type>VkImageLayout</type> <name>dstImageLayout</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkBufferImageCopy</type>* <name>pRegions</name></param> + <validity> + <usage>The buffer region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcBuffer</usage> + <usage>The image region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage</usage> + <usage>The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory</usage> + <usage>pname:srcBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag</usage> + <usage>pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag</usage> + <usage>pname:dstImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT</usage> + <usage>pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + </validity> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdCopyImageToBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>srcImage</name></param> + <param><type>VkImageLayout</type> <name>srcImageLayout</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkBufferImageCopy</type>* <name>pRegions</name></param> + <validity> + <usage>The image region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage</usage> + <usage>The buffer region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstBuffer</usage> + <usage>The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory</usage> + <usage>pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag</usage> + <usage>pname:srcImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT</usage> + <usage>pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag</usage> + </validity> + </command> + <command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdUpdateBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>VkDeviceSize</type> <name>dstOffset</name></param> + <param><type>VkDeviceSize</type> <name>dataSize</name></param> + <param len="dataSize/4">const <type>uint32_t</type>* <name>pData</name></param> + <validity> + <usage>The sum of pname:dstOffset and pname:dataSize must: be less than or equal to the size of pname:dstBuffer</usage> + <usage>pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag</usage> + <usage>The value of pname:dstOffset must: be a multiple of `4`</usage> + <usage>The value of pname:dataSize must: be greater than `0`</usage> + <usage>The value of pname:dataSize must: be less than `65536`</usage> + <usage>The value of pname:dataSize must: be a multiple of `4`</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdFillBuffer</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>VkDeviceSize</type> <name>dstOffset</name></param> + <param><type>VkDeviceSize</type> <name>size</name></param> + <param><type>uint32_t</type> <name>data</name></param> + <validity> + <usage>If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:dstOffset and pname:size must: be less than or equal to the size of pname:dstBuffer</usage> + <usage>pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag</usage> + <usage>pname:dstOffset must: be a multiple of `4`</usage> + <usage>If pname:size is not equal to ename:VK_WHOLE_SIZE, pname:size must: be a multiple of `4`</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdClearColorImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param><type>VkImageLayout</type> <name>imageLayout</name></param> + <param>const <type>VkClearColorValue</type>* <name>pColor</name></param> + <param><type>uint32_t</type> <name>rangeCount</name></param> + <param len="rangeCount">const <type>VkImageSubresourceRange</type>* <name>pRanges</name></param> + <validity> + <usage>pname:image must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag</usage> + <usage>pname:imageLayout must: specify the layout of the subresource ranges of pname:image specified in pname:pRanges at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:imageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>The image range of any given element of pname:pRanges must: be a subresource range that is contained within pname:image</usage> + </validity> + </command> + <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdClearDepthStencilImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>image</name></param> + <param><type>VkImageLayout</type> <name>imageLayout</name></param> + <param>const <type>VkClearDepthStencilValue</type>* <name>pDepthStencil</name></param> + <param><type>uint32_t</type> <name>rangeCount</name></param> + <param len="rangeCount">const <type>VkImageSubresourceRange</type>* <name>pRanges</name></param> + <validity> + <usage>pname:image must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag</usage> + <usage>pname:imageLayout must: specify the layout of the subresource ranges of pname:image specified in pname:pRanges at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:imageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>The image range of any given element of pname:pRanges must: be a subresource range that is contained within pname:image</usage> + </validity> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdClearAttachments</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>attachmentCount</name></param> + <param len="attachmentCount">const <type>VkClearAttachment</type>* <name>pAttachments</name></param> + <param><type>uint32_t</type> <name>rectCount</name></param> + <param len="rectCount">const <type>VkClearRect</type>* <name>pRects</name></param> + <validity> + <usage>If the pname:aspectMask member of any given element of pname:pAttachments contains ename:VK_IMAGE_ASPECT_COLOR_BIT, the pname:colorAttachment member of those elements must: refer to a valid color attachment in the current subpass</usage> + <usage>The rectangular region specified by a given element of pname:pRects must: be contained within the render area of the current render pass instance</usage> + <usage>The layers specified by a given element of pname:pRects must: be contained within every attachment that pname:pAttachments refers to</usage> + </validity> + </command> + <command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdResolveImage</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkImage</type> <name>srcImage</name></param> + <param><type>VkImageLayout</type> <name>srcImageLayout</name></param> + <param><type>VkImage</type> <name>dstImage</name></param> + <param><type>VkImageLayout</type> <name>dstImageLayout</name></param> + <param><type>uint32_t</type> <name>regionCount</name></param> + <param len="regionCount">const <type>VkImageResolve</type>* <name>pRegions</name></param> + <validity> + <usage>The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage</usage> + <usage>The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage</usage> + <usage>The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory</usage> + <usage>pname:srcImage must: have a sample count equal to any valid sample count value other than ename:VK_SAMPLE_COUNT_1_BIT</usage> + <usage>pname:dstImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT</usage> + <usage>pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice</usage> + <usage>pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL</usage> + <usage>If pname:dstImage was created with pname:tiling equal to ename:VK_IMAGE_TILING_LINEAR, pname:dstImage must: have been created with a pname:format that supports being a color attachment, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + <usage>If pname:dstImage was created with pname:tiling equal to ename:VK_IMAGE_TILING_OPTIMAL, pname:dstImage must: have been created with a pname:format that supports being a color attachment, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties</usage> + + </validity> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdSetEvent</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkEvent</type> <name>event</name></param> + <param><type>VkPipelineStageFlags</type> <name>stageMask</name></param> + <validity> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdResetEvent</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkEvent</type> <name>event</name></param> + <param><type>VkPipelineStageFlags</type> <name>stageMask</name></param> + <validity> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdWaitEvents</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>eventCount</name></param> + <param len="eventCount">const <type>VkEvent</type>* <name>pEvents</name></param> + <param><type>VkPipelineStageFlags</type> <name>srcStageMask</name></param> + <param><type>VkPipelineStageFlags</type> <name>dstStageMask</name></param> + <param optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></param> + <param len="memoryBarrierCount">const <type>VkMemoryBarrier</type>* <name>pMemoryBarriers</name></param> + <param optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></param> + <param len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier</type>* <name>pBufferMemoryBarriers</name></param> + <param optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></param> + <param len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier</type>* <name>pImageMemoryBarriers</name></param> + <validity> + <usage>pname:srcStageMask must: be the bitwise OR of the pname:stageMask parameter used in previous calls to fname:vkCmdSetEvent with any of the members of pname:pEvents</usage> + <usage>If fname:vkSetEvent was used to signal any of the events in pname:pEvents, pname:srcStageMask must: include the ename:VK_PIPELINE_STAGE_HOST_BIT flag</usage> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + <usage>If pname:pEvents includes one or more events that will be signaled by fname:vkSetEvent after pname:commandBuffer has been submitted to a queue, then fname:vkCmdWaitEvents mustnot: be called inside a render pass instance</usage> + </validity> + </command> + <command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdPipelineBarrier</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineStageFlags</type> <name>srcStageMask</name></param> + <param><type>VkPipelineStageFlags</type> <name>dstStageMask</name></param> + <param optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></param> + <param optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></param> + <param len="memoryBarrierCount">const <type>VkMemoryBarrier</type>* <name>pMemoryBarriers</name></param> + <param optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></param> + <param len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier</type>* <name>pBufferMemoryBarriers</name></param> + <param optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></param> + <param len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier</type>* <name>pImageMemoryBarriers</name></param> + <validity> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + <usage>If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT</usage> + <usage>If fname:vkCmdPipelineBarrier is called within a render pass instance, the render pass must: declare at least one self-dependency from the current subpass to itself - see <<synchronization-pipeline-barriers-subpass-self-dependencies,Subpass Self-dependency>></usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdBeginQuery</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>query</name></param> + <param optional="true"><type>VkQueryControlFlags</type> <name>flags</name></param> + <validity> + <usage>The query identified by pname:queryPool and pname:query must: currently not be <<queries-operation-active,active>></usage> + <usage>The query identified by pname:queryPool and pname:query must: be unavailable</usage> + <usage>If the <<features-features-occlusionQueryPrecise,precise occlusion queries>> feature is not enabled, or the pname:queryType used to create pname:queryPool was not ename:VK_QUERY_TYPE_OCCLUSION, pname:flags mustnot: contain ename:VK_QUERY_CONTROL_PRECISE_BIT</usage> + <usage>pname:queryPool must: have been created with a pname:queryType that differs from that of any other queries that have been made <<queries-operation-active,active>>, and are currently still active within pname:commandBuffer</usage> + <usage>pname:query must: be less than the number of queries in pname:queryPool</usage> + <usage>If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_OCCLUSION, the sname:VkCommandPool that pname:commandBuffer was created from must: support graphics operations</usage> + <usage>If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pname:pipelineStatistics indicate graphics operations, the sname:VkCommandPool that pname:commandBuffer was created from must: support graphics operations</usage> + <usage>If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pname:pipelineStatistics indicate compute operations, the sname:VkCommandPool that pname:commandBuffer was created from must: support compute operations</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdEndQuery</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>query</name></param> + <validity> + <usage>The query identified by pname:queryPool and pname:query must: currently be <<queries-operation-active,active>></usage> + <usage>pname:query must: be less than the number of queries in pname:queryPool</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdResetQueryPool</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>firstQuery</name></param> + <param><type>uint32_t</type> <name>queryCount</name></param> + <validity> + <usage>pname:firstQuery must: be less than the number of queries in pname:queryPool</usage> + <usage>The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdWriteTimestamp</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineStageFlagBits</type> <name>pipelineStage</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>query</name></param> + <validity> + <usage>The query identified by pname:queryPool and pname:query must: be _unavailable_</usage> + <usage>The command pool's queue family must: support a non-zero value of pname:timestampValidBits</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdCopyQueryPoolResults</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkQueryPool</type> <name>queryPool</name></param> + <param><type>uint32_t</type> <name>firstQuery</name></param> + <param><type>uint32_t</type> <name>queryCount</name></param> + <param><type>VkBuffer</type> <name>dstBuffer</name></param> + <param><type>VkDeviceSize</type> <name>dstOffset</name></param> + <param><type>VkDeviceSize</type> <name>stride</name></param> + <param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param> + <validity> + <usage>pname:firstQuery must: be less than the number of queries in pname:queryPool</usage> + <usage>The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool</usage> + <usage>If ename:VK_QUERY_RESULT_64_BIT is not set in pname:flags then pname:dstOffset and pname:stride must be multiples of `4`</usage> + <usage>If ename:VK_QUERY_RESULT_64_BIT is set in pname:flags then pname:dstOffset and pname:stride must be multiples of `8`</usage> + <usage>pname:dstBuffer must: have enough storage, from pname:dstOffset, to contain the result of each query, as described <<queries-operation-memorylayout,here>></usage> + <usage>If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_TIMESTAMP, pname:flags mustnot: contain ename:VK_QUERY_RESULT_PARTIAL_BIT</usage> + </validity> + </command> + <command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary"> + <proto><type>void</type> <name>vkCmdPushConstants</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkPipelineLayout</type> <name>layout</name></param> + <param><type>VkShaderStageFlags</type> <name>stageFlags</name></param> + <param><type>uint32_t</type> <name>offset</name></param> + <param><type>uint32_t</type> <name>size</name></param> + <param len="size">const <type>void</type>* <name>pValues</name></param> + <validity> + <usage>pname:stageFlags must: match exactly the shader stages used in pname:layout for the range specified by pname:offset and pname:size</usage> + <usage>pname:offset must: be a multiple of `4`</usage> + <usage>pname:size must: be a multiple of `4`</usage> + </validity> + </command> + <command queues="graphics" renderpass="outside" cmdbufferlevel="primary"> + <proto><type>void</type> <name>vkCmdBeginRenderPass</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param>const <type>VkRenderPassBeginInfo</type>* <name>pRenderPassBegin</name></param> + <param><type>VkSubpassContents</type> <name>contents</name></param> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary"> + <proto><type>void</type> <name>vkCmdNextSubpass</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>VkSubpassContents</type> <name>contents</name></param> + <validity> + <usage>The current render pass instance mustnot: be in the last subpass, that is - since the call to fname:vkCmdBeginRenderPass, fname:vkCmdNextSubpass must: have been called a number of times at least two less than the number of subpasses in the render pass</usage> + </validity> + </command> + <command queues="graphics" renderpass="inside" cmdbufferlevel="primary"> + <proto><type>void</type> <name>vkCmdEndRenderPass</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <validity> + <usage>The render pass instance that is being ended must: be in the last subpass, that is - since the call to fname:vkCmdBeginRenderPass, fname:vkCmdNextSubpass must: have been called a number of times equal to one less than the number of subpasses in the render pass</usage> + </validity> + </command> + <command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary"> + <proto><type>void</type> <name>vkCmdExecuteCommands</name></proto> + <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param> + <param><type>uint32_t</type> <name>commandBufferCount</name></param> + <param len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param> + <validity> + <usage>pname:commandBuffer must: have been created with a pname:level value of VK_COMMAND_BUFFER_LEVEL_PRIMARY</usage> + <usage>Any given element of pname:pCommandBuffers must: have been created with a pname:level value of VK_COMMAND_BUFFER_LEVEL_SECONDARY</usage> + <usage>Any given element of pname:pCommandBuffers mustnot: be already pending execution in pname:commandBuffer, or appear twice in pname:pCommandBuffers, unless it was created with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag</usage> + <usage>Any given element of pname:pCommandBuffers mustnot: be already pending execution in any other sname:VkCommandBuffer, unless it was created with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag</usage> + <usage>Any given element of pname:pCommandBuffers must: be in the executable state</usage> + <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, that render pass instance must: have been begun with the pname:contents parameter of fname:vkCmdBeginRenderPass set to ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS</usage> + <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT</usage> + <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the pname:subpass member of the pname:inheritanceInfo structure set to the index of the subpass which the given command buffer will be executed in</usage> + <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with a render pass that is compatible with the current render pass - see <<renderpass-compatibility>></usage> + <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, and any given element of pname:pCommandBuffers was recorded with the pname:framebuffer member of the sname:VkCommandBufferInheritanceInfo structure not equal to sname:VK_NULL_HANDLE, that sname:VkFramebuffer must: be compatible with the sname:VkFramebuffer used in the current render pass instance</usage> + <usage>If the <<features-features-inheritedQueries,inherited queries>> feature is not enabled, pname:commandBuffer mustnot: have any queries <<queries-operation-active,active>></usage> + <usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:occlusionQueryEnable set to ename:VK_TRUE</usage> + <usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:queryFlags having all bits set that are set for the query</usage> + <usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_PIPELINE_STATISTICS query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:pipelineStatistics having all bits set that are set in the sname:VkQueryPool the query uses</usage> + <usage>Any given element of pname:pCommandBuffers mustnot: begin any query types that are <<queries-operation-active,active>> in pname:commandBuffer</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateAndroidSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkAndroidSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPropertiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkDisplayPropertiesKHR</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPlanePropertiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkDisplayPlanePropertiesKHR</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetDisplayPlaneSupportedDisplaysKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>planeIndex</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pDisplayCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkDisplayKHR</type>* <name>pDisplays</name></param> + <validity> + <usage>pname:planeIndex must: be less than the number of display planes supported by the device as determined by calling fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetDisplayModePropertiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkDisplayKHR</type> <name>display</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param> + <param optional="true" len="pPropertyCount"><type>VkDisplayModePropertiesKHR</type>* <name>pProperties</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateDisplayModeKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param externsync="true"><type>VkDisplayKHR</type> <name>display</name></param> + <param>const <type>VkDisplayModeCreateInfoKHR</type>*<name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDisplayModeKHR</type>* <name>pMode</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetDisplayPlaneCapabilitiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param externsync="true"><type>VkDisplayModeKHR</type> <name>mode</name></param> + <param><type>uint32_t</type> <name>planeIndex</name></param> + <param><type>VkDisplayPlaneCapabilitiesKHR</type>* <name>pCapabilities</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateDisplayPlaneSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkDisplaySurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkResult</type> <name>vkCreateSharedSwapchainsKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>uint32_t</type> <name>swapchainCount</name></param> + <param len="swapchainCount">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfos</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param len="swapchainCount"><type>VkSwapchainKHR</type>* <name>pSwapchains</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateMirSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkMirSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceMirPresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>MirConnection</type>* <name>connection</name></param> + <validity> + <usage>pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice</usage> + </validity> + </command> + <command> + <proto>void <name>vkDestroySurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param optional="true" externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All sname:VkSwapchainKHR objects created for pname:surface must: have been destroyed prior to destroying pname:surface</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:surface was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:surface was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param><type>VkBool32</type>* <name>pSupported</name></param> + <validity> + <usage>pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param><type>VkSurfaceCapabilitiesKHR</type>* <name>pSurfaceCapabilities</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceFormatsKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pSurfaceFormatCount</name></param> + <param optional="true" len="pSurfaceFormatCount"><type>VkSurfaceFormatKHR</type>* <name>pSurfaceFormats</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfacePresentModesKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>VkSurfaceKHR</type> <name>surface</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pPresentModeCount</name></param> + <param optional="true" len="pPresentModeCount"><type>VkPresentModeKHR</type>* <name>pPresentModes</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateSwapchainKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param>const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSwapchainKHR</type>* <name>pSwapchain</name></param> + </command> + <command> + <proto>void <name>vkDestroySwapchainKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param optional="true" externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>All uses of presentable images acquired from pname:swapchain and owned by the application must: have completed execution</usage> + <usage>If sname:VkAllocationCallbacks were provided when pname:swapchain was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:swapchain was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkGetSwapchainImagesKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param><type>VkSwapchainKHR</type> <name>swapchain</name></param> + <param optional="false,true"><type>uint32_t</type>* <name>pSwapchainImageCount</name></param> + <param optional="true" len="pSwapchainImageCount"><type>VkImage</type>* <name>pSwapchainImages</name></param> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkAcquireNextImageKHR</name></proto> + <param><type>VkDevice</type> <name>device</name></param> + <param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param> + <param><type>uint64_t</type> <name>timeout</name></param> + <param optional="true"><type>VkSemaphore</type> <name>semaphore</name></param> + <param optional="true"><type>VkFence</type> <name>fence</name></param> + <param><type>uint32_t</type>* <name>pImageIndex</name></param> + <validity> + <usage>If pname:semaphore is not sname:VK_NULL_HANDLE it must: be unsignalled</usage> + <usage>If pname:fence is not sname:VK_NULL_HANDLE it must: be unsignalled and mustnot: be associated with any other queue command that has not yet completed execution on that queue</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkQueuePresentKHR</name></proto> + <param externsync="true"><type>VkQueue</type> <name>queue</name></param> + <param>const <type>VkPresentInfoKHR</type>* <name>pPresentInfo</name></param> + <validity> + <usage>Any given element of pname:pSwapchains member of pname:pPresentInfo must: be a swapchain that is created for a surface for which presentation is supported from pname:queue as determined using a call to fname:vkGetPhysicalDeviceSurfaceSupportKHR</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateWaylandSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkWaylandSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWaylandPresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param>struct <type>wl_display</type>* <name>display</name></param> + <validity> + <usage>pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateWin32SurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkWin32SurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWin32PresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <validity> + <usage>pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateXlibSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkXlibSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXlibPresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>Display</type>* <name>dpy</name></param> + <param><type>VisualID</type> <name>visualID</name></param> + <validity> + <usage>pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice</usage> + </validity> + </command> + <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY"> + <proto><type>VkResult</type> <name>vkCreateXcbSurfaceKHR</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkXcbSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkSurfaceKHR</type>* <name>pSurface</name></param> + </command> + <command> + <proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXcbPresentationSupportKHR</name></proto> + <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param> + <param><type>uint32_t</type> <name>queueFamilyIndex</name></param> + <param><type>xcb_connection_t</type>* <name>connection</name></param> + <param><type>xcb_visualid_t</type> <name>visual_id</name></param> + <validity> + <usage>pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice</usage> + </validity> + </command> + <command> + <proto><type>VkResult</type> <name>vkCreateDebugReportCallbackEXT</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param>const <type>VkDebugReportCallbackCreateInfoEXT</type>* <name>pCreateInfo</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <param><type>VkDebugReportCallbackEXT</type>* <name>pCallback</name></param> + </command> + <command> + <proto>void <name>vkDestroyDebugReportCallbackEXT</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param externsync="true"><type>VkDebugReportCallbackEXT</type> <name>callback</name></param> + <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param> + <validity> + <usage>If sname:VkAllocationCallbacks were provided when pname:instance was created, a compatible set of callbacks must: be provided here</usage> + <usage>If no sname:VkAllocationCallbacks were provided when pname:instance was created, pname:pAllocator must: be `NULL`</usage> + </validity> + </command> + <command> + <proto>void <name>vkDebugReportMessageEXT</name></proto> + <param><type>VkInstance</type> <name>instance</name></param> + <param><type>VkDebugReportFlagsEXT</type> <name>flags</name></param> + <param><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name></param> + <param><type>uint64_t</type> <name>object</name></param> + <param><type>size_t</type> <name>location</name></param> + <param><type>int32_t</type> <name>messageCode</name></param> + <param>const <type>char</type>* <name>pLayerPrefix</name></param> + <param>const <type>char</type>* <name>pMessage</name></param> + </command> + </commands> + + <!-- SECTION: Vulkan API interface definitions --> + <feature api="vulkan" name="VK_VERSION_1_0" number="1.0"> + <require comment="Header boilerplate"> + <type name="vk_platform"/> + </require> + <require comment="API version"> + <type name="VK_API_VERSION"/> + </require> + <require comment="API constants"> + <enum name="VK_LOD_CLAMP_NONE"/> + <enum name="VK_REMAINING_MIP_LEVELS"/> + <enum name="VK_REMAINING_ARRAY_LAYERS"/> + <enum name="VK_WHOLE_SIZE"/> + <enum name="VK_ATTACHMENT_UNUSED"/> + <enum name="VK_TRUE"/> + <enum name="VK_FALSE"/> + <type name="VK_NULL_HANDLE"/> + <enum name="VK_QUEUE_FAMILY_IGNORED"/> + <enum name="VK_SUBPASS_EXTERNAL"/> + <type name="VkPipelineCacheHeaderVersion"/> + </require> + <require comment="Device initialization"> + <command name="vkCreateInstance"/> + <command name="vkDestroyInstance"/> + <command name="vkEnumeratePhysicalDevices"/> + <command name="vkGetPhysicalDeviceFeatures"/> + <command name="vkGetPhysicalDeviceFormatProperties"/> + <command name="vkGetPhysicalDeviceImageFormatProperties"/> + <command name="vkGetPhysicalDeviceProperties"/> + <command name="vkGetPhysicalDeviceQueueFamilyProperties"/> + <command name="vkGetPhysicalDeviceMemoryProperties"/> + <command name="vkGetInstanceProcAddr"/> + <command name="vkGetDeviceProcAddr"/> + </require> + <require comment="Device commands"> + <command name="vkCreateDevice"/> + <command name="vkDestroyDevice"/> + </require> + <require comment="Extension discovery commands"> + <command name="vkEnumerateInstanceExtensionProperties"/> + <command name="vkEnumerateDeviceExtensionProperties"/> + </require> + <require comment="Layer discovery commands"> + <command name="vkEnumerateInstanceLayerProperties"/> + <command name="vkEnumerateDeviceLayerProperties"/> + </require> + <require comment="queue commands"> + <command name="vkGetDeviceQueue"/> + <command name="vkQueueSubmit"/> + <command name="vkQueueWaitIdle"/> + <command name="vkDeviceWaitIdle"/> + </require> + <require comment="Memory commands"> + <command name="vkAllocateMemory"/> + <command name="vkFreeMemory"/> + <command name="vkMapMemory"/> + <command name="vkUnmapMemory"/> + <command name="vkFlushMappedMemoryRanges"/> + <command name="vkInvalidateMappedMemoryRanges"/> + <command name="vkGetDeviceMemoryCommitment"/> + </require> + <require comment="Memory management API commands"> + <command name="vkBindBufferMemory"/> + <command name="vkBindImageMemory"/> + <command name="vkGetBufferMemoryRequirements"/> + <command name="vkGetImageMemoryRequirements"/> + </require> + <require comment="Sparse resource memory management API commands"> + <command name="vkGetImageSparseMemoryRequirements"/> + <command name="vkGetPhysicalDeviceSparseImageFormatProperties"/> + <command name="vkQueueBindSparse"/> + </require> + <require comment="Fence commands"> + <command name="vkCreateFence"/> + <command name="vkDestroyFence"/> + <command name="vkResetFences"/> + <command name="vkGetFenceStatus"/> + <command name="vkWaitForFences"/> + </require> + <require comment="Queue semaphore commands"> + <command name="vkCreateSemaphore"/> + <command name="vkDestroySemaphore"/> + </require> + <require comment="Event commands"> + <command name="vkCreateEvent"/> + <command name="vkDestroyEvent"/> + <command name="vkGetEventStatus"/> + <command name="vkSetEvent"/> + <command name="vkResetEvent"/> + </require> + <require comment="Query commands"> + <command name="vkCreateQueryPool"/> + <command name="vkDestroyQueryPool"/> + <command name="vkGetQueryPoolResults"/> + </require> + <require comment="Buffer commands"> + <command name="vkCreateBuffer"/> + <command name="vkDestroyBuffer"/> + </require> + <require comment="Buffer view commands"> + <command name="vkCreateBufferView"/> + <command name="vkDestroyBufferView"/> + </require> + <require comment="Image commands"> + <command name="vkCreateImage"/> + <command name="vkDestroyImage"/> + <command name="vkGetImageSubresourceLayout"/> + </require> + <require comment="Image view commands"> + <command name="vkCreateImageView"/> + <command name="vkDestroyImageView"/> + </require> + <require comment="Shader commands"> + <command name="vkCreateShaderModule"/> + <command name="vkDestroyShaderModule"/> + </require> + <require comment="Pipeline Cache commands"> + <command name="vkCreatePipelineCache"/> + <command name="vkDestroyPipelineCache"/> + <command name="vkGetPipelineCacheData"/> + <command name="vkMergePipelineCaches"/> + </require> + + <require comment="Pipeline commands"> + <command name="vkCreateGraphicsPipelines"/> + <command name="vkCreateComputePipelines"/> + <command name="vkDestroyPipeline"/> + </require> + <require comment="Pipeline layout commands"> + <command name="vkCreatePipelineLayout"/> + <command name="vkDestroyPipelineLayout"/> + </require> + <require comment="Sampler commands"> + <command name="vkCreateSampler"/> + <command name="vkDestroySampler"/> + </require> + <require comment="Descriptor set commands"> + <command name="vkCreateDescriptorSetLayout"/> + <command name="vkDestroyDescriptorSetLayout"/> + <command name="vkCreateDescriptorPool"/> + <command name="vkDestroyDescriptorPool"/> + <command name="vkResetDescriptorPool"/> + <command name="vkAllocateDescriptorSets"/> + <command name="vkFreeDescriptorSets"/> + <command name="vkUpdateDescriptorSets"/> + </require> + <require comment="Pass commands"> + <command name="vkCreateFramebuffer"/> + <command name="vkDestroyFramebuffer"/> + <command name="vkCreateRenderPass"/> + <command name="vkDestroyRenderPass"/> + <command name="vkGetRenderAreaGranularity"/> + </require> + <require comment="Command pool commands"> + <command name="vkCreateCommandPool"/> + <command name="vkDestroyCommandPool"/> + <command name="vkResetCommandPool"/> + </require> + <require comment="Command buffer commands"> + <command name="vkAllocateCommandBuffers"/> + <command name="vkFreeCommandBuffers"/> + <command name="vkBeginCommandBuffer"/> + <command name="vkEndCommandBuffer"/> + <command name="vkResetCommandBuffer"/> + </require> + <require comment="Command buffer building commands"> + <command name="vkCmdBindPipeline"/> + <command name="vkCmdSetViewport"/> + <command name="vkCmdSetScissor"/> + <command name="vkCmdSetLineWidth"/> + <command name="vkCmdSetDepthBias"/> + <command name="vkCmdSetBlendConstants"/> + <command name="vkCmdSetDepthBounds"/> + <command name="vkCmdSetStencilCompareMask"/> + <command name="vkCmdSetStencilWriteMask"/> + <command name="vkCmdSetStencilReference"/> + <command name="vkCmdBindDescriptorSets"/> + <command name="vkCmdBindIndexBuffer"/> + <command name="vkCmdBindVertexBuffers"/> + <command name="vkCmdDraw"/> + <command name="vkCmdDrawIndexed"/> + <command name="vkCmdDrawIndirect"/> + <command name="vkCmdDrawIndexedIndirect"/> + <command name="vkCmdDispatch"/> + <command name="vkCmdDispatchIndirect"/> + <command name="vkCmdCopyBuffer"/> + <command name="vkCmdCopyImage"/> + <command name="vkCmdBlitImage"/> + <command name="vkCmdCopyBufferToImage"/> + <command name="vkCmdCopyImageToBuffer"/> + <command name="vkCmdUpdateBuffer"/> + <command name="vkCmdFillBuffer"/> + <command name="vkCmdClearColorImage"/> + <command name="vkCmdClearDepthStencilImage"/> + <command name="vkCmdClearAttachments"/> + <command name="vkCmdResolveImage"/> + <command name="vkCmdSetEvent"/> + <command name="vkCmdResetEvent"/> + <command name="vkCmdWaitEvents"/> + <command name="vkCmdPipelineBarrier"/> + <command name="vkCmdBeginQuery"/> + <command name="vkCmdEndQuery"/> + <command name="vkCmdResetQueryPool"/> + <command name="vkCmdWriteTimestamp"/> + <command name="vkCmdCopyQueryPoolResults"/> + <command name="vkCmdPushConstants"/> + <command name="vkCmdBeginRenderPass"/> + <command name="vkCmdNextSubpass"/> + <command name="vkCmdEndRenderPass"/> + <command name="vkCmdExecuteCommands"/> + </require> + <require comment="Types not directly used by the API"> + <!-- Include <type name="typename"/> here for e.g. structs that + are not parameter types of commands, but still need to be + defined in the API. + --> + <type name="VkBufferMemoryBarrier"/> + <type name="VkDispatchIndirectCommand"/> + <type name="VkDrawIndexedIndirectCommand"/> + <type name="VkDrawIndirectCommand"/> + <type name="VkImageMemoryBarrier"/> + <type name="VkMemoryBarrier"/> + </require> + </feature> + + <!-- SECTION: Vulkan extension interface definitions (none yet) --> + <extensions> + <!-- WSI extensions --> + <extension name="VK_KHR_surface" number="1" supported="vulkan"> + <require> + <enum value="25" name="VK_KHR_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_surface"" name="VK_KHR_SURFACE_EXTENSION_NAME"/> + <enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_SURFACE_LOST_KHR"/> + <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"/> + <command name="vkDestroySurfaceKHR"/> + <command name="vkGetPhysicalDeviceSurfaceSupportKHR"/> + <command name="vkGetPhysicalDeviceSurfaceCapabilitiesKHR"/> + <command name="vkGetPhysicalDeviceSurfaceFormatsKHR"/> + <command name="vkGetPhysicalDeviceSurfacePresentModesKHR"/> + </require> + </extension> + <extension name="VK_KHR_swapchain" number="2" supported="vulkan"> + <require> + <enum value="67" name="VK_KHR_SWAPCHAIN_SPEC_VERSION"/> + <enum value=""VK_KHR_swapchain"" name="VK_KHR_SWAPCHAIN_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_INFO_KHR"/> + <enum offset="2" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_PRESENT_SRC_KHR"/> + <enum offset="3" extends="VkResult" name="VK_SUBOPTIMAL_KHR"/> + <enum offset="4" dir="-" extends="VkResult" name="VK_ERROR_OUT_OF_DATE_KHR"/> + <command name="vkCreateSwapchainKHR"/> + <command name="vkDestroySwapchainKHR"/> + <command name="vkGetSwapchainImagesKHR"/> + <command name="vkAcquireNextImageKHR"/> + <command name="vkQueuePresentKHR"/> + </require> + </extension> + <extension name="VK_KHR_display" number="3" supported="vulkan"> + <require> + <enum value="21" name="VK_KHR_DISPLAY_SPEC_VERSION"/> + <enum value=""VK_KHR_display"" name="VK_KHR_DISPLAY_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR"/> + <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR"/> + <type name="VkDisplayPlaneAlphaFlagBitsKHR"/> + <type name="VkDisplayPropertiesKHR"/> + <type name="VkDisplayModeParametersKHR"/> + <type name="VkDisplayModePropertiesKHR"/> + <type name="VkDisplayModeCreateInfoKHR"/> + <type name="VkDisplayPlaneCapabilitiesKHR"/> + <type name="VkDisplayPlanePropertiesKHR"/> + <type name="VkDisplaySurfaceCreateInfoKHR"/> + <command name="vkGetPhysicalDeviceDisplayPropertiesKHR"/> + <command name="vkGetPhysicalDeviceDisplayPlanePropertiesKHR"/> + <command name="vkGetDisplayPlaneSupportedDisplaysKHR"/> + <command name="vkGetDisplayModePropertiesKHR"/> + <command name="vkCreateDisplayModeKHR"/> + <command name="vkGetDisplayPlaneCapabilitiesKHR"/> + <command name="vkCreateDisplayPlaneSurfaceKHR"/> + </require> + </extension> + <extension name="VK_KHR_display_swapchain" number="4" supported="vulkan"> + <require> + <enum value="9" name="VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION"/> + <enum value=""VK_KHR_display_swapchain"" name="VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR"/> + <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_INCOMPATIBLE_DISPLAY_KHR"/> + <type name="VkDisplayPresentInfoKHR"/> + <command name="vkCreateSharedSwapchainsKHR"/> + </require> + </extension> + <extension name="VK_KHR_xlib_surface" number="5" protect="VK_USE_PLATFORM_XLIB_KHR" supported="vulkan"> + <require> + <enum value="6" name="VK_KHR_XLIB_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_xlib_surface"" name="VK_KHR_XLIB_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR"/> + <type name="VkXlibSurfaceCreateFlagsKHR"/> + <type name="VkXlibSurfaceCreateInfoKHR"/> + <command name="vkCreateXlibSurfaceKHR"/> + <command name="vkGetPhysicalDeviceXlibPresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_KHR_xcb_surface" number="6" protect="VK_USE_PLATFORM_XCB_KHR" supported="vulkan"> + <require> + <enum value="6" name="VK_KHR_XCB_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_xcb_surface"" name="VK_KHR_XCB_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR"/> + <type name="VkXcbSurfaceCreateFlagsKHR"/> + <type name="VkXcbSurfaceCreateInfoKHR"/> + <command name="vkCreateXcbSurfaceKHR"/> + <command name="vkGetPhysicalDeviceXcbPresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_KHR_wayland_surface" number="7" protect="VK_USE_PLATFORM_WAYLAND_KHR" supported="vulkan"> + <require> + <enum value="5" name="VK_KHR_WAYLAND_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_wayland_surface"" name="VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR"/> + <type name="VkWaylandSurfaceCreateFlagsKHR"/> + <type name="VkWaylandSurfaceCreateInfoKHR"/> + <command name="vkCreateWaylandSurfaceKHR"/> + <command name="vkGetPhysicalDeviceWaylandPresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_KHR_mir_surface" number="8" protect="VK_USE_PLATFORM_MIR_KHR" supported="vulkan"> + <require> + <enum value="4" name="VK_KHR_MIR_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_mir_surface"" name="VK_KHR_MIR_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR"/> + <type name="VkMirSurfaceCreateFlagsKHR"/> + <type name="VkMirSurfaceCreateInfoKHR"/> + <command name="vkCreateMirSurfaceKHR"/> + <command name="vkGetPhysicalDeviceMirPresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_KHR_android_surface" number="9" protect="VK_USE_PLATFORM_ANDROID_KHR" supported="vulkan"> + <require> + <enum value="6" name="VK_KHR_ANDROID_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_android_surface"" name="VK_KHR_ANDROID_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR"/> + <type name="VkAndroidSurfaceCreateFlagsKHR"/> + <type name="VkAndroidSurfaceCreateInfoKHR"/> + <command name="vkCreateAndroidSurfaceKHR"/> + </require> + </extension> + <extension name="VK_KHR_win32_surface" number="10" protect="VK_USE_PLATFORM_WIN32_KHR" supported="vulkan"> + <require> + <enum value="5" name="VK_KHR_WIN32_SURFACE_SPEC_VERSION"/> + <enum value=""VK_KHR_win32_surface"" name="VK_KHR_WIN32_SURFACE_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR"/> + <type name="VkWin32SurfaceCreateFlagsKHR"/> + <type name="VkWin32SurfaceCreateInfoKHR"/> + <command name="vkCreateWin32SurfaceKHR"/> + <command name="vkGetPhysicalDeviceWin32PresentationSupportKHR"/> + </require> + </extension> + <extension name="VK_ANDROID_native_buffer" number="11" supported="disabled"> + <require> + <enum value="4" name="VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION"/> + <enum value="11" name="VK_ANDROID_NATIVE_BUFFER_NUMBER"/> + <enum value=""VK_ANDROID_native_buffer"" name="VK_ANDROID_NATIVE_BUFFER_NAME"/> + </require> + </extension> + <extension name="VK_EXT_debug_report" number="12" author="Google, Inc." contact="Courtney Goeltzenleuchter @courtney" supported="vulkan"> + <require> + <enum value="1" name="VK_EXT_DEBUG_REPORT_SPEC_VERSION"/> + <enum value=""VK_EXT_debug_report"" name="VK_EXT_DEBUG_REPORT_EXTENSION_NAME"/> + <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT"/> + <enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_VALIDATION_FAILED_EXT"/> + <type name="VkDebugReportObjectTypeEXT"/> + <type name="VkDebugReportErrorEXT"/> + <command name="vkCreateDebugReportCallbackEXT"/> + <command name="vkDestroyDebugReportCallbackEXT"/> + <command name="vkDebugReportMessageEXT"/> + </require> + </extension> + </extensions> +</registry> |
