Update for Vulkan-Docs 1.2.146

This commit is contained in:
Jon Leech
2020-07-04 00:33:22 -07:00
committed by Jon Leech
parent 8188e3fbbc
commit db06fce926
8 changed files with 8143 additions and 8175 deletions

View File

@@ -432,11 +432,11 @@ class OutputGenerator:
# Determine the required bit width for the enum group.
# 32 is the default, which generates C enum types for the values.
bitwidth = 32
# If the constFlagBits preference is set, 64 is the default for bitmasks
if self.genOpts.conventions.constFlagBits and groupElem.get('type') == 'bitmask':
bitwidth = 64
# Check for an explicitly defined bitwidth, which will override any defaults.
if groupElem.get('bitwidth'):
try:
@@ -444,10 +444,10 @@ class OutputGenerator:
except ValueError as ve:
self.logMsg('error', 'Invalid value for bitwidth attribute (', groupElem.get('bitwidth'), ') for ', groupName, ' - must be an integer value\n')
exit(1)
# Bitmask types support 64-bit flags, so have different handling
if groupElem.get('type') == 'bitmask':
# Validate the bitwidth and generate values appropriately
# Bitmask flags up to 64-bit are generated as static const uint64_t values
# Bitmask flags up to 32-bit are generated as C enum values
@@ -475,7 +475,7 @@ class OutputGenerator:
# Prefix
body = "// Flag bits for " + flagTypeName + "\n"
# Maximum allowable value for a flag (unsigned 64-bit integer)
maxValidValue = 2**(64) - 1
minValidValue = 0
@@ -487,12 +487,13 @@ class OutputGenerator:
# Should catch exceptions here for more complex constructs. Not yet.
(numVal, strVal) = self.enumToValue(elem, True)
name = elem.get('name')
# Range check for the enum value
if numVal is not None and (numVal > maxValidValue or numVal < minValidValue):
self.logMsg('error', 'Allowable range for flag types in C is [', minValidValue, ',', maxValidValue, '], but', name, 'flag has a value outside of this (', strVal, ')\n')
exit(1)
body += self.genRequirements(name, mustBeFound = False)
body += "static const {} {} = {};\n".format(flagTypeName, name, strVal)
# Postfix
@@ -519,11 +520,11 @@ class OutputGenerator:
# @@ Should use the type="bitmask" attribute instead
isEnum = ('FLAG_BITS' not in expandPrefix)
# Allowable range for a C enum - which is that of a signed 32-bit integer
maxValidValue = 2**(32 - 1) - 1
minValidValue = (maxValidValue * -1) - 1
# Get a list of nested 'enum' tags.
enums = groupElem.findall('enum')
@@ -553,7 +554,11 @@ class OutputGenerator:
# Extension enumerants are only included if they are required
if self.isEnumRequired(elem):
decl = " {} = {},".format(name, strVal)
# Indent requirements comment, if there is one
decl = self.genRequirements(name, mustBeFound = False)
if decl != '':
decl = ' ' + decl
decl += " {} = {},".format(name, strVal)
if numVal is not None:
body.append(decl)
else:
@@ -563,7 +568,7 @@ class OutputGenerator:
if numVal is not None and (numVal > maxValidValue or numVal < minValidValue):
self.logMsg('error', 'Allowable range for C enum types is [', minValidValue, ',', maxValidValue, '], but', name, 'has a value outside of this (', strVal, ')\n')
exit(1)
# Don't track min/max for non-numbers (numVal is None)
if isEnum and numVal is not None and elem.get('extends') is None:
@@ -683,6 +688,20 @@ class OutputGenerator:
self.featureName = None
self.featureExtraProtect = None
def genRequirements(self, name, mustBeFound = True):
"""Generate text showing what core versions and extensions introduce
an API. This exists in the base Generator class because it's used by
the shared enumerant-generating interfaces (buildEnumCDecl, etc.).
Here it returns an empty string for most generators, but can be
overridden by e.g. DocGenerator.
- name - name of the API
- mustBeFound - If True, when requirements for 'name' cannot be
determined, a warning comment is generated.
"""
return ''
def validateFeature(self, featureType, featureName):
"""Validate we're generating something only inside a `<feature>` tag"""
if self.featureName is None:

View File

@@ -294,6 +294,7 @@ def makeGenOpts(args):
] ],
[ 'vulkan_xcb.h', [ 'VK_KHR_xcb_surface' ], commonSuppressExtensions ],
[ 'vulkan_xlib.h', [ 'VK_KHR_xlib_surface' ], commonSuppressExtensions ],
[ 'vulkan_directfb.h', [ 'VK_EXT_directfb_surface' ], commonSuppressExtensions ],
[ 'vulkan_xlib_xrandr.h', [ 'VK_EXT_acquire_xlib_display' ], commonSuppressExtensions ],
[ 'vulkan_metal.h', [ 'VK_EXT_metal_surface' ], commonSuppressExtensions ],
[ 'vulkan_beta.h', betaRequireExtensions, betaSuppressExtensions ],

File diff suppressed because one or more lines are too long

View File

@@ -23,6 +23,7 @@ server.
<platform name="xlib_xrandr" protect="VK_USE_PLATFORM_XLIB_XRANDR_EXT" comment="X Window System, Xlib client library, XRandR extension"/>
<platform name="xcb" protect="VK_USE_PLATFORM_XCB_KHR" comment="X Window System, Xcb client library"/>
<platform name="wayland" protect="VK_USE_PLATFORM_WAYLAND_KHR" comment="Wayland display server protocol"/>
<platform name="directfb" protect="VK_USE_PLATFORM_DIRECTFB_EXT" comment="DirectFB library"/>
<platform name="android" protect="VK_USE_PLATFORM_ANDROID_KHR" comment="Android OS"/>
<platform name="win32" protect="VK_USE_PLATFORM_WIN32_KHR" comment="Microsoft Win32 API (also refers to Win64 apps)"/>
<platform name="vi" protect="VK_USE_PLATFORM_VI_NN" comment="Nintendo Vi"/>
@@ -77,6 +78,7 @@ server.
<type category="include" name="wayland-client.h"/>
<type category="include" name="windows.h"/>
<type category="include" name="xcb/xcb.h"/>
<type category="include" name="directfb.h"/>
<type category="include" name="zircon/types.h"/>
<type category="include" name="ggp_c/vulkan_types.h"/>
<comment>
@@ -112,6 +114,8 @@ server.
<type requires="xcb/xcb.h" name="xcb_connection_t"/>
<type requires="xcb/xcb.h" name="xcb_visualid_t"/>
<type requires="xcb/xcb.h" name="xcb_window_t"/>
<type requires="directfb.h" name="IDirectFB"/>
<type requires="directfb.h" name="IDirectFBSurface"/>
<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"/>
@@ -131,7 +135,7 @@ server.
<type category="define">// Vulkan 1.2 version number
#define <name>VK_API_VERSION_1_2</name> <type>VK_MAKE_VERSION</type>(1, 2, 0)// Patch version should always be set to 0</type>
<type category="define">// Version of this file
#define <name>VK_HEADER_VERSION</name> 145</type>
#define <name>VK_HEADER_VERSION</name> 146</type>
<type category="define" requires="VK_HEADER_VERSION">// Complete version of this file
#define <name>VK_HEADER_VERSION_COMPLETE</name> <type>VK_MAKE_VERSION</type>(1, 2, VK_HEADER_VERSION)</type>
@@ -272,6 +276,7 @@ typedef void <name>CAMetalLayer</name>;
<type category="bitmask">typedef <type>VkFlags</type> <name>VkWin32SurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkXlibSurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkXcbSurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDirectFBSurfaceCreateFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkIOSSurfaceCreateFlagsMVK</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMacOSSurfaceCreateFlagsMVK</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMetalSurfaceCreateFlagsEXT</name>;</type>
@@ -1728,6 +1733,13 @@ typedef void <name>CAMetalLayer</name>;
<member noautovalidity="true"><type>xcb_connection_t</type>* <name>connection</name></member>
<member><type>xcb_window_t</type> <name>window</name></member>
</type>
<type category="struct" name="VkDirectFBSurfaceCreateInfoEXT">
<member values="VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDirectFBSurfaceCreateFlagsEXT</type> <name>flags</name></member>
<member noautovalidity="true"><type>IDirectFB</type>* <name>dfb</name></member>
<member noautovalidity="true"><type>IDirectFBSurface</type>* <name>surface</name></member>
</type>
<type category="struct" name="VkImagePipeSurfaceCreateInfoFUCHSIA">
<member values="VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
@@ -3285,7 +3297,7 @@ typedef void <name>CAMetalLayer</name>;
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>bindingCount</name></member>
<member len="bindingCount" optional="true">const <type>VkDescriptorBindingFlags</type>* <name>pBindingFlags</name></member>
<member len="bindingCount" optional="false,true">const <type>VkDescriptorBindingFlags</type>* <name>pBindingFlags</name></member>
</type>
<type category="struct" name="VkDescriptorSetLayoutBindingFlagsCreateInfoEXT" alias="VkDescriptorSetLayoutBindingFlagsCreateInfo"/>
<type category="struct" name="VkDescriptorSetVariableDescriptorCountAllocateInfo" structextends="VkDescriptorSetAllocateInfo">
@@ -3925,13 +3937,18 @@ typedef void <name>CAMetalLayer</name>;
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkMemoryOverallocationBehaviorAMD</type> <name>overallocationBehavior</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentDensityMapFeaturesEXT" returnedonly="true" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<type category="struct" name="VkPhysicalDeviceFragmentDensityMapFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>fragmentDensityMap</name></member>
<member><type>VkBool32</type> <name>fragmentDensityMapDynamic</name></member>
<member><type>VkBool32</type> <name>fragmentDensityMapNonSubsampledImages</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentDensityMap2FeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>fragmentDensityMapDeferred</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentDensityMapPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
@@ -3939,6 +3956,14 @@ typedef void <name>CAMetalLayer</name>;
<member><type>VkExtent2D</type> <name>maxFragmentDensityTexelSize</name></member>
<member><type>VkBool32</type> <name>fragmentDensityInvocations</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentDensityMap2PropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>subsampledLoads</name></member>
<member><type>VkBool32</type> <name>subsampledCoarseReconstructionEarlyAccess</name></member>
<member><type>uint32_t</type> <name>maxSubsampledArrayLayers</name></member>
<member><type>uint32_t</type> <name>maxDescriptorSetSubsampledSamplers</name></member>
</type>
<type category="struct" name="VkRenderPassFragmentDensityMapCreateInfoEXT" structextends="VkRenderPassCreateInfo,VkRenderPassCreateInfo2">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
@@ -7328,6 +7353,19 @@ typedef void <name>CAMetalLayer</name>;
<param><type>xcb_connection_t</type>* <name>connection</name></param>
<param><type>xcb_visualid_t</type> <name>visual_id</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateDirectFBSurfaceEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkDirectFBSurfaceCreateInfoEXT</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command>
<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceDirectFBPresentationSupportEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param><type>IDirectFB</type>* <name>dfb</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateImagePipeSurfaceFUCHSIA</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
@@ -7610,27 +7648,27 @@ typedef void <name>CAMetalLayer</name>;
<param><type>Display</type>* <name>dpy</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
</command>
<command successcodes="VK_SUCCESS">
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetRandROutputDisplayEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>Display</type>* <name>dpy</name></param>
<param><type>RROutput</type> <name>rrOutput</name></param>
<param><type>VkDisplayKHR</type>* <name>pDisplay</name></param>
</command>
<command successcodes="VK_SUCCESS">
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkDisplayPowerControlEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
<param>const <type>VkDisplayPowerInfoEXT</type>* <name>pDisplayPowerInfo</name></param>
</command>
<command successcodes="VK_SUCCESS">
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkRegisterDeviceEventEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkDeviceEventInfoEXT</type>* <name>pDeviceEventInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkFence</type>* <name>pFence</name></param>
</command>
<command successcodes="VK_SUCCESS">
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkRegisterDisplayEventEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
@@ -12162,6 +12200,8 @@ typedef void <name>CAMetalLayer</name>;
<enum value="0" name="VK_EXT_EXTENSION_168_SPEC_VERSION"/>
<enum value="&quot;VK_NV_extension_168&quot;" name="VK_EXT_EXTENSION_168_EXTENSION_NAME"/>
<enum bitpos="19" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RESERVED_19_BIT_KHR"/>
<enum bitpos="19" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_RESERVED_19_BIT_KHR"/>
<enum bitpos="20" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_RESERVED_20_BIT_KHR"/>
</require>
</extension>
<extension name="VK_KHR_maintenance3" number="169" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_1">
@@ -13720,11 +13760,15 @@ typedef void <name>CAMetalLayer</name>;
<enum value="&quot;VK_NV_extension_332&quot;" name="VK_NV_EXTENSION_332_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_333" number="333" author="EXT" contact="Matthew Netsch @mnetsch" supported="disabled">
<extension name="VK_EXT_fragment_density_map2" number="333" type="device" requires="VK_EXT_fragment_density_map" author="EXT" contact="Matthew Netsch @mnetsch" supported="vulkan">
<require>
<enum value="0" name="VK_EXT_EXTENSION_333_SPEC_VERSION"/>
<enum value="&quot;VK_EXT_extension_333&quot;" name="VK_EXT_EXTENSION_333_EXTENSION_NAME"/>
<enum bitpos="1" extends="VkImageViewCreateFlagBits" name="VK_IMAGE_VIEW_CREATE_RESERVED_1_BIT_EXT"/>
<enum value="1" name="VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION"/>
<enum value="&quot;VK_EXT_fragment_density_map2&quot;" name="VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT"/>
<enum bitpos="1" extends="VkImageViewCreateFlagBits" name="VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT"/>
<type name="VkPhysicalDeviceFragmentDensityMap2FeaturesEXT"/>
<type name="VkPhysicalDeviceFragmentDensityMap2PropertiesEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_334" number="334" author="EXT" contact="Jeff Leger @jackohound" supported="disabled">
@@ -13805,10 +13849,15 @@ typedef void <name>CAMetalLayer</name>;
<enum value="&quot;VK_NV_extension_346&quot;" name="VK_NV_EXTENSION_346_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_347" number="347" author="EXT" contact="Nicolas Caramelli @caramelli" supported="disabled">
<extension name="VK_EXT_directfb_surface" number="347" type="instance" requires="VK_KHR_surface" platform="directfb" supported="vulkan" author="EXT" contact="Nicolas Caramelli @caramelli">
<require>
<enum value="0" name="VK_EXT_EXTENSION_347_SPEC_VERSION"/>
<enum value="&quot;VK_EXT_extension_347&quot;" name="VK_EXT_EXTENSION_347_EXTENSION_NAME"/>
<enum value="1" name="VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION"/>
<enum value="&quot;VK_EXT_directfb_surface&quot;" name="VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT"/>
<type name="VkDirectFBSurfaceCreateFlagsEXT"/>
<type name="VkDirectFBSurfaceCreateInfoEXT"/>
<command name="vkCreateDirectFBSurfaceEXT"/>
<command name="vkGetPhysicalDeviceDirectFBPresentationSupportEXT"/>
</require>
</extension>
<extension name="VK_KHR_extension_348" number="348" author="KHR" contact="Daniel Koch @dgkoch" supported="disabled">