aboutsummaryrefslogtreecommitdiffhomepage
path: root/registry
diff options
context:
space:
mode:
authorJon Leech <[email protected]>2019-03-20 02:20:31 -0700
committerJon Leech <[email protected]>2019-03-22 18:02:36 -0700
commit71be0a4302045876c788c942ec86d177735eeea7 (patch)
tree07c7507dae32ae532e685110aa420d484d790eb2 /registry
parent16a43fcfe42dc8c7565754b1df5d575b540a876a (diff)
downloadVulkan-Headers-71be0a4302045876c788c942ec86d177735eeea7.tar.gz
Vulkan-Headers-71be0a4302045876c788c942ec86d177735eeea7.zip
Update for Vulkan-Docs 1.1.105
Diffstat (limited to 'registry')
-rw-r--r--registry/cgenerator.py318
-rw-r--r--registry/conventions.py132
-rw-r--r--registry/generator.py357
-rw-r--r--registry/genvk.py58
-rw-r--r--registry/reg.py508
-rw-r--r--registry/validusage.json360
-rw-r--r--registry/vk.xml235
-rw-r--r--registry/vkconventions.py214
8 files changed, 1597 insertions, 585 deletions
diff --git a/registry/cgenerator.py b/registry/cgenerator.py
index ab0c779..7f2d9bc 100644
--- a/registry/cgenerator.py
+++ b/registry/cgenerator.py
@@ -14,8 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import os,re,sys,pdb
-from generator import *
+import os
+import re
+import sys
+from generator import (GeneratorOptions, OutputGenerator, noneStr,
+ regSortFeatures, write)
# CGeneratorOptions - subclass of GeneratorOptions.
#
@@ -51,9 +54,16 @@ from generator import *
# parameter on a separate line
# alignFuncParam - if nonzero and parameters are being put on a
# separate line, align parameter names at the specified column
+# genEnumBeginEndRange - True if BEGIN_RANGE / END_RANGE macros should
+# be generated for enumerated types
+# genAliasMacro - True if the OpenXR alias macro should be generated
+# for aliased types (unclear what other circumstances this is useful)
+# aliasMacro - alias macro to inject when genAliasMacro is True
class CGeneratorOptions(GeneratorOptions):
"""Represents options during C interface generation for headers"""
+
def __init__(self,
+ conventions = None,
filename = None,
directory = '.',
apiname = None,
@@ -76,8 +86,12 @@ class CGeneratorOptions(GeneratorOptions):
apientryp = '',
indentFuncProto = True,
indentFuncPointer = False,
- alignFuncParam = 0):
- GeneratorOptions.__init__(self, filename, directory, apiname, profile,
+ alignFuncParam = 0,
+ genEnumBeginEndRange = False,
+ genAliasMacro = False,
+ aliasMacro = ''
+ ):
+ GeneratorOptions.__init__(self, conventions, filename, directory, apiname, profile,
versions, emitversions, defaultExtensions,
addExtensions, removeExtensions,
emitExtensions, sortProcedure)
@@ -93,6 +107,9 @@ class CGeneratorOptions(GeneratorOptions):
self.indentFuncProto = indentFuncProto
self.indentFuncPointer = indentFuncPointer
self.alignFuncParam = alignFuncParam
+ self.genEnumBeginEndRange = genEnumBeginEndRange
+ self.genAliasMacro = genAliasMacro
+ self.aliasMacro = aliasMacro
# COutputGenerator - subclass of OutputGenerator.
# Generates C-language API interfaces.
@@ -116,21 +133,25 @@ class COutputGenerator(OutputGenerator):
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])
- #
+ self.sections = {section: [] for section in self.ALL_SECTIONS}
+ self.feature_not_empty = False
+ self.need_platform_include = False
+ self.may_alias = None
+
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_',
+ if genOpts.protectFile and self.genOpts.filename:
+ headerSym = re.sub(r'\.h', '_h_',
os.path.basename(self.genOpts.filename)).upper()
write('#ifndef', headerSym, file=self.outFile)
write('#define', headerSym, '1', file=self.outFile)
@@ -139,26 +160,12 @@ class COutputGenerator(OutputGenerator):
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):
+ 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(' * Extensions emitted:', genOpts.emitExtensions, file=self.outFile)
- # write(' */', file=self.outFile)
+
def endFile(self):
# C-specific
# Finish C++ wrapper and multiple inclusion protection
@@ -166,11 +173,12 @@ class COutputGenerator(OutputGenerator):
write('#ifdef __cplusplus', file=self.outFile)
write('}', file=self.outFile)
write('#endif', file=self.outFile)
- if (self.genOpts.protectFile and self.genOpts.filename):
+ 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)
@@ -178,55 +186,68 @@ class COutputGenerator(OutputGenerator):
# 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])
+ self.sections = {section: [] for section in self.ALL_SECTIONS}
+ self.feature_not_empty = False
+
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)
+ if self.emit:
+ if self.feature_not_empty:
+ if self.genOpts.conventions.writeFeature(self.featureExtraProtect, self.genOpts.filename):
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:
+ 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 is not None:
+ write('#ifdef', self.featureExtraProtect, file=self.outFile)
self.newline()
- if (self.featureExtraProtect != None):
- write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile)
- if (self.genOpts.protectFeature):
- write('#endif /*', self.featureName, '*/', file=self.outFile)
+ write('#define', self.featureName, '1', file=self.outFile)
+ for section in self.TYPE_SECTIONS:
+ # OpenXR:
+ # If we need the explicit include of the external platform header,
+ # put it right before the function pointer definitions
+ if section == "funcpointer" and self.need_platform_include:
+ write('// Include for OpenXR Platform-Specific Types', file=self.outFile)
+ write('#include "openxr_platform.h"', file=self.outFile)
+ self.newline()
+ self.need_platform_include = False
+ contents = self.sections[section]
+ if contents:
+ write('\n'.join(contents), file=self.outFile)
+ 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 is not 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)
- # self.logMsg('diag', 'appendSection(section =', section, 'text =', text)
- #
+ self.feature_not_empty = True
+
# Type generation
def genType(self, typeinfo, name, alias):
OutputGenerator.genType(self, typeinfo, name, alias)
typeElem = typeinfo.elem
+ # Vulkan:
# Determine the category of the type, and the type section to add
# its definition to.
# 'funcpointer' is added to the 'struct' section as a workaround for
@@ -238,11 +259,12 @@ class COutputGenerator(OutputGenerator):
else:
section = category
- if category == 'struct' or category == 'union':
+ if category in ('struct', 'union'):
# If the type is a struct type, generate it using the
# special-purpose generator.
self.genStruct(typeinfo, name, alias)
else:
+ # OpenXR: this section was not under 'else:' previously, just fell through
if alias:
# If the type is an alias, just emit a typedef declaration
body = 'typedef ' + alias + ' ' + name + ';\n'
@@ -252,17 +274,65 @@ class COutputGenerator(OutputGenerator):
# If the resulting text is an empty string, don't emit it.
body = noneStr(typeElem.text)
for elem in typeElem:
- if (elem.tag == 'apientry'):
+ if elem.tag == 'apientry':
body += self.genOpts.apientry + noneStr(elem.tail)
else:
body += noneStr(elem.text) + noneStr(elem.tail)
-
if body:
# Add extra newline after multi-line entries.
if '\n' in body[0:-1]:
body += '\n'
self.appendSection(section, body)
- #
+
+ # Protection string generation
+ # Protection strings are the strings defining the OS/Platform/Graphics
+ # requirements for a given OpenXR command. When generating the
+ # language header files, we need to make sure the items specific to a
+ # graphics API or OS platform are properly wrapped in #ifs.
+ def genProtectString(self, protect_str):
+ protect_if_str = ''
+ protect_end_str = ''
+ protect_list = []
+ if protect_str:
+ if ',' in protect_str:
+ protect_list.extend(protect_str.split(","))
+ protect_def_str = ''
+ count = 0
+ for protect_define in protect_list:
+ if count > 0:
+ protect_def_str += ' &&'
+ protect_def_str += ' defined(%s)' % protect_define
+ count = count + 1
+ count = count + 1
+ protect_if_str = '#if'
+ protect_if_str += protect_def_str
+ protect_if_str += '\n'
+ protect_end_str = '#endif //'
+ protect_end_str += protect_def_str
+ protect_end_str += '\n'
+ else:
+ protect_if_str += '#ifdef %s\n' % protect_str
+ protect_end_str += '#endif // %s\n' % protect_str
+ return (protect_if_str, protect_end_str)
+
+ def typeMayAlias(self, typeName):
+ if not self.may_alias:
+ # First time we've asked if a type may alias.
+ # So, let's populate the set of all names of types that may.
+
+ # Everyone with an explicit mayalias="true"
+ self.may_alias = set(typeName
+ for typeName, data in self.registry.typedict.items()
+ if data.elem.get('mayalias') == 'true')
+
+ # Every type mentioned in some other type's parentstruct attribute.
+ self.may_alias.update(set(x for x in
+ [otherType.elem.get('parentstruct')
+ for _, otherType in self.registry.typedict.items()]
+ if x is not None
+ ))
+ return typeName in self.may_alias
+
# 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
@@ -270,7 +340,7 @@ class COutputGenerator(OutputGenerator):
# tags - they are a declaration of a struct or union member.
# Only simple member declarations are supported (no nested
# structs etc.)
- # If alias != None, then this struct aliases another; just
+ # If alias is not None, then this struct aliases another; just
# generate a typedef of that alias.
def genStruct(self, typeinfo, typeName, alias):
OutputGenerator.genStruct(self, typeinfo, typeName, alias)
@@ -280,127 +350,65 @@ class COutputGenerator(OutputGenerator):
if alias:
body = 'typedef ' + alias + ' ' + typeName + ';\n'
else:
- body = 'typedef ' + typeElem.get('category') + ' ' + typeName + ' {\n'
+ body = ''
+ (protect_begin, protect_end) = self.genProtectString(typeElem.get('protect'))
+ if protect_begin:
+ body += protect_begin
+ body += 'typedef ' + typeElem.get('category')
+
+ # This is an OpenXR-specific alternative where aliasing refers
+ # to an inheritance hierarchy of types rather than C-level type
+ # aliases.
+ if self.genOpts.genAliasMacro and self.typeMayAlias(typeName):
+ body += ' ' + self.genOpts.aliasMacro
+
+ body += ' ' + typeName + ' {\n'
- targetLen = 0;
+ targetLen = 0
for member in typeElem.findall('.//member'):
targetLen = max(targetLen, self.getCParamTypeLength(member))
for member in typeElem.findall('.//member'):
body += self.makeCParamDecl(member, targetLen + 4)
body += ';\n'
body += '} ' + typeName + ';\n'
+ if protect_end:
+ body += protect_end
self.appendSection('struct', body)
- #
+
# Group (e.g. C "enum" type) generation.
# These are concatenated together with other types.
- # If alias != None, it is the name of another group type
+ # If alias is not None, it is the name of another group type
# which aliases this type; just generate that alias.
def genGroup(self, groupinfo, groupName, alias = None):
OutputGenerator.genGroup(self, groupinfo, groupName, alias)
groupElem = groupinfo.elem
- if alias:
- # If the group name is aliased, just emit a typedef declaration
- # for the alias.
- body = 'typedef ' + alias + ' ' + groupName + ';\n'
- else:
- self.logMsg('diag', 'CGenerator.genGroup group =', groupName, 'alias =', alias)
-
- # Otherwise, emit an actual enumerated type declaration
- expandName = re.sub(r'([0-9a-z_])([A-Z0-9])',r'\1_\2',groupName).upper()
-
- expandPrefix = expandName
- expandSuffix = ''
- expandSuffixMatch = re.search(r'[A-Z][A-Z]+$',groupName)
- if expandSuffixMatch:
- expandSuffix = '_' + expandSuffixMatch.group()
- # Strip off the suffix from the prefix
- expandPrefix = expandName.rsplit(expandSuffix, 1)[0]
-
- # Prefix
- body = "\ntypedef enum " + groupName + " {\n"
-
- # @@ Should use the type="bitmask" attribute instead
- isEnum = ('FLAG_BITS' not in expandPrefix)
-
- # Get a list of nested 'enum' tags.
- enums = groupElem.findall('enum')
-
- # Check for and report duplicates, and return a list with them
- # removed.
- enums = self.checkDuplicateEnums(enums)
-
- # 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
-
- # Accumulate non-numeric enumerant values separately and append
- # them following the numeric values, to allow for aliases.
- # NOTE: this doesn't do a topological sort yet, so aliases of
- # aliases can still get in the wrong order.
- aliasText = ""
-
- for elem in enums:
- # Convert the value to an integer and use that to track min/max.
- (numVal,strVal) = self.enumToValue(elem, True)
- name = elem.get('name')
-
- # Extension enumerants are only included if they are required
- if self.isEnumRequired(elem):
- decl = " " + name + " = " + strVal + ",\n"
- if numVal != None:
- body += decl
- else:
- aliasText += decl
-
- # Don't track min/max for non-numbers (numVal == None)
- if isEnum and numVal != None and elem.get('extends') is None:
- if minName == None:
- minName = maxName = name
- minValue = maxValue = numVal
- elif numVal < minValue:
- minName = name
- minValue = numVal
- elif numVal > maxValue:
- maxName = name
- maxValue = numVal
-
- # Now append the non-numeric enumerant values
- body += aliasText
-
- # Generate min/max value tokens and a range-padding enum. Need some
- # additional padding to generate correct names...
- if isEnum:
- body += " " + expandPrefix + "_BEGIN_RANGE" + expandSuffix + " = " + minName + ",\n"
- body += " " + expandPrefix + "_END_RANGE" + expandSuffix + " = " + maxName + ",\n"
- body += " " + expandPrefix + "_RANGE_SIZE" + expandSuffix + " = (" + maxName + " - " + minName + " + 1),\n"
-
- body += " " + expandPrefix + "_MAX_ENUM" + expandSuffix + " = 0x7FFFFFFF\n"
-
- # Postfix
- body += "} " + groupName + ";"
-
# After either enumerated type or alias paths, add the declaration
# to the appropriate section for the group being defined.
if groupElem.get('type') == 'bitmask':
section = 'bitmask'
else:
section = 'group'
- self.appendSection(section, body)
+
+ if alias:
+ # If the group name is aliased, just emit a typedef declaration
+ # for the alias.
+ body = 'typedef ' + alias + ' ' + groupName + ';\n'
+ self.appendSection(section, body)
+ else:
+ (section, body) = self.buildEnumCDecl(self.genOpts.genEnumBeginEndRange, groupinfo, groupName)
+ self.appendSection(section, "\n" + body)
# Enumerant generation
# <enum> tags may specify their values in several ways, but are usually
# just integers.
def genEnum(self, enuminfo, name, alias):
OutputGenerator.genEnum(self, enuminfo, name, alias)
- (numVal,strVal) = self.enumToValue(enuminfo.elem, False)
+ (_, strVal) = self.enumToValue(enuminfo.elem, False)
body = '#define ' + name.ljust(33) + ' ' + strVal
self.appendSection('enum', body)
- #
# Command generation
def genCmd(self, cmdinfo, name, alias):
OutputGenerator.genCmd(self, cmdinfo, name, alias)
@@ -413,5 +421,5 @@ class COutputGenerator(OutputGenerator):
prefix = ''
decls = self.makeCDecls(cmdinfo.elem)
self.appendSection('command', prefix + decls[0] + '\n')
- if (self.genOpts.genFuncPointers):
+ if self.genOpts.genFuncPointers:
self.appendSection('commandPointer', decls[1])
diff --git a/registry/conventions.py b/registry/conventions.py
new file mode 100644
index 0000000..7c0ac9f
--- /dev/null
+++ b/registry/conventions.py
@@ -0,0 +1,132 @@
+#!/usr/bin/python3 -i
+#
+# Copyright (c) 2013-2019 The Khronos Group Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Base class for working-group-specific style conventions,
+# used in generation.
+
+from abc import ABC, abstractmethod
+
+
+class ConventionsBase(ABC):
+ """WG-specific conventions."""
+
+ @abstractmethod
+ def formatExtension(self, name):
+ """Mark up a name as an extension for the spec."""
+ raise NotImplementedError
+
+ @property
+ @abstractmethod
+ def null(self):
+ """Preferred spelling of NULL."""
+ raise NotImplementedError
+
+ def makeProseList(self, elements, connective='and'):
+ """Make a (comma-separated) list for use in prose.
+
+ Adds a connective (by default, 'and')
+ before the last element if there are more than 1.
+
+ Override with a different method or different call to
+ _implMakeProseList if you want to add a comma for two elements,
+ or not use a serial comma.
+ """
+ return self._implMakeProseList(elements, connective)
+
+ @property
+ def struct_macro(self):
+ """Get the appropriate format macro for a structure.
+
+ May override.
+ """
+ return 'sname:'
+
+ def makeStructName(self, name):
+ """Prepend the appropriate format macro for a structure to a structure type name.
+
+ Uses struct_macro, so just override that if you want to change behavior.
+ """
+ return self.struct_macro + name
+
+ @property
+ def external_macro(self):
+ """Get the appropriate format macro for an external type like uint32_t.
+
+ May override.
+ """
+ return 'basetype:'
+
+ def makeExternalTypeName(self, name):
+ """Prepend the appropriate format macro for an external type like uint32_t to a type name.
+
+ Uses external_macro, so just override that if you want to change behavior.
+ """
+ return self.external_macro + name
+
+ def _implMakeProseList(self, elements, connective, comma_for_two_elts=False, serial_comma=True):
+ """Internal-use implementation to make a (comma-separated) list for use in prose.
+
+ Adds a connective (by default, 'and')
+ before the last element if there are more than 1,
+ and only includes commas if there are more than 2
+ (if comma_for_two_elts is False).
+
+ Don't edit these defaults, override self.makeProseList().
+ """
+ assert(serial_comma) # didn't implement what we didn't need
+ my_elts = list(elements)
+ if len(my_elts) > 1:
+ my_elts[-1] = '{} {}'.format(connective, my_elts[-1])
+
+ if not comma_for_two_elts and len(my_elts) <= 2:
+ return ' '.join(my_elts)
+ return ', '.join(my_elts)
+
+ @property
+ @abstractmethod
+ def file_suffix(self):
+ """Return suffix of generated Asciidoctor files"""
+ raise NotImplementedError
+
+ @property
+ @abstractmethod
+ def api_name(self):
+ """Return API name"""
+ raise NotImplementedError
+
+ @property
+ @abstractmethod
+ def api_prefix(self):
+ """Return API token prefix"""
+ raise NotImplementedError
+
+ @property
+ @abstractmethod
+ def api_version_prefix(self):
+ """Return API core version token prefix"""
+ raise NotImplementedError
+
+ @property
+ @abstractmethod
+ def KHR_prefix(self):
+ """Return extension name prefix for KHR extensions"""
+ raise NotImplementedError
+
+ @property
+ @abstractmethod
+ def EXT_prefix(self):
+ """Return extension name prefix for EXT extensions"""
+ raise NotImplementedError
diff --git a/registry/generator.py b/registry/generator.py
index fbd4f8d..d6a1afe 100644
--- a/registry/generator.py
+++ b/registry/generator.py
@@ -15,35 +15,34 @@
# limitations under the License.
from __future__ import unicode_literals
-import io,os,re,sys,pdb
+
+import io
+import os
+import re
+import pdb
+import sys
+from pathlib import Path
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(' '.join(str(arg) for arg in args))
file.write(end)
# noneStr - returns string argument, or "" if argument is None.
# Used in converting etree Elements into text.
-# str - string to convert
-def noneStr(str):
- if (str):
- return str
- else:
- return ""
+# s - string to convert
+def noneStr(s):
+ if s:
+ return s
+ return ""
# enquote - returns string argument with surrounding quotes,
# for serialization into Python code.
-def enquote(str):
- if (str):
- return "'" + str + "'"
- else:
- return None
-
-# apiName - returns True if name is a Vulkan name (vk/Vk/VK prefix, or a
-# function pointer type), False otherwise.
-def apiName(str):
- return str[0:2].lower() == 'vk' or str[0:3] == 'PFN'
+def enquote(s):
+ if s:
+ return "'{}'".format(s)
+ return None
# Primary sort key for regSortFeatures.
# Sorts by category of the feature name string:
@@ -52,14 +51,14 @@ def apiName(str):
# other (EXT/vendor extensions)
# This will need changing for Vulkan!
def regSortCategoryKey(feature):
- if (feature.elem.tag == 'feature'):
+ if feature.elem.tag == 'feature':
return 0
- elif (feature.category == 'ARB' or
- feature.category == 'KHR' or
- feature.category == 'OES'):
+ if (feature.category == 'ARB' or
+ feature.category == 'KHR' or
+ feature.category == 'OES'):
return 1
- else:
- return 2
+
+ return 2
# Secondary sort key for regSortFeatures.
# Sorts by extension name.
@@ -90,6 +89,8 @@ def regSortFeatures(featureList):
# Registry.apiGen() and by base OutputGenerator objects.
#
# Members
+# conventions - may be mandatory for some generators:
+# an object that implements ConventionsBase
# filename - basename of file to generate, or None to write to stdout.
# directory - directory in which to generate filename
# apiname - string matching <api> 'apiname' attribute, e.g. 'gl'.
@@ -119,7 +120,9 @@ def regSortFeatures(featureList):
# nothing.
class GeneratorOptions:
"""Represents options during header production from an API registry"""
+
def __init__(self,
+ conventions = None,
filename = None,
directory = '.',
apiname = None,
@@ -131,6 +134,7 @@ class GeneratorOptions:
removeExtensions = None,
emitExtensions = None,
sortProcedure = regSortFeatures):
+ self.conventions = conventions
self.filename = filename
self.directory = directory
self.apiname = apiname
@@ -142,14 +146,14 @@ class GeneratorOptions:
self.removeExtensions = self.emptyRegex(removeExtensions)
self.emitExtensions = self.emptyRegex(emitExtensions)
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 == ''):
+ def emptyRegex(self, pat):
+ if pat is None or pat == '':
return '_nomatch_^'
- else:
- return pat
+
+ return pat
# OutputGenerator - base class for generating API interfaces.
# Manages basic logic, logging, and output file control
@@ -195,7 +199,7 @@ class GeneratorOptions:
#
class OutputGenerator:
"""Generate specified API interfaces in a specific style, such as a C header"""
- #
+
# categoryToPath - map XML 'category' to include file directory name
categoryToPath = {
'bitmask' : 'flags',
@@ -205,7 +209,7 @@ class OutputGenerator:
'define' : 'defines',
'basetype' : 'basetypes',
}
- #
+
# Constructor
def __init__(self,
errFile = sys.stderr,
@@ -223,7 +227,7 @@ class OutputGenerator:
self.extBase = 1000000000
self.extBlockSize = 1000
self.madeDirs = {}
- #
+
# logMsg - write a message of different categories to different
# destinations.
# level -
@@ -233,22 +237,22 @@ class OutputGenerator:
# *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'):
+ if level == 'error':
strfile = io.StringIO()
write('ERROR:', *args, file=strfile)
- if (self.errFile != None):
+ if self.errFile is not None:
write(strfile.getvalue(), file=self.errFile)
raise UserWarning(strfile.getvalue())
- elif (level == 'warn'):
- if (self.warnFile != None):
+ elif level == 'warn':
+ if self.warnFile is not None:
write('WARNING:', *args, file=self.warnFile)
- elif (level == 'diag'):
- if (self.diagFile != None):
+ elif level == 'diag':
+ if self.diagFile is not 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
@@ -264,39 +268,41 @@ class OutputGenerator:
# '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.
+ # API extension enum scheme in this function.
# A 'alias' attribute contains the name of another enum
# which this is an alias of. The other enum must be
# declared first when emitting this enum.
def enumToValue(self, elem, needsNum):
name = elem.get('name')
numVal = None
- if ('value' in elem.keys()):
+ if 'value' in elem.keys():
value = elem.get('value')
# print('About to translate value =', value, 'type =', type(value))
- if (needsNum):
+ 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'):
+ # if t is not 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()):
+ if 'bitpos' in elem.keys():
value = elem.get('bitpos')
- numVal = int(value, 0)
- numVal = 1 << numVal
+ bitpos = int(value, 0)
+ numVal = 1 << bitpos
value = '0x%08x' % numVal
+ if( bitpos >= 32 ):
+ value = value + 'ULL'
self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']')
return [numVal, value]
- if ('offset' in elem.keys()):
+ 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()):
+ if 'dir' in elem.keys():
enumNegative = True
self.logMsg('diag', 'Enum', name, 'offset =', offset,
'extnumber =', extnumber, 'extends =', extends,
@@ -304,8 +310,8 @@ class OutputGenerator:
# 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
+ if enumNegative:
+ numVal *= -1
value = '%d' % numVal
# More logic needed!
self.logMsg('diag', 'Enum', name, '-> offset [', numVal, ',', value, ']')
@@ -313,7 +319,7 @@ class OutputGenerator:
if 'alias' in elem.keys():
return [None, elem.get('alias')]
return [None, None]
- #
+
# checkDuplicateEnums - sanity check for enumerated values
# enums - list of <enum> Elements
# returns the list with duplicates stripped
@@ -336,7 +342,7 @@ class OutputGenerator:
# Duplicate enum values for the same name are benign. This
# happens when defining the same enum conditionally in
# several extension blocks.
- if (strVal2 == strVal or (numVal != None and
+ if (strVal2 == strVal or (numVal is not None and
numVal == numVal2)):
True
# self.logMsg('info', 'checkDuplicateEnums: Duplicate enum (' + name +
@@ -361,7 +367,7 @@ class OutputGenerator:
# Track this enum to detect followon duplicates
nameMap[name] = [ elem, numVal, strVal ]
- if numVal != None:
+ if numVal is not None:
valueMap[numVal] = [ elem, numVal, strVal ]
# Add this enum to the list
@@ -369,58 +375,194 @@ class OutputGenerator:
# Return the list
return stripped
- #
+
+ # buildEnumCDecl
+ # Generates the C declaration for an enum
+ def buildEnumCDecl(self, expand, groupinfo, groupName):
+ groupElem = groupinfo.elem
+
+ if self.genOpts.conventions.constFlagBits and groupElem.get('type') == 'bitmask':
+ return self.buildEnumCDecl_Bitmask( groupinfo, groupName)
+ else:
+ return self.buildEnumCDecl_Enum(expand, groupinfo, groupName)
+
+ # buildEnumCDecl_Bitmask
+ # Generates the C declaration for an "enum" that is actually a
+ # set of flag bits
+ def buildEnumCDecl_Bitmask(self, groupinfo, groupName):
+ groupElem = groupinfo.elem
+ flagTypeName = groupinfo.flagType.elem.get('name')
+
+ # Prefix
+ body = "// Flag bits for " + flagTypeName + "\n"
+
+ # Loop over the nested 'enum' tags.
+ 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.
+ (_, strVal) = self.enumToValue(elem, True)
+ name = elem.get('name')
+ body += "static const " + flagTypeName + " " + name + " = " + strVal + ";\n"
+
+ # Postfix
+
+ return ("bitmask", body)
+
+ # Generates the C declaration for an enumerated type
+ def buildEnumCDecl_Enum(self, expand, groupinfo, groupName):
+ groupElem = groupinfo.elem
+
+ # Break the group name into prefix and suffix portions for range
+ # enum generation
+ expandName = re.sub(r'([0-9a-z_])([A-Z0-9])',r'\1_\2',groupName).upper()
+ expandPrefix = expandName
+ expandSuffix = ''
+ expandSuffixMatch = re.search(r'[A-Z][A-Z]+$',groupName)
+ if expandSuffixMatch:
+ expandSuffix = '_' + expandSuffixMatch.group()
+ # Strip off the suffix from the prefix
+ expandPrefix = expandName.rsplit(expandSuffix, 1)[0]
+
+ # Prefix
+ body = "typedef enum " + groupName + " {\n"
+
+ # @@ Should use the type="bitmask" attribute instead
+ isEnum = ('FLAG_BITS' not in expandPrefix)
+
+ # Get a list of nested 'enum' tags.
+ enums = groupElem.findall('enum')
+
+ # Check for and report duplicates, and return a list with them
+ # removed.
+ enums = self.checkDuplicateEnums(enums)
+
+ # 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
+
+ # Accumulate non-numeric enumerant values separately and append
+ # them following the numeric values, to allow for aliases.
+ # NOTE: this doesn't do a topological sort yet, so aliases of
+ # aliases can still get in the wrong order.
+ aliasText = ""
+
+ for elem in enums:
+ # 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')
+
+ # Extension enumerants are only included if they are required
+ if self.isEnumRequired(elem):
+ decl = " " + name + " = " + strVal + ",\n"
+ if numVal is not None:
+ body += decl
+ else:
+ aliasText += decl
+
+ # Don't track min/max for non-numbers (numVal is None)
+ if isEnum and numVal is not None and elem.get('extends') is None:
+ if minName is None:
+ minName = maxName = name
+ minValue = maxValue = numVal
+ elif numVal < minValue:
+ minName = name
+ minValue = numVal
+ elif numVal > maxValue:
+ maxName = name
+ maxValue = numVal
+
+ # Now append the non-numeric enumerant values
+ body += aliasText
+
+ # Generate min/max value tokens and a range-padding enum. Need some
+ # additional padding to generate correct names...
+ if isEnum and expand:
+ body += " " + expandPrefix + "_BEGIN_RANGE" + expandSuffix + " = " + minName + ",\n"
+ body += " " + expandPrefix + "_END_RANGE" + expandSuffix + " = " + maxName + ",\n"
+ body += " " + expandPrefix + "_RANGE_SIZE" + expandSuffix + " = (" + maxName + " - " + minName + " + 1),\n"
+
+ # Always generate this to make sure the enumerated type is 32 bits
+ body += " " + expandPrefix + "_MAX_ENUM" + expandSuffix + " = 0x7FFFFFFF\n"
+
+ # Postfix
+ body += "} " + groupName + ";"
+
+ # Determine appropriate section for this declaration
+ if groupElem.get('type') == 'bitmask':
+ section = 'bitmask'
+ else:
+ section = 'group'
+
+ return (section, body)
+
def makeDir(self, path):
self.logMsg('diag', 'OutputGenerator::makeDir(' + path + ')')
- if not (path in self.madeDirs.keys()):
+ if path not in self.madeDirs:
# This can get race conditions with multiple writers, see
# https://stackoverflow.com/questions/273192/
if not os.path.exists(path):
os.makedirs(path)
self.madeDirs[path] = 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):
- filename = self.genOpts.directory + '/' + self.genOpts.filename
- self.outFile = io.open(filename, 'w', encoding='utf-8')
+ if self.genOpts.filename is not None:
+ if sys.platform == 'win32':
+ directory = Path(self.genOpts.directory)
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+ self.outFile = io.open(directory / self.genOpts.filename, 'w', encoding='utf-8')
+ else:
+ filename = self.genOpts.directory + '/' + self.genOpts.filename
+ self.outFile = io.open(filename, 'w', encoding='utf-8')
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()
+ if self.errFile:
+ self.errFile.flush()
+ if self.warnFile:
+ self.warnFile.flush()
+ if self.diagFile:
+ self.diagFile.flush()
self.outFile.flush()
- if (self.outFile != sys.stdout and self.outFile != sys.stderr):
+ 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):
+ if self.featureName is None:
raise UserWarning('Attempt to generate', featureType,
- featureName, 'when not in feature')
- #
+ featureName, 'when not in feature')
+
# Type generation
def genType(self, typeinfo, name, alias):
self.validateFeature('type', name)
- #
+
# Struct (e.g. C "struct" type) generation
- def genStruct(self, typeinfo, name, alias):
- self.validateFeature('struct', name)
+ def genStruct(self, typeinfo, typeName, alias):
+ self.validateFeature('struct', typeName)
# The mixed-mode <member> tags may contain no-op <comment> tags.
# It is convenient to remove them here where all output generators
@@ -428,28 +570,29 @@ class OutputGenerator:
for member in typeinfo.elem.findall('.//member'):
for comment in member.findall('comment'):
member.remove(comment)
- #
+
# Group (e.g. C "enum" type) generation
- def genGroup(self, groupinfo, name, alias):
- self.validateFeature('group', name)
- #
+ def genGroup(self, groupinfo, groupName, alias):
+ self.validateFeature('group', groupName)
+
# Enumerant (really, constant) generation
- def genEnum(self, enuminfo, name, alias):
- self.validateFeature('enum', name)
- #
+ def genEnum(self, enuminfo, typeName, alias):
+ self.validateFeature('enum', typeName)
+
# Command generation
- def genCmd(self, cmd, name, alias):
- self.validateFeature('command', name)
- #
+ def genCmd(self, cmd, cmdinfo, alias):
+ self.validateFeature('command', cmdinfo)
+
# 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 + ')'
- #
+ 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).
@@ -461,7 +604,11 @@ class OutputGenerator:
for elem in param:
text = noneStr(elem.text)
tail = noneStr(elem.tail)
- if (elem.tag == 'name' and aligncol > 0):
+
+ if self.genOpts.conventions.is_voidpointer_alias(elem.tag, text, tail):
+ # OpenXR-specific macro insertion
+ tail = self.genOpts.conventions.make_voidpointer_alias(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()
@@ -474,7 +621,7 @@ class OutputGenerator:
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).
@@ -484,18 +631,23 @@ class OutputGenerator:
for elem in param:
text = noneStr(elem.text)
tail = noneStr(elem.tail)
- if (elem.tag == 'name'):
+
+ if self.genOpts.conventions.is_voidpointer_alias(elem.tag, text, tail):
+ # OpenXR-specific macro insertion
+ tail = self.genOpts.conventions.make_voidpointer_alias(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
- #
+
# isEnumRequired(elem) - return True if this <enum> element is
# required, False otherwise
# elem - <enum> element to test
def isEnumRequired(self, elem):
- required = elem.get('required') != None
+ required = elem.get('required') is not None
self.logMsg('diag', 'isEnumRequired:', elem.get('name'),
'->', required)
return required
@@ -520,7 +672,6 @@ class OutputGenerator:
return required
- #
# makeCDecls - return C prototype and function pointer typedef for a
# command, as a two-element list of strings.
# cmd - Element containing a <command> tag
@@ -531,7 +682,7 @@ class OutputGenerator:
# 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
@@ -547,7 +698,7 @@ class OutputGenerator:
for elem in proto:
text = noneStr(elem.text)
tail = noneStr(elem.tail)
- if (elem.tag == 'name'):
+ if elem.tag == 'name':
pdecl += self.makeProtoName(text, tail)
tdecl += self.makeTypedefName(text, tail)
else:
@@ -560,36 +711,28 @@ class OutputGenerator:
# 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
+ indentdecl += ',\n'.join(self.makeCParamDecl(p, self.genOpts.alignFuncParam)
+ for p in params)
+ indentdecl += ');'
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 += ', '
+ paramnames = (''.join(t for t in p.itertext())
+ for p in params)
+ paramdecl += ', '.join(paramnames)
else:
paramdecl += 'void'
- paramdecl += ");";
+ paramdecl += ");"
return [ pdecl + indentdecl, tdecl + paramdecl ]
- #
+
def newline(self):
write('', file=self.outFile)
def setRegistry(self, registry):
self.registry = registry
- #
diff --git a/registry/genvk.py b/registry/genvk.py
index 7034a3d..5fbeb47 100644
--- a/registry/genvk.py
+++ b/registry/genvk.py
@@ -23,7 +23,7 @@ from extensionmetadocgenerator import ExtensionMetaDocGeneratorOptions, Extensio
from pygenerator import PyOutputGenerator
from validitygenerator import ValidityOutputGenerator
from hostsyncgenerator import HostSynchronizationOutputGenerator
-from extensionStubSource import ExtensionStubSourceOutputGenerator
+from vkconventions import VulkanConventions
# Simple timer functions
startTime = None
@@ -122,6 +122,9 @@ def makeGenOpts(args):
protectFeature = protect
protectProto = protect
+ # An API style conventions object
+ conventions = VulkanConventions()
+
# API include files for spec and ref pages
# Overwrites include subdirectories in spec source tree
# The generated include files do not include the calling convention
@@ -132,6 +135,7 @@ def makeGenOpts(args):
genOpts['apiinc'] = [
DocOutputGenerator,
DocGeneratorOptions(
+ conventions = conventions,
filename = 'timeMarker',
directory = directory,
apiname = 'vulkan',
@@ -154,6 +158,7 @@ def makeGenOpts(args):
genOpts['vkapi.py'] = [
PyOutputGenerator,
DocGeneratorOptions(
+ conventions = conventions,
filename = 'vkapi.py',
directory = directory,
apiname = 'vulkan',
@@ -170,6 +175,7 @@ def makeGenOpts(args):
genOpts['validinc'] = [
ValidityOutputGenerator,
DocGeneratorOptions(
+ conventions = conventions,
filename = 'timeMarker',
directory = directory,
apiname = 'vulkan',
@@ -186,6 +192,7 @@ def makeGenOpts(args):
genOpts['hostsyncinc'] = [
HostSynchronizationOutputGenerator,
DocGeneratorOptions(
+ conventions = conventions,
filename = 'timeMarker',
directory = directory,
apiname = 'vulkan',
@@ -198,30 +205,11 @@ def makeGenOpts(args):
emitExtensions = emitExtensionsPat)
]
- # Extension stub source dispatcher
- # This target is no longer maintained and supported.
- # See README.adoc for discussion.
- genOpts['vulkan_ext.c'] = [
- ExtensionStubSourceOutputGenerator,
- CGeneratorOptions(
- filename = 'vulkan_ext.c',
- directory = directory,
- apiname = 'vulkan',
- profile = None,
- versions = featuresPat,
- emitversions = None,
- defaultExtensions = None,
- addExtensions = '.*',
- removeExtensions = removeExtensionsPat,
- emitExtensions = emitExtensionsPat,
- prefixText = prefixStrings + vkPrefixStrings,
- alignFuncParam = 48)
- ]
-
# Extension metainformation for spec extension appendices
genOpts['extinc'] = [
ExtensionMetaDocOutputGenerator,
ExtensionMetaDocGeneratorOptions(
+ conventions = conventions,
filename = 'timeMarker',
directory = directory,
apiname = 'vulkan',
@@ -256,11 +244,13 @@ def makeGenOpts(args):
'VK_ANDROID_external_memory_android_hardware_buffer'
], commonSuppressExtensions ],
[ 'vulkan_fuchsia.h', [ 'VK_FUCHSIA_imagepipe_surface'], commonSuppressExtensions ],
+ [ 'vulkan_ggp.h', [ 'VK_GGP_stream_descriptor_surface',
+ 'VK_GGP_frame_token' ], commonSuppressExtensions ],
[ 'vulkan_ios.h', [ 'VK_MVK_ios_surface' ], commonSuppressExtensions ],
[ 'vulkan_macos.h', [ 'VK_MVK_macos_surface' ], commonSuppressExtensions ],
[ 'vulkan_vi.h', [ 'VK_NN_vi_surface' ], commonSuppressExtensions ],
[ 'vulkan_wayland.h', [ 'VK_KHR_wayland_surface' ], commonSuppressExtensions ],
- [ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)' ], commonSuppressExtensions + [ 'VK_KHR_external_semaphore', 'VK_KHR_external_memory_capabilities', 'VK_KHR_external_fence', 'VK_KHR_external_fence_capabilities', 'VK_NV_external_memory_capabilities' ] ],
+ [ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)', 'VK_EXT_full_screen_exclusive'], commonSuppressExtensions + [ 'VK_KHR_external_semaphore', 'VK_KHR_external_memory_capabilities', 'VK_KHR_external_fence', 'VK_KHR_external_fence_capabilities', 'VK_NV_external_memory_capabilities' ] ],
[ 'vulkan_xcb.h', [ 'VK_KHR_xcb_surface' ], commonSuppressExtensions ],
[ 'vulkan_xlib.h', [ 'VK_KHR_xlib_surface' ], commonSuppressExtensions ],
[ 'vulkan_xlib_xrandr.h', [ 'VK_EXT_acquire_xlib_display' ], commonSuppressExtensions ],
@@ -276,6 +266,7 @@ def makeGenOpts(args):
emitPlatformExtensionsRE = makeREstring(platform[1])
opts = CGeneratorOptions(
+ conventions = conventions,
filename = headername,
directory = directory,
apiname = 'vulkan',
@@ -295,7 +286,8 @@ def makeGenOpts(args):
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
- alignFuncParam = 48)
+ alignFuncParam = 48,
+ genEnumBeginEndRange = True)
genOpts[headername] = [ COutputGenerator, opts ]
@@ -312,6 +304,7 @@ def makeGenOpts(args):
genOpts['vulkan_core.h'] = [
COutputGenerator,
CGeneratorOptions(
+ conventions = conventions,
filename = 'vulkan_core.h',
directory = directory,
apiname = 'vulkan',
@@ -331,7 +324,8 @@ def makeGenOpts(args):
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
- alignFuncParam = 48)
+ alignFuncParam = 48,
+ genEnumBeginEndRange = True)
]
# Unused - vulkan10.h target.
@@ -342,6 +336,7 @@ def makeGenOpts(args):
genOpts['vulkan10.h'] = [
COutputGenerator,
CGeneratorOptions(
+ conventions = conventions,
filename = 'vulkan10.h',
directory = directory,
apiname = 'vulkan',
@@ -367,6 +362,7 @@ def makeGenOpts(args):
genOpts['alias.h'] = [
COutputGenerator,
CGeneratorOptions(
+ conventions = conventions,
filename = 'alias.h',
directory = directory,
apiname = 'vulkan',
@@ -404,7 +400,7 @@ def genTarget(args):
# Create generator options with specified parameters
makeGenOpts(args)
- if (args.target in genOpts.keys()):
+ if args.target in genOpts.keys():
createGenerator = genOpts[args.target][0]
options = genOpts[args.target][1]
@@ -504,27 +500,27 @@ if __name__ == '__main__':
reg.loadElementTree(tree)
endTimer(args.time, '* Time to parse ElementTree =')
- if (args.validate):
+ if args.validate:
reg.validateGroups()
- if (args.dump):
+ if args.dump:
write('* Dumping registry to regdump.txt', file=sys.stderr)
reg.dumpReg(filehandle = open('regdump.txt', 'w', encoding='utf-8'))
# create error/warning & diagnostic files
- if (args.errfile):
+ if args.errfile:
errWarn = open(args.errfile, 'w', encoding='utf-8')
else:
errWarn = sys.stderr
- if (args.diagfile):
+ if args.diagfile:
diag = open(args.diagfile, 'w', encoding='utf-8')
else:
diag = None
- if (args.debug):
+ if args.debug:
pdb.run('genTarget(args)')
- elif (args.profile):
+ elif args.profile:
import cProfile, pstats
cProfile.run('genTarget(args)', 'profile.txt')
p = pstats.Stats('profile.txt')
diff --git a/registry/reg.py b/registry/reg.py
index f0c27a7..29d610f 100644
--- a/registry/reg.py
+++ b/registry/reg.py
@@ -14,9 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import io,os,pdb,re,string,sys,copy
+import copy
+import re
+import sys
import xml.etree.ElementTree as etree
-from collections import defaultdict
+from collections import defaultdict, namedtuple
+from generator import OutputGenerator, write
# matchAPIProfile - returns whether an API and profile
# being generated matches an element's profile
@@ -48,20 +51,21 @@ from collections import defaultdict
# 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):
+ elem_api = elem.get('api')
+ if elem_api:
+ if api is None:
raise UserWarning("No API requested, but 'api' attribute is present with value '" +
- elem.get('api') + "'")
- elif (api != elem.get('api')):
+ elem_api + "'")
+ elif api != elem_api:
# Requested API doesn't match attribute
return False
- if ('profile' in elem.attrib):
- if (profile == None):
+ elem_profile = elem.get('profile')
+ if elem_profile:
+ if profile is None:
raise UserWarning("No profile requested, but 'profile' attribute is present with value '" +
- elem.get('profile') + "'")
- elif (profile != elem.get('profile')):
+ elem_profile + "'")
+ elif profile != elem_profile:
# Requested profile doesn't match attribute
return False
return True
@@ -134,7 +138,7 @@ class EnumInfo(BaseInfo):
def __init__(self, elem):
BaseInfo.__init__(self, elem)
self.type = elem.get('type')
- if (self.type == None):
+ if self.type is None:
self.type = ''
# CmdInfo - registry information about a command
@@ -168,7 +172,7 @@ class FeatureInfo(BaseInfo):
self.name = elem.get('name')
# Determine element category (vendor). Only works
# for <extension> elements.
- if (elem.tag == 'feature'):
+ if elem.tag == 'feature':
self.category = 'VERSION'
self.version = elem.get('name')
self.versionNumber = elem.get('number')
@@ -182,8 +186,6 @@ class FeatureInfo(BaseInfo):
self.supported = elem.get('supported')
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>
@@ -229,7 +231,15 @@ class Registry:
self.apidict = {}
self.extensions = []
self.requiredextensions = [] # Hack - can remove it after validity generator goes away
+ # ** Global types for automatic source generation **
+ # Length Member data
+ self.commandextensiontuple = namedtuple('commandextensiontuple',
+ ['command', # The name of the command being modified
+ 'value', # The value to append to the command
+ 'extension']) # The name of the extension that added it
self.validextensionstructs = defaultdict(list)
+ self.commandextensionsuccesses = []
+ self.commandextensionerrors = []
self.extdict = {}
# A default output generator, so commands prior to apiGen can report
# errors via the generator object.
@@ -238,14 +248,17 @@ class Registry:
self.emitFeatures = False
self.breakPat = None
# self.breakPat = re.compile('VkFenceImportFlagBits.*')
+
def loadElementTree(self, tree):
"""Load ElementTree into a Registry object and parse it"""
self.tree = tree
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
@@ -263,9 +276,9 @@ class Registry:
def addElementInfo(self, elem, info, infoName, dictionary):
# self.gen.logMsg('diag', 'Adding ElementInfo.required =',
# info.required, 'name =', elem.get('name'))
-
- if ('api' in elem.attrib):
- key = (elem.get('name'),elem.get('api'))
+ api = elem.get('api')
+ if api:
+ key = (elem.get('name'), api)
else:
key = elem.get('name')
if key in dictionary:
@@ -277,28 +290,30 @@ class Registry:
# 'with identical value')
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):
+ if key in dictionary:
# self.gen.logMsg('diag', 'Found API-specific element for feature', fname)
return dictionary[key]
- elif (fname in dictionary):
+ if fname in dictionary:
# self.gen.logMsg('diag', 'Found generic element for feature', fname)
return dictionary[fname]
- else:
- return None
+
+ return None
+
def breakOnName(self, regexp):
self.breakPat = re.compile(regexp)
+
def parseTree(self):
"""Parse the registry Element, once created"""
# This must be the Element for the root <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.
@@ -306,13 +321,13 @@ class Registry:
# 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'):
+ for type_elem 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)
- #
+ if type_elem.get('name') is None:
+ type_elem.set('name', type_elem.find('name').text)
+ self.addElementInfo(type_elem, TypeInfo(type_elem), 'type', self.typedict)
+
# Create dictionary of registry enum groups from <enums> tags.
#
# Required <enums> attributes: 'name'. If no name is given, one is
@@ -321,7 +336,7 @@ class Registry:
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
@@ -333,14 +348,12 @@ class Registry:
# 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)
+ required = (enums.get('type') is not None)
for enum in enums.findall('enum'):
enumInfo = EnumInfo(enum)
enumInfo.required = required
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
- # self.gen.logMsg('diag', 'parseTree: marked req =',
- # required, 'for', enum.get('name'))
- #
+
# Create dictionary of registry commands from <command> tags
# and add 'name' attribute to each <command> tag (where missing)
# based on its <proto><name> element.
@@ -356,13 +369,14 @@ class Registry:
# If the <command> doesn't already have a 'name' attribute, set
# it from contents of its <proto><name> tag.
name = cmd.get('name')
- if name == None:
- name = cmd.attrib['name'] = cmd.find('proto/name').text
+ if name is None:
+ name = cmd.set('name', cmd.find('proto/name').text)
ci = CmdInfo(cmd)
self.addElementInfo(cmd, ci, 'command', self.cmddict)
alias = cmd.get('alias')
if alias:
cmdAlias.append([name, alias, cmd])
+
# Now loop over aliases, injecting a copy of the aliased command's
# Element with the aliased prototype name replaced with the command
# name - if it exists.
@@ -372,8 +386,8 @@ class Registry:
aliasInfo = self.cmddict[alias]
cmdElem = copy.deepcopy(aliasInfo.elem)
cmdElem.find('proto/name').text = name
- cmdElem.attrib['name'] = name
- cmdElem.attrib['alias'] = alias
+ cmdElem.set('name', name)
+ cmdElem.set('alias', alias)
ci = CmdInfo(cmdElem)
# Replace the dictionary entry for the CmdInfo element
self.cmddict[name] = ci
@@ -384,10 +398,8 @@ class Registry:
self.gen.logMsg('warn', 'No matching <command> found for command',
cmd.get('name'), 'alias', alias)
- #
# 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)
@@ -418,36 +430,35 @@ class Registry:
# 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.
- #
for elem in feature.findall('require'):
- for enum in elem.findall('enum'):
- addEnumInfo = False
- groupName = enum.get('extends')
- if (groupName != None):
- # self.gen.logMsg('diag', 'Found extension enum',
- # enum.get('name'))
- # Add version number attribute to the <enum> element
- enum.attrib['version'] = featureInfo.version
- # Look up the GroupInfo with matching groupName
- if (groupName in self.groupdict.keys()):
- # self.gen.logMsg('diag', 'Matching group',
- # groupName, 'found, adding element...')
- gi = self.groupdict[groupName]
- gi.elem.append(enum)
- # Remove element from parent <require> tag
- # This should be a no-op in lxml.etree
- elem.remove(enum)
- else:
- self.gen.logMsg('warn', 'NO matching group',
- groupName, 'for enum', enum.get('name'), 'found.')
- addEnumInfo = True
- elif (enum.get('value') or enum.get('bitpos') or enum.get('alias')):
- # self.gen.logMsg('diag', 'Adding extension constant "enum"',
- # enum.get('name'))
- addEnumInfo = True
- if (addEnumInfo):
- enumInfo = EnumInfo(enum)
- self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
+ for enum in elem.findall('enum'):
+ addEnumInfo = False
+ groupName = enum.get('extends')
+ if groupName is not None:
+ # self.gen.logMsg('diag', 'Found extension enum',
+ # enum.get('name'))
+ # Add version number attribute to the <enum> element
+ enum.set('version', featureInfo.version)
+ # Look up the GroupInfo with matching groupName
+ if groupName in self.groupdict:
+ # self.gen.logMsg('diag', 'Matching group',
+ # groupName, 'found, adding element...')
+ gi = self.groupdict[groupName]
+ gi.elem.append(enum)
+ # Remove element from parent <require> tag
+ # This should be a no-op in lxml.etree
+ elem.remove(enum)
+ else:
+ self.gen.logMsg('warn', 'NO matching group',
+ groupName, 'for enum', enum.get('name'), 'found.')
+ addEnumInfo = True
+ elif enum.get('value') or enum.get('bitpos') or enum.get('alias'):
+ # self.gen.logMsg('diag', 'Adding extension constant "enum"',
+ # enum.get('name'))
+ addEnumInfo = True
+ if addEnumInfo:
+ enumInfo = EnumInfo(enum)
+ self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
self.extensions = self.reg.findall('extensions/extension')
self.extdict = {}
@@ -461,58 +472,57 @@ class Registry:
#
# This code also adds a 'extnumber' attribute containing the
# extension number, used for enumerant value calculation.
- #
for elem in feature.findall('require'):
- for enum in elem.findall('enum'):
- addEnumInfo = False
- groupName = enum.get('extends')
- if (groupName != None):
- # self.gen.logMsg('diag', 'Found extension enum',
- # enum.get('name'))
-
- # Add <extension> block's extension number attribute to
- # the <enum> element unless specified explicitly, such
- # as when redefining an enum in another extension.
- extnumber = enum.get('extnumber')
- if not extnumber:
- enum.attrib['extnumber'] = featureInfo.number
-
- enum.attrib['extname'] = featureInfo.name
- enum.attrib['supported'] = featureInfo.supported
- # Look up the GroupInfo with matching groupName
- if (groupName in self.groupdict.keys()):
- # self.gen.logMsg('diag', 'Matching group',
- # groupName, 'found, adding element...')
- gi = self.groupdict[groupName]
- gi.elem.append(enum)
- # Remove element from parent <require> tag
- # This should be a no-op in lxml.etree
- elem.remove(enum)
- else:
- self.gen.logMsg('warn', 'NO matching group',
- groupName, 'for enum', enum.get('name'), 'found.')
- addEnumInfo = True
- elif (enum.get('value') or enum.get('bitpos') or enum.get('alias')):
- # self.gen.logMsg('diag', 'Adding extension constant "enum"',
- # enum.get('name'))
- addEnumInfo = True
- if (addEnumInfo):
- enumInfo = EnumInfo(enum)
- self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
+ for enum in elem.findall('enum'):
+ addEnumInfo = False
+ groupName = enum.get('extends')
+ if groupName is not None:
+ # self.gen.logMsg('diag', 'Found extension enum',
+ # enum.get('name'))
+
+ # Add <extension> block's extension number attribute to
+ # the <enum> element unless specified explicitly, such
+ # as when redefining an enum in another extension.
+ extnumber = enum.get('extnumber')
+ if not extnumber:
+ enum.set('extnumber', featureInfo.number)
+
+ enum.set('extname', featureInfo.name)
+ enum.set('supported', featureInfo.supported)
+ # Look up the GroupInfo with matching groupName
+ if groupName in self.groupdict:
+ # self.gen.logMsg('diag', 'Matching group',
+ # groupName, 'found, adding element...')
+ gi = self.groupdict[groupName]
+ gi.elem.append(enum)
+ # Remove element from parent <require> tag
+ # This should be a no-op in lxml.etree
+ elem.remove(enum)
+ else:
+ self.gen.logMsg('warn', 'NO matching group',
+ groupName, 'for enum', enum.get('name'), 'found.')
+ addEnumInfo = True
+ elif enum.get('value') or enum.get('bitpos') or enum.get('alias'):
+ # self.gen.logMsg('diag', 'Adding extension constant "enum"',
+ # enum.get('name'))
+ addEnumInfo = True
+ if addEnumInfo:
+ enumInfo = EnumInfo(enum)
+ self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
# Construct a "validextensionstructs" list for parent structures
# based on "structextends" tags in child structures
disabled_types = []
for disabled_ext in self.reg.findall('extensions/extension[@supported="disabled"]'):
- for type in disabled_ext.findall("*/type"):
- disabled_types.append(type.get('name'))
- for type in self.reg.findall('types/type'):
- if type.get('name') not in disabled_types:
- parentStructs = type.get('structextends')
- if (parentStructs != None):
+ for type_elem in disabled_ext.findall("*/type"):
+ disabled_types.append(type_elem.get('name'))
+ for type_elem in self.reg.findall('types/type'):
+ if type_elem.get('name') not in disabled_types:
+ parentStructs = type_elem.get('structextends')
+ if parentStructs is not None:
for parent in parentStructs.split(','):
# self.gen.logMsg('diag', type.get('name'), 'extends', parent)
- self.validextensionstructs[parent].append(type.get('name'))
+ self.validextensionstructs[parent].append(type_elem.get('name'))
# Sort the lists so they don't depend on the XML order
for parent in self.validextensionstructs:
self.validextensionstructs[parent].sort()
@@ -550,26 +560,26 @@ class Registry:
# 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):
+ typeinfo = self.lookupElementInfo(typename, self.typedict)
+ if typeinfo is not None:
+ if required:
# Tag type dependencies in 'alias' and 'required' attributes as
# required. This DOES NOT un-tag dependencies in a <remove>
# tag. See comments in markRequired() below for the reason.
- for attrib in [ 'requires', 'alias' ]:
- depname = type.elem.get(attrib)
+ for attrib_name in [ 'requires', 'alias' ]:
+ depname = typeinfo.elem.get(attrib_name)
if depname:
self.gen.logMsg('diag', 'Generating dependent type',
- depname, 'for', attrib, 'type', typename)
+ depname, 'for', attrib_name, 'type', typename)
# Don't recurse on self-referential structures.
- if (typename != depname):
+ if typename != depname:
self.markTypeRequired(depname, required)
else:
self.gen.logMsg('diag', 'type', typename, 'is self-referential')
@@ -577,27 +587,39 @@ class Registry:
# <type> tags)
# Look for <type> in entire <command> tree,
# not just immediate children
- for subtype in type.elem.findall('.//type'):
+ for subtype in typeinfo.elem.findall('.//type'):
self.gen.logMsg('diag', 'markRequired: type requires dependent <type>', subtype.text)
- if (typename != subtype.text):
+ if typename != subtype.text:
self.markTypeRequired(subtype.text, required)
else:
self.gen.logMsg('diag', 'type', typename, 'is self-referential')
# 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'):
+ for subenum in typeinfo.elem.findall('.//enum'):
self.gen.logMsg('diag', 'markRequired: type requires dependent <enum>', subenum.text)
self.markEnumRequired(subenum.text, required)
- type.required = required
- else:
+ # Tag type dependency in 'bitvalues' attributes as
+ # required. This ensures that the bit values for a flag
+ # are emitted
+ depType = typeinfo.elem.get('bitvalues')
+ if depType:
+ self.gen.logMsg('diag', 'Generating bitflag type',
+ depType, 'for type', typename)
+ self.markTypeRequired(depType, required)
+ group = self.lookupElementInfo(depType, self.groupdict)
+ if group is not None:
+ group.flagType = typeinfo
+
+ typeinfo.required = required
+ elif '.h' not in typename:
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):
+ if enum is not None:
enum.required = required
# Tag enum dependencies in 'alias' attribute as required
depname = enum.elem.get('alias')
@@ -607,13 +629,13 @@ class Registry:
self.markEnumRequired(depname, required)
else:
self.gen.logMsg('warn', 'enum:', enumname , 'IS NOT DEFINED')
- #
+
# cmdname - name of command
# required - boolean (to tag features as required or not)
def markCmdRequired(self, cmdname, required):
self.gen.logMsg('diag', 'tagging command:', cmdname, '-> required =', required)
cmd = self.lookupElementInfo(cmdname, self.cmddict)
- if (cmd != None):
+ if cmd is not None:
cmd.required = required
# Tag command dependencies in 'alias' attribute as required
depname = cmd.elem.get('alias')
@@ -626,67 +648,88 @@ class Registry:
# 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):
+ 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)
+ for type_elem in cmd.elem.findall('.//type'):
+ self.gen.logMsg('diag', 'markRequired: command implicitly requires dependent type', type_elem.text)
+ self.markTypeRequired(type_elem.text, required)
else:
self.gen.logMsg('warn', 'command:', name, 'IS NOT DEFINED')
- #
- # features - Element for <require> or <remove> tag
+
+ # featurename - name of the feature
+ # feature - Element for <require> or <remove> tag
# required - boolean (to tag features as required or not)
- def markRequired(self, features, required):
+ def markRequired(self, featurename, feature, required):
"""Require or remove features specified in the Element"""
- self.gen.logMsg('diag', 'markRequired (features = <too long to print>, required =', required, ')')
+ self.gen.logMsg('diag', 'markRequired (feature = <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'):
+ for typeElem in feature.findall('type'):
self.markTypeRequired(typeElem.get('name'), required)
- for enumElem in features.findall('enum'):
+ for enumElem in feature.findall('enum'):
self.markEnumRequired(enumElem.get('name'), required)
- for cmdElem in features.findall('command'):
+ for cmdElem in feature.findall('command'):
self.markCmdRequired(cmdElem.get('name'), required)
- #
+
+ # Extensions may need to extend existing commands or other items in the future.
+ # So, look for extend tags.
+ for extendElem in feature.findall('extend'):
+ extendType = extendElem.get('type')
+ if extendType == 'command':
+ commandName = extendElem.get('name')
+ successExtends = extendElem.get('successcodes')
+ if successExtends is not None:
+ for success in successExtends.split(','):
+ self.commandextensionsuccesses.append(self.commandextensiontuple(command=commandName,
+ value=success,
+ extension=featurename))
+ errorExtends = extendElem.get('errorcodes')
+ if errorExtends is not None:
+ for error in errorExtends.split(','):
+ self.commandextensionerrors.append(self.commandextensiontuple(command=commandName,
+ value=error,
+ extension=featurename))
+ else:
+ self.gen.logMsg('warn', 'extend type:', extendType, 'IS NOT SUPPORTED')
+
# interface - Element for <version> or <extension>, containing
# <require> and <remove> tags
+ # featurename - name of the feature
# 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>"""
+ def requireAndRemoveFeatures(self, interface, featurename, api, profile):
+ """Process <require> 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)
+ if matchAPIProfile(api, profile, feature):
+ self.markRequired(featurename, 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)
+ if matchAPIProfile(api, profile, feature):
+ self.markRequired(featurename, feature, False)
def assignAdditionalValidity(self, interface, api, profile):
- #
# Loop over all usage inside all <require> tags.
for feature in interface.findall('require'):
- if (matchAPIProfile(api, profile, feature)):
+ if matchAPIProfile(api, profile, feature):
for v in feature.findall('usage'):
if v.get('command'):
self.cmddict[v.get('command')].additionalValidity.append(copy.deepcopy(v))
if v.get('struct'):
self.typedict[v.get('struct')].additionalValidity.append(copy.deepcopy(v))
- #
# Loop over all usage inside all <remove> tags.
for feature in interface.findall('remove'):
- if (matchAPIProfile(api, profile, feature)):
+ if matchAPIProfile(api, profile, feature):
for v in feature.findall('usage'):
if v.get('command'):
self.cmddict[v.get('command')].removedValidity.append(copy.deepcopy(v))
if v.get('struct'):
self.typedict[v.get('struct')].removedValidity.append(copy.deepcopy(v))
- #
# generateFeature - generate a single type / enum group / enum / command,
# and all its dependencies as needed.
# fname - name of feature (<type>/<enum>/<command>)
@@ -699,17 +742,17 @@ class Registry:
self.gen.logMsg('diag', 'generateFeature: generating', ftype, fname)
f = self.lookupElementInfo(fname, dictionary)
- if (f == None):
+ if f is 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):
+ if not f.required:
self.gen.logMsg('diag', 'Skipping', ftype, fname, '(not required)')
return
- if (f.declared):
+ if f.declared:
self.gen.logMsg('diag', 'Skipping', ftype, fname, '(already declared)')
return
# Always mark feature declared, as though actually emitted
@@ -720,23 +763,25 @@ class Registry:
if alias:
self.gen.logMsg('diag', fname, 'is an alias of', alias)
- #
# Pull in dependent declaration(s) of the feature.
- # For types, there may be one type in the 'required' attribute of
+ # For types, there may be one type in the 'requires' attribute of
# the element, one in the 'alias' attribute, and many in
- # imbedded <type> and <enum> tags within the element.
+ # embedded <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 that type).
genProc = None
- if (ftype == 'type'):
+ followupFeature = None
+ if ftype == 'type':
genProc = self.gen.genType
- # Generate type dependencies in 'alias' and 'required' attributes
+ # Generate type dependencies in 'alias' and 'requires' attributes
if alias:
self.generateFeature(alias, 'type', self.typedict)
requires = f.elem.get('requires')
if requires:
+ self.gen.logMsg('diag', 'Generating required dependent type',
+ requires)
self.generateFeature(requires, 'type', self.typedict)
# Generate types used in defining this type (e.g. in nested
@@ -757,10 +802,10 @@ class Registry:
# 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'):
+ 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 alias != None:
+ if alias is not None:
# An alias of another group name.
# Pass to genGroup with 'alias' parameter = aliased name
self.gen.logMsg('diag', 'Generating alias', fname,
@@ -769,7 +814,7 @@ class Registry:
# with an additional parameter which is the alias name.
genProc = self.gen.genGroup
f = self.lookupElementInfo(alias, self.groupdict)
- elif group == None:
+ elif group is None:
self.gen.logMsg('warn', 'Skipping enum type', fname,
': No matching enumerant group')
return
@@ -817,7 +862,7 @@ class Registry:
self.gen.logMsg('diag', '* required =', required, 'for', name)
if required:
# Mark this element as required (in the element, not the EnumInfo)
- elem.attrib['required'] = 'true'
+ elem.set('required', 'true')
# If it's an alias, track that for later use
enumAlias = elem.get('alias')
if enumAlias:
@@ -825,20 +870,22 @@ class Registry:
for elem in enums:
name = elem.get('name')
if name in enumAliases:
- elem.attrib['required'] = 'true'
+ elem.set('required', 'true')
self.gen.logMsg('diag', '* also need to require alias', name)
- elif (ftype == 'command'):
+ if f.elem.get('category') == 'bitmask':
+ followupFeature = f.elem.get( 'bitvalues' )
+ elif ftype == 'command':
# Generate command dependencies in 'alias' attribute
if alias:
self.generateFeature(alias, 'command', self.cmddict)
genProc = self.gen.genCmd
- for type in f.elem.findall('.//type'):
- depname = type.text
+ for type_elem in f.elem.findall('.//type'):
+ depname = type_elem.text
self.gen.logMsg('diag', 'Generating required parameter type',
depname)
self.generateFeature(depname, 'type', self.typedict)
- elif (ftype == 'enum'):
+ elif ftype == 'enum':
# Generate enum dependencies in 'alias' attribute
if alias:
self.generateFeature(alias, 'enum', self.enumdict)
@@ -846,19 +893,23 @@ class Registry:
# Actually generate the type only if emitting declarations
if self.emitFeatures:
- self.gen.logMsg('diag', 'Emitting', ftype, fname, 'declaration')
+ self.gen.logMsg('diag', 'Emitting', ftype, 'decl for', fname)
genProc(f, fname, alias)
else:
self.gen.logMsg('diag', 'Skipping', ftype, fname,
'(should not be emitted)')
- #
+
+ if followupFeature :
+ self.gen.logMsg('diag', 'Generating required bitvalues <enum>',
+ followupFeature)
+ self.generateFeature(followupFeature, "type", self.typedict)
+
# 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.
for features in interface.findall('require'):
for t in features.findall('type'):
@@ -868,30 +919,29 @@ class Registry:
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)
regEmitExtensions = re.compile(self.genOpts.emitExtensions)
- #
+
# Get all matching API feature names & add to list of FeatureInfo
# Note we used to select on feature version attributes, not names.
features = []
@@ -899,15 +949,15 @@ class Registry:
for key in self.apidict:
fi = self.apidict[key]
api = fi.elem.get('api')
- if (api == self.genOpts.apiname):
+ if api == self.genOpts.apiname:
apiMatch = True
- if (regVersions.match(fi.name)):
+ if regVersions.match(fi.name):
# Matches API & version #s being generated. Mark for
# emission and add to the features[] list .
# @@ Could use 'declared' instead of 'emit'?
- fi.emit = (regEmitVersions.match(fi.name) != None)
+ fi.emit = (regEmitVersions.match(fi.name) is not None)
features.append(fi)
- if (not fi.emit):
+ 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)')
@@ -923,9 +973,9 @@ class Registry:
self.gen.logMsg('diag', 'NOT including feature api =', api,
'name =', fi.name,
'(does not match requested API)')
- if (not apiMatch):
+ 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
@@ -935,7 +985,7 @@ class Registry:
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
@@ -946,12 +996,12 @@ class Registry:
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):
+ if regAddExtensions.match(extName) is not None:
self.gen.logMsg('diag', 'Including extension',
extName, '(matches explicitly requested extensions to add)')
include = True
@@ -959,20 +1009,21 @@ class Registry:
# 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):
+ if regRemoveExtensions.match(extName) is not 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 = (regEmitExtensions.match(extName) != None)
+ if include:
+ ei.emit = (regEmitExtensions.match(extName) is not None)
features.append(ei)
- if (not ei.emit):
+ if not ei.emit:
self.gen.logMsg('diag', 'NOT tagging extension',
extName,
'for emission (does not match emitextensions pattern)')
+
# Hack - can be removed when validity generator goes away
# (Jon) I'm not sure what this does, or if it should respect
# the ei.emit flag above.
@@ -980,11 +1031,11 @@ class Registry:
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):
+ 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
@@ -993,23 +1044,23 @@ class Registry:
# 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 **********')
+ 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)
+ self.requireAndRemoveFeatures(f.elem, f.name, self.genOpts.apiname, self.genOpts.profile)
self.assignAdditionalValidity(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.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):
+ 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
@@ -1018,54 +1069,51 @@ class Registry:
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 datatype in self.typedict:
+ self.typedict[datatype].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 ***')
+ 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
+ # funcname = cmd.find('proto/name').text
+ group = proto.get('group')
+ if group is not None and group not in self.groupdict:
+ # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group)
+ if group not in badGroup:
+ badGroup[group] = 1
+ else:
+ badGroup[group] = badGroup[group] + 1
+
for param in cmd.findall('param'):
pname = param.find('name')
- if (pname != None):
+ if pname is not 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 ***')
+ pname = param.get('name')
+ group = param.get('group')
+ if group is not None and group not in self.groupdict:
+ # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group)
+ if group not in badGroup:
+ badGroup[group] = 1
+ else:
+ badGroup[group] = badGroup[group] + 1
+
+ if badGroup:
+ self.gen.logMsg('diag', 'SUMMARY OF UNRECOGNIZED GROUPS')
for key in sorted(badGroup.keys()):
self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times')
diff --git a/registry/validusage.json b/registry/validusage.json
index e90c0f0..46f209d 100644
--- a/registry/validusage.json
+++ b/registry/validusage.json
@@ -1,9 +1,9 @@
{
"version info": {
"schema version": 2,
- "api version": "1.1.103",
- "comment": "from git branch: github-master commit: 4ad4fd17161efd9bfd1125c0c9d17db6fb276216",
- "date": "2019-03-11 09:10:44Z"
+ "api version": "1.1.105",
+ "comment": "from git branch: github-master commit: 1f1a557801f170971868735dcbf8484a684abba7",
+ "date": "2019-03-19 09:15:00Z"
},
"validation": {
"vkGetInstanceProcAddr": {
@@ -362,7 +362,7 @@
},
{
"vuid": "VUID-VkDeviceCreateInfo-pNext-pNext",
- "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupDeviceCreateInfo\">VkDeviceGroupDeviceCreateInfo</a>, <a href=\"#VkDeviceMemoryOverallocationCreateInfoAMD\">VkDeviceMemoryOverallocationCreateInfoAMD</a>, <a href=\"#VkPhysicalDevice16BitStorageFeatures\">VkPhysicalDevice16BitStorageFeatures</a>, <a href=\"#VkPhysicalDevice8BitStorageFeaturesKHR\">VkPhysicalDevice8BitStorageFeaturesKHR</a>, <a href=\"#VkPhysicalDeviceASTCDecodeFeaturesEXT\">VkPhysicalDeviceASTCDecodeFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT\">VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceBufferAddressFeaturesEXT\">VkPhysicalDeviceBufferAddressFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceComputeShaderDerivativesFeaturesNV\">VkPhysicalDeviceComputeShaderDerivativesFeaturesNV</a>, <a href=\"#VkPhysicalDeviceConditionalRenderingFeaturesEXT\">VkPhysicalDeviceConditionalRenderingFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceCooperativeMatrixFeaturesNV\">VkPhysicalDeviceCooperativeMatrixFeaturesNV</a>, <a href=\"#VkPhysicalDeviceCornerSampledImageFeaturesNV\">VkPhysicalDeviceCornerSampledImageFeaturesNV</a>, <a href=\"#VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV\">VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV</a>, <a href=\"#VkPhysicalDeviceDepthClipEnableFeaturesEXT\">VkPhysicalDeviceDepthClipEnableFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceDescriptorIndexingFeaturesEXT\">VkPhysicalDeviceDescriptorIndexingFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceExclusiveScissorFeaturesNV\">VkPhysicalDeviceExclusiveScissorFeaturesNV</a>, <a href=\"#VkPhysicalDeviceFeatures2\">VkPhysicalDeviceFeatures2</a>, <a href=\"#VkPhysicalDeviceFloat16Int8FeaturesKHR\">VkPhysicalDeviceFloat16Int8FeaturesKHR</a>, <a href=\"#VkPhysicalDeviceFragmentDensityMapFeaturesEXT\">VkPhysicalDeviceFragmentDensityMapFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV\">VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV</a>, <a href=\"#VkPhysicalDeviceInlineUniformBlockFeaturesEXT\">VkPhysicalDeviceInlineUniformBlockFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceMemoryPriorityFeaturesEXT\">VkPhysicalDeviceMemoryPriorityFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceMeshShaderFeaturesNV\">VkPhysicalDeviceMeshShaderFeaturesNV</a>, <a href=\"#VkPhysicalDeviceMultiviewFeatures\">VkPhysicalDeviceMultiviewFeatures</a>, <a href=\"#VkPhysicalDeviceProtectedMemoryFeatures\">VkPhysicalDeviceProtectedMemoryFeatures</a>, <a href=\"#VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV\">VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV</a>, <a href=\"#VkPhysicalDeviceSamplerYcbcrConversionFeatures\">VkPhysicalDeviceSamplerYcbcrConversionFeatures</a>, <a href=\"#VkPhysicalDeviceScalarBlockLayoutFeaturesEXT\">VkPhysicalDeviceScalarBlockLayoutFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceShaderAtomicInt64FeaturesKHR\">VkPhysicalDeviceShaderAtomicInt64FeaturesKHR</a>, <a href=\"#VkPhysicalDeviceShaderDrawParameterFeatures\">VkPhysicalDeviceShaderDrawParameterFeatures</a>, <a href=\"#VkPhysicalDeviceShaderImageFootprintFeaturesNV\">VkPhysicalDeviceShaderImageFootprintFeaturesNV</a>, <a href=\"#VkPhysicalDeviceShadingRateImageFeaturesNV\">VkPhysicalDeviceShadingRateImageFeaturesNV</a>, <a href=\"#VkPhysicalDeviceTransformFeedbackFeaturesEXT\">VkPhysicalDeviceTransformFeedbackFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceVariablePointerFeatures\">VkPhysicalDeviceVariablePointerFeatures</a>, <a href=\"#VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT\">VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceVulkanMemoryModelFeaturesKHR\">VkPhysicalDeviceVulkanMemoryModelFeaturesKHR</a>, or <a href=\"#VkPhysicalDeviceYcbcrImageArraysFeaturesEXT\">VkPhysicalDeviceYcbcrImageArraysFeaturesEXT</a>"
+ "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupDeviceCreateInfo\">VkDeviceGroupDeviceCreateInfo</a>, <a href=\"#VkDeviceMemoryOverallocationCreateInfoAMD\">VkDeviceMemoryOverallocationCreateInfoAMD</a>, <a href=\"#VkPhysicalDevice16BitStorageFeatures\">VkPhysicalDevice16BitStorageFeatures</a>, <a href=\"#VkPhysicalDevice8BitStorageFeaturesKHR\">VkPhysicalDevice8BitStorageFeaturesKHR</a>, <a href=\"#VkPhysicalDeviceASTCDecodeFeaturesEXT\">VkPhysicalDeviceASTCDecodeFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT\">VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceBufferAddressFeaturesEXT\">VkPhysicalDeviceBufferAddressFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceComputeShaderDerivativesFeaturesNV\">VkPhysicalDeviceComputeShaderDerivativesFeaturesNV</a>, <a href=\"#VkPhysicalDeviceConditionalRenderingFeaturesEXT\">VkPhysicalDeviceConditionalRenderingFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceCooperativeMatrixFeaturesNV\">VkPhysicalDeviceCooperativeMatrixFeaturesNV</a>, <a href=\"#VkPhysicalDeviceCornerSampledImageFeaturesNV\">VkPhysicalDeviceCornerSampledImageFeaturesNV</a>, <a href=\"#VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV\">VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV</a>, <a href=\"#VkPhysicalDeviceDepthClipEnableFeaturesEXT\">VkPhysicalDeviceDepthClipEnableFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceDescriptorIndexingFeaturesEXT\">VkPhysicalDeviceDescriptorIndexingFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceExclusiveScissorFeaturesNV\">VkPhysicalDeviceExclusiveScissorFeaturesNV</a>, <a href=\"#VkPhysicalDeviceFeatures2\">VkPhysicalDeviceFeatures2</a>, <a href=\"#VkPhysicalDeviceFloat16Int8FeaturesKHR\">VkPhysicalDeviceFloat16Int8FeaturesKHR</a>, <a href=\"#VkPhysicalDeviceFragmentDensityMapFeaturesEXT\">VkPhysicalDeviceFragmentDensityMapFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV\">VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV</a>, <a href=\"#VkPhysicalDeviceHostQueryResetFeaturesEXT\">VkPhysicalDeviceHostQueryResetFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceInlineUniformBlockFeaturesEXT\">VkPhysicalDeviceInlineUniformBlockFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceMemoryPriorityFeaturesEXT\">VkPhysicalDeviceMemoryPriorityFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceMeshShaderFeaturesNV\">VkPhysicalDeviceMeshShaderFeaturesNV</a>, <a href=\"#VkPhysicalDeviceMultiviewFeatures\">VkPhysicalDeviceMultiviewFeatures</a>, <a href=\"#VkPhysicalDeviceProtectedMemoryFeatures\">VkPhysicalDeviceProtectedMemoryFeatures</a>, <a href=\"#VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV\">VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV</a>, <a href=\"#VkPhysicalDeviceSamplerYcbcrConversionFeatures\">VkPhysicalDeviceSamplerYcbcrConversionFeatures</a>, <a href=\"#VkPhysicalDeviceScalarBlockLayoutFeaturesEXT\">VkPhysicalDeviceScalarBlockLayoutFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceShaderAtomicInt64FeaturesKHR\">VkPhysicalDeviceShaderAtomicInt64FeaturesKHR</a>, <a href=\"#VkPhysicalDeviceShaderDrawParameterFeatures\">VkPhysicalDeviceShaderDrawParameterFeatures</a>, <a href=\"#VkPhysicalDeviceShaderImageFootprintFeaturesNV\">VkPhysicalDeviceShaderImageFootprintFeaturesNV</a>, <a href=\"#VkPhysicalDeviceShadingRateImageFeaturesNV\">VkPhysicalDeviceShadingRateImageFeaturesNV</a>, <a href=\"#VkPhysicalDeviceTransformFeedbackFeaturesEXT\">VkPhysicalDeviceTransformFeedbackFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceVariablePointerFeatures\">VkPhysicalDeviceVariablePointerFeatures</a>, <a href=\"#VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT\">VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT</a>, <a href=\"#VkPhysicalDeviceVulkanMemoryModelFeaturesKHR\">VkPhysicalDeviceVulkanMemoryModelFeaturesKHR</a>, or <a href=\"#VkPhysicalDeviceYcbcrImageArraysFeaturesEXT\">VkPhysicalDeviceYcbcrImageArraysFeaturesEXT</a>"
},
{
"vuid": "VUID-VkDeviceCreateInfo-sType-unique",
@@ -982,7 +982,7 @@
},
{
"vuid": "VUID-vkQueueSubmit-pSubmits-02207",
- "text": " If any element of <code>pSubmits</code>&#8594;<code>pCommandBuffers</code> includes a <a href=\"#synchronization-queue-transfers-acquire\">Queue Family Transfer Acquire Operation</a>, there <strong class=\"purple\">must</strong> exist a previously submitted <a href=\"#synchronization-queue-transfers-release\">Queue Family Transfer Release Operation</a> on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such <a href=\"#synchronization-queue-transfers-acquire\">acquire operations</a>, and which happens before the acquire operation."
+ "text": " If any element of <code>pSubmits</code>-&gt;<code>pCommandBuffers</code> includes a <a href=\"#synchronization-queue-transfers-acquire\">Queue Family Transfer Acquire Operation</a>, there <strong class=\"purple\">must</strong> exist a previously submitted <a href=\"#synchronization-queue-transfers-release\">Queue Family Transfer Release Operation</a> on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such <a href=\"#synchronization-queue-transfers-acquire\">acquire operations</a>, and which happens before the acquire operation."
},
{
"vuid": "VUID-vkQueueSubmit-queue-parameter",
@@ -3122,7 +3122,7 @@
},
{
"vuid": "VUID-VkRenderPassCreateInfo-pNext-02512",
- "text": " If the <code>pNext</code> chain includes an instance of <a href=\"#VkRenderPassMultiviewCreateInfo\">VkRenderPassMultiviewCreateInfo</a>, for any element of <code>pDependencies</code> with a <code>dependencyFlags</code> member that doesn&#8217;t include <code>VK_DEPENDENCY_VIEW_LOCAL_BIT</code>, the corresponding element of the <code>pViewOffsets</code> member of that <a href=\"#VkRenderPassMultiviewCreateInfo\">VkRenderPassMultiviewCreateInfo</a> instance <strong class=\"purple\">must</strong> be <code>0</code>"
+ "text": " If the <code>pNext</code> chain includes an instance of <a href=\"#VkRenderPassMultiviewCreateInfo\">VkRenderPassMultiviewCreateInfo</a>, for any element of <code>pDependencies</code> with a <code>dependencyFlags</code> member that does not include <code>VK_DEPENDENCY_VIEW_LOCAL_BIT</code>, the corresponding element of the <code>pViewOffsets</code> member of that <a href=\"#VkRenderPassMultiviewCreateInfo\">VkRenderPassMultiviewCreateInfo</a> instance <strong class=\"purple\">must</strong> be <code>0</code>"
},
{
"vuid": "VUID-VkRenderPassCreateInfo-pNext-02513",
@@ -3276,7 +3276,7 @@
"(VK_VERSION_1_1,VK_KHR_maintenance2)+(VK_EXT_image_drm_format_modifier)": [
{
"vuid": "VUID-VkInputAttachmentAspectReference-aspectMask-02250",
- "text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT for any index <em>i</em>."
+ "text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> for any index <code>i</code>."
}
]
},
@@ -5040,7 +5040,7 @@
},
{
"vuid": "VUID-VkComputePipelineCreateInfo-pNext-pNext",
- "text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code>"
+ "text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkPipelineCreationFeedbackCreateInfoEXT\">VkPipelineCreationFeedbackCreateInfoEXT</a>"
},
{
"vuid": "VUID-VkComputePipelineCreateInfo-flags-parameter",
@@ -5376,7 +5376,7 @@
},
{
"vuid": "VUID-VkGraphicsPipelineCreateInfo-pNext-pNext",
- "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkPipelineDiscardRectangleStateCreateInfoEXT\">VkPipelineDiscardRectangleStateCreateInfoEXT</a> or <a href=\"#VkPipelineRepresentativeFragmentTestStateCreateInfoNV\">VkPipelineRepresentativeFragmentTestStateCreateInfoNV</a>"
+ "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkPipelineCreationFeedbackCreateInfoEXT\">VkPipelineCreationFeedbackCreateInfoEXT</a>, <a href=\"#VkPipelineDiscardRectangleStateCreateInfoEXT\">VkPipelineDiscardRectangleStateCreateInfoEXT</a>, or <a href=\"#VkPipelineRepresentativeFragmentTestStateCreateInfoNV\">VkPipelineRepresentativeFragmentTestStateCreateInfoNV</a>"
},
{
"vuid": "VUID-VkGraphicsPipelineCreateInfo-sType-unique",
@@ -5962,7 +5962,7 @@
},
{
"vuid": "VUID-VkRayTracingPipelineCreateInfoNV-pNext-pNext",
- "text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code>"
+ "text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkPipelineCreationFeedbackCreateInfoEXT\">VkPipelineCreationFeedbackCreateInfoEXT</a>"
},
{
"vuid": "VUID-VkRayTracingPipelineCreateInfoNV-flags-parameter",
@@ -6090,6 +6090,40 @@
}
]
},
+ "VkPipelineCreationFeedbackCreateInfoEXT": {
+ "(VK_EXT_pipeline_creation_feedback)": [
+ {
+ "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02668",
+ "text": " When chained to <a href=\"#VkGraphicsPipelineCreateInfo\">VkGraphicsPipelineCreateInfo</a>, <a href=\"#VkPipelineCreationFeedbackEXT\">VkPipelineCreationFeedbackEXT</a>::<code>pipelineStageCreationFeedbackCount</code> <strong class=\"purple\">must</strong> equal <a href=\"#VkGraphicsPipelineCreateInfo\">VkGraphicsPipelineCreateInfo</a>::<code>stageCount</code>"
+ },
+ {
+ "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02669",
+ "text": " When chained to <a href=\"#VkComputePipelineCreateInfo\">VkComputePipelineCreateInfo</a>, <a href=\"#VkPipelineCreationFeedbackEXT\">VkPipelineCreationFeedbackEXT</a>::<code>pipelineStageCreationFeedbackCount</code> <strong class=\"purple\">must</strong> equal 1"
+ },
+ {
+ "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT</code>"
+ },
+ {
+ "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pPipelineCreationFeedback-parameter",
+ "text": " <code>pPipelineCreationFeedback</code> <strong class=\"purple\">must</strong> be a valid pointer to a <code>VkPipelineCreationFeedbackEXT</code> structure"
+ },
+ {
+ "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pPipelineStageCreationFeedbacks-parameter",
+ "text": " <code>pPipelineStageCreationFeedbacks</code> <strong class=\"purple\">must</strong> be a valid pointer to an array of <code>pipelineStageCreationFeedbackCount</code> <code>VkPipelineCreationFeedbackEXT</code> structures"
+ },
+ {
+ "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-arraylength",
+ "text": " <code>pipelineStageCreationFeedbackCount</code> <strong class=\"purple\">must</strong> be greater than <code>0</code>"
+ }
+ ],
+ "(VK_EXT_pipeline_creation_feedback)+(VK_NV_ray_tracing)": [
+ {
+ "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02670",
+ "text": " When chained to <a href=\"#VkRayTracingPipelineCreateInfoNV\">VkRayTracingPipelineCreateInfoNV</a>, <a href=\"#VkPipelineCreationFeedbackEXT\">VkPipelineCreationFeedbackEXT</a>::<code>pipelineStageCreationFeedbackCount</code> <strong class=\"purple\">must</strong> equal <a href=\"#VkRayTracingPipelineCreateInfoNV\">VkRayTracingPipelineCreateInfoNV</a>::<code>stageCount</code>"
+ }
+ ]
+ },
"VkAllocationCallbacks": {
"core": [
{
@@ -8180,7 +8214,7 @@
},
{
"vuid": "VUID-vkGetImageSubresourceLayout-tiling-02271",
- "text": " If the <code>tiling</code> of the <code>image</code> is <code>VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT</code>, then the <code>aspectMask</code> member of <code>pSubresource</code> <strong class=\"purple\">must</strong> be <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT and the index <em>i</em> <strong class=\"purple\">must</strong> be less than the <a href=\"#VkDrmFormatModifierPropertiesEXT\"><code>drmFormatModifierPlaneCount</code></a> associated with the image&#8217;s <a href=\"#VkImageCreateInfo\"><code>format</code></a> and <a href=\"#VkImageDrmFormatModifierPropertiesEXT\"><code>drmFormatModifier</code></a>."
+ "text": " If the <code>tiling</code> of the <code>image</code> is <code>VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT</code>, then the <code>aspectMask</code> member of <code>pSubresource</code> <strong class=\"purple\">must</strong> be <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> and the index <code>i</code> <strong class=\"purple\">must</strong> be less than the <a href=\"#VkDrmFormatModifierPropertiesEXT\"><code>drmFormatModifierPlaneCount</code></a> associated with the image&#8217;s <a href=\"#VkImageCreateInfo\"><code>format</code></a> and <a href=\"#VkImageDrmFormatModifierPropertiesEXT\"><code>drmFormatModifier</code></a>."
}
],
"core": [
@@ -8638,7 +8672,7 @@
"(VK_EXT_image_drm_format_modifier)": [
{
"vuid": "VUID-VkImageSubresourceRange-aspectMask-02278",
- "text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT for any index <em>i</em>."
+ "text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> for any index <code>i</code>."
}
]
},
@@ -12008,6 +12042,34 @@
}
]
},
+ "vkResetQueryPoolEXT": {
+ "(VK_EXT_host_query_reset)": [
+ {
+ "vuid": "VUID-vkResetQueryPoolEXT-None-02665",
+ "text": " The <a href=\"#features-hostQueryReset\">hostQueryReset</a> feature <strong class=\"purple\">must</strong> be enabled"
+ },
+ {
+ "vuid": "VUID-vkResetQueryPoolEXT-firstQuery-02666",
+ "text": " <code>firstQuery</code> <strong class=\"purple\">must</strong> be less than the number of queries in <code>queryPool</code>"
+ },
+ {
+ "vuid": "VUID-vkResetQueryPoolEXT-firstQuery-02667",
+ "text": " The sum of <code>firstQuery</code> and <code>queryCount</code> <strong class=\"purple\">must</strong> be less than or equal to the number of queries in <code>queryPool</code>"
+ },
+ {
+ "vuid": "VUID-vkResetQueryPoolEXT-device-parameter",
+ "text": " <code>device</code> <strong class=\"purple\">must</strong> be a valid <code>VkDevice</code> handle"
+ },
+ {
+ "vuid": "VUID-vkResetQueryPoolEXT-queryPool-parameter",
+ "text": " <code>queryPool</code> <strong class=\"purple\">must</strong> be a valid <code>VkQueryPool</code> handle"
+ },
+ {
+ "vuid": "VUID-vkResetQueryPoolEXT-queryPool-parent",
+ "text": " <code>queryPool</code> <strong class=\"purple\">must</strong> have been created, allocated, or retrieved from <code>device</code>"
+ }
+ ]
+ },
"vkCmdBeginQuery": {
"core": [
{
@@ -12776,7 +12838,7 @@
"(VK_EXT_image_drm_format_modifier)": [
{
"vuid": "VUID-VkClearAttachment-aspectMask-02246",
- "text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT for any index <em>i</em>."
+ "text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> for any index <code>i</code>."
}
]
},
@@ -13458,7 +13520,7 @@
"(VK_EXT_image_drm_format_modifier)": [
{
"vuid": "VUID-VkImageSubresourceLayers-aspectMask-02247",
- "text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE</code><em>_i</em>_BIT_EXT for any index <em>i</em>."
+ "text": " <code>aspectMask</code> <strong class=\"purple\">must</strong> not include <code>VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT</code> for any index <code>i</code>."
}
]
},
@@ -14576,7 +14638,7 @@
},
{
"vuid": "VUID-vkCmdDraw-filterCubicMinmax-02614",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_VERSION_1_1,VK_KHR_multiview)": [
@@ -14722,7 +14784,7 @@
},
{
"vuid": "VUID-vkCmdDrawIndexed-filterCubicMinmax-02616",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_VERSION_1_1,VK_KHR_multiview)": [
@@ -14904,7 +14966,7 @@
},
{
"vuid": "VUID-vkCmdDrawIndirect-filterCubicMinmax-02618",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_VERSION_1_1,VK_KHR_multiview)": [
@@ -15110,7 +15172,7 @@
},
{
"vuid": "VUID-vkCmdDrawIndirectCountKHR-filterCubicMinmax-02620",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_KHR_draw_indirect_count)+(VK_VERSION_1_1,VK_KHR_multiview)": [
@@ -15460,7 +15522,7 @@
},
{
"vuid": "VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02622",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_VERSION_1_1,VK_KHR_multiview)": [
@@ -15670,7 +15732,7 @@
},
{
"vuid": "VUID-vkCmdDrawIndexedIndirectCountKHR-filterCubicMinmax-02624",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_KHR_draw_indirect_count)+(VK_VERSION_1_1,VK_KHR_multiview)": [
@@ -15996,7 +16058,7 @@
},
{
"vuid": "VUID-vkCmdDrawIndirectByteCountEXT-filterCubicMinmax-02626",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_EXT_transform_feedback)+(VK_VERSION_1_1,VK_KHR_multiview)": [
@@ -18442,7 +18504,7 @@
},
{
"vuid": "VUID-vkCmdDispatch-filterCubicMinmax-02610",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_VERSION_1_1)": [
@@ -18568,7 +18630,7 @@
},
{
"vuid": "VUID-vkCmdDispatchIndirect-filterCubicMinmax-02612",
- "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
+ "text": " Any <a href=\"#VkImageView\">VkImageView</a> being sampled with <code>VK_FILTER_CUBIC_EXT</code> with a reduction mode of either <code>VK_SAMPLER_REDUCTION_MODE_MIN_EXT</code> or <code>VK_SAMPLER_REDUCTION_MODE_MAX_EXT</code> as a result of this command <strong class=\"purple\">must</strong> have a <a href=\"#VkImageViewType\">VkImageViewType</a> and format that supports cubic filtering together with minmax filtering, as specified by <code>VkFilterCubicImageViewImageFormatPropertiesEXT</code>::<code>filterCubicMinmax</code> returned by <code>vkGetPhysicalDeviceImageFormatProperties2</code>"
}
],
"(VK_VERSION_1_1)": [
@@ -20052,6 +20114,46 @@
}
]
},
+ "vkCreateStreamDescriptorSurfaceGGP": {
+ "(VK_KHR_surface)+(VK_GGP_stream_descriptor_surface)": [
+ {
+ "vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-instance-parameter",
+ "text": " <code>instance</code> <strong class=\"purple\">must</strong> be a valid <code>VkInstance</code> handle"
+ },
+ {
+ "vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pCreateInfo-parameter",
+ "text": " <code>pCreateInfo</code> <strong class=\"purple\">must</strong> be a valid pointer to a valid <code>VkStreamDescriptorSurfaceCreateInfoGGP</code> structure"
+ },
+ {
+ "vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pAllocator-parameter",
+ "text": " If <code>pAllocator</code> is not <code>NULL</code>, <code>pAllocator</code> <strong class=\"purple\">must</strong> be a valid pointer to a valid <code>VkAllocationCallbacks</code> structure"
+ },
+ {
+ "vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pSurface-parameter",
+ "text": " <code>pSurface</code> <strong class=\"purple\">must</strong> be a valid pointer to a <code>VkSurfaceKHR</code> handle"
+ }
+ ]
+ },
+ "VkStreamDescriptorSurfaceCreateInfoGGP": {
+ "(VK_KHR_surface)+(VK_GGP_stream_descriptor_surface)": [
+ {
+ "vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-streamDescriptor-02681",
+ "text": " <code>streamDescriptor</code> <strong class=\"purple\">must</strong> be a valid <code>GgpStreamDescriptor</code>"
+ },
+ {
+ "vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP</code>"
+ },
+ {
+ "vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-pNext-pNext",
+ "text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code>"
+ },
+ {
+ "vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-flags-zerobitmask",
+ "text": " <code>flags</code> <strong class=\"purple\">must</strong> be <code>0</code>"
+ }
+ ]
+ },
"vkCreateIOSSurfaceMVK": {
"(VK_KHR_surface)+(VK_MVK_ios_surface)": [
{
@@ -20769,6 +20871,12 @@
]
},
"vkGetPhysicalDeviceSurfaceCapabilities2KHR": {
+ "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive,VK_KHR_win32_surface)": [
+ {
+ "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-02671",
+ "text": " If an instance of <a href=\"#VkSurfaceCapabilitiesFullScreenExclusiveEXT\">VkSurfaceCapabilitiesFullScreenExclusiveEXT</a> is included in the <code>pNext</code> chain of <code>pSurfaceCapabilities</code>, an instance of <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a> <strong class=\"purple\">must</strong> be included in the <code>pNext</code> chain of <code>pSurfaceInfo</code>."
+ }
+ ],
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
{
"vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter",
@@ -20785,6 +20893,12 @@
]
},
"VkPhysicalDeviceSurfaceInfo2KHR": {
+ "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_KHR_win32_surface,VK_EXT_full_screen_exclusive)": [
+ {
+ "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-02672",
+ "text": " If the <code>pNext</code> chain includes an instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a> with its <code>fullScreenExclusive</code> member set to <code>VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT</code>, and <code>surface</code> was created using <a href=\"#vkCreateWin32SurfaceKHR\">vkCreateWin32SurfaceKHR</a>, an instance of <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a> <strong class=\"purple\">must</strong> be present in the <code>pNext</code> chain"
+ }
+ ],
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
{
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-sType",
@@ -20792,7 +20906,11 @@
},
{
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-pNext",
- "text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code>"
+ "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a> or <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a>"
+ },
+ {
+ "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-unique",
+ "text": " Each <code>sType</code> member in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be unique"
},
{
"vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter",
@@ -20800,6 +20918,30 @@
}
]
},
+ "VkSurfaceFullScreenExclusiveInfoEXT": {
+ "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)": [
+ {
+ "vuid": "VUID-VkSurfaceFullScreenExclusiveInfoEXT-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT</code>"
+ },
+ {
+ "vuid": "VUID-VkSurfaceFullScreenExclusiveInfoEXT-fullScreenExclusive-parameter",
+ "text": " <code>fullScreenExclusive</code> <strong class=\"purple\">must</strong> be a valid <a href=\"#VkFullScreenExclusiveEXT\">VkFullScreenExclusiveEXT</a> value"
+ }
+ ]
+ },
+ "VkSurfaceFullScreenExclusiveWin32InfoEXT": {
+ "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)+(VK_KHR_win32_surface)": [
+ {
+ "vuid": "VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-hmonitor-02673",
+ "text": " <code>hmonitor</code> <strong class=\"purple\">must</strong> be a valid <code>HMONITOR</code>"
+ },
+ {
+ "vuid": "VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT</code>"
+ }
+ ]
+ },
"VkSurfaceCapabilities2KHR": {
"(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [
{
@@ -20808,7 +20950,19 @@
},
{
"vuid": "VUID-VkSurfaceCapabilities2KHR-pNext-pNext",
- "text": " <code>pNext</code> <strong class=\"purple\">must</strong> be <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkSharedPresentSurfaceCapabilitiesKHR\">VkSharedPresentSurfaceCapabilitiesKHR</a>"
+ "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDisplayNativeHdrSurfaceCapabilitiesAMD\">VkDisplayNativeHdrSurfaceCapabilitiesAMD</a>, <a href=\"#VkSharedPresentSurfaceCapabilitiesKHR\">VkSharedPresentSurfaceCapabilitiesKHR</a>, <a href=\"#VkSurfaceCapabilitiesFullScreenExclusiveEXT\">VkSurfaceCapabilitiesFullScreenExclusiveEXT</a>, or <a href=\"#VkSurfaceProtectedCapabilitiesKHR\">VkSurfaceProtectedCapabilitiesKHR</a>"
+ },
+ {
+ "vuid": "VUID-VkSurfaceCapabilities2KHR-sType-unique",
+ "text": " Each <code>sType</code> member in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be unique"
+ }
+ ]
+ },
+ "VkSurfaceProtectedCapabilitiesKHR": {
+ "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_KHR_surface_protected_capabilities)": [
+ {
+ "vuid": "VUID-VkSurfaceProtectedCapabilitiesKHR-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR</code>"
}
]
},
@@ -20820,6 +20974,22 @@
}
]
},
+ "VkDisplayNativeHdrSurfaceCapabilitiesAMD": {
+ "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_AMD_display_native_hdr)": [
+ {
+ "vuid": "VUID-VkDisplayNativeHdrSurfaceCapabilitiesAMD-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD</code>"
+ }
+ ]
+ },
+ "VkSurfaceCapabilitiesFullScreenExclusiveEXT": {
+ "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)": [
+ {
+ "vuid": "VUID-VkSurfaceCapabilitiesFullScreenExclusiveEXT-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT</code>"
+ }
+ ]
+ },
"vkGetPhysicalDeviceSurfaceCapabilities2EXT": {
"(VK_KHR_surface)+(VK_EXT_display_surface_counter)": [
{
@@ -20936,6 +21106,66 @@
}
]
},
+ "vkGetPhysicalDeviceSurfacePresentModes2EXT": {
+ "(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [
+ {
+ "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-physicalDevice-parameter",
+ "text": " <code>physicalDevice</code> <strong class=\"purple\">must</strong> be a valid <code>VkPhysicalDevice</code> handle"
+ },
+ {
+ "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pSurfaceInfo-parameter",
+ "text": " <code>pSurfaceInfo</code> <strong class=\"purple\">must</strong> be a valid pointer to a valid <code>VkPhysicalDeviceSurfaceInfo2KHR</code> structure"
+ },
+ {
+ "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pPresentModeCount-parameter",
+ "text": " <code>pPresentModeCount</code> <strong class=\"purple\">must</strong> be a valid pointer to a <code>uint32_t</code> value"
+ },
+ {
+ "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pPresentModes-parameter",
+ "text": " If the value referenced by <code>pPresentModeCount</code> is not <code>0</code>, and <code>pPresentModes</code> is not <code>NULL</code>, <code>pPresentModes</code> <strong class=\"purple\">must</strong> be a valid pointer to an array of <code>pPresentModeCount</code> <a href=\"#VkPresentModeKHR\">VkPresentModeKHR</a> values"
+ }
+ ]
+ },
+ "vkAcquireFullScreenExclusiveModeEXT": {
+ "(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [
+ {
+ "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02674",
+ "text": " <code>swapchain</code> <strong class=\"purple\">must</strong> not be in the retired state"
+ },
+ {
+ "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02675",
+ "text": " <code>swapchain</code> <strong class=\"purple\">must</strong> be a swapchain created with an instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a>, with <code>fullScreenExclusive</code> set to <code>VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT</code>"
+ },
+ {
+ "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02676",
+ "text": " <code>swapchain</code> <strong class=\"purple\">must</strong> not currently have exclusive full-screen access"
+ },
+ {
+ "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-device-parameter",
+ "text": " <code>device</code> <strong class=\"purple\">must</strong> be a valid <code>VkDevice</code> handle"
+ },
+ {
+ "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-parameter",
+ "text": " <code>swapchain</code> <strong class=\"purple\">must</strong> be a valid <code>VkSwapchainKHR</code> handle"
+ },
+ {
+ "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-commonparent",
+ "text": " Both of <code>device</code>, and <code>swapchain</code> <strong class=\"purple\">must</strong> have been created, allocated, or retrieved from the same <code>VkInstance</code>"
+ }
+ ]
+ },
+ "vkReleaseFullScreenExclusiveModeEXT": {
+ "(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [
+ {
+ "vuid": "VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-02677",
+ "text": " <code>swapchain</code> <strong class=\"purple\">must</strong> not be in the retired state"
+ },
+ {
+ "vuid": "VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-02678",
+ "text": " <code>swapchain</code> <strong class=\"purple\">must</strong> be a swapchain created with an instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a>, with <code>fullScreenExclusive</code> set to <code>VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT</code>"
+ }
+ ]
+ },
"vkGetDeviceGroupPresentCapabilitiesKHR": {
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)": [
{
@@ -20980,6 +21210,22 @@
}
]
},
+ "vkGetDeviceGroupSurfacePresentModes2EXT": {
+ "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)+(VK_EXT_full_screen_exclusive)": [
+ {
+ "vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-device-parameter",
+ "text": " <code>device</code> <strong class=\"purple\">must</strong> be a valid <code>VkDevice</code> handle"
+ },
+ {
+ "vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pSurfaceInfo-parameter",
+ "text": " <code>pSurfaceInfo</code> <strong class=\"purple\">must</strong> be a valid pointer to a valid <code>VkPhysicalDeviceSurfaceInfo2KHR</code> structure"
+ },
+ {
+ "vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pModes-parameter",
+ "text": " <code>pModes</code> <strong class=\"purple\">must</strong> be a valid pointer to a <a href=\"#VkDeviceGroupPresentModeFlagsKHR\">VkDeviceGroupPresentModeFlagsKHR</a> value"
+ }
+ ]
+ },
"vkGetPhysicalDevicePresentRectanglesKHR": {
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)": [
{
@@ -21088,11 +21334,11 @@
"(VK_KHR_surface)+(VK_KHR_swapchain)": [
{
"vuid": "VUID-VkSwapchainCreateInfoKHR-surface-01270",
- "text": " <code>surface</code> <strong class=\"purple\">must</strong> be a surface that is supported by the device as determined using <code>vkGetPhysicalDeviceSurfaceSupportKHR</code>"
+ "text": " <code>surface</code> <strong class=\"purple\">must</strong> be a surface that is supported by the device as determined using <a href=\"#vkGetPhysicalDeviceSurfaceSupportKHR\">vkGetPhysicalDeviceSurfaceSupportKHR</a>"
},
{
"vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01271",
- "text": " <code>minImageCount</code> <strong class=\"purple\">must</strong> be greater than or equal to the value returned in the <code>minImageCount</code> member of the <code>VkSurfaceCapabilitiesKHR</code> structure returned by <code>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</code> for the surface"
+ "text": " <code>minImageCount</code> <strong class=\"purple\">must</strong> be greater than or equal to the value returned in the <code>minImageCount</code> member of the <code>VkSurfaceCapabilitiesKHR</code> structure returned by <a href=\"#vkGetPhysicalDeviceSurfaceCapabilitiesKHR\">vkGetPhysicalDeviceSurfaceCapabilitiesKHR</a> for the surface"
},
{
"vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01272",
@@ -21148,7 +21394,7 @@
},
{
"vuid": "VUID-VkSwapchainCreateInfoKHR-pNext-pNext",
- "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupSwapchainCreateInfoKHR\">VkDeviceGroupSwapchainCreateInfoKHR</a>, <a href=\"#VkImageFormatListCreateInfoKHR\">VkImageFormatListCreateInfoKHR</a>, or <a href=\"#VkSwapchainCounterCreateInfoEXT\">VkSwapchainCounterCreateInfoEXT</a>"
+ "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupSwapchainCreateInfoKHR\">VkDeviceGroupSwapchainCreateInfoKHR</a>, <a href=\"#VkImageFormatListCreateInfoKHR\">VkImageFormatListCreateInfoKHR</a>, <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a>, <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a>, <a href=\"#VkSwapchainCounterCreateInfoEXT\">VkSwapchainCounterCreateInfoEXT</a>, or <a href=\"#VkSwapchainDisplayNativeHdrCreateInfoAMD\">VkSwapchainDisplayNativeHdrCreateInfoAMD</a>"
},
{
"vuid": "VUID-VkSwapchainCreateInfoKHR-sType-unique",
@@ -21250,6 +21496,18 @@
"vuid": "VUID-VkSwapchainCreateInfoKHR-flags-03168",
"text": " If <code>flags</code> contains <code>VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR</code> then the <code>pNext</code> chain <strong class=\"purple\">must</strong> contain an instance of <a href=\"#VkImageFormatListCreateInfoKHR\">VkImageFormatListCreateInfoKHR</a> with a <code>viewFormatCount</code> greater than zero and <code>pViewFormats</code> <strong class=\"purple\">must</strong> have an element equal to <code>imageFormat</code>"
}
+ ],
+ "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_surface_protected_capabilities)": [
+ {
+ "vuid": "VUID-VkSwapchainCreateInfoKHR-flags-03187",
+ "text": " If <code>flags</code> contains <code>VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR</code>, then <code>VkSurfaceProtectedCapabilitiesKHR</code>::<code>supportsProtected</code> <strong class=\"purple\">must</strong> be <code>VK_TRUE</code> in the <a href=\"#VkSurfaceProtectedCapabilitiesKHR\">VkSurfaceProtectedCapabilitiesKHR</a> structure returned by <a href=\"#vkGetPhysicalDeviceSurfaceCapabilities2KHR\">vkGetPhysicalDeviceSurfaceCapabilities2KHR</a> for <code>surface</code>"
+ }
+ ],
+ "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_full_screen_exclusive,VK_KHR_win32_surface)": [
+ {
+ "vuid": "VUID-VkSwapchainCreateInfoKHR-pNext-02679",
+ "text": " If the <code>pNext</code> chain includes an instance of <a href=\"#VkSurfaceFullScreenExclusiveInfoEXT\">VkSurfaceFullScreenExclusiveInfoEXT</a> with its <code>fullScreenExclusive</code> member set to <code>VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT</code>, and <code>surface</code> was created using <a href=\"#vkCreateWin32SurfaceKHR\">vkCreateWin32SurfaceKHR</a>, an instance of <a href=\"#VkSurfaceFullScreenExclusiveWin32InfoEXT\">VkSurfaceFullScreenExclusiveWin32InfoEXT</a> <strong class=\"purple\">must</strong> be present in the <code>pNext</code> chain"
+ }
]
},
"VkDeviceGroupSwapchainCreateInfoKHR": {
@@ -21268,6 +21526,30 @@
}
]
},
+ "VkSwapchainDisplayNativeHdrCreateInfoAMD": {
+ "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_AMD_display_native_hdr)": [
+ {
+ "vuid": "VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD</code>"
+ },
+ {
+ "vuid": "VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-localDimmingEnable-XXXXX",
+ "text": " It is only valid to set <code>localDimmingEnable</code> to <code>VK_TRUE</code> if <a href=\"#VkDisplayNativeHdrSurfaceCapabilitiesAMD\">VkDisplayNativeHdrSurfaceCapabilitiesAMD</a>::<code>localDimmingSupport</code> is supported."
+ }
+ ]
+ },
+ "vkSetLocalDimmingAMD": {
+ "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_AMD_display_native_hdr)": [
+ {
+ "vuid": "VUID-vkSetLocalDimmingAMD-swapChain-parameter",
+ "text": " <code>swapChain</code> <strong class=\"purple\">must</strong> be a valid <code>VkSwapchainKHR</code> handle"
+ },
+ {
+ "vuid": "VUID-vkSetLocalDimmingAMD-XXXXX",
+ "text": " It is only valid to call <a href=\"#vkSetLocalDimmingAMD\">vkSetLocalDimmingAMD</a> if <a href=\"#VkDisplayNativeHdrSurfaceCapabilitiesAMD\">VkDisplayNativeHdrSurfaceCapabilitiesAMD</a>::<code>localDimmingSupport</code> is supported."
+ }
+ ]
+ },
"VkSwapchainCounterCreateInfoEXT": {
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_display_control)": [
{
@@ -21578,7 +21860,7 @@
},
{
"vuid": "VUID-VkPresentInfoKHR-pNext-pNext",
- "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupPresentInfoKHR\">VkDeviceGroupPresentInfoKHR</a>, <a href=\"#VkDisplayPresentInfoKHR\">VkDisplayPresentInfoKHR</a>, <a href=\"#VkPresentRegionsKHR\">VkPresentRegionsKHR</a>, or <a href=\"#VkPresentTimesInfoGOOGLE\">VkPresentTimesInfoGOOGLE</a>"
+ "text": " Each <code>pNext</code> member of any structure (including this one) in the <code>pNext</code> chain <strong class=\"purple\">must</strong> be either <code>NULL</code> or a pointer to a valid instance of <a href=\"#VkDeviceGroupPresentInfoKHR\">VkDeviceGroupPresentInfoKHR</a>, <a href=\"#VkDisplayPresentInfoKHR\">VkDisplayPresentInfoKHR</a>, <a href=\"#VkPresentFrameTokenGGP\">VkPresentFrameTokenGGP</a>, <a href=\"#VkPresentRegionsKHR\">VkPresentRegionsKHR</a>, or <a href=\"#VkPresentTimesInfoGOOGLE\">VkPresentTimesInfoGOOGLE</a>"
},
{
"vuid": "VUID-VkPresentInfoKHR-sType-unique",
@@ -21734,6 +22016,18 @@
}
]
},
+ "VkPresentFrameTokenGGP": {
+ "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_GGP_frame_token)": [
+ {
+ "vuid": "VUID-VkPresentFrameTokenGGP-frameToken-02680",
+ "text": " <code>frameToken</code> <strong class=\"purple\">must</strong> be a valid <code>GgpFrameToken</code>"
+ },
+ {
+ "vuid": "VUID-VkPresentFrameTokenGGP-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP</code>"
+ }
+ ]
+ },
"vkSetHdrMetadataEXT": {
"(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_hdr_metadata)": [
{
@@ -22472,6 +22766,14 @@
}
]
},
+ "VkPhysicalDeviceHostQueryResetFeaturesEXT": {
+ "(VK_EXT_host_query_reset)": [
+ {
+ "vuid": "VUID-VkPhysicalDeviceHostQueryResetFeaturesEXT-sType-sType",
+ "text": " <code>sType</code> <strong class=\"purple\">must</strong> be <code>VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT</code>"
+ }
+ ]
+ },
"VkPhysicalDevicePushDescriptorPropertiesKHR": {
"(VK_KHR_push_descriptor)": [
{
diff --git a/registry/vk.xml b/registry/vk.xml
index ef45ce5..7647e00 100644
--- a/registry/vk.xml
+++ b/registry/vk.xml
@@ -56,6 +56,7 @@ server.
<platform name="macos" protect="VK_USE_PLATFORM_MACOS_MVK" comment="Apple MacOS"/>
<platform name="metal" protect="VK_USE_PLATFORM_METAL_EXT" comment="Metal on CoreAnimation on Apple platforms"/>
<platform name="fuchsia" protect="VK_USE_PLATFORM_FUCHSIA" comment="Fuchsia"/>
+ <platform name="ggp" protect="VK_USE_PLATFORM_GGP" comment="Google Games Platform"/>
</platforms>
<tags comment="Vulkan vendor/author tags for extensions and layers">
@@ -74,6 +75,7 @@ server.
<tag name="ANDROID" author="Google LLC" contact="Jesse Hall @critsec"/>
<tag name="CHROMIUM" author="Google LLC" contact="Jesse Hall @critsec"/>
<tag name="FUCHSIA" author="Google LLC" contact="Craig Stout @cdotstout, Jesse Hall @critsec"/>
+ <tag name="GGP" author="Google, LLC" contact="Jean-Francois Roy @jfroy, Hai Nguyen @chaoticbob, Jesse Hall @critsec"/>
<tag name="GOOGLE" author="Google LLC" contact="Jesse Hall @critsec"/>
<tag name="QCOM" author="Qualcomm Technologies, Inc." contact="Maurice Ribble @mribble"/>
<tag name="LUNARG" author="LunarG, Inc." contact="Karen Ghavam @karenghavam-lunarg"/>
@@ -100,6 +102,7 @@ server.
<type category="include" name="windows.h"/>
<type category="include" name="xcb/xcb.h"/>
<type category="include" name="zircon/types.h"/>
+ <type category="include" name="ggp_c/vulkan_types.h"/>
<comment>
In the current header structure, each platform's interfaces
are confined to a platform-specific header (vulkan_xlib.h,
@@ -125,6 +128,7 @@ server.
<type requires="wayland-client.h" name="wl_surface"/>
<type requires="windows.h" name="HINSTANCE"/>
<type requires="windows.h" name="HWND"/>
+ <type requires="windows.h" name="HMONITOR"/>
<type requires="windows.h" name="HANDLE"/>
<type requires="windows.h" name="SECURITY_ATTRIBUTES"/>
<type requires="windows.h" name="DWORD"/>
@@ -133,6 +137,8 @@ server.
<type requires="xcb/xcb.h" name="xcb_visualid_t"/>
<type requires="xcb/xcb.h" name="xcb_window_t"/>
<type requires="zircon/types.h" name="zx_handle_t"/>
+ <type requires="ggp_c/vulkan_types.h" name="GgpStreamDescriptor"/>
+ <type requires="ggp_c/vulkan_types.h" name="GgpFrameToken"/>
<type category="define">#define <name>VK_MAKE_VERSION</name>(major, minor, patch) \
(((major) &lt;&lt; 22) | ((minor) &lt;&lt; 12) | (patch))</type>
@@ -147,7 +153,7 @@ server.
<type category="define">// Vulkan 1.1 version number
#define <name>VK_API_VERSION_1_1</name> <type>VK_MAKE_VERSION</type>(1, 1, 0)// Patch version should always be set to 0</type>
<type category="define">// Version of this file
-#define <name>VK_HEADER_VERSION</name> 103</type>
+#define <name>VK_HEADER_VERSION</name> 105</type>
<type category="define">
#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type>
@@ -259,6 +265,7 @@ typedef void <name>CAMetalLayer</name>;
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorUpdateTemplateCreateFlags</name>;</type>
<type category="bitmask" name="VkDescriptorUpdateTemplateCreateFlagsKHR" alias="VkDescriptorUpdateTemplateCreateFlags"/>
+ <type requires="VkPipelineCreationFeedbackFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCreationFeedbackFlagsEXT</name>;</type>
<comment>WSI extensions</comment>
<type requires="VkCompositeAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkCompositeAlphaFlagsKHR</name>;</type>
@@ -277,6 +284,7 @@ typedef void <name>CAMetalLayer</name>;
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMacOSSurfaceCreateFlagsMVK</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMetalSurfaceCreateFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkImagePipeSurfaceCreateFlagsFUCHSIA</name>;</type>
+ <type category="bitmask">typedef <type>VkFlags</type> <name>VkStreamDescriptorSurfaceCreateFlagsGGP</name>;</type>
<type requires="VkPeerMemoryFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPeerMemoryFeatureFlags</name>;</type>
<type category="bitmask" name="VkPeerMemoryFeatureFlagsKHR" alias="VkPeerMemoryFeatureFlags"/>
<type requires="VkMemoryAllocateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryAllocateFlags</name>;</type>
@@ -487,6 +495,7 @@ typedef void <name>CAMetalLayer</name>;
<type name="VkMemoryOverallocationBehaviorAMD" category="enum"/>
<type name="VkScopeNV" category="enum"/>
<type name="VkComponentTypeNV" category="enum"/>
+ <type name="VkPipelineCreationFeedbackFlagBitsEXT" category="enum"/>
<comment>WSI extensions</comment>
<type name="VkColorSpaceKHR" category="enum"/>
@@ -541,6 +550,7 @@ typedef void <name>CAMetalLayer</name>;
<type name="VkBlendOverlapEXT" category="enum"/>
<type name="VkDebugUtilsMessageSeverityFlagBitsEXT" category="enum"/>
<type name="VkDebugUtilsMessageTypeFlagBitsEXT" category="enum"/>
+ <type name="VkFullScreenExclusiveEXT" category="enum"/>
<comment>Enumerated types in the header, but not used by the API</comment>
<type name="VkVendorId" category="enum"/>
@@ -1697,6 +1707,12 @@ typedef void <name>CAMetalLayer</name>;
<member optional="true"><type>VkImagePipeSurfaceCreateFlagsFUCHSIA</type> <name>flags</name></member>
<member><type>zx_handle_t</type> <name>imagePipeHandle</name></member>
</type>
+ <type category="struct" name="VkStreamDescriptorSurfaceCreateInfoGGP">
+ <member values="VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP"><type>VkStructureType</type> <name>sType</name></member>
+ <member>const <type>void</type>* <name>pNext</name></member>
+ <member optional="true"><type>VkStreamDescriptorSurfaceCreateFlagsGGP</type> <name>flags</name></member>
+ <member><type>GgpStreamDescriptor</type> <name>streamDescriptor</name></member>
+ </type>
<type category="struct" name="VkSurfaceFormatKHR" returnedonly="true">
<member><type>VkFormat</type> <name>format</name><comment>Supported pair of rendering format</comment></member>
<member><type>VkColorSpaceKHR</type> <name>colorSpace</name><comment>and color space for the surface</comment></member>
@@ -2496,6 +2512,16 @@ typedef void <name>CAMetalLayer</name>;
<member noautovalidity="true"><type>float</type> <name>maxContentLightLevel</name><comment>Content maximum luminance</comment></member>
<member noautovalidity="true"><type>float</type> <name>maxFrameAverageLightLevel</name></member>
</type>
+ <type category="struct" name="VkDisplayNativeHdrSurfaceCapabilitiesAMD" returnedonly="true" structextends="VkSurfaceCapabilities2KHR">
+ <member values="VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD"><type>VkStructureType</type> <name>sType</name></member>
+ <member><type>void</type>* <name>pNext</name></member>
+ <member><type>VkBool32</type> <name>localDimmingSupport</name></member>
+ </type>
+ <type category="struct" name="VkSwapchainDisplayNativeHdrCreateInfoAMD" structextends="VkSwapchainCreateInfoKHR">
+ <member values="VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD"><type>VkStructureType</type> <name>sType</name></member>
+ <member>const <type>void</type>* <name>pNext</name></member>
+ <member><type>VkBool32</type> <name>localDimmingEnable</name></member>
+ </type>
<type category="struct" name="VkRefreshCycleDurationGOOGLE" returnedonly="true">
<member><type>uint64_t</type> <name>refreshDuration</name><comment>Number of nanoseconds from the start of one refresh cycle to the next</comment></member>
</type>
@@ -2645,12 +2671,12 @@ typedef void <name>CAMetalLayer</name>;
</type>
<type category="struct" name="VkPhysicalDevice16BitStorageFeaturesKHR" alias="VkPhysicalDevice16BitStorageFeatures"/>
<type category="struct" name="VkPhysicalDeviceSubgroupProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
- <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
- <member><type>void</type>* <name>pNext</name></member>
- <member noautovalidity="true"><type>uint32_t</type> <name>subgroupSize</name><comment>The size of a subgroup for this queue.</comment></member>
- <member noautovalidity="true"><type>VkShaderStageFlags</type> <name>supportedStages</name><comment>Bitfield of what shader stages support subgroup operations</comment></member>
- <member noautovalidity="true"><type>VkSubgroupFeatureFlags</type> <name>supportedOperations</name><comment>Bitfield of what subgroup operations are supported.</comment></member>
- <member noautovalidity="true"><type>VkBool32</type> <name>quadOperationsInAllStages</name><comment>Flag to specify whether quad operations are available in all stages.</comment></member>
+ <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
+ <member><type>void</type>* <name>pNext</name></member>
+ <member noautovalidity="true"><type>uint32_t</type> <name>subgroupSize</name><comment>The size of a subgroup for this queue.</comment></member>
+ <member noautovalidity="true"><type>VkShaderStageFlags</type> <name>supportedStages</name><comment>Bitfield of what shader stages support subgroup operations</comment></member>
+ <member noautovalidity="true"><type>VkSubgroupFeatureFlags</type> <name>supportedOperations</name><comment>Bitfield of what subgroup operations are supported.</comment></member>
+ <member noautovalidity="true"><type>VkBool32</type> <name>quadOperationsInAllStages</name><comment>Flag to specify whether quad operations are available in all stages.</comment></member>
</type>
<type category="struct" name="VkBufferMemoryRequirementsInfo2">
<member values="VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2"><type>VkStructureType</type> <name>sType</name></member>
@@ -2977,6 +3003,11 @@ typedef void <name>CAMetalLayer</name>;
<member><type>VkBool32</type> <name>shaderRoundingModeRTZFloat32</name></member> <!-- An implementation can support RTZ -->
<member><type>VkBool32</type> <name>shaderRoundingModeRTZFloat64</name></member> <!-- An implementation can support RTZ -->
</type>
+ <type category="struct" name="VkPhysicalDeviceHostQueryResetFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
+ <member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
+ <member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
+ <member><type>VkBool32</type> <name>hostQueryReset</name></member>
+ </type>
<type category="struct" name="VkNativeBufferANDROID">
<member values="VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
@@ -3698,6 +3729,11 @@ typedef void <name>CAMetalLayer</name>;
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>scalarBlockLayout</name></member>
</type>
+ <type category="struct" name="VkSurfaceProtectedCapabilitiesKHR" structextends="VkSurfaceCapabilities2KHR">
+ <member values="VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
+ <member>const <type>void</type>* <name>pNext</name></member>
+ <member><type>VkBool32</type> <name>supportsProtected</name><comment>Represents if surface can be protected</comment></member>
+ </type>
<type category="struct" name="VkPhysicalDeviceDepthClipEnableFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name><comment>Pointer to next structure</comment></member>
@@ -3740,7 +3776,7 @@ typedef void <name>CAMetalLayer</name>;
<type category="struct" name="VkBufferDeviceAddressCreateInfoEXT" structextends="VkBufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
- <member><type>VkDeviceSize</type> <name>deviceAddress</name></member>
+ <member><type>VkDeviceAddress</type> <name>deviceAddress</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceImageViewImageFormatInfoEXT" structextends="VkPhysicalDeviceImageFormatInfo2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
@@ -3788,6 +3824,37 @@ typedef void <name>CAMetalLayer</name>;
<member><type>VkDescriptorType</type> <name>descriptorType</name></member>
<member optional="true"><type>VkSampler</type> <name>sampler</name></member>
</type>
+ <type category="struct" name="VkPresentFrameTokenGGP" structextends="VkPresentInfoKHR">
+ <member values="VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP"><type>VkStructureType</type> <name>sType</name></member>
+ <member>const <type>void</type>* <name>pNext</name></member>
+ <member><type>GgpFrameToken</type> <name>frameToken</name></member>
+ </type>
+ <type category="struct" name="VkPipelineCreationFeedbackEXT" returnedonly="true">
+ <member><type>VkPipelineCreationFeedbackFlagsEXT</type> <name>flags</name></member>
+ <member><type>uint64_t</type> <name>duration</name></member>
+ </type>
+ <type category="struct" name="VkPipelineCreationFeedbackCreateInfoEXT" structextends="VkGraphicsPipelineCreateInfo,VkComputePipelineCreateInfo,VkRayTracingPipelineCreateInfoNV">
+ <member values="VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
+ <member>const <type>void</type>* <name>pNext</name></member>
+ <member><type>VkPipelineCreationFeedbackEXT</type>* <name>pPipelineCreationFeedback</name><comment>Output pipeline creation feedback.</comment></member>
+ <member><type>uint32_t</type> <name>pipelineStageCreationFeedbackCount</name></member>
+ <member len="pipelineStageCreationFeedbackCount"><type>VkPipelineCreationFeedbackEXT</type>* <name>pPipelineStageCreationFeedbacks</name><comment>One entry for each shader stage specified in the parent Vk*PipelineCreateInfo struct</comment></member>
+ </type>
+ <type category="struct" name="VkSurfaceFullScreenExclusiveInfoEXT" structextends="VkPhysicalDeviceSurfaceInfo2KHR,VkSwapchainCreateInfoKHR">
+ <member values="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
+ <member><type>void</type>* <name>pNext</name></member>
+ <member><type>VkFullScreenExclusiveEXT</type> <name>fullScreenExclusive</name></member>
+ </type>
+ <type category="struct" name="VkSurfaceFullScreenExclusiveWin32InfoEXT" structextends="VkPhysicalDeviceSurfaceInfo2KHR,VkSwapchainCreateInfoKHR">
+ <member values="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
+ <member>const <type>void</type>* <name>pNext</name></member>
+ <member><type>HMONITOR</type> <name>hmonitor</name></member>
+ </type>
+ <type category="struct" name="VkSurfaceCapabilitiesFullScreenExclusiveEXT" structextends="VkSurfaceCapabilities2KHR">
+ <member values="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT"><type>VkStructureType</type> <name>sType</name></member>
+ <member><type>void</type>* <name>pNext</name></member>
+ <member><type>VkBool32</type> <name>fullScreenExclusiveSupported</name></member>
+ </type>
</types>
<comment>Vulkan enumerant (token) definitions</comment>
@@ -4916,6 +4983,7 @@ typedef void <name>CAMetalLayer</name>;
<enum value="8" name="VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR" comment="Qualcomm Technologies, Inc."/>
<enum value="9" name="VK_DRIVER_ID_ARM_PROPRIETARY_KHR" comment="Arm Limited"/>
<enum value="10" name="VK_DRIVER_ID_GOOGLE_PASTEL_KHR" comment="Google LLC"/>
+ <enum value="11" name="VK_DRIVER_ID_GGP_PROPRIETARY_KHR" comment="Google LLC"/>
</enums>
<enums name="VkConditionalRenderingFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT"/>
@@ -5010,6 +5078,17 @@ typedef void <name>CAMetalLayer</name>;
<enum value="9" name="VK_COMPONENT_TYPE_UINT32_NV"/>
<enum value="10" name="VK_COMPONENT_TYPE_UINT64_NV"/>
</enums>
+ <enums name="VkPipelineCreationFeedbackFlagBitsEXT" type="bitmask">
+ <enum bitpos="0" name="VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT"/>
+ <enum bitpos="1" name="VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT"/>
+ <enum bitpos="2" name="VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT"/>
+ </enums>
+ <enums name="VkFullScreenExclusiveEXT" type="enum">
+ <enum value="0" name="VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT"/>
+ <enum value="1" name="VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT"/>
+ <enum value="2" name="VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT"/>
+ <enum value="3" name="VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT"/>
+ </enums>
<commands comment="Vulkan command definitions">
<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>
@@ -5333,6 +5412,13 @@ typedef void <name>CAMetalLayer</name>;
<param><type>VkDeviceSize</type> <name>stride</name></param>
<param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param>
</command>
+ <command>
+ <proto><type>void</type> <name>vkResetQueryPoolEXT</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>
+ </command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_DEVICE_ADDRESS_EXT">
<proto><type>VkResult</type> <name>vkCreateBuffer</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
@@ -6066,7 +6152,7 @@ typedef void <name>CAMetalLayer</name>;
<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,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
+ <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkCreateSwapchainKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="pCreateInfo.surface,pCreateInfo.oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfo</name></param>
@@ -6086,7 +6172,7 @@ typedef void <name>CAMetalLayer</name>;
<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,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
+ <command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
<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>
@@ -6095,7 +6181,7 @@ typedef void <name>CAMetalLayer</name>;
<param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
<param><type>uint32_t</type>* <name>pImageIndex</name></param>
</command>
- <command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
+ <command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
<proto><type>VkResult</type> <name>vkQueuePresentKHR</name></proto>
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
<param externsync="pPresentInfo.pWaitSemaphores[],pPresentInfo.pSwapchains[]">const <type>VkPresentInfoKHR</type>* <name>pPresentInfo</name></param>
@@ -6167,6 +6253,13 @@ typedef void <name>CAMetalLayer</name>;
<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,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
+ <proto><type>VkResult</type> <name>vkCreateStreamDescriptorSurfaceGGP</name></proto>
+ <param><type>VkInstance</type> <name>instance</name></param>
+ <param>const <type>VkStreamDescriptorSurfaceCreateInfoGGP</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">
<proto><type>VkResult</type> <name>vkCreateDebugReportCallbackEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
@@ -6564,7 +6657,7 @@ typedef void <name>CAMetalLayer</name>;
<param externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
<param optional="false,true"><type>VkDeviceGroupPresentModeFlagsKHR</type>* <name>pModes</name></param>
</command>
- <command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
+ <command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
<proto><type>VkResult</type> <name>vkAcquireNextImage2KHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkAcquireNextImageInfoKHR</type>* <name>pAcquireInfo</name></param>
@@ -6594,7 +6687,7 @@ typedef void <name>CAMetalLayer</name>;
<param>const <type>VkDescriptorUpdateTemplateCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDescriptorUpdateTemplate</type>* <name>pDescriptorUpdateTemplate</name></param>
- </command>
+ </command>
<command name="vkCreateDescriptorUpdateTemplateKHR" alias="vkCreateDescriptorUpdateTemplate"/>
<command>
<proto><type>void</type> <name>vkDestroyDescriptorUpdateTemplate</name></proto>
@@ -6626,7 +6719,7 @@ typedef void <name>CAMetalLayer</name>;
<param len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name></param>
<param len="swapchainCount">const <type>VkHdrMetadataEXT</type>* <name>pMetadata</name></param>
</command>
- <command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
+ <command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
<proto><type>VkResult</type> <name>vkGetSwapchainStatusKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
@@ -6837,6 +6930,11 @@ typedef void <name>CAMetalLayer</name>;
<param optional="false,true"><type>size_t</type>* <name>pInfoSize</name></param>
<param optional="true" len="pInfoSize"><type>void</type>* <name>pInfo</name></param>
</command>
+ <command>
+ <proto><type>void</type> <name>vkSetLocalDimmingAMD</name></proto>
+ <param><type>VkSwapchainKHR</type> <name>swapChain</name></param>
+ <param><type>VkBool32</type> <name>localDimmingEnable</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>vkGetPhysicalDeviceCalibrateableTimeDomainsEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
@@ -7216,6 +7314,30 @@ typedef void <name>CAMetalLayer</name>;
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImageViewHandleInfoNVX</type>* <name>pInfo</name></param>
</command>
+ <command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
+ <proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfacePresentModes2EXT</name></proto>
+ <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
+ <param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</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,VK_ERROR_SURFACE_LOST_KHR">
+ <proto><type>VkResult</type> <name>vkGetDeviceGroupSurfacePresentModes2EXT</name></proto>
+ <param><type>VkDevice</type> <name>device</name></param>
+ <param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
+ <param optional="false,true"><type>VkDeviceGroupPresentModeFlagsKHR</type>* <name>pModes</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_SURFACE_LOST_KHR">
+ <proto><type>VkResult</type> <name>vkAcquireFullScreenExclusiveModeEXT</name></proto>
+ <param><type>VkDevice</type> <name>device</name></param>
+ <param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
+ </command>
+ <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
+ <proto><type>VkResult</type> <name>vkReleaseFullScreenExclusiveModeEXT</name></proto>
+ <param><type>VkDevice</type> <name>device</name></param>
+ <param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
+ </command>
+
</commands>
<feature api="vulkan" name="VK_VERSION_1_0" number="1.0" comment="Vulkan core API interface definitions">
@@ -7985,7 +8107,7 @@ typedef void <name>CAMetalLayer</name>;
<enum value="&quot;VK_IMG_filter_cubic&quot;" name="VK_IMG_FILTER_CUBIC_EXTENSION_NAME"/>
<enum offset="0" extends="VkFilter" name="VK_FILTER_CUBIC_IMG"/>
<enum bitpos="13" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG" comment="Format can be filtered with VK_FILTER_CUBIC_IMG when being sampled"/>
- </require>
+ </require>
</extension>
<extension name="VK_AMD_extension_17" number="17" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
@@ -8268,10 +8390,14 @@ typedef void <name>CAMetalLayer</name>;
<enum value="&quot;VK_GOOGLE_extension_49&quot;" name="VK_GOOGLE_EXTENSION_49_EXTENSION_NAME"/>
</require>
</extension>
- <extension name="VK_GOOGLE_extension_50" number="50" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
+ <extension name="VK_GGP_stream_descriptor_surface" number="50" type="instance" requires="VK_KHR_surface" platform="ggp" author="GGP" contact="Jean-Francois Roy @jfroy" supported="vulkan">
<require>
- <enum value="0" name="VK_GOOGLE_EXTENSION_50_SPEC_VERSION"/>
- <enum value="&quot;VK_GOOGLE_extension_50&quot;" name="VK_GOOGLE_EXTENSION_50_EXTENSION_NAME"/>
+ <enum value="1" name="VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION"/>
+ <enum value="&quot;VK_GGP_stream_descriptor_surface&quot;" name="VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME"/>
+ <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP"/>
+ <type name="VkStreamDescriptorSurfaceCreateFlagsGGP"/>
+ <type name="VkStreamDescriptorSurfaceCreateInfoGGP"/>
+ <command name="vkCreateStreamDescriptorSurfaceGGP"/>
</require>
</extension>
<extension name="VK_NV_corner_sampled_image" number="51" author="NV" type="device" requires="VK_KHR_get_physical_device_properties2" contact="Daniel Koch @dgkoch" supported="vulkan">
@@ -8454,6 +8580,9 @@ typedef void <name>CAMetalLayer</name>;
<type name="VkDeviceGroupSwapchainCreateInfoKHR"/>
<command name="vkAcquireNextImage2KHR"/>
</require>
+ <require extension="VK_EXT_full_screen_exclusive">
+ <command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
+ </require>
</extension>
<extension name="VK_EXT_validation_flags" number="62" type="instance" author="GOOGLE" contact="Tobin Ehlis @tobine" supported="vulkan">
<require>
@@ -10052,16 +10181,23 @@ typedef void <name>CAMetalLayer</name>;
<type name="VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT"/>
</require>
</extension>
- <extension name="VK_GOOGLE_extension_192" number="192" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
+ <extension name="VK_GGP_frame_token" number="192" type="device" requires="VK_KHR_swapchain,VK_GGP_stream_descriptor_surface" platform="ggp" author="GGP" contact="Jean-Francois Roy @jfroy" supported="vulkan">
<require>
- <enum value="0" name="VK_GOOGLE_EXTENSION_192_SPEC_VERSION"/>
- <enum value="&quot;VK_GOOGLE_extension_192&quot;" name="VK_GOOGLE_EXTENSION_192_EXTENSION_NAME"/>
+ <enum value="1" name="VK_GGP_FRAME_TOKEN_SPEC_VERSION"/>
+ <enum value="&quot;VK_GGP_frame_token&quot;" name="VK_GGP_FRAME_TOKEN_EXTENSION_NAME"/>
+ <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP"/>
+ <type name="VkPresentFrameTokenGGP"/>
</require>
</extension>
- <extension name="VK_GOOGLE_extension_193" number="193" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
+ <extension name="VK_EXT_pipeline_creation_feedback" number="193" type="device" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="vulkan">
<require>
- <enum value="0" name="VK_GOOGLE_EXTENSION_193_SPEC_VERSION"/>
- <enum value="&quot;VK_GOOGLE_extension_193&quot;" name="VK_GOOGLE_EXTENSION_193_EXTENSION_NAME"/>
+ <enum value="1" name="VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION"/>
+ <enum value="&quot;VK_EXT_pipeline_creation_feedback&quot;" name="VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME"/>
+ <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT"/>
+ <type name="VkPipelineCreationFeedbackFlagBitsEXT"/>
+ <type name="VkPipelineCreationFeedbackFlagsEXT"/>
+ <type name="VkPipelineCreationFeedbackCreateInfoEXT"/>
+ <type name="VkPipelineCreationFeedbackEXT"/>
</require>
</extension>
<extension name="VK_GOOGLE_extension_194" number="194" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
@@ -10233,10 +10369,16 @@ typedef void <name>CAMetalLayer</name>;
<type name="VkPhysicalDevicePCIBusInfoPropertiesEXT"/>
</require>
</extension>
- <extension name="VK_AMD_extension_214" number="214" author="AMD" contact="Neil Henning @sheredom" supported="disabled">
+ <extension name="VK_AMD_display_native_hdr" number="214" type="device" author="AMD" requires="VK_KHR_get_physical_device_properties2,VK_KHR_get_surface_capabilities2,VK_KHR_swapchain" contact="Matthaeus G. Chajdas @anteru" supported="vulkan">
<require>
- <enum value="0" name="VK_KHR_EXTENSION_214_SPEC_VERSION"/>
- <enum value="&quot;VK_KHR_extension_214&quot;" name="VK_KHR_EXTENSION_214_EXTENSION_NAME"/>
+ <enum value="1" name="VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION"/>
+ <enum value="&quot;VK_AMD_display_native_hdr&quot;" name="VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME"/>
+ <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD"/>
+ <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD"/>
+ <enum offset="0" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DISPLAY_NATIVE_AMD"/>
+ <type name="VkDisplayNativeHdrSurfaceCapabilitiesAMD"/>
+ <type name="VkSwapchainDisplayNativeHdrCreateInfoAMD"/>
+ <command name="vkSetLocalDimmingAMD"/>
</require>
</extension>
<extension name="VK_FUCHSIA_imagepipe_surface" number="215" type="instance" author="FUCHSIA" requires="VK_KHR_surface" platform="fuchsia" contact="Craig Stout @cdotstout" supported="vulkan">
@@ -10421,10 +10563,12 @@ typedef void <name>CAMetalLayer</name>;
<type name="VkMemoryPriorityAllocateInfoEXT"/>
</require>
</extension>
- <extension name="VK_KHR_extension_240" number="240" author="KHR" contact="Sandeep Shinde @nvidia" supported="disabled">
+ <extension name="VK_KHR_surface_protected_capabilities" number="240" type="instance" requiresCore="1.1" requires="VK_KHR_get_surface_capabilities2" author="KHR" contact="Sandeep Shinde @sashinde" supported="vulkan">
<require>
- <enum value="0" name="VK_KHR_EXTENSION_240_SPEC_VERSION"/>
- <enum value="&quot;VK_KHR_extension_240&quot;" name="VK_KHR_EXTENSION_240_EXTENSION_NAME"/>
+ <enum value="1" name="VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION"/>
+ <enum value="&quot;VK_KHR_surface_protected_capabilities&quot;" name="VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME"/>
+ <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR"/>
+ <type name="VkSurfaceProtectedCapabilitiesKHR"/>
</require>
</extension>
<extension name="VK_NV_dedicated_allocation_image_aliasing" number="241" type="device" requires="VK_KHR_dedicated_allocation" author="NVIDIA" contact="Nuno Subtil @nsubtil" supported="vulkan">
@@ -10544,10 +10688,26 @@ typedef void <name>CAMetalLayer</name>;
<enum value="&quot;VK_EXT_extension_255&quot;" name="VK_EXT_EXTENSION_255_EXTENSION_NAME"/>
</require>
</extension>
- <extension name="VK_EXT_extension_256" number="256" author="EXT" contact="James Jones @cubanismo" supported="disabled">
+ <extension name="VK_EXT_full_screen_exclusive" number="256" type="device" author="EXT" requires="VK_KHR_get_physical_device_properties2,VK_KHR_surface,VK_KHR_get_surface_capabilities2,VK_KHR_swapchain" platform="win32" contact="James Jones @cubanismo" supported="vulkan">
<require>
- <enum value="0" name="VK_EXT_EXTENSION_256_SPEC_VERSION"/>
- <enum value="&quot;VK_EXT_extension_256&quot;" name="VK_EXT_EXTENSION_256_EXTENSION_NAME"/>
+ <enum value="3" name="VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION"/>
+ <enum value="&quot;VK_EXT_full_screen_exclusive&quot;" name="VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME"/>
+ <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT"/>
+ <enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT"/>
+ <enum offset="0" extends="VkResult" dir="-" name="VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"/>
+ <type name="VkFullScreenExclusiveEXT"/>
+ <type name="VkSurfaceFullScreenExclusiveInfoEXT"/>
+ <type name="VkSurfaceCapabilitiesFullScreenExclusiveEXT"/>
+ <command name="vkGetPhysicalDeviceSurfacePresentModes2EXT"/>
+ <command name="vkAcquireFullScreenExclusiveModeEXT"/>
+ <command name="vkReleaseFullScreenExclusiveModeEXT"/>
+ </require>
+ <require feature="VK_KHR_win32_surface">
+ <enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT"/>
+ <type name="VkSurfaceFullScreenExclusiveWin32InfoEXT"/>
+ </require>
+ <require feature="VK_VERSION_1_1">
+ <command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_257" number="257" author="EXT" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
@@ -10580,5 +10740,14 @@ typedef void <name>CAMetalLayer</name>;
<enum value="&quot;VK_NV_extension_261&quot;" name="VK_NV_EXTENSION_261_EXTENSION_NAME"/>
</require>
</extension>
+ <extension name="VK_EXT_host_query_reset" number="262" author="EXT" contact="Bas Nieuwenhuizen @BNieuwenhuizen" supported="vulkan" type="device" requires="VK_KHR_get_physical_device_properties2">
+ <require>
+ <enum value="1" name="VK_EXT_HOST_QUERY_RESET_SPEC_VERSION"/>
+ <enum value="&quot;VK_EXT_host_query_reset&quot;" name="VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME"/>
+ <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT"/>
+ <type name="VkPhysicalDeviceHostQueryResetFeaturesEXT"/>
+ <command name="vkResetQueryPoolEXT"/>
+ </require>
+ </extension>
</extensions>
</registry>
diff --git a/registry/vkconventions.py b/registry/vkconventions.py
new file mode 100644
index 0000000..64b4dd4
--- /dev/null
+++ b/registry/vkconventions.py
@@ -0,0 +1,214 @@
+#!/usr/bin/python3 -i
+#
+# Copyright (c) 2013-2019 The Khronos Group Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Working-group-specific style conventions,
+# used in generation.
+
+from conventions import ConventionsBase
+
+
+class VulkanConventions(ConventionsBase):
+ def formatExtension(self, name):
+ """Mark up a name as an extension for the spec."""
+ return '`<<{}>>`'.format(name)
+
+ @property
+ def null(self):
+ """Preferred spelling of NULL."""
+ return '`NULL`'
+
+ @property
+ def constFlagBits(self):
+ """Returns True if static const flag bits should be generated, False if an enumerated type should be generated."""
+ return False
+
+ @property
+ def struct_macro(self):
+ return 'sname:'
+
+ @property
+ def external_macro(self):
+ return 'code:'
+
+ @property
+ def structtype_member_name(self):
+ """Return name of the structure type member"""
+ return 'sType'
+
+ @property
+ def nextpointer_member_name(self):
+ """Return name of the structure pointer chain member"""
+ return 'pNext'
+
+ @property
+ def valid_pointer_prefix(self):
+ """Return prefix to pointers which must themselves be valid"""
+ return 'valid'
+
+ def is_structure_type_member(self, paramtype, paramname):
+ """Determine if member type and name match the structure type member."""
+ return paramtype == 'VkStructureType' and paramname == self.structtype_member_name
+
+ def is_nextpointer_member(self, paramtype, paramname):
+ """Determine if member type and name match the next pointer chain member."""
+ return paramtype == 'void' and paramname == self.nextpointer_member_name
+
+ @property
+ def warning_comment(self):
+ """Return warning comment to be placed in header of generated Asciidoctor files"""
+ return '// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry'
+
+ @property
+ def file_suffix(self):
+ """Return suffix of generated Asciidoctor files"""
+ return '.txt'
+
+ @property
+ def api_name(self):
+ """Return API name"""
+ return 'Vulkan'
+
+ @property
+ def xml_supported_name_of_api(self):
+ """Return the supported= attribute used in API XML"""
+ return 'vulkan'
+
+ @property
+ def api_prefix(self):
+ """Return API token prefix"""
+ return 'VK_'
+
+ @property
+ def api_version_prefix(self):
+ """Return API core version token prefix"""
+ return 'VK_VERSION_'
+
+ @property
+ def KHR_prefix(self):
+ """Return extension name prefix for KHR extensions"""
+ return 'VK_KHR_'
+
+ @property
+ def EXT_prefix(self):
+ """Return extension name prefix for EXT extensions"""
+ return 'VK_EXT_'
+
+ @property
+ def write_contacts(self):
+ """Return whether contact list should be written to extension appendices"""
+ return True
+
+ @property
+ def write_refpage_include(self):
+ """Return whether refpage include should be written to extension appendices"""
+ return True
+
+ def writeFeature(self, featureExtraProtect, filename):
+ """Returns True if OutputGenerator.endFeature should write this feature.
+ Used in COutputGenerator
+ """
+ return True
+
+ def requires_error_validation(self, return_type):
+ """Returns True if the return_type element is an API result code
+ requiring error validation.
+ """
+ return False
+
+ @property
+ def required_errors(self):
+ """Return a list of required error codes for validation."""
+ return []
+
+ def is_externsync_command(self, protoname):
+ """Returns True if the protoname element is an API command requiring
+ external synchronization
+ """
+ return protoname is not None and 'vkCmd' in protoname
+
+ def is_api_name(self, name):
+ """Returns True if name is in the reserved API namespace.
+ For Vulkan, these are names with a case-insensitive 'vk' prefix, or
+ a 'PFN_vk' function pointer type prefix.
+ """
+ return name[0:2].lower() == 'vk' or name[0:6] == 'PFN_vk'
+
+ def is_voidpointer_alias(self, tag, text, tail):
+ """Return True if the declaration components (tag,text,tail) of an
+ element represents a void * type
+ """
+ return tag == 'type' and text == 'void' and tail.startswith('*')
+
+ def make_voidpointer_alias(self, tail):
+ """Reformat a void * declaration to include the API alias macro.
+ Vulkan doesn't have an API alias macro, so do nothing.
+ """
+ return tail
+
+ @property
+ def specURL(self):
+ """Return public registry URL which ref pages should link to for the
+ current all-extensions HTML specification, so xrefs in the
+ asciidoc source that aren't to ref pages can link into it
+ instead. N.b. this may need to change on a per-refpage basis if
+ there are multiple documents involved.
+ """
+ return 'https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html'
+
+ @property
+ def xml_api_name(self):
+ """Return the name used in the default API XML registry for the default API"""
+ return 'vulkan'
+
+ @property
+ def registry_path(self):
+ """Return relpath to the default API XML registry in this project."""
+ return 'xml/vk.xml'
+
+ @property
+ def specification_path(self):
+ """Return relpath to the Asciidoctor specification sources in this project."""
+ return '../appendices/meta'
+
+ @property
+ def extra_refpage_headers(self):
+ """Return any extra text to add to refpage headers."""
+ return 'include::../config/attribs.txt[]'
+
+ @property
+ def extension_index_prefixes(self):
+ """Return a list of extension prefixes used to group extension refpages."""
+ return ['VK_KHR', 'VK_EXT', 'VK']
+
+ @property
+ def unified_flag_refpages(self):
+ """Returns True if Flags/FlagBits refpages are unified, False if
+ they're separate.
+ """
+ return False
+
+ @property
+ def spec_reflow_path(self):
+ """Return the relative path to the spec source folder to reflow"""
+ return '.'
+
+ @property
+ def spec_no_reflow_dirs(self):
+ """Return a set of directories not to automatically descend into
+ when reflowing spec text
+ """
+ return ('scripts', 'style')
+