From ee13fc355fae06ffcd36ee09a98f12132d95dfc0 Mon Sep 17 00:00:00 2001 From: Jon Leech Date: Fri, 25 May 2018 04:00:32 -0700 Subject: [PATCH] Change log for May 25, 2018 Vulkan 1.1.76 spec update: * Update release number to 76. Internal Issues: * Add an exception clause to the license on `vk.xml`, enabling its use with GPL-based projects (internal issue 1017). * Remove the generated `vulkan_ext.[ch]` files, which are no longer supported. Add `src/ext_loader/README.md` explaining why, and update files in `xml/` to not generate them by default (internal issue 1268) Other Issues: * Fix typos in valid usage statements for the ftext:vkDrawIndexedIndirectCount* commands, replacing sizeof(VkDrawIndirectComment) with sizeof(VkDrawIndexedIndirectCommand). * Modify the <> section to require code:NonReadable or code:NonWriteable in SPIR-V code for images with an image format of code:Unknown if one of the requisite code:shaderImageReadWithoutFormat or code:shaderImageWriteWithoutFormat features is disabled. New Extensions: * `VK_KHR_get_display_properties2` * `VK_KHR_draw_indirect_count` --- Makefile | 2 +- appendices/VK_KHR_draw_indirect_count.txt | 35 + appendices/VK_KHR_get_display_properties2.txt | 89 + appendices/extensions.txt | 8 + appendices/glossary.txt | 15 + appendices/spirvenv.txt | 10 + chapters/VK_KHR_display/display.txt | 189 ++ chapters/drawing.txt | 451 ++- include/vulkan/vulkan_core.h | 98 +- src/ext_loader/README.md | 28 + src/ext_loader/vulkan_ext.c | 2570 ----------------- src/ext_loader/vulkan_ext.h | 63 - xml/Makefile | 14 +- xml/README.adoc | 26 +- xml/extensionStubSource.py | 3 + xml/genvk.py | 2 + xml/vk.xml | 101 +- 17 files changed, 1042 insertions(+), 2662 deletions(-) create mode 100644 appendices/VK_KHR_draw_indirect_count.txt create mode 100644 appendices/VK_KHR_get_display_properties2.txt create mode 100644 src/ext_loader/README.md delete mode 100644 src/ext_loader/vulkan_ext.c delete mode 100644 src/ext_loader/vulkan_ext.h diff --git a/Makefile b/Makefile index 6c8729e2..1c19f236 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,7 @@ VERBOSE = # $(EXTENSIONS)) # ADOCOPTS options for asciidoc->HTML5 output NOTEOPTS = -a editing-notes -a implementation-guide -PATCHVERSION = 75 +PATCHVERSION = 76 ifneq (,$(findstring VK_VERSION_1_1,$(VERSIONS))) SPECREVISION = 1.1.$(PATCHVERSION) else diff --git a/appendices/VK_KHR_draw_indirect_count.txt b/appendices/VK_KHR_draw_indirect_count.txt new file mode 100644 index 00000000..371251e9 --- /dev/null +++ b/appendices/VK_KHR_draw_indirect_count.txt @@ -0,0 +1,35 @@ +// Copyright (c) 2016-2017 Khronos Group. This work is licensed under a +// Creative Commons Attribution 4.0 International License; see +// http://creativecommons.org/licenses/by/4.0/ + +include::meta/VK_KHR_draw_indirect_count.txt[] + +*Status*:: + Draft +*Last Modified Date*:: + 2017-08-25 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Matthaeus G. Chajdas, AMD + - Derrick Owens, AMD + - Graham Sellers, AMD + - Daniel Rakos, AMD + - Dominik Witczak, AMD + - Piers Daniell, NVIDIA + +This extension is based off the VK_AMD_draw_indirect_count extension. +This extension allows an application to source the number of draw calls for +indirect draw calls from a buffer. +This enables applications to generate arbitrary amounts of draw commands and +execute them without host intervention. + +=== New Functions + + * flink:vkCmdDrawIndirectCountKHR + * flink:vkCmdDrawIndexedIndirectCountKHR + +=== Version History + + * Revision 1, 2017-08-25 (Piers Daniell) + - Initial draft based off VK_AMD_draw_indirect_count diff --git a/appendices/VK_KHR_get_display_properties2.txt b/appendices/VK_KHR_get_display_properties2.txt new file mode 100644 index 00000000..ddabc2f0 --- /dev/null +++ b/appendices/VK_KHR_get_display_properties2.txt @@ -0,0 +1,89 @@ +// Copyright (c) 2017-2018 Khronos Group. This work is licensed under a +// Creative Commons Attribution 4.0 International License; see +// http://creativecommons.org/licenses/by/4.0/ + +include::meta/VK_KHR_get_display_properties2.txt[] + +*Last Modified Date*:: + 2017-02-21 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Ian Elliott, Google + - James Jones, NVIDIA + +This extension provides new entry points to query device display properties +and capabilities in a way that can be easily extended by other extensions, +without introducing any further entry points. +This extension can be considered the <> +equivalent of the <> extension. + +=== New Object Types + +None. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR + ** ename:VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR + ** ename:VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR + ** ename:VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR + ** ename:VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR + +=== New Enums + +None. + +=== New Structures + + * slink:VkDisplayProperties2KHR + * slink:VkDisplayPlaneProperties2KHR + * slink:VkDisplayModeProperties2KHR + * slink:VkDisplayPlaneInfo2KHR + * slink:VkDisplayPlaneCapabilities2KHR + +=== New Functions + + * flink:vkGetPhysicalDeviceDisplayProperties2KHR + * flink:vkGetPhysicalDeviceDisplayPlaneProperties2KHR + * flink:vkGetDisplayModeProperties2KHR + * flink:vkGetDisplayPlaneCapabilities2KHR + +=== Issues + +1) What should this extension be named? + +*RESOLVED*: VK_KHR_get_display_properties2. +Other alternatives: + + * VK_KHR_display2 + * One extension, combined with VK_KHR_surface_capabilites2. + +2) Should extensible input structs be added for these new functions: + +*RESOLVED*: + + * flink:vkGetPhysicalDeviceDisplayProperties2KHR: No. + The only current input is a VkPhysicalDevice. + Other inputs wouldn't make sense. + * flink:vkGetPhysicalDeviceDisplayPlaneProperties2KHR: No. + The only current input is a VkPhysicalDevice. + Other inputs wouldn't make sense. + * flink:vkGetDisplayModeProperties2KHR: No. + The only curent inputs are a VkPhysicalDevice and a VkDisplayModeKHR. + Other inputs wouldn't make sense. + +3) Should additional display query functions be extended? + +*RESOLVED*: + + * flink:vkGetDisplayPlaneSupportedDisplaysKHR: No. + Extensions should instead extend + flink:vkGetDisplayPlaneCapabilitiesKHR(). + +=== Version History + + * Revision 1, 2017-02-21 (James Jones) + - Initial draft. diff --git a/appendices/extensions.txt b/appendices/extensions.txt index 81d6f0dd..1d69e884 100644 --- a/appendices/extensions.txt +++ b/appendices/extensions.txt @@ -101,6 +101,10 @@ ifdef::VK_KHR_display_swapchain[] include::VK_KHR_display_swapchain.txt[] endif::VK_KHR_display_swapchain[] +ifdef::VK_KHR_draw_indirect_count[] +include::VK_KHR_draw_indirect_count.txt[] +endif::VK_KHR_draw_indirect_count[] + ifdef::VK_KHR_external_fence[] include::VK_KHR_external_fence.txt[] endif::VK_KHR_external_fence[] @@ -149,6 +153,10 @@ ifdef::VK_KHR_external_semaphore_win32[] include::VK_KHR_external_semaphore_win32.txt[] endif::VK_KHR_external_semaphore_win32[] +ifdef::VK_KHR_get_display_properties2[] +include::VK_KHR_get_display_properties2.txt[] +endif::VK_KHR_get_display_properties2[] + ifdef::VK_KHR_get_memory_requirements2[] include::VK_KHR_get_memory_requirements2.txt[] endif::VK_KHR_get_memory_requirements2[] diff --git a/appendices/glossary.txt b/appendices/glossary.txt index 7fad3431..6ffb670d 100644 --- a/appendices/glossary.txt +++ b/appendices/glossary.txt @@ -345,6 +345,9 @@ Drawing Commands:: Commands that provoke work using a graphics pipeline. Includes flink:vkCmdDraw, flink:vkCmdDrawIndexed, flink:vkCmdDrawIndirect, +ifdef::VK_KHR_draw_indirect_count[] + flink:vkCmdDrawIndirectCountKHR, flink:vkCmdDrawIndexedIndirectCountKHR, +endif::VK_KHR_draw_indirect_count[] ifdef::VK_AMD_draw_indirect_count[] flink:vkCmdDrawIndirectCountAMD, flink:vkCmdDrawIndexedIndirectCountAMD, endif::VK_AMD_draw_indirect_count[] @@ -608,6 +611,9 @@ Indexed Drawing Commands:: _Drawing commands_ which use an _index buffer_ as the source of index values used to fetch vertex attributes for a drawing command. Includes flink:vkCmdDrawIndexed, +ifdef::VK_KHR_draw_indirect_count[] + flink:vkCmdDrawIndexedIndirectCountKHR, +endif::VK_KHR_draw_indirect_count[] ifdef::VK_AMD_draw_indirect_count[] flink:vkCmdDrawIndexedIndirectCountAMD, endif::VK_AMD_draw_indirect_count[] @@ -617,6 +623,9 @@ Indirect Commands:: Drawing or dispatching commands that source some of their parameters from structures in buffer memory. Includes flink:vkCmdDrawIndirect, flink:vkCmdDrawIndexedIndirect, +ifdef::VK_KHR_draw_indirect_count[] + flink:vkCmdDrawIndirectCountKHR, flink:vkCmdDrawIndexedIndirectCountKHR, +endif::VK_KHR_draw_indirect_count[] ifdef::VK_AMD_draw_indirect_count[] flink:vkCmdDrawIndirectCountAMD, flink:vkCmdDrawIndexedIndirectCountAMD, endif::VK_AMD_draw_indirect_count[] @@ -636,6 +645,9 @@ Indirect Drawing Commands:: _Drawing commands_ that source some of their parameters from structures in buffer memory. Includes flink:vkCmdDrawIndirect, +ifdef::VK_KHR_draw_indirect_count[] + flink:vkCmdDrawIndirectCountKHR, flink:vkCmdDrawIndexedIndirectCountKHR, +endif::VK_KHR_draw_indirect_count[] ifdef::VK_AMD_draw_indirect_count[] flink:vkCmdDrawIndirectCountAMD, flink:vkCmdDrawIndexedIndirectCountAMD, endif::VK_AMD_draw_indirect_count[] @@ -766,6 +778,9 @@ Non-Indexed Drawing Commands:: order from the vertex input attributes for a drawing command (i.e. they do not use an _index buffer_). Includes flink:vkCmdDraw, +ifdef::VK_KHR_draw_indirect_count[] + flink:vkCmdDrawIndirectCountKHR, +endif::VK_KHR_draw_indirect_count[] ifdef::VK_AMD_draw_indirect_count[] flink:vkCmdDrawIndirectCountAMD, endif::VK_AMD_draw_indirect_count[] diff --git a/appendices/spirvenv.txt b/appendices/spirvenv.txt index 9ec368a4..92f35888 100644 --- a/appendices/spirvenv.txt +++ b/appendices/spirvenv.txt @@ -394,6 +394,16 @@ endif::VK_VERSION_1_1,VK_KHR_storage_buffer_storage_class[] the variable holding the result of a sampling instruction.) ** code:OpTypeImage must: have a "`Sampled`" operand of 1 (sampled image) or 2 (storage image). + ** If + <> + is not enabled and an code:OpTypeImage has "`Image Format`" operand of + code:Unknown, any variables created with the given type must be + decorated with code:NonReadable. + ** If + <> + is not enabled and an code:OpTypeImage has "`Image Format`" operand of + code:Unknown, any variables created with the given type must be + decorated with code:NonWriteable. ** code:OpImageQuerySizeLod, and code:OpImageQueryLevels must: only consume an "`Image`" operand whose type has its "`Sampled`" operand set to 1. diff --git a/chapters/VK_KHR_display/display.txt b/chapters/VK_KHR_display/display.txt index 43c5380f..0d80b535 100644 --- a/chapters/VK_KHR_display/display.txt +++ b/chapters/VK_KHR_display/display.txt @@ -110,6 +110,45 @@ screen needs to be updated in most frames. include::../../validity/structs/VkDisplayPropertiesKHR.txt[] -- +ifdef::VK_KHR_get_display_properties2[] + +[open,refpage='vkGetPhysicalDeviceDisplayProperties2KHR',desc='Query information about the available displays',type='protos'] +-- + +To query information about the available displays, call: + +include::../../api/protos/vkGetPhysicalDeviceDisplayProperties2KHR.txt[] + + * pname:physicalDevice is a physical device. + * pname:pPropertyCount is a pointer to an integer related to the number of + display devices available or queried, as described below. + * pname:pProperties is either `NULL` or a pointer to an array of + sname:VkDisplayProperties2KHR structures. + +fname:vkGetPhysicalDeviceDisplayProperties2KHR behaves similarly to +flink:vkGetPhysicalDeviceDisplayPropertiesKHR, with the ability to return +extended information via chained output structures. + +include::../../validity/protos/vkGetPhysicalDeviceDisplayProperties2KHR.txt[] +-- + +[open,refpage='VkDisplayProperties2KHR',desc='Structure describing an available display device',type='structs'] +-- + +The sname:VkDisplayProperties2KHR structure is defined as: + +include::../../api/structs/VkDisplayProperties2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:displayProperties is an instance of the + slink:VkDisplayPropertiesKHR structure. + +include::../../validity/structs/VkDisplayProperties2KHR.txt[] +-- + +endif::VK_KHR_get_display_properties2[] + ifdef::VK_EXT_direct_mode_display[] include::../VK_EXT_direct_mode_display/acquire_release_displays.txt[] endif::VK_EXT_direct_mode_display[] @@ -169,6 +208,45 @@ include::../../api/structs/VkDisplayPlanePropertiesKHR.txt[] include::../../validity/structs/VkDisplayPlanePropertiesKHR.txt[] -- +ifdef::VK_KHR_get_display_properties2[] + +[open,refpage='vkGetPhysicalDeviceDisplayPlaneProperties2KHR',desc='Query information about the available display planes.',type='protos'] +-- + +To query the properties of a device's display planes, call: + +include::../../api/protos/vkGetPhysicalDeviceDisplayPlaneProperties2KHR.txt[] + + * pname:physicalDevice is a physical device. + * pname:pPropertyCount is a pointer to an integer related to the number of + display planes available or queried, as described below. + * pname:pProperties is either `NULL` or a pointer to an array of + sname:VkDisplayPlaneProperties2KHR structures. + +fname:vkGetPhysicalDeviceDisplayPlaneProperties2KHR behaves similarly to +flink:vkGetPhysicalDeviceDisplayPlanePropertiesKHR, with the ability to +return extended information via chained output structures. + +include::../../validity/protos/vkGetPhysicalDeviceDisplayPlaneProperties2KHR.txt[] +-- + +[open,refpage='VkDisplayPlaneProperties2KHR',desc='Structure describing an available display plane',type='structs'] +-- + +The sname:VkDisplayPlaneProperties2KHR structure is defined as: + +include::../../api/structs/VkDisplayPlaneProperties2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:displayPlaneProperties is an instance of the + slink:VkDisplayPlanePropertiesKHR structure. + +include::../../validity/structs/VkDisplayPlaneProperties2KHR.txt[] +-- + +endif::VK_KHR_get_display_properties2[] + [open,refpage='vkGetDisplayPlaneSupportedDisplaysKHR',desc='Query the list of displays a plane supports',type='protos'] -- @@ -275,6 +353,47 @@ include::../../api/structs/VkDisplayModePropertiesKHR.txt[] include::../../validity/structs/VkDisplayModePropertiesKHR.txt[] -- +ifdef::VK_KHR_get_display_properties2[] + +[open,refpage='vkGetDisplayModeProperties2KHR',desc='Query information about the available display modes.',type='protos'] +-- + +To query the properties of a device's built-in display modes, call: + +include::../../api/protos/vkGetDisplayModeProperties2KHR.txt[] + + * pname:physicalDevice is the physical device associated with + pname:display. + * pname:display is the display to query. + * pname:pPropertyCount is a pointer to an integer related to the number of + display modes available or queried, as described below. + * pname:pProperties is either `NULL` or a pointer to an array of + sname:VkDisplayModeProperties2KHR structures. + +fname:vkGetDisplayModeProperties2KHR behaves similarly to +flink:vkGetDisplayModePropertiesKHR, with the ability to return extended +information via chained output structures. + +include::../../validity/protos/vkGetDisplayModeProperties2KHR.txt[] +-- + +[open,refpage='VkDisplayModeProperties2KHR',desc='Structure describing an available display mode',type='structs'] +-- + +The sname:VkDisplayModeProperties2KHR structure is defined as: + +include::../../api/structs/VkDisplayModeProperties2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:displayModeProperties is an instance of the + slink:VkDisplayModePropertiesKHR structure. + +include::../../validity/structs/VkDisplayModeProperties2KHR.txt[] +-- + +endif::VK_KHR_get_display_properties2[] + [open,refpage='VkDisplayModeParametersKHR',desc='Structure describing display parameters associated with a display mode',type='structs'] -- @@ -432,6 +551,76 @@ combinations. include::../../validity/structs/VkDisplayPlaneCapabilitiesKHR.txt[] -- +ifdef::VK_KHR_get_display_properties2[] + +[open,refpage='vkGetDisplayPlaneCapabilities2KHR',desc='Query capabilities of a mode and plane combination',type='protos'] +-- + +To query the capabilities of a given mode and plane combination, call: + +include::../../api/protos/vkGetDisplayPlaneCapabilities2KHR.txt[] + + * pname:physicalDevice is the physical device associated with + pname:pDisplayPlaneInfo. + * pname:pDisplayPlaneInfo is a pointer to an instance of the + slink:VkDisplayPlaneInfo2KHR structure describing the plane and mode. + * pname:pCapabilities is a pointer to a + slink:VkDisplayPlaneCapabilities2KHR structure in which the capabilities + are returned. + +fname:vkGetDisplayPlaneCapabilities2KHR behaves similarly to +flink:vkGetDisplayPlaneCapabilitiesKHR, with the ability to specify extended +inputs via chained input structures, and to return extended information via +chained output structures. + +include::../../validity/protos/vkGetDisplayPlaneCapabilities2KHR.txt[] +-- + +[open,refpage='VkDisplayPlaneInfo2KHR',desc='Structure defining the intended configuration of a display plane',type='structs'] +-- + +The sname:VkDisplayPlaneInfo2KHR structure is defined as: + +include::../../api/structs/VkDisplayPlaneInfo2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:mode is the display mode the application intends to program when + using the specified plane. + +[NOTE] +.Note +==== +This parameter also implicitly specifies a display. +==== + + * pname:planeIndex is the plane which the application intends to use with + the display. + +The members of sname:VkDisplayPlaneInfo2KHR correspond to the arguments to +flink:vkGetDisplayPlaneCapabilitiesKHR, with pname:sType and pname:pNext +added for extensibility. + +include::../../validity/structs/VkDisplayPlaneInfo2KHR.txt[] +-- + +[open,refpage='VkDisplayPlaneCapabilities2KHR',desc='Structure describing the capabilities of a mode and plane combination',type='structs'] +-- + +The sname:VkDisplayPlaneCapabilities2KHR structure is defined as: + +include::../../api/structs/VkDisplayPlaneCapabilities2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:capabilities is an instance of the + slink:VkDisplayPlaneCapabilitiesKHR structure. + +include::../../validity/structs/VkDisplayPlaneCapabilities2KHR.txt[] +-- + +endif::VK_KHR_get_display_properties2[] + ifdef::VK_EXT_display_control[] include::../VK_EXT_display_control/display_control.txt[] endif::VK_EXT_display_control[] diff --git a/chapters/drawing.txt b/chapters/drawing.txt index b3b2aca1..6b943210 100644 --- a/chapters/drawing.txt +++ b/chapters/drawing.txt @@ -416,6 +416,9 @@ Drawing commands fall roughly into two categories: These commands are: ** flink:vkCmdDraw ** flink:vkCmdDrawIndirect +ifdef::VK_KHR_draw_indirect_count[] + ** flink:vkCmdDrawIndirectCountKHR +endif::VK_KHR_draw_indirect_count[] ifdef::VK_AMD_draw_indirect_count[] ** flink:vkCmdDrawIndirectCountAMD. endif::VK_AMD_draw_indirect_count[] @@ -424,6 +427,9 @@ endif::VK_AMD_draw_indirect_count[] These commands are: ** flink:vkCmdDrawIndexed ** flink:vkCmdDrawIndexedIndirect +ifdef::VK_KHR_draw_indirect_count[] + ** flink:vkCmdDrawIndexedIndirectCountKHR +endif::VK_KHR_draw_indirect_count[] ifdef::VK_AMD_draw_indirect_count[] ** flink:vkCmdDrawIndexedIndirectCountAMD. endif::VK_AMD_draw_indirect_count[] @@ -1182,6 +1188,225 @@ include::../validity/structs/VkDrawIndirectCommand.txt[] -- +ifdef::VK_KHR_draw_indirect_count[] +[open,refpage='vkCmdDrawIndirectCountKHR',desc='Perform an indirect draw with the draw count sourced from a buffer',type='protos'] +-- + +To record a non-indexed draw call with a draw call count sourced from a +buffer, call: + +include::../api/protos/vkCmdDrawIndirectCountKHR.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:buffer is the buffer containing draw parameters. + * pname:offset is the byte offset into pname:buffer where parameters + begin. + * pname:countBuffer is the buffer containing the draw count. + * pname:countBufferOffset is the byte offset into pname:countBuffer where + the draw count begins. + * pname:maxDrawCount specifies the maximum number of draws that will be + executed. + The actual number of executed draw calls is the minimum of the count + specified in pname:countBuffer and pname:maxDrawCount. + * pname:stride is the byte stride between successive sets of draw + parameters. + +fname:vkCmdDrawIndirectCountKHR behaves similarly to flink:vkCmdDrawIndirect +except that the draw count is read by the device from a buffer during +execution. +The command will read an unsigned 32-bit integer from pname:countBuffer +located at pname:countBufferOffset and use this as the draw count. + +.Valid Usage +**** + * [[VUID-vkCmdDrawIndirectCountKHR-buffer-03104]] + If pname:buffer is non-sparse then it must: be bound completely and + contiguously to a single sname:VkDeviceMemory object + * [[VUID-vkCmdDrawIndirectCountKHR-buffer-03105]] + pname:buffer must: have been created with the + ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set + * [[VUID-vkCmdDrawIndirectCountKHR-countBuffer-03106]] + If pname:countBuffer is non-sparse then it must: be bound completely and + contiguously to a single sname:VkDeviceMemory object + * [[VUID-vkCmdDrawIndirectCountKHR-countBuffer-03107]] + pname:countBuffer must: have been created with the + ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set + * [[VUID-vkCmdDrawIndirectCountKHR-offset-03108]] + pname:offset must: be a multiple of `4` + * [[VUID-vkCmdDrawIndirectCountKHR-countBufferOffset-03109]] + pname:countBufferOffset must: be a multiple of `4` + * [[VUID-vkCmdDrawIndirectCountKHR-stride-03110]] + pname:stride must: be a multiple of `4` and must: be greater than or + equal to sizeof(sname:VkDrawIndirectCommand) + * [[VUID-vkCmdDrawIndirectCountKHR-maxDrawCount-03111]] + If pname:maxDrawCount is greater than or equal to `1`, + [eq]#(pname:stride {times} (pname:maxDrawCount - 1) {plus} pname:offset + {plus} sizeof(sname:VkDrawIndirectCommand))# must: be less than or equal + to the size of pname:buffer + * [[VUID-vkCmdDrawIndirectCountKHR-firstInstance-03112]] + If the + <> + feature is not enabled, all the pname:firstInstance members of the + sname:VkDrawIndirectCommand structures accessed by this command must: be + code:0 + * [[VUID-vkCmdDrawIndirectCountKHR-renderPass-03113]] + The current render pass must: be <> + with the pname:renderPass member of the + sname:VkGraphicsPipelineCreateInfo structure specified when creating the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS. + * [[VUID-vkCmdDrawIndirectCountKHR-subpass-03114]] + The subpass index of the current render pass must: be equal to the + pname:subpass member of the sname:VkGraphicsPipelineCreateInfo structure + specified when creating the sname:VkPipeline bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS. + * [[VUID-vkCmdDrawIndirectCountKHR-None-03115]] + For each set _n_ that is statically used by the sname:VkPipeline bound + to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have + been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a + sname:VkPipelineLayout that is compatible for set _n_, with the + sname:VkPipelineLayout used to create the current sname:VkPipeline, as + described in <> + * [[VUID-vkCmdDrawIndirectCountKHR-None-03116]] + For each push constant that is statically used by the sname:VkPipeline + bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value + must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a + sname:VkPipelineLayout that is compatible for push constants, with the + sname:VkPipelineLayout used to create the current sname:VkPipeline, as + described in <> + * [[VUID-vkCmdDrawIndirectCountKHR-None-03117]] + Descriptors in each bound descriptor set, specified via + fname:vkCmdBindDescriptorSets, must: be valid if they are statically + used by the bound sname:VkPipeline object, specified via + fname:vkCmdBindPipeline + * [[VUID-vkCmdDrawIndirectCountKHR-None-03118]] + All vertex input bindings accessed via vertex input variables declared + in the vertex shader entry point's interface must: have valid buffers + bound + * [[VUID-vkCmdDrawIndirectCountKHR-None-03119]] + A valid graphics pipeline must: be bound to the current command buffer + with ename:VK_PIPELINE_BIND_POINT_GRAPHICS + * [[VUID-vkCmdDrawIndirectCountKHR-None-03120]] + If the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that + state must: have been set on the current command buffer + * [[VUID-vkCmdDrawIndirectCountKHR-countBuffer-03121]] + If the count stored in pname:countBuffer is equal to `1`, + [eq]#(pname:offset {plus} sizeof(sname:VkDrawIndirectCommand))# must: be + less than or equal to the size of pname:buffer + * [[VUID-vkCmdDrawIndirectCountKHR-countBuffer-03122]] + If the count stored in pname:countBuffer is greater than `1`, + [eq]#(pname:stride {times} (pname:drawCount - 1) {plus} pname:offset + {plus} sizeof(sname:VkDrawIndirectCommand))# must: be less than or equal + to the size of pname:buffer + * [[VUID-vkCmdDrawIndirectCountKHR-countBuffer-03123]] + The count stored in pname:countBuffer must: be less than or equal to + sname:VkPhysicalDeviceLimits::pname:maxDrawIndirectCount + * [[VUID-vkCmdDrawIndirectCountKHR-None-03124]] + Every input attachment used by the current subpass must: be bound to the + pipeline via a descriptor set + * [[VUID-vkCmdDrawIndirectCountKHR-None-03125]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used to sample from any + sname:VkImage with a sname:VkImageView of the type + ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, + ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or + ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + * [[VUID-vkCmdDrawIndirectCountKHR-None-03126]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used with any of the SPIR-V + `OpImageSample*` or `OpImageSparseSample*` instructions with + code:ImplicitLod, code:Dref or code:Proj in their name, in any shader + stage + * [[VUID-vkCmdDrawIndirectCountKHR-None-03127]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used with any of the SPIR-V + `OpImageSample*` or `OpImageSparseSample*` instructions that includes a + LOD bias or any offset values, in any shader stage + * [[VUID-vkCmdDrawIndirectCountKHR-None-03128]] + If the <> + feature is not enabled, and any shader stage in the sname:VkPipeline + object bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform + buffer, it must: not access values outside of the range of that buffer + specified in the bound descriptor set + * [[VUID-vkCmdDrawIndirectCountKHR-None-03129]] + If the <> + feature is not enabled, and any shader stage in the sname:VkPipeline + object bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage + buffer, it must: not access values outside of the range of that buffer + specified in the bound descriptor set + * [[VUID-vkCmdDrawIndirectCountKHR-linearTilingFeatures-03130]] + Any sname:VkImageView being sampled with ename:VK_FILTER_LINEAR as a + result of this command must: be of a format which supports linear + filtering, as specified by the + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in + sname:VkFormatProperties::pname:linearTilingFeatures (for a linear + image) or sname:VkFormatProperties::pname:optimalTilingFeatures(for an + optimally tiled image) returned by + fname:vkGetPhysicalDeviceFormatProperties + * [[VUID-vkCmdDrawIndirectCountKHR-None-03131]] + Image subresources used as attachments in the current render pass must: + not be accessed in any way other than as an attachment by this command. +ifdef::VK_IMG_filter_cubic[] + * [[VUID-vkCmdDrawIndirectCountKHR-linearTilingFeatures-03169]] + Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_IMG as a + result of this command must: be of a format which supports cubic + filtering, as specified by the + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in + sname:VkFormatProperties::pname:linearTilingFeatures (for a linear + image) or sname:VkFormatProperties::pname:optimalTilingFeatures(for an + optimally tiled image) returned by + fname:vkGetPhysicalDeviceFormatProperties + * [[VUID-vkCmdDrawIndirectCountKHR-None-03170]] + Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_IMG as a + result of this command must: not have a elink:VkImageViewType of + ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, or + ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY +endif::VK_IMG_filter_cubic[] +ifdef::VK_VERSION_1_1,VK_KHR_multiview[] + * [[VUID-vkCmdDrawIndirectCountKHR-maxMultiviewInstanceIndex-03132]] + If the draw is recorded in a render pass instance with multiview + enabled, the maximum instance index must: be less than or equal to + slink:VkPhysicalDeviceMultiviewProperties::pname:maxMultiviewInstanceIndex. +endif::VK_VERSION_1_1,VK_KHR_multiview[] +ifdef::VK_VERSION_1_1[] + * [[VUID-vkCmdDrawIndirectCountKHR-commandBuffer-03133]] + If pname:commandBuffer is an unprotected command buffer, and any + pipeline stage in the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS reads from or writes to any image + or buffer, that image or buffer must: not be a protected image or + protected buffer. + * [[VUID-vkCmdDrawIndirectCountKHR-commandBuffer-03134]] + If pname:commandBuffer is a protected command buffer, and any pipeline + stage in the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS writes to any image or buffer, + that image or buffer must: not be an unprotected image or unprotected + buffer. + * [[VUID-vkCmdDrawIndirectCountKHR-commandBuffer-03135]] + If pname:commandBuffer is a protected command buffer, and any pipeline + stage other than the framebuffer-space pipeline stages in the + sname:VkPipeline object bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS + reads from or writes to any image or buffer, the image or buffer must: + not be a protected image or protected buffer. +endif::VK_VERSION_1_1[] +ifdef::VK_EXT_sample_locations[] + * [[VUID-vkCmdDrawIndirectCountKHR-sampleLocationsEnable-03171]] + If the bound graphics pipeline was created with + slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable + set to ename:VK_TRUE and the current subpass has a depth/stencil + attachment, then that attachment must: have been created with the + ename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set +endif::VK_EXT_sample_locations[] +**** + +include::../validity/protos/vkCmdDrawIndirectCountKHR.txt[] + +-- +endif::VK_KHR_draw_indirect_count[] + ifdef::VK_AMD_draw_indirect_count[] [open,refpage='vkCmdDrawIndirectCountAMD',desc='Perform an indirect draw with the draw count sourced from a buffer',type='protos'] -- @@ -1676,6 +1901,226 @@ include::../validity/structs/VkDrawIndexedIndirectCommand.txt[] -- +ifdef::VK_KHR_draw_indirect_count[] +[open,refpage='vkCmdDrawIndexedIndirectCountKHR',desc='Perform an indexed indirect draw with the draw count sourced from a buffer',type='protos'] +-- + +To record an indexed draw call with a draw call count sourced from a buffer, +call: + +include::../api/protos/vkCmdDrawIndexedIndirectCountKHR.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:buffer is the buffer containing draw parameters. + * pname:offset is the byte offset into pname:buffer where parameters + begin. + * pname:countBuffer is the buffer containing the draw count. + * pname:countBufferOffset is the byte offset into pname:countBuffer where + the draw count begins. + * pname:maxDrawCount specifies the maximum number of draws that will be + executed. + The actual number of executed draw calls is the minimum of the count + specified in pname:countBuffer and pname:maxDrawCount. + * pname:stride is the byte stride between successive sets of draw + parameters. + +fname:vkCmdDrawIndexedIndirectCountKHR behaves similarly to +flink:vkCmdDrawIndexedIndirect except that the draw count is read by the +device from a buffer during execution. +The command will read an unsigned 32-bit integer from pname:countBuffer +located at pname:countBufferOffset and use this as the draw count. + +.Valid Usage +**** + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-buffer-03136]] + If pname:buffer is non-sparse then it must: be bound completely and + contiguously to a single sname:VkDeviceMemory object + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-buffer-03137]] + pname:buffer must: have been created with the + ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-countBuffer-03138]] + If pname:countBuffer is non-sparse then it must: be bound completely and + contiguously to a single sname:VkDeviceMemory object + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-countBuffer-03139]] + pname:countBuffer must: have been created with the + ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-offset-03140]] + pname:offset must: be a multiple of `4` + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-countBufferOffset-03141]] + pname:countBufferOffset must: be a multiple of `4` + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-stride-03142]] + pname:stride must: be a multiple of `4` and must: be greater than or + equal to sizeof(sname:VkDrawIndexedIndirectCommand) + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-maxDrawCount-03143]] + If pname:maxDrawCount is greater than or equal to `1`, + [eq]#(pname:stride {times} (pname:maxDrawCount - 1) {plus} pname:offset + {plus} sizeof(sname:VkDrawIndexedIndirectCommand))# must: be less than + or equal to the size of pname:buffer + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-firstInstance-03144]] + If the + <> + feature is not enabled, all the pname:firstInstance members of the + sname:VkDrawIndexedIndirectCommand structures accessed by this command + must: be code:0 + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-renderPass-03145]] + The current render pass must: be <> + with the pname:renderPass member of the + sname:VkGraphicsPipelineCreateInfo structure specified when creating the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS. + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-subpass-03146]] + The subpass index of the current render pass must: be equal to the + pname:subpass member of the sname:VkGraphicsPipelineCreateInfo structure + specified when creating the sname:VkPipeline bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS. + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03147]] + For each set _n_ that is statically used by the sname:VkPipeline bound + to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have + been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a + sname:VkPipelineLayout that is compatible for set _n_, with the + sname:VkPipelineLayout used to create the current sname:VkPipeline, as + described in <> + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03148]] + For each push constant that is statically used by the sname:VkPipeline + bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value + must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a + sname:VkPipelineLayout that is compatible for push constants, with the + sname:VkPipelineLayout used to create the current sname:VkPipeline, as + described in <> + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03149]] + Descriptors in each bound descriptor set, specified via + fname:vkCmdBindDescriptorSets, must: be valid if they are statically + used by the bound sname:VkPipeline object, specified via + fname:vkCmdBindPipeline + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03150]] + All vertex input bindings accessed via vertex input variables declared + in the vertex shader entry point's interface must: have valid buffers + bound + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03151]] + A valid graphics pipeline must: be bound to the current command buffer + with ename:VK_PIPELINE_BIND_POINT_GRAPHICS + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03152]] + If the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that + state must: have been set on the current command buffer + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-countBuffer-03153]] + If count stored in pname:countBuffer is equal to `1`, [eq]#(pname:offset + {plus} sizeof(sname:VkDrawIndexedIndirectCommand))# must: be less than + or equal to the size of pname:buffer + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-countBuffer-03154]] + If count stored in pname:countBuffer is greater than `1`, + [eq]#(pname:stride {times} (pname:drawCount - 1) {plus} pname:offset + {plus} sizeof(sname:VkDrawIndexedIndirectCommand))# must: be less than + or equal to the size of pname:buffer + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-drawCount-03155]] + pname:drawCount must: be less than or equal to + sname:VkPhysicalDeviceLimits::pname:maxDrawIndirectCount + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03156]] + Every input attachment used by the current subpass must: be bound to the + pipeline via a descriptor set + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03157]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used to sample from any + sname:VkImage with a sname:VkImageView of the type + ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, + ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or + ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03158]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used with any of the SPIR-V + `OpImageSample*` or `OpImageSparseSample*` instructions with + code:ImplicitLod, code:Dref or code:Proj in their name, in any shader + stage + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03159]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used with any of the SPIR-V + `OpImageSample*` or `OpImageSparseSample*` instructions that includes a + LOD bias or any offset values, in any shader stage + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03160]] + If the <> + feature is not enabled, and any shader stage in the sname:VkPipeline + object bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform + buffer, it must: not access values outside of the range of that buffer + specified in the bound descriptor set + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03161]] + If the <> + feature is not enabled, and any shader stage in the sname:VkPipeline + object bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage + buffer, it must: not access values outside of the range of that buffer + specified in the bound descriptor set + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-linearTilingFeatures-03162]] + Any sname:VkImageView being sampled with ename:VK_FILTER_LINEAR as a + result of this command must: be of a format which supports linear + filtering, as specified by the + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in + sname:VkFormatProperties::pname:linearTilingFeatures (for a linear + image) or sname:VkFormatProperties::pname:optimalTilingFeatures(for an + optimally tiled image) returned by + fname:vkGetPhysicalDeviceFormatProperties + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03163]] + Image subresources used as attachments in the current render pass must: + not be accessed in any way other than as an attachment by this command. +ifdef::VK_IMG_filter_cubic[] + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-linearTilingFeatures-03172]] + Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_IMG as a + result of this command must: be of a format which supports cubic + filtering, as specified by the + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in + sname:VkFormatProperties::pname:linearTilingFeatures (for a linear + image) or sname:VkFormatProperties::pname:optimalTilingFeatures(for an + optimally tiled image) returned by + fname:vkGetPhysicalDeviceFormatProperties + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-None-03173]] + Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_IMG as a + result of this command must: not have a elink:VkImageViewType of + ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, or + ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY +endif::VK_IMG_filter_cubic[] +ifdef::VK_VERSION_1_1,VK_KHR_multiview[] + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-maxMultiviewInstanceIndex-03164]] + If the draw is recorded in a render pass instance with multiview + enabled, the maximum instance index must: be less than or equal to + slink:VkPhysicalDeviceMultiviewProperties::pname:maxMultiviewInstanceIndex. +endif::VK_VERSION_1_1,VK_KHR_multiview[] +ifdef::VK_VERSION_1_1[] + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-commandBuffer-03165]] + If pname:commandBuffer is an unprotected command buffer, and any + pipeline stage in the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS reads from or writes to any image + or buffer, that image or buffer must: not be a protected image or + protected buffer. + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-commandBuffer-03166]] + If pname:commandBuffer is a protected command buffer, and any pipeline + stage in the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS writes to any image or buffer, + that image or buffer must: not be an unprotected image or unprotected + buffer. + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-commandBuffer-03167]] + If pname:commandBuffer is a protected command buffer, and any pipeline + stage other than the framebuffer-space pipeline stages in the + sname:VkPipeline object bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS + reads from or writes to any image or buffer, the image or buffer must: + not be a protected image or protected buffer. +endif::VK_VERSION_1_1[] +ifdef::VK_EXT_sample_locations[] + * [[VUID-vkCmdDrawIndexedIndirectCountKHR-sampleLocationsEnable-03174]] + If the bound graphics pipeline was created with + slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable + set to ename:VK_TRUE and the current subpass has a depth/stencil + attachment, then that attachment must: have been created with the + ename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set +endif::VK_EXT_sample_locations[] +**** + +include::../validity/protos/vkCmdDrawIndexedIndirectCountKHR.txt[] + +-- +endif::VK_KHR_draw_indirect_count[] + + ifdef::VK_AMD_draw_indirect_count[] [open,refpage='vkCmdDrawIndexedIndirectCountAMD',desc='Perform an indexed indirect draw with the draw count sourced from a buffer',type='protos'] -- @@ -1726,12 +2171,12 @@ located at pname:countBufferOffset and use this as the draw count. pname:countBufferOffset must: be a multiple of `4` * [[VUID-vkCmdDrawIndexedIndirectCountAMD-stride-00557]] pname:stride must: be a multiple of `4` and must: be greater than or - equal to code:sizeof(sname:VkDrawIndirectCommand) + equal to code:sizeof(sname:VkDrawIndexedIndirectCommand) * [[VUID-vkCmdDrawIndexedIndirectCountAMD-maxDrawCount-00558]] If pname:maxDrawCount is greater than or equal to `1`, [eq]#(pname:stride {times} (pname:maxDrawCount - 1) {plus} pname:offset - {plus} code:sizeof(sname:VkDrawIndirectCommand))# must: be less than or - equal to the size of pname:buffer + {plus} code:sizeof(sname:VkDrawIndexedIndirectCommand))# must: be less + than or equal to the size of pname:buffer * [[VUID-vkCmdDrawIndexedIndirectCountAMD-firstInstance-00559]] If the <> diff --git a/include/vulkan/vulkan_core.h b/include/vulkan/vulkan_core.h index f41b8d69..a28661f4 100644 --- a/include/vulkan/vulkan_core.h +++ b/include/vulkan/vulkan_core.h @@ -43,7 +43,7 @@ extern "C" { #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) // Version of this file -#define VK_HEADER_VERSION 75 +#define VK_HEADER_VERSION 76 #define VK_NULL_HANDLE 0 @@ -350,6 +350,11 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001, VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002, + VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR = 1000121000, + VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001, + VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002, + VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR = 1000121003, + VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004, VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000, @@ -5582,6 +5587,70 @@ typedef VkPhysicalDeviceVariablePointerFeatures VkPhysicalDeviceVariablePointerF +#define VK_KHR_get_display_properties2 1 +#define VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION 1 +#define VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_display_properties2" + +typedef struct VkDisplayProperties2KHR { + VkStructureType sType; + void* pNext; + VkDisplayPropertiesKHR displayProperties; +} VkDisplayProperties2KHR; + +typedef struct VkDisplayPlaneProperties2KHR { + VkStructureType sType; + void* pNext; + VkDisplayPlanePropertiesKHR displayPlaneProperties; +} VkDisplayPlaneProperties2KHR; + +typedef struct VkDisplayModeProperties2KHR { + VkStructureType sType; + void* pNext; + VkDisplayModePropertiesKHR displayModeProperties; +} VkDisplayModeProperties2KHR; + +typedef struct VkDisplayPlaneInfo2KHR { + VkStructureType sType; + const void* pNext; + VkDisplayModeKHR mode; + uint32_t planeIndex; +} VkDisplayPlaneInfo2KHR; + +typedef struct VkDisplayPlaneCapabilities2KHR { + VkStructureType sType; + void* pNext; + VkDisplayPlaneCapabilitiesKHR capabilities; +} VkDisplayPlaneCapabilities2KHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModeProperties2KHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayProperties2KHR( + VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkDisplayProperties2KHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlaneProperties2KHR( + VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkDisplayPlaneProperties2KHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModeProperties2KHR( + VkPhysicalDevice physicalDevice, + VkDisplayKHR display, + uint32_t* pPropertyCount, + VkDisplayModeProperties2KHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilities2KHR( + VkPhysicalDevice physicalDevice, + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + VkDisplayPlaneCapabilities2KHR* pCapabilities); +#endif + #define VK_KHR_dedicated_allocation 1 #define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3 #define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation" @@ -5737,6 +5806,33 @@ VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR( VkDescriptorSetLayoutSupport* pSupport); #endif +#define VK_KHR_draw_indirect_count 1 +#define VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 +#define VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_KHR_draw_indirect_count" + +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountKHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountKHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountKHR( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); +#endif + #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) diff --git a/src/ext_loader/README.md b/src/ext_loader/README.md new file mode 100644 index 00000000..304fc157 --- /dev/null +++ b/src/ext_loader/README.md @@ -0,0 +1,28 @@ +# What Happened To The Vulkan Extension Loader? + +If you're looking for the files vulkan_ext.[ch] in this directory, they have +been removed. There were two significant problems with these simple +wrappers. + +First, vulkan_ext exported all extension entrypoints. However, the Vulkan +loader also exports entrypoints for the window system integration +extensions. If someone tried to compile a project and link it to both the +loader and vulkan_ext, they would get a bunch of redefined symbols. This +linking error is difficult to work around, because vulkan_ext does not have +an easy method of disabling the entrypoints at compile time. It is possible +to remove these entrypoints when generating vulkan_ext, but even then you +have to manually compile a list of every single extension to be disabled. + +Second, each entrypoint is only stored once, regardless of how many +instances or devices are created. This means that attempting to use multiple +instances or devices in parallel can result in one device calling function +pointers that are only valid on the other device, which will crash. You may +be able to work around this by never initializing the device dispatch +(vkExtInitDevice), but we haven't tried this. + +It is still possible to retrieve the last versions of these files in the +Github KhronosGroup/Vulkan-Docs repository from the 'v1.1.75' release tag. +It is also possible to regenerate them from ../../xml/vk.xml, although we +are no longer maintaining the generator code and it may eventually stop +working correctly. See README.adoc and the `extloader` Makefile target in +that directory. diff --git a/src/ext_loader/vulkan_ext.c b/src/ext_loader/vulkan_ext.c deleted file mode 100644 index 38cfcfae..00000000 --- a/src/ext_loader/vulkan_ext.c +++ /dev/null @@ -1,2570 +0,0 @@ -/* -** Copyright (c) 2015-2018 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. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - -#include - -#ifdef VK_KHR_surface -static PFN_vkDestroySurfaceKHR pfn_vkDestroySurfaceKHR; -void vkDestroySurfaceKHR( - VkInstance instance, - VkSurfaceKHR surface, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroySurfaceKHR( - instance, - surface, - pAllocator - ); -} - -static PFN_vkGetPhysicalDeviceSurfaceSupportKHR pfn_vkGetPhysicalDeviceSurfaceSupportKHR; -VkResult vkGetPhysicalDeviceSurfaceSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - VkSurfaceKHR surface, - VkBool32* pSupported) -{ - return pfn_vkGetPhysicalDeviceSurfaceSupportKHR( - physicalDevice, - queueFamilyIndex, - surface, - pSupported - ); -} - -static PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR pfn_vkGetPhysicalDeviceSurfaceCapabilitiesKHR; -VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) -{ - return pfn_vkGetPhysicalDeviceSurfaceCapabilitiesKHR( - physicalDevice, - surface, - pSurfaceCapabilities - ); -} - -static PFN_vkGetPhysicalDeviceSurfaceFormatsKHR pfn_vkGetPhysicalDeviceSurfaceFormatsKHR; -VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t* pSurfaceFormatCount, - VkSurfaceFormatKHR* pSurfaceFormats) -{ - return pfn_vkGetPhysicalDeviceSurfaceFormatsKHR( - physicalDevice, - surface, - pSurfaceFormatCount, - pSurfaceFormats - ); -} - -static PFN_vkGetPhysicalDeviceSurfacePresentModesKHR pfn_vkGetPhysicalDeviceSurfacePresentModesKHR; -VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t* pPresentModeCount, - VkPresentModeKHR* pPresentModes) -{ - return pfn_vkGetPhysicalDeviceSurfacePresentModesKHR( - physicalDevice, - surface, - pPresentModeCount, - pPresentModes - ); -} - -#endif /* VK_KHR_surface */ -#ifdef VK_KHR_swapchain -static PFN_vkCreateSwapchainKHR pfn_vkCreateSwapchainKHR; -VkResult vkCreateSwapchainKHR( - VkDevice device, - const VkSwapchainCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSwapchainKHR* pSwapchain) -{ - return pfn_vkCreateSwapchainKHR( - device, - pCreateInfo, - pAllocator, - pSwapchain - ); -} - -static PFN_vkDestroySwapchainKHR pfn_vkDestroySwapchainKHR; -void vkDestroySwapchainKHR( - VkDevice device, - VkSwapchainKHR swapchain, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroySwapchainKHR( - device, - swapchain, - pAllocator - ); -} - -static PFN_vkGetSwapchainImagesKHR pfn_vkGetSwapchainImagesKHR; -VkResult vkGetSwapchainImagesKHR( - VkDevice device, - VkSwapchainKHR swapchain, - uint32_t* pSwapchainImageCount, - VkImage* pSwapchainImages) -{ - return pfn_vkGetSwapchainImagesKHR( - device, - swapchain, - pSwapchainImageCount, - pSwapchainImages - ); -} - -static PFN_vkAcquireNextImageKHR pfn_vkAcquireNextImageKHR; -VkResult vkAcquireNextImageKHR( - VkDevice device, - VkSwapchainKHR swapchain, - uint64_t timeout, - VkSemaphore semaphore, - VkFence fence, - uint32_t* pImageIndex) -{ - return pfn_vkAcquireNextImageKHR( - device, - swapchain, - timeout, - semaphore, - fence, - pImageIndex - ); -} - -static PFN_vkQueuePresentKHR pfn_vkQueuePresentKHR; -VkResult vkQueuePresentKHR( - VkQueue queue, - const VkPresentInfoKHR* pPresentInfo) -{ - return pfn_vkQueuePresentKHR( - queue, - pPresentInfo - ); -} - -static PFN_vkGetDeviceGroupPresentCapabilitiesKHR pfn_vkGetDeviceGroupPresentCapabilitiesKHR; -VkResult vkGetDeviceGroupPresentCapabilitiesKHR( - VkDevice device, - VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) -{ - return pfn_vkGetDeviceGroupPresentCapabilitiesKHR( - device, - pDeviceGroupPresentCapabilities - ); -} - -static PFN_vkGetDeviceGroupSurfacePresentModesKHR pfn_vkGetDeviceGroupSurfacePresentModesKHR; -VkResult vkGetDeviceGroupSurfacePresentModesKHR( - VkDevice device, - VkSurfaceKHR surface, - VkDeviceGroupPresentModeFlagsKHR* pModes) -{ - return pfn_vkGetDeviceGroupSurfacePresentModesKHR( - device, - surface, - pModes - ); -} - -static PFN_vkGetPhysicalDevicePresentRectanglesKHR pfn_vkGetPhysicalDevicePresentRectanglesKHR; -VkResult vkGetPhysicalDevicePresentRectanglesKHR( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t* pRectCount, - VkRect2D* pRects) -{ - return pfn_vkGetPhysicalDevicePresentRectanglesKHR( - physicalDevice, - surface, - pRectCount, - pRects - ); -} - -static PFN_vkAcquireNextImage2KHR pfn_vkAcquireNextImage2KHR; -VkResult vkAcquireNextImage2KHR( - VkDevice device, - const VkAcquireNextImageInfoKHR* pAcquireInfo, - uint32_t* pImageIndex) -{ - return pfn_vkAcquireNextImage2KHR( - device, - pAcquireInfo, - pImageIndex - ); -} - -#endif /* VK_KHR_swapchain */ -#ifdef VK_KHR_display -static PFN_vkGetPhysicalDeviceDisplayPropertiesKHR pfn_vkGetPhysicalDeviceDisplayPropertiesKHR; -VkResult vkGetPhysicalDeviceDisplayPropertiesKHR( - VkPhysicalDevice physicalDevice, - uint32_t* pPropertyCount, - VkDisplayPropertiesKHR* pProperties) -{ - return pfn_vkGetPhysicalDeviceDisplayPropertiesKHR( - physicalDevice, - pPropertyCount, - pProperties - ); -} - -static PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR pfn_vkGetPhysicalDeviceDisplayPlanePropertiesKHR; -VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - VkPhysicalDevice physicalDevice, - uint32_t* pPropertyCount, - VkDisplayPlanePropertiesKHR* pProperties) -{ - return pfn_vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - physicalDevice, - pPropertyCount, - pProperties - ); -} - -static PFN_vkGetDisplayPlaneSupportedDisplaysKHR pfn_vkGetDisplayPlaneSupportedDisplaysKHR; -VkResult vkGetDisplayPlaneSupportedDisplaysKHR( - VkPhysicalDevice physicalDevice, - uint32_t planeIndex, - uint32_t* pDisplayCount, - VkDisplayKHR* pDisplays) -{ - return pfn_vkGetDisplayPlaneSupportedDisplaysKHR( - physicalDevice, - planeIndex, - pDisplayCount, - pDisplays - ); -} - -static PFN_vkGetDisplayModePropertiesKHR pfn_vkGetDisplayModePropertiesKHR; -VkResult vkGetDisplayModePropertiesKHR( - VkPhysicalDevice physicalDevice, - VkDisplayKHR display, - uint32_t* pPropertyCount, - VkDisplayModePropertiesKHR* pProperties) -{ - return pfn_vkGetDisplayModePropertiesKHR( - physicalDevice, - display, - pPropertyCount, - pProperties - ); -} - -static PFN_vkCreateDisplayModeKHR pfn_vkCreateDisplayModeKHR; -VkResult vkCreateDisplayModeKHR( - VkPhysicalDevice physicalDevice, - VkDisplayKHR display, - const VkDisplayModeCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDisplayModeKHR* pMode) -{ - return pfn_vkCreateDisplayModeKHR( - physicalDevice, - display, - pCreateInfo, - pAllocator, - pMode - ); -} - -static PFN_vkGetDisplayPlaneCapabilitiesKHR pfn_vkGetDisplayPlaneCapabilitiesKHR; -VkResult vkGetDisplayPlaneCapabilitiesKHR( - VkPhysicalDevice physicalDevice, - VkDisplayModeKHR mode, - uint32_t planeIndex, - VkDisplayPlaneCapabilitiesKHR* pCapabilities) -{ - return pfn_vkGetDisplayPlaneCapabilitiesKHR( - physicalDevice, - mode, - planeIndex, - pCapabilities - ); -} - -static PFN_vkCreateDisplayPlaneSurfaceKHR pfn_vkCreateDisplayPlaneSurfaceKHR; -VkResult vkCreateDisplayPlaneSurfaceKHR( - VkInstance instance, - const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateDisplayPlaneSurfaceKHR( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -#endif /* VK_KHR_display */ -#ifdef VK_KHR_display_swapchain -static PFN_vkCreateSharedSwapchainsKHR pfn_vkCreateSharedSwapchainsKHR; -VkResult vkCreateSharedSwapchainsKHR( - VkDevice device, - uint32_t swapchainCount, - const VkSwapchainCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, - VkSwapchainKHR* pSwapchains) -{ - return pfn_vkCreateSharedSwapchainsKHR( - device, - swapchainCount, - pCreateInfos, - pAllocator, - pSwapchains - ); -} - -#endif /* VK_KHR_display_swapchain */ -#ifdef VK_KHR_xlib_surface -static PFN_vkCreateXlibSurfaceKHR pfn_vkCreateXlibSurfaceKHR; -VkResult vkCreateXlibSurfaceKHR( - VkInstance instance, - const VkXlibSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateXlibSurfaceKHR( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -static PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR pfn_vkGetPhysicalDeviceXlibPresentationSupportKHR; -VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - Display* dpy, - VisualID visualID) -{ - return pfn_vkGetPhysicalDeviceXlibPresentationSupportKHR( - physicalDevice, - queueFamilyIndex, - dpy, - visualID - ); -} - -#endif /* VK_KHR_xlib_surface */ -#ifdef VK_KHR_xcb_surface -static PFN_vkCreateXcbSurfaceKHR pfn_vkCreateXcbSurfaceKHR; -VkResult vkCreateXcbSurfaceKHR( - VkInstance instance, - const VkXcbSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateXcbSurfaceKHR( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -static PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR pfn_vkGetPhysicalDeviceXcbPresentationSupportKHR; -VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - xcb_connection_t* connection, - xcb_visualid_t visual_id) -{ - return pfn_vkGetPhysicalDeviceXcbPresentationSupportKHR( - physicalDevice, - queueFamilyIndex, - connection, - visual_id - ); -} - -#endif /* VK_KHR_xcb_surface */ -#ifdef VK_KHR_wayland_surface -static PFN_vkCreateWaylandSurfaceKHR pfn_vkCreateWaylandSurfaceKHR; -VkResult vkCreateWaylandSurfaceKHR( - VkInstance instance, - const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateWaylandSurfaceKHR( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -static PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR pfn_vkGetPhysicalDeviceWaylandPresentationSupportKHR; -VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - struct wl_display* display) -{ - return pfn_vkGetPhysicalDeviceWaylandPresentationSupportKHR( - physicalDevice, - queueFamilyIndex, - display - ); -} - -#endif /* VK_KHR_wayland_surface */ -#ifdef VK_KHR_mir_surface -static PFN_vkCreateMirSurfaceKHR pfn_vkCreateMirSurfaceKHR; -VkResult vkCreateMirSurfaceKHR( - VkInstance instance, - const VkMirSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateMirSurfaceKHR( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -static PFN_vkGetPhysicalDeviceMirPresentationSupportKHR pfn_vkGetPhysicalDeviceMirPresentationSupportKHR; -VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - MirConnection* connection) -{ - return pfn_vkGetPhysicalDeviceMirPresentationSupportKHR( - physicalDevice, - queueFamilyIndex, - connection - ); -} - -#endif /* VK_KHR_mir_surface */ -#ifdef VK_KHR_android_surface -static PFN_vkCreateAndroidSurfaceKHR pfn_vkCreateAndroidSurfaceKHR; -VkResult vkCreateAndroidSurfaceKHR( - VkInstance instance, - const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateAndroidSurfaceKHR( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -#endif /* VK_KHR_android_surface */ -#ifdef VK_KHR_win32_surface -static PFN_vkCreateWin32SurfaceKHR pfn_vkCreateWin32SurfaceKHR; -VkResult vkCreateWin32SurfaceKHR( - VkInstance instance, - const VkWin32SurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateWin32SurfaceKHR( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR pfn_vkGetPhysicalDeviceWin32PresentationSupportKHR; -VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex) -{ - return pfn_vkGetPhysicalDeviceWin32PresentationSupportKHR( - physicalDevice, - queueFamilyIndex - ); -} - -#endif /* VK_KHR_win32_surface */ -#ifdef VK_KHR_get_physical_device_properties2 -static PFN_vkGetPhysicalDeviceFeatures2KHR pfn_vkGetPhysicalDeviceFeatures2KHR; -void vkGetPhysicalDeviceFeatures2KHR( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceFeatures2* pFeatures) -{ - pfn_vkGetPhysicalDeviceFeatures2KHR( - physicalDevice, - pFeatures - ); -} - -static PFN_vkGetPhysicalDeviceProperties2KHR pfn_vkGetPhysicalDeviceProperties2KHR; -void vkGetPhysicalDeviceProperties2KHR( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties2* pProperties) -{ - pfn_vkGetPhysicalDeviceProperties2KHR( - physicalDevice, - pProperties - ); -} - -static PFN_vkGetPhysicalDeviceFormatProperties2KHR pfn_vkGetPhysicalDeviceFormatProperties2KHR; -void vkGetPhysicalDeviceFormatProperties2KHR( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkFormatProperties2* pFormatProperties) -{ - pfn_vkGetPhysicalDeviceFormatProperties2KHR( - physicalDevice, - format, - pFormatProperties - ); -} - -static PFN_vkGetPhysicalDeviceImageFormatProperties2KHR pfn_vkGetPhysicalDeviceImageFormatProperties2KHR; -VkResult vkGetPhysicalDeviceImageFormatProperties2KHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties) -{ - return pfn_vkGetPhysicalDeviceImageFormatProperties2KHR( - physicalDevice, - pImageFormatInfo, - pImageFormatProperties - ); -} - -static PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR pfn_vkGetPhysicalDeviceQueueFamilyProperties2KHR; -void vkGetPhysicalDeviceQueueFamilyProperties2KHR( - VkPhysicalDevice physicalDevice, - uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties) -{ - pfn_vkGetPhysicalDeviceQueueFamilyProperties2KHR( - physicalDevice, - pQueueFamilyPropertyCount, - pQueueFamilyProperties - ); -} - -static PFN_vkGetPhysicalDeviceMemoryProperties2KHR pfn_vkGetPhysicalDeviceMemoryProperties2KHR; -void vkGetPhysicalDeviceMemoryProperties2KHR( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties) -{ - pfn_vkGetPhysicalDeviceMemoryProperties2KHR( - physicalDevice, - pMemoryProperties - ); -} - -static PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR pfn_vkGetPhysicalDeviceSparseImageFormatProperties2KHR; -void vkGetPhysicalDeviceSparseImageFormatProperties2KHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties) -{ - pfn_vkGetPhysicalDeviceSparseImageFormatProperties2KHR( - physicalDevice, - pFormatInfo, - pPropertyCount, - pProperties - ); -} - -#endif /* VK_KHR_get_physical_device_properties2 */ -#ifdef VK_KHR_device_group -static PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR pfn_vkGetDeviceGroupPeerMemoryFeaturesKHR; -void vkGetDeviceGroupPeerMemoryFeaturesKHR( - VkDevice device, - uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) -{ - pfn_vkGetDeviceGroupPeerMemoryFeaturesKHR( - device, - heapIndex, - localDeviceIndex, - remoteDeviceIndex, - pPeerMemoryFeatures - ); -} - -static PFN_vkCmdSetDeviceMaskKHR pfn_vkCmdSetDeviceMaskKHR; -void vkCmdSetDeviceMaskKHR( - VkCommandBuffer commandBuffer, - uint32_t deviceMask) -{ - pfn_vkCmdSetDeviceMaskKHR( - commandBuffer, - deviceMask - ); -} - -static PFN_vkCmdDispatchBaseKHR pfn_vkCmdDispatchBaseKHR; -void vkCmdDispatchBaseKHR( - VkCommandBuffer commandBuffer, - uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ) -{ - pfn_vkCmdDispatchBaseKHR( - commandBuffer, - baseGroupX, - baseGroupY, - baseGroupZ, - groupCountX, - groupCountY, - groupCountZ - ); -} - -#endif /* VK_KHR_device_group */ -#ifdef VK_KHR_maintenance1 -static PFN_vkTrimCommandPoolKHR pfn_vkTrimCommandPoolKHR; -void vkTrimCommandPoolKHR( - VkDevice device, - VkCommandPool commandPool, - VkCommandPoolTrimFlags flags) -{ - pfn_vkTrimCommandPoolKHR( - device, - commandPool, - flags - ); -} - -#endif /* VK_KHR_maintenance1 */ -#ifdef VK_KHR_device_group_creation -static PFN_vkEnumeratePhysicalDeviceGroupsKHR pfn_vkEnumeratePhysicalDeviceGroupsKHR; -VkResult vkEnumeratePhysicalDeviceGroupsKHR( - VkInstance instance, - uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) -{ - return pfn_vkEnumeratePhysicalDeviceGroupsKHR( - instance, - pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties - ); -} - -#endif /* VK_KHR_device_group_creation */ -#ifdef VK_KHR_external_memory_capabilities -static PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR pfn_vkGetPhysicalDeviceExternalBufferPropertiesKHR; -void vkGetPhysicalDeviceExternalBufferPropertiesKHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties) -{ - pfn_vkGetPhysicalDeviceExternalBufferPropertiesKHR( - physicalDevice, - pExternalBufferInfo, - pExternalBufferProperties - ); -} - -#endif /* VK_KHR_external_memory_capabilities */ -#ifdef VK_KHR_external_memory_win32 -static PFN_vkGetMemoryWin32HandleKHR pfn_vkGetMemoryWin32HandleKHR; -VkResult vkGetMemoryWin32HandleKHR( - VkDevice device, - const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle) -{ - return pfn_vkGetMemoryWin32HandleKHR( - device, - pGetWin32HandleInfo, - pHandle - ); -} - -static PFN_vkGetMemoryWin32HandlePropertiesKHR pfn_vkGetMemoryWin32HandlePropertiesKHR; -VkResult vkGetMemoryWin32HandlePropertiesKHR( - VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - HANDLE handle, - VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) -{ - return pfn_vkGetMemoryWin32HandlePropertiesKHR( - device, - handleType, - handle, - pMemoryWin32HandleProperties - ); -} - -#endif /* VK_KHR_external_memory_win32 */ -#ifdef VK_KHR_external_memory_fd -static PFN_vkGetMemoryFdKHR pfn_vkGetMemoryFdKHR; -VkResult vkGetMemoryFdKHR( - VkDevice device, - const VkMemoryGetFdInfoKHR* pGetFdInfo, - int* pFd) -{ - return pfn_vkGetMemoryFdKHR( - device, - pGetFdInfo, - pFd - ); -} - -static PFN_vkGetMemoryFdPropertiesKHR pfn_vkGetMemoryFdPropertiesKHR; -VkResult vkGetMemoryFdPropertiesKHR( - VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - int fd, - VkMemoryFdPropertiesKHR* pMemoryFdProperties) -{ - return pfn_vkGetMemoryFdPropertiesKHR( - device, - handleType, - fd, - pMemoryFdProperties - ); -} - -#endif /* VK_KHR_external_memory_fd */ -#ifdef VK_KHR_external_semaphore_capabilities -static PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR pfn_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; -void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties) -{ - pfn_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( - physicalDevice, - pExternalSemaphoreInfo, - pExternalSemaphoreProperties - ); -} - -#endif /* VK_KHR_external_semaphore_capabilities */ -#ifdef VK_KHR_external_semaphore_win32 -static PFN_vkImportSemaphoreWin32HandleKHR pfn_vkImportSemaphoreWin32HandleKHR; -VkResult vkImportSemaphoreWin32HandleKHR( - VkDevice device, - const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) -{ - return pfn_vkImportSemaphoreWin32HandleKHR( - device, - pImportSemaphoreWin32HandleInfo - ); -} - -static PFN_vkGetSemaphoreWin32HandleKHR pfn_vkGetSemaphoreWin32HandleKHR; -VkResult vkGetSemaphoreWin32HandleKHR( - VkDevice device, - const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle) -{ - return pfn_vkGetSemaphoreWin32HandleKHR( - device, - pGetWin32HandleInfo, - pHandle - ); -} - -#endif /* VK_KHR_external_semaphore_win32 */ -#ifdef VK_KHR_external_semaphore_fd -static PFN_vkImportSemaphoreFdKHR pfn_vkImportSemaphoreFdKHR; -VkResult vkImportSemaphoreFdKHR( - VkDevice device, - const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) -{ - return pfn_vkImportSemaphoreFdKHR( - device, - pImportSemaphoreFdInfo - ); -} - -static PFN_vkGetSemaphoreFdKHR pfn_vkGetSemaphoreFdKHR; -VkResult vkGetSemaphoreFdKHR( - VkDevice device, - const VkSemaphoreGetFdInfoKHR* pGetFdInfo, - int* pFd) -{ - return pfn_vkGetSemaphoreFdKHR( - device, - pGetFdInfo, - pFd - ); -} - -#endif /* VK_KHR_external_semaphore_fd */ -#ifdef VK_KHR_push_descriptor -static PFN_vkCmdPushDescriptorSetKHR pfn_vkCmdPushDescriptorSetKHR; -void vkCmdPushDescriptorSetKHR( - VkCommandBuffer commandBuffer, - VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, - uint32_t set, - uint32_t descriptorWriteCount, - const VkWriteDescriptorSet* pDescriptorWrites) -{ - pfn_vkCmdPushDescriptorSetKHR( - commandBuffer, - pipelineBindPoint, - layout, - set, - descriptorWriteCount, - pDescriptorWrites - ); -} - -static PFN_vkCmdPushDescriptorSetWithTemplateKHR pfn_vkCmdPushDescriptorSetWithTemplateKHR; -void vkCmdPushDescriptorSetWithTemplateKHR( - VkCommandBuffer commandBuffer, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - VkPipelineLayout layout, - uint32_t set, - const void* pData) -{ - pfn_vkCmdPushDescriptorSetWithTemplateKHR( - commandBuffer, - descriptorUpdateTemplate, - layout, - set, - pData - ); -} - -#endif /* VK_KHR_push_descriptor */ -#ifdef VK_KHR_descriptor_update_template -static PFN_vkCreateDescriptorUpdateTemplateKHR pfn_vkCreateDescriptorUpdateTemplateKHR; -VkResult vkCreateDescriptorUpdateTemplateKHR( - VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) -{ - return pfn_vkCreateDescriptorUpdateTemplateKHR( - device, - pCreateInfo, - pAllocator, - pDescriptorUpdateTemplate - ); -} - -static PFN_vkDestroyDescriptorUpdateTemplateKHR pfn_vkDestroyDescriptorUpdateTemplateKHR; -void vkDestroyDescriptorUpdateTemplateKHR( - VkDevice device, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroyDescriptorUpdateTemplateKHR( - device, - descriptorUpdateTemplate, - pAllocator - ); -} - -static PFN_vkUpdateDescriptorSetWithTemplateKHR pfn_vkUpdateDescriptorSetWithTemplateKHR; -void vkUpdateDescriptorSetWithTemplateKHR( - VkDevice device, - VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const void* pData) -{ - pfn_vkUpdateDescriptorSetWithTemplateKHR( - device, - descriptorSet, - descriptorUpdateTemplate, - pData - ); -} - -#endif /* VK_KHR_descriptor_update_template */ -#ifdef VK_KHR_shared_presentable_image -static PFN_vkGetSwapchainStatusKHR pfn_vkGetSwapchainStatusKHR; -VkResult vkGetSwapchainStatusKHR( - VkDevice device, - VkSwapchainKHR swapchain) -{ - return pfn_vkGetSwapchainStatusKHR( - device, - swapchain - ); -} - -#endif /* VK_KHR_shared_presentable_image */ -#ifdef VK_KHR_external_fence_capabilities -static PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR pfn_vkGetPhysicalDeviceExternalFencePropertiesKHR; -void vkGetPhysicalDeviceExternalFencePropertiesKHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties) -{ - pfn_vkGetPhysicalDeviceExternalFencePropertiesKHR( - physicalDevice, - pExternalFenceInfo, - pExternalFenceProperties - ); -} - -#endif /* VK_KHR_external_fence_capabilities */ -#ifdef VK_KHR_external_fence_win32 -static PFN_vkImportFenceWin32HandleKHR pfn_vkImportFenceWin32HandleKHR; -VkResult vkImportFenceWin32HandleKHR( - VkDevice device, - const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) -{ - return pfn_vkImportFenceWin32HandleKHR( - device, - pImportFenceWin32HandleInfo - ); -} - -static PFN_vkGetFenceWin32HandleKHR pfn_vkGetFenceWin32HandleKHR; -VkResult vkGetFenceWin32HandleKHR( - VkDevice device, - const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle) -{ - return pfn_vkGetFenceWin32HandleKHR( - device, - pGetWin32HandleInfo, - pHandle - ); -} - -#endif /* VK_KHR_external_fence_win32 */ -#ifdef VK_KHR_external_fence_fd -static PFN_vkImportFenceFdKHR pfn_vkImportFenceFdKHR; -VkResult vkImportFenceFdKHR( - VkDevice device, - const VkImportFenceFdInfoKHR* pImportFenceFdInfo) -{ - return pfn_vkImportFenceFdKHR( - device, - pImportFenceFdInfo - ); -} - -static PFN_vkGetFenceFdKHR pfn_vkGetFenceFdKHR; -VkResult vkGetFenceFdKHR( - VkDevice device, - const VkFenceGetFdInfoKHR* pGetFdInfo, - int* pFd) -{ - return pfn_vkGetFenceFdKHR( - device, - pGetFdInfo, - pFd - ); -} - -#endif /* VK_KHR_external_fence_fd */ -#ifdef VK_KHR_get_surface_capabilities2 -static PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR pfn_vkGetPhysicalDeviceSurfaceCapabilities2KHR; -VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - VkSurfaceCapabilities2KHR* pSurfaceCapabilities) -{ - return pfn_vkGetPhysicalDeviceSurfaceCapabilities2KHR( - physicalDevice, - pSurfaceInfo, - pSurfaceCapabilities - ); -} - -static PFN_vkGetPhysicalDeviceSurfaceFormats2KHR pfn_vkGetPhysicalDeviceSurfaceFormats2KHR; -VkResult vkGetPhysicalDeviceSurfaceFormats2KHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - uint32_t* pSurfaceFormatCount, - VkSurfaceFormat2KHR* pSurfaceFormats) -{ - return pfn_vkGetPhysicalDeviceSurfaceFormats2KHR( - physicalDevice, - pSurfaceInfo, - pSurfaceFormatCount, - pSurfaceFormats - ); -} - -#endif /* VK_KHR_get_surface_capabilities2 */ -#ifdef VK_KHR_get_memory_requirements2 -static PFN_vkGetImageMemoryRequirements2KHR pfn_vkGetImageMemoryRequirements2KHR; -void vkGetImageMemoryRequirements2KHR( - VkDevice device, - const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements) -{ - pfn_vkGetImageMemoryRequirements2KHR( - device, - pInfo, - pMemoryRequirements - ); -} - -static PFN_vkGetBufferMemoryRequirements2KHR pfn_vkGetBufferMemoryRequirements2KHR; -void vkGetBufferMemoryRequirements2KHR( - VkDevice device, - const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements) -{ - pfn_vkGetBufferMemoryRequirements2KHR( - device, - pInfo, - pMemoryRequirements - ); -} - -static PFN_vkGetImageSparseMemoryRequirements2KHR pfn_vkGetImageSparseMemoryRequirements2KHR; -void vkGetImageSparseMemoryRequirements2KHR( - VkDevice device, - const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) -{ - pfn_vkGetImageSparseMemoryRequirements2KHR( - device, - pInfo, - pSparseMemoryRequirementCount, - pSparseMemoryRequirements - ); -} - -#endif /* VK_KHR_get_memory_requirements2 */ -#ifdef VK_KHR_sampler_ycbcr_conversion -static PFN_vkCreateSamplerYcbcrConversionKHR pfn_vkCreateSamplerYcbcrConversionKHR; -VkResult vkCreateSamplerYcbcrConversionKHR( - VkDevice device, - const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSamplerYcbcrConversion* pYcbcrConversion) -{ - return pfn_vkCreateSamplerYcbcrConversionKHR( - device, - pCreateInfo, - pAllocator, - pYcbcrConversion - ); -} - -static PFN_vkDestroySamplerYcbcrConversionKHR pfn_vkDestroySamplerYcbcrConversionKHR; -void vkDestroySamplerYcbcrConversionKHR( - VkDevice device, - VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroySamplerYcbcrConversionKHR( - device, - ycbcrConversion, - pAllocator - ); -} - -#endif /* VK_KHR_sampler_ycbcr_conversion */ -#ifdef VK_KHR_bind_memory2 -static PFN_vkBindBufferMemory2KHR pfn_vkBindBufferMemory2KHR; -VkResult vkBindBufferMemory2KHR( - VkDevice device, - uint32_t bindInfoCount, - const VkBindBufferMemoryInfo* pBindInfos) -{ - return pfn_vkBindBufferMemory2KHR( - device, - bindInfoCount, - pBindInfos - ); -} - -static PFN_vkBindImageMemory2KHR pfn_vkBindImageMemory2KHR; -VkResult vkBindImageMemory2KHR( - VkDevice device, - uint32_t bindInfoCount, - const VkBindImageMemoryInfo* pBindInfos) -{ - return pfn_vkBindImageMemory2KHR( - device, - bindInfoCount, - pBindInfos - ); -} - -#endif /* VK_KHR_bind_memory2 */ -#ifdef VK_KHR_maintenance3 -static PFN_vkGetDescriptorSetLayoutSupportKHR pfn_vkGetDescriptorSetLayoutSupportKHR; -void vkGetDescriptorSetLayoutSupportKHR( - VkDevice device, - const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport) -{ - pfn_vkGetDescriptorSetLayoutSupportKHR( - device, - pCreateInfo, - pSupport - ); -} - -#endif /* VK_KHR_maintenance3 */ -#ifdef VK_ANDROID_native_buffer -static PFN_vkGetSwapchainGrallocUsageANDROID pfn_vkGetSwapchainGrallocUsageANDROID; -VkResult vkGetSwapchainGrallocUsageANDROID( - VkDevice device, - VkFormat format, - VkImageUsageFlags imageUsage, - int* grallocUsage) -{ - return pfn_vkGetSwapchainGrallocUsageANDROID( - device, - format, - imageUsage, - grallocUsage - ); -} - -static PFN_vkAcquireImageANDROID pfn_vkAcquireImageANDROID; -VkResult vkAcquireImageANDROID( - VkDevice device, - VkImage image, - int nativeFenceFd, - VkSemaphore semaphore, - VkFence fence) -{ - return pfn_vkAcquireImageANDROID( - device, - image, - nativeFenceFd, - semaphore, - fence - ); -} - -static PFN_vkQueueSignalReleaseImageANDROID pfn_vkQueueSignalReleaseImageANDROID; -VkResult vkQueueSignalReleaseImageANDROID( - VkQueue queue, - uint32_t waitSemaphoreCount, - const VkSemaphore* pWaitSemaphores, - VkImage image, - int* pNativeFenceFd) -{ - return pfn_vkQueueSignalReleaseImageANDROID( - queue, - waitSemaphoreCount, - pWaitSemaphores, - image, - pNativeFenceFd - ); -} - -#endif /* VK_ANDROID_native_buffer */ -#ifdef VK_EXT_debug_report -static PFN_vkCreateDebugReportCallbackEXT pfn_vkCreateDebugReportCallbackEXT; -VkResult vkCreateDebugReportCallbackEXT( - VkInstance instance, - const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDebugReportCallbackEXT* pCallback) -{ - return pfn_vkCreateDebugReportCallbackEXT( - instance, - pCreateInfo, - pAllocator, - pCallback - ); -} - -static PFN_vkDestroyDebugReportCallbackEXT pfn_vkDestroyDebugReportCallbackEXT; -void vkDestroyDebugReportCallbackEXT( - VkInstance instance, - VkDebugReportCallbackEXT callback, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroyDebugReportCallbackEXT( - instance, - callback, - pAllocator - ); -} - -static PFN_vkDebugReportMessageEXT pfn_vkDebugReportMessageEXT; -void vkDebugReportMessageEXT( - VkInstance instance, - VkDebugReportFlagsEXT flags, - VkDebugReportObjectTypeEXT objectType, - uint64_t object, - size_t location, - int32_t messageCode, - const char* pLayerPrefix, - const char* pMessage) -{ - pfn_vkDebugReportMessageEXT( - instance, - flags, - objectType, - object, - location, - messageCode, - pLayerPrefix, - pMessage - ); -} - -#endif /* VK_EXT_debug_report */ -#ifdef VK_EXT_debug_marker -static PFN_vkDebugMarkerSetObjectTagEXT pfn_vkDebugMarkerSetObjectTagEXT; -VkResult vkDebugMarkerSetObjectTagEXT( - VkDevice device, - const VkDebugMarkerObjectTagInfoEXT* pTagInfo) -{ - return pfn_vkDebugMarkerSetObjectTagEXT( - device, - pTagInfo - ); -} - -static PFN_vkDebugMarkerSetObjectNameEXT pfn_vkDebugMarkerSetObjectNameEXT; -VkResult vkDebugMarkerSetObjectNameEXT( - VkDevice device, - const VkDebugMarkerObjectNameInfoEXT* pNameInfo) -{ - return pfn_vkDebugMarkerSetObjectNameEXT( - device, - pNameInfo - ); -} - -static PFN_vkCmdDebugMarkerBeginEXT pfn_vkCmdDebugMarkerBeginEXT; -void vkCmdDebugMarkerBeginEXT( - VkCommandBuffer commandBuffer, - const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) -{ - pfn_vkCmdDebugMarkerBeginEXT( - commandBuffer, - pMarkerInfo - ); -} - -static PFN_vkCmdDebugMarkerEndEXT pfn_vkCmdDebugMarkerEndEXT; -void vkCmdDebugMarkerEndEXT( - VkCommandBuffer commandBuffer) -{ - pfn_vkCmdDebugMarkerEndEXT( - commandBuffer - ); -} - -static PFN_vkCmdDebugMarkerInsertEXT pfn_vkCmdDebugMarkerInsertEXT; -void vkCmdDebugMarkerInsertEXT( - VkCommandBuffer commandBuffer, - const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) -{ - pfn_vkCmdDebugMarkerInsertEXT( - commandBuffer, - pMarkerInfo - ); -} - -#endif /* VK_EXT_debug_marker */ -#ifdef VK_AMD_draw_indirect_count -static PFN_vkCmdDrawIndirectCountAMD pfn_vkCmdDrawIndirectCountAMD; -void vkCmdDrawIndirectCountAMD( - VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride) -{ - pfn_vkCmdDrawIndirectCountAMD( - commandBuffer, - buffer, - offset, - countBuffer, - countBufferOffset, - maxDrawCount, - stride - ); -} - -static PFN_vkCmdDrawIndexedIndirectCountAMD pfn_vkCmdDrawIndexedIndirectCountAMD; -void vkCmdDrawIndexedIndirectCountAMD( - VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride) -{ - pfn_vkCmdDrawIndexedIndirectCountAMD( - commandBuffer, - buffer, - offset, - countBuffer, - countBufferOffset, - maxDrawCount, - stride - ); -} - -#endif /* VK_AMD_draw_indirect_count */ -#ifdef VK_AMD_shader_info -static PFN_vkGetShaderInfoAMD pfn_vkGetShaderInfoAMD; -VkResult vkGetShaderInfoAMD( - VkDevice device, - VkPipeline pipeline, - VkShaderStageFlagBits shaderStage, - VkShaderInfoTypeAMD infoType, - size_t* pInfoSize, - void* pInfo) -{ - return pfn_vkGetShaderInfoAMD( - device, - pipeline, - shaderStage, - infoType, - pInfoSize, - pInfo - ); -} - -#endif /* VK_AMD_shader_info */ -#ifdef VK_NV_external_memory_capabilities -static PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV pfn_vkGetPhysicalDeviceExternalImageFormatPropertiesNV; -VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkImageType type, - VkImageTiling tiling, - VkImageUsageFlags usage, - VkImageCreateFlags flags, - VkExternalMemoryHandleTypeFlagsNV externalHandleType, - VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) -{ - return pfn_vkGetPhysicalDeviceExternalImageFormatPropertiesNV( - physicalDevice, - format, - type, - tiling, - usage, - flags, - externalHandleType, - pExternalImageFormatProperties - ); -} - -#endif /* VK_NV_external_memory_capabilities */ -#ifdef VK_NV_external_memory_win32 -static PFN_vkGetMemoryWin32HandleNV pfn_vkGetMemoryWin32HandleNV; -VkResult vkGetMemoryWin32HandleNV( - VkDevice device, - VkDeviceMemory memory, - VkExternalMemoryHandleTypeFlagsNV handleType, - HANDLE* pHandle) -{ - return pfn_vkGetMemoryWin32HandleNV( - device, - memory, - handleType, - pHandle - ); -} - -#endif /* VK_NV_external_memory_win32 */ -#ifdef VK_NN_vi_surface -static PFN_vkCreateViSurfaceNN pfn_vkCreateViSurfaceNN; -VkResult vkCreateViSurfaceNN( - VkInstance instance, - const VkViSurfaceCreateInfoNN* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateViSurfaceNN( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -#endif /* VK_NN_vi_surface */ -#ifdef VK_NVX_device_generated_commands -static PFN_vkCmdProcessCommandsNVX pfn_vkCmdProcessCommandsNVX; -void vkCmdProcessCommandsNVX( - VkCommandBuffer commandBuffer, - const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo) -{ - pfn_vkCmdProcessCommandsNVX( - commandBuffer, - pProcessCommandsInfo - ); -} - -static PFN_vkCmdReserveSpaceForCommandsNVX pfn_vkCmdReserveSpaceForCommandsNVX; -void vkCmdReserveSpaceForCommandsNVX( - VkCommandBuffer commandBuffer, - const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo) -{ - pfn_vkCmdReserveSpaceForCommandsNVX( - commandBuffer, - pReserveSpaceInfo - ); -} - -static PFN_vkCreateIndirectCommandsLayoutNVX pfn_vkCreateIndirectCommandsLayoutNVX; -VkResult vkCreateIndirectCommandsLayoutNVX( - VkDevice device, - const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout) -{ - return pfn_vkCreateIndirectCommandsLayoutNVX( - device, - pCreateInfo, - pAllocator, - pIndirectCommandsLayout - ); -} - -static PFN_vkDestroyIndirectCommandsLayoutNVX pfn_vkDestroyIndirectCommandsLayoutNVX; -void vkDestroyIndirectCommandsLayoutNVX( - VkDevice device, - VkIndirectCommandsLayoutNVX indirectCommandsLayout, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroyIndirectCommandsLayoutNVX( - device, - indirectCommandsLayout, - pAllocator - ); -} - -static PFN_vkCreateObjectTableNVX pfn_vkCreateObjectTableNVX; -VkResult vkCreateObjectTableNVX( - VkDevice device, - const VkObjectTableCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkObjectTableNVX* pObjectTable) -{ - return pfn_vkCreateObjectTableNVX( - device, - pCreateInfo, - pAllocator, - pObjectTable - ); -} - -static PFN_vkDestroyObjectTableNVX pfn_vkDestroyObjectTableNVX; -void vkDestroyObjectTableNVX( - VkDevice device, - VkObjectTableNVX objectTable, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroyObjectTableNVX( - device, - objectTable, - pAllocator - ); -} - -static PFN_vkRegisterObjectsNVX pfn_vkRegisterObjectsNVX; -VkResult vkRegisterObjectsNVX( - VkDevice device, - VkObjectTableNVX objectTable, - uint32_t objectCount, - const VkObjectTableEntryNVX* const* ppObjectTableEntries, - const uint32_t* pObjectIndices) -{ - return pfn_vkRegisterObjectsNVX( - device, - objectTable, - objectCount, - ppObjectTableEntries, - pObjectIndices - ); -} - -static PFN_vkUnregisterObjectsNVX pfn_vkUnregisterObjectsNVX; -VkResult vkUnregisterObjectsNVX( - VkDevice device, - VkObjectTableNVX objectTable, - uint32_t objectCount, - const VkObjectEntryTypeNVX* pObjectEntryTypes, - const uint32_t* pObjectIndices) -{ - return pfn_vkUnregisterObjectsNVX( - device, - objectTable, - objectCount, - pObjectEntryTypes, - pObjectIndices - ); -} - -static PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX pfn_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX; -void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( - VkPhysicalDevice physicalDevice, - VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, - VkDeviceGeneratedCommandsLimitsNVX* pLimits) -{ - pfn_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( - physicalDevice, - pFeatures, - pLimits - ); -} - -#endif /* VK_NVX_device_generated_commands */ -#ifdef VK_NV_clip_space_w_scaling -static PFN_vkCmdSetViewportWScalingNV pfn_vkCmdSetViewportWScalingNV; -void vkCmdSetViewportWScalingNV( - VkCommandBuffer commandBuffer, - uint32_t firstViewport, - uint32_t viewportCount, - const VkViewportWScalingNV* pViewportWScalings) -{ - pfn_vkCmdSetViewportWScalingNV( - commandBuffer, - firstViewport, - viewportCount, - pViewportWScalings - ); -} - -#endif /* VK_NV_clip_space_w_scaling */ -#ifdef VK_EXT_direct_mode_display -static PFN_vkReleaseDisplayEXT pfn_vkReleaseDisplayEXT; -VkResult vkReleaseDisplayEXT( - VkPhysicalDevice physicalDevice, - VkDisplayKHR display) -{ - return pfn_vkReleaseDisplayEXT( - physicalDevice, - display - ); -} - -#endif /* VK_EXT_direct_mode_display */ -#ifdef VK_EXT_acquire_xlib_display -static PFN_vkAcquireXlibDisplayEXT pfn_vkAcquireXlibDisplayEXT; -VkResult vkAcquireXlibDisplayEXT( - VkPhysicalDevice physicalDevice, - Display* dpy, - VkDisplayKHR display) -{ - return pfn_vkAcquireXlibDisplayEXT( - physicalDevice, - dpy, - display - ); -} - -static PFN_vkGetRandROutputDisplayEXT pfn_vkGetRandROutputDisplayEXT; -VkResult vkGetRandROutputDisplayEXT( - VkPhysicalDevice physicalDevice, - Display* dpy, - RROutput rrOutput, - VkDisplayKHR* pDisplay) -{ - return pfn_vkGetRandROutputDisplayEXT( - physicalDevice, - dpy, - rrOutput, - pDisplay - ); -} - -#endif /* VK_EXT_acquire_xlib_display */ -#ifdef VK_EXT_display_surface_counter -static PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT pfn_vkGetPhysicalDeviceSurfaceCapabilities2EXT; -VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - VkSurfaceCapabilities2EXT* pSurfaceCapabilities) -{ - return pfn_vkGetPhysicalDeviceSurfaceCapabilities2EXT( - physicalDevice, - surface, - pSurfaceCapabilities - ); -} - -#endif /* VK_EXT_display_surface_counter */ -#ifdef VK_EXT_display_control -static PFN_vkDisplayPowerControlEXT pfn_vkDisplayPowerControlEXT; -VkResult vkDisplayPowerControlEXT( - VkDevice device, - VkDisplayKHR display, - const VkDisplayPowerInfoEXT* pDisplayPowerInfo) -{ - return pfn_vkDisplayPowerControlEXT( - device, - display, - pDisplayPowerInfo - ); -} - -static PFN_vkRegisterDeviceEventEXT pfn_vkRegisterDeviceEventEXT; -VkResult vkRegisterDeviceEventEXT( - VkDevice device, - const VkDeviceEventInfoEXT* pDeviceEventInfo, - const VkAllocationCallbacks* pAllocator, - VkFence* pFence) -{ - return pfn_vkRegisterDeviceEventEXT( - device, - pDeviceEventInfo, - pAllocator, - pFence - ); -} - -static PFN_vkRegisterDisplayEventEXT pfn_vkRegisterDisplayEventEXT; -VkResult vkRegisterDisplayEventEXT( - VkDevice device, - VkDisplayKHR display, - const VkDisplayEventInfoEXT* pDisplayEventInfo, - const VkAllocationCallbacks* pAllocator, - VkFence* pFence) -{ - return pfn_vkRegisterDisplayEventEXT( - device, - display, - pDisplayEventInfo, - pAllocator, - pFence - ); -} - -static PFN_vkGetSwapchainCounterEXT pfn_vkGetSwapchainCounterEXT; -VkResult vkGetSwapchainCounterEXT( - VkDevice device, - VkSwapchainKHR swapchain, - VkSurfaceCounterFlagBitsEXT counter, - uint64_t* pCounterValue) -{ - return pfn_vkGetSwapchainCounterEXT( - device, - swapchain, - counter, - pCounterValue - ); -} - -#endif /* VK_EXT_display_control */ -#ifdef VK_GOOGLE_display_timing -static PFN_vkGetRefreshCycleDurationGOOGLE pfn_vkGetRefreshCycleDurationGOOGLE; -VkResult vkGetRefreshCycleDurationGOOGLE( - VkDevice device, - VkSwapchainKHR swapchain, - VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) -{ - return pfn_vkGetRefreshCycleDurationGOOGLE( - device, - swapchain, - pDisplayTimingProperties - ); -} - -static PFN_vkGetPastPresentationTimingGOOGLE pfn_vkGetPastPresentationTimingGOOGLE; -VkResult vkGetPastPresentationTimingGOOGLE( - VkDevice device, - VkSwapchainKHR swapchain, - uint32_t* pPresentationTimingCount, - VkPastPresentationTimingGOOGLE* pPresentationTimings) -{ - return pfn_vkGetPastPresentationTimingGOOGLE( - device, - swapchain, - pPresentationTimingCount, - pPresentationTimings - ); -} - -#endif /* VK_GOOGLE_display_timing */ -#ifdef VK_EXT_discard_rectangles -static PFN_vkCmdSetDiscardRectangleEXT pfn_vkCmdSetDiscardRectangleEXT; -void vkCmdSetDiscardRectangleEXT( - VkCommandBuffer commandBuffer, - uint32_t firstDiscardRectangle, - uint32_t discardRectangleCount, - const VkRect2D* pDiscardRectangles) -{ - pfn_vkCmdSetDiscardRectangleEXT( - commandBuffer, - firstDiscardRectangle, - discardRectangleCount, - pDiscardRectangles - ); -} - -#endif /* VK_EXT_discard_rectangles */ -#ifdef VK_EXT_hdr_metadata -static PFN_vkSetHdrMetadataEXT pfn_vkSetHdrMetadataEXT; -void vkSetHdrMetadataEXT( - VkDevice device, - uint32_t swapchainCount, - const VkSwapchainKHR* pSwapchains, - const VkHdrMetadataEXT* pMetadata) -{ - pfn_vkSetHdrMetadataEXT( - device, - swapchainCount, - pSwapchains, - pMetadata - ); -} - -#endif /* VK_EXT_hdr_metadata */ -#ifdef VK_MVK_ios_surface -static PFN_vkCreateIOSSurfaceMVK pfn_vkCreateIOSSurfaceMVK; -VkResult vkCreateIOSSurfaceMVK( - VkInstance instance, - const VkIOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateIOSSurfaceMVK( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -#endif /* VK_MVK_ios_surface */ -#ifdef VK_MVK_macos_surface -static PFN_vkCreateMacOSSurfaceMVK pfn_vkCreateMacOSSurfaceMVK; -VkResult vkCreateMacOSSurfaceMVK( - VkInstance instance, - const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface) -{ - return pfn_vkCreateMacOSSurfaceMVK( - instance, - pCreateInfo, - pAllocator, - pSurface - ); -} - -#endif /* VK_MVK_macos_surface */ -#ifdef VK_EXT_debug_utils -static PFN_vkSetDebugUtilsObjectNameEXT pfn_vkSetDebugUtilsObjectNameEXT; -VkResult vkSetDebugUtilsObjectNameEXT( - VkDevice device, - const VkDebugUtilsObjectNameInfoEXT* pNameInfo) -{ - return pfn_vkSetDebugUtilsObjectNameEXT( - device, - pNameInfo - ); -} - -static PFN_vkSetDebugUtilsObjectTagEXT pfn_vkSetDebugUtilsObjectTagEXT; -VkResult vkSetDebugUtilsObjectTagEXT( - VkDevice device, - const VkDebugUtilsObjectTagInfoEXT* pTagInfo) -{ - return pfn_vkSetDebugUtilsObjectTagEXT( - device, - pTagInfo - ); -} - -static PFN_vkQueueBeginDebugUtilsLabelEXT pfn_vkQueueBeginDebugUtilsLabelEXT; -void vkQueueBeginDebugUtilsLabelEXT( - VkQueue queue, - const VkDebugUtilsLabelEXT* pLabelInfo) -{ - pfn_vkQueueBeginDebugUtilsLabelEXT( - queue, - pLabelInfo - ); -} - -static PFN_vkQueueEndDebugUtilsLabelEXT pfn_vkQueueEndDebugUtilsLabelEXT; -void vkQueueEndDebugUtilsLabelEXT( - VkQueue queue) -{ - pfn_vkQueueEndDebugUtilsLabelEXT( - queue - ); -} - -static PFN_vkQueueInsertDebugUtilsLabelEXT pfn_vkQueueInsertDebugUtilsLabelEXT; -void vkQueueInsertDebugUtilsLabelEXT( - VkQueue queue, - const VkDebugUtilsLabelEXT* pLabelInfo) -{ - pfn_vkQueueInsertDebugUtilsLabelEXT( - queue, - pLabelInfo - ); -} - -static PFN_vkCmdBeginDebugUtilsLabelEXT pfn_vkCmdBeginDebugUtilsLabelEXT; -void vkCmdBeginDebugUtilsLabelEXT( - VkCommandBuffer commandBuffer, - const VkDebugUtilsLabelEXT* pLabelInfo) -{ - pfn_vkCmdBeginDebugUtilsLabelEXT( - commandBuffer, - pLabelInfo - ); -} - -static PFN_vkCmdEndDebugUtilsLabelEXT pfn_vkCmdEndDebugUtilsLabelEXT; -void vkCmdEndDebugUtilsLabelEXT( - VkCommandBuffer commandBuffer) -{ - pfn_vkCmdEndDebugUtilsLabelEXT( - commandBuffer - ); -} - -static PFN_vkCmdInsertDebugUtilsLabelEXT pfn_vkCmdInsertDebugUtilsLabelEXT; -void vkCmdInsertDebugUtilsLabelEXT( - VkCommandBuffer commandBuffer, - const VkDebugUtilsLabelEXT* pLabelInfo) -{ - pfn_vkCmdInsertDebugUtilsLabelEXT( - commandBuffer, - pLabelInfo - ); -} - -static PFN_vkCreateDebugUtilsMessengerEXT pfn_vkCreateDebugUtilsMessengerEXT; -VkResult vkCreateDebugUtilsMessengerEXT( - VkInstance instance, - const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDebugUtilsMessengerEXT* pMessenger) -{ - return pfn_vkCreateDebugUtilsMessengerEXT( - instance, - pCreateInfo, - pAllocator, - pMessenger - ); -} - -static PFN_vkDestroyDebugUtilsMessengerEXT pfn_vkDestroyDebugUtilsMessengerEXT; -void vkDestroyDebugUtilsMessengerEXT( - VkInstance instance, - VkDebugUtilsMessengerEXT messenger, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroyDebugUtilsMessengerEXT( - instance, - messenger, - pAllocator - ); -} - -static PFN_vkSubmitDebugUtilsMessageEXT pfn_vkSubmitDebugUtilsMessageEXT; -void vkSubmitDebugUtilsMessageEXT( - VkInstance instance, - VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VkDebugUtilsMessageTypeFlagsEXT messageTypes, - const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) -{ - pfn_vkSubmitDebugUtilsMessageEXT( - instance, - messageSeverity, - messageTypes, - pCallbackData - ); -} - -#endif /* VK_EXT_debug_utils */ -#ifdef VK_ANDROID_external_memory_android_hardware_buffer -static PFN_vkGetAndroidHardwareBufferPropertiesANDROID pfn_vkGetAndroidHardwareBufferPropertiesANDROID; -VkResult vkGetAndroidHardwareBufferPropertiesANDROID( - VkDevice device, - const struct AHardwareBuffer* buffer, - VkAndroidHardwareBufferPropertiesANDROID* pProperties) -{ - return pfn_vkGetAndroidHardwareBufferPropertiesANDROID( - device, - buffer, - pProperties - ); -} - -static PFN_vkGetMemoryAndroidHardwareBufferANDROID pfn_vkGetMemoryAndroidHardwareBufferANDROID; -VkResult vkGetMemoryAndroidHardwareBufferANDROID( - VkDevice device, - const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, - struct AHardwareBuffer** pBuffer) -{ - return pfn_vkGetMemoryAndroidHardwareBufferANDROID( - device, - pInfo, - pBuffer - ); -} - -#endif /* VK_ANDROID_external_memory_android_hardware_buffer */ -#ifdef VK_EXT_sample_locations -static PFN_vkCmdSetSampleLocationsEXT pfn_vkCmdSetSampleLocationsEXT; -void vkCmdSetSampleLocationsEXT( - VkCommandBuffer commandBuffer, - const VkSampleLocationsInfoEXT* pSampleLocationsInfo) -{ - pfn_vkCmdSetSampleLocationsEXT( - commandBuffer, - pSampleLocationsInfo - ); -} - -static PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT pfn_vkGetPhysicalDeviceMultisamplePropertiesEXT; -void vkGetPhysicalDeviceMultisamplePropertiesEXT( - VkPhysicalDevice physicalDevice, - VkSampleCountFlagBits samples, - VkMultisamplePropertiesEXT* pMultisampleProperties) -{ - pfn_vkGetPhysicalDeviceMultisamplePropertiesEXT( - physicalDevice, - samples, - pMultisampleProperties - ); -} - -#endif /* VK_EXT_sample_locations */ -#ifdef VK_EXT_validation_cache -static PFN_vkCreateValidationCacheEXT pfn_vkCreateValidationCacheEXT; -VkResult vkCreateValidationCacheEXT( - VkDevice device, - const VkValidationCacheCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkValidationCacheEXT* pValidationCache) -{ - return pfn_vkCreateValidationCacheEXT( - device, - pCreateInfo, - pAllocator, - pValidationCache - ); -} - -static PFN_vkDestroyValidationCacheEXT pfn_vkDestroyValidationCacheEXT; -void vkDestroyValidationCacheEXT( - VkDevice device, - VkValidationCacheEXT validationCache, - const VkAllocationCallbacks* pAllocator) -{ - pfn_vkDestroyValidationCacheEXT( - device, - validationCache, - pAllocator - ); -} - -static PFN_vkMergeValidationCachesEXT pfn_vkMergeValidationCachesEXT; -VkResult vkMergeValidationCachesEXT( - VkDevice device, - VkValidationCacheEXT dstCache, - uint32_t srcCacheCount, - const VkValidationCacheEXT* pSrcCaches) -{ - return pfn_vkMergeValidationCachesEXT( - device, - dstCache, - srcCacheCount, - pSrcCaches - ); -} - -static PFN_vkGetValidationCacheDataEXT pfn_vkGetValidationCacheDataEXT; -VkResult vkGetValidationCacheDataEXT( - VkDevice device, - VkValidationCacheEXT validationCache, - size_t* pDataSize, - void* pData) -{ - return pfn_vkGetValidationCacheDataEXT( - device, - validationCache, - pDataSize, - pData - ); -} - -#endif /* VK_EXT_validation_cache */ -#ifdef VK_EXT_external_memory_host -static PFN_vkGetMemoryHostPointerPropertiesEXT pfn_vkGetMemoryHostPointerPropertiesEXT; -VkResult vkGetMemoryHostPointerPropertiesEXT( - VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - const void* pHostPointer, - VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) -{ - return pfn_vkGetMemoryHostPointerPropertiesEXT( - device, - handleType, - pHostPointer, - pMemoryHostPointerProperties - ); -} - -#endif /* VK_EXT_external_memory_host */ -#ifdef VK_AMD_buffer_marker -static PFN_vkCmdWriteBufferMarkerAMD pfn_vkCmdWriteBufferMarkerAMD; -void vkCmdWriteBufferMarkerAMD( - VkCommandBuffer commandBuffer, - VkPipelineStageFlagBits pipelineStage, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - uint32_t marker) -{ - pfn_vkCmdWriteBufferMarkerAMD( - commandBuffer, - pipelineStage, - dstBuffer, - dstOffset, - marker - ); -} - -#endif /* VK_AMD_buffer_marker */ - -void vkExtInitInstance(VkInstance instance) -{ -#ifdef VK_KHR_surface - pfn_vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)vkGetInstanceProcAddr(instance, "vkDestroySurfaceKHR"); - pfn_vkGetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceSupportKHR"); - pfn_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); - pfn_vkGetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR"); - pfn_vkGetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR"); -#endif /* VK_KHR_surface */ -#ifdef VK_KHR_swapchain - pfn_vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)vkGetInstanceProcAddr(instance, "vkCreateSwapchainKHR"); - pfn_vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR)vkGetInstanceProcAddr(instance, "vkDestroySwapchainKHR"); - pfn_vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR)vkGetInstanceProcAddr(instance, "vkGetSwapchainImagesKHR"); - pfn_vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR)vkGetInstanceProcAddr(instance, "vkAcquireNextImageKHR"); - pfn_vkQueuePresentKHR = (PFN_vkQueuePresentKHR)vkGetInstanceProcAddr(instance, "vkQueuePresentKHR"); - pfn_vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR)vkGetInstanceProcAddr(instance, "vkGetDeviceGroupPresentCapabilitiesKHR"); - pfn_vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR)vkGetInstanceProcAddr(instance, "vkGetDeviceGroupSurfacePresentModesKHR"); - pfn_vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDevicePresentRectanglesKHR"); - pfn_vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR)vkGetInstanceProcAddr(instance, "vkAcquireNextImage2KHR"); -#endif /* VK_KHR_swapchain */ -#ifdef VK_KHR_display - pfn_vkGetPhysicalDeviceDisplayPropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"); - pfn_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"); - pfn_vkGetDisplayPlaneSupportedDisplaysKHR = (PFN_vkGetDisplayPlaneSupportedDisplaysKHR)vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneSupportedDisplaysKHR"); - pfn_vkGetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR)vkGetInstanceProcAddr(instance, "vkGetDisplayModePropertiesKHR"); - pfn_vkCreateDisplayModeKHR = (PFN_vkCreateDisplayModeKHR)vkGetInstanceProcAddr(instance, "vkCreateDisplayModeKHR"); - pfn_vkGetDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR)vkGetInstanceProcAddr(instance, "vkGetDisplayPlaneCapabilitiesKHR"); - pfn_vkCreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateDisplayPlaneSurfaceKHR"); -#endif /* VK_KHR_display */ -#ifdef VK_KHR_display_swapchain - pfn_vkCreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)vkGetInstanceProcAddr(instance, "vkCreateSharedSwapchainsKHR"); -#endif /* VK_KHR_display_swapchain */ -#ifdef VK_KHR_xlib_surface - pfn_vkCreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateXlibSurfaceKHR"); - pfn_vkGetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR"); -#endif /* VK_KHR_xlib_surface */ -#ifdef VK_KHR_xcb_surface - pfn_vkCreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateXcbSurfaceKHR"); - pfn_vkGetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); -#endif /* VK_KHR_xcb_surface */ -#ifdef VK_KHR_wayland_surface - pfn_vkCreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateWaylandSurfaceKHR"); - pfn_vkGetPhysicalDeviceWaylandPresentationSupportKHR = (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR"); -#endif /* VK_KHR_wayland_surface */ -#ifdef VK_KHR_mir_surface - pfn_vkCreateMirSurfaceKHR = (PFN_vkCreateMirSurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateMirSurfaceKHR"); - pfn_vkGetPhysicalDeviceMirPresentationSupportKHR = (PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMirPresentationSupportKHR"); -#endif /* VK_KHR_mir_surface */ -#ifdef VK_KHR_android_surface - pfn_vkCreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateAndroidSurfaceKHR"); -#endif /* VK_KHR_android_surface */ -#ifdef VK_KHR_win32_surface - pfn_vkCreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)vkGetInstanceProcAddr(instance, "vkCreateWin32SurfaceKHR"); - pfn_vkGetPhysicalDeviceWin32PresentationSupportKHR = (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR"); -#endif /* VK_KHR_win32_surface */ -#ifdef VK_KHR_get_physical_device_properties2 - pfn_vkGetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFeatures2KHR"); - pfn_vkGetPhysicalDeviceProperties2KHR = (PFN_vkGetPhysicalDeviceProperties2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceProperties2KHR"); - pfn_vkGetPhysicalDeviceFormatProperties2KHR = (PFN_vkGetPhysicalDeviceFormatProperties2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceFormatProperties2KHR"); - pfn_vkGetPhysicalDeviceImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR"); - pfn_vkGetPhysicalDeviceQueueFamilyProperties2KHR = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"); - pfn_vkGetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMemoryProperties2KHR"); - pfn_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"); -#endif /* VK_KHR_get_physical_device_properties2 */ -#ifdef VK_KHR_device_group - pfn_vkGetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)vkGetInstanceProcAddr(instance, "vkGetDeviceGroupPeerMemoryFeaturesKHR"); - pfn_vkCmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR)vkGetInstanceProcAddr(instance, "vkCmdSetDeviceMaskKHR"); - pfn_vkCmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR)vkGetInstanceProcAddr(instance, "vkCmdDispatchBaseKHR"); -#endif /* VK_KHR_device_group */ -#ifdef VK_KHR_maintenance1 - pfn_vkTrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR)vkGetInstanceProcAddr(instance, "vkTrimCommandPoolKHR"); -#endif /* VK_KHR_maintenance1 */ -#ifdef VK_KHR_device_group_creation - pfn_vkEnumeratePhysicalDeviceGroupsKHR = (PFN_vkEnumeratePhysicalDeviceGroupsKHR)vkGetInstanceProcAddr(instance, "vkEnumeratePhysicalDeviceGroupsKHR"); -#endif /* VK_KHR_device_group_creation */ -#ifdef VK_KHR_external_memory_capabilities - pfn_vkGetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"); -#endif /* VK_KHR_external_memory_capabilities */ -#ifdef VK_KHR_external_memory_win32 - pfn_vkGetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR)vkGetInstanceProcAddr(instance, "vkGetMemoryWin32HandleKHR"); - pfn_vkGetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR)vkGetInstanceProcAddr(instance, "vkGetMemoryWin32HandlePropertiesKHR"); -#endif /* VK_KHR_external_memory_win32 */ -#ifdef VK_KHR_external_memory_fd - pfn_vkGetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)vkGetInstanceProcAddr(instance, "vkGetMemoryFdKHR"); - pfn_vkGetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR)vkGetInstanceProcAddr(instance, "vkGetMemoryFdPropertiesKHR"); -#endif /* VK_KHR_external_memory_fd */ -#ifdef VK_KHR_external_semaphore_capabilities - pfn_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); -#endif /* VK_KHR_external_semaphore_capabilities */ -#ifdef VK_KHR_external_semaphore_win32 - pfn_vkImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR)vkGetInstanceProcAddr(instance, "vkImportSemaphoreWin32HandleKHR"); - pfn_vkGetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR)vkGetInstanceProcAddr(instance, "vkGetSemaphoreWin32HandleKHR"); -#endif /* VK_KHR_external_semaphore_win32 */ -#ifdef VK_KHR_external_semaphore_fd - pfn_vkImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR)vkGetInstanceProcAddr(instance, "vkImportSemaphoreFdKHR"); - pfn_vkGetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR)vkGetInstanceProcAddr(instance, "vkGetSemaphoreFdKHR"); -#endif /* VK_KHR_external_semaphore_fd */ -#ifdef VK_KHR_push_descriptor - pfn_vkCmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR)vkGetInstanceProcAddr(instance, "vkCmdPushDescriptorSetKHR"); - pfn_vkCmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR)vkGetInstanceProcAddr(instance, "vkCmdPushDescriptorSetWithTemplateKHR"); -#endif /* VK_KHR_push_descriptor */ -#ifdef VK_KHR_descriptor_update_template - pfn_vkCreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR)vkGetInstanceProcAddr(instance, "vkCreateDescriptorUpdateTemplateKHR"); - pfn_vkDestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR)vkGetInstanceProcAddr(instance, "vkDestroyDescriptorUpdateTemplateKHR"); - pfn_vkUpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR)vkGetInstanceProcAddr(instance, "vkUpdateDescriptorSetWithTemplateKHR"); -#endif /* VK_KHR_descriptor_update_template */ -#ifdef VK_KHR_shared_presentable_image - pfn_vkGetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR)vkGetInstanceProcAddr(instance, "vkGetSwapchainStatusKHR"); -#endif /* VK_KHR_shared_presentable_image */ -#ifdef VK_KHR_external_fence_capabilities - pfn_vkGetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR"); -#endif /* VK_KHR_external_fence_capabilities */ -#ifdef VK_KHR_external_fence_win32 - pfn_vkImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR)vkGetInstanceProcAddr(instance, "vkImportFenceWin32HandleKHR"); - pfn_vkGetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR)vkGetInstanceProcAddr(instance, "vkGetFenceWin32HandleKHR"); -#endif /* VK_KHR_external_fence_win32 */ -#ifdef VK_KHR_external_fence_fd - pfn_vkImportFenceFdKHR = (PFN_vkImportFenceFdKHR)vkGetInstanceProcAddr(instance, "vkImportFenceFdKHR"); - pfn_vkGetFenceFdKHR = (PFN_vkGetFenceFdKHR)vkGetInstanceProcAddr(instance, "vkGetFenceFdKHR"); -#endif /* VK_KHR_external_fence_fd */ -#ifdef VK_KHR_get_surface_capabilities2 - pfn_vkGetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"); - pfn_vkGetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR"); -#endif /* VK_KHR_get_surface_capabilities2 */ -#ifdef VK_KHR_get_memory_requirements2 - pfn_vkGetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)vkGetInstanceProcAddr(instance, "vkGetImageMemoryRequirements2KHR"); - pfn_vkGetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)vkGetInstanceProcAddr(instance, "vkGetBufferMemoryRequirements2KHR"); - pfn_vkGetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR)vkGetInstanceProcAddr(instance, "vkGetImageSparseMemoryRequirements2KHR"); -#endif /* VK_KHR_get_memory_requirements2 */ -#ifdef VK_KHR_sampler_ycbcr_conversion - pfn_vkCreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR)vkGetInstanceProcAddr(instance, "vkCreateSamplerYcbcrConversionKHR"); - pfn_vkDestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR)vkGetInstanceProcAddr(instance, "vkDestroySamplerYcbcrConversionKHR"); -#endif /* VK_KHR_sampler_ycbcr_conversion */ -#ifdef VK_KHR_bind_memory2 - pfn_vkBindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR)vkGetInstanceProcAddr(instance, "vkBindBufferMemory2KHR"); - pfn_vkBindImageMemory2KHR = (PFN_vkBindImageMemory2KHR)vkGetInstanceProcAddr(instance, "vkBindImageMemory2KHR"); -#endif /* VK_KHR_bind_memory2 */ -#ifdef VK_KHR_maintenance3 - pfn_vkGetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR)vkGetInstanceProcAddr(instance, "vkGetDescriptorSetLayoutSupportKHR"); -#endif /* VK_KHR_maintenance3 */ -#ifdef VK_ANDROID_native_buffer - pfn_vkGetSwapchainGrallocUsageANDROID = (PFN_vkGetSwapchainGrallocUsageANDROID)vkGetInstanceProcAddr(instance, "vkGetSwapchainGrallocUsageANDROID"); - pfn_vkAcquireImageANDROID = (PFN_vkAcquireImageANDROID)vkGetInstanceProcAddr(instance, "vkAcquireImageANDROID"); - pfn_vkQueueSignalReleaseImageANDROID = (PFN_vkQueueSignalReleaseImageANDROID)vkGetInstanceProcAddr(instance, "vkQueueSignalReleaseImageANDROID"); -#endif /* VK_ANDROID_native_buffer */ -#ifdef VK_EXT_debug_report - pfn_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(instance, "vkCreateDebugReportCallbackEXT"); - pfn_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(instance, "vkDestroyDebugReportCallbackEXT"); - pfn_vkDebugReportMessageEXT = (PFN_vkDebugReportMessageEXT)vkGetInstanceProcAddr(instance, "vkDebugReportMessageEXT"); -#endif /* VK_EXT_debug_report */ -#ifdef VK_EXT_debug_marker - pfn_vkDebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)vkGetInstanceProcAddr(instance, "vkDebugMarkerSetObjectTagEXT"); - pfn_vkDebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)vkGetInstanceProcAddr(instance, "vkDebugMarkerSetObjectNameEXT"); - pfn_vkCmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT)vkGetInstanceProcAddr(instance, "vkCmdDebugMarkerBeginEXT"); - pfn_vkCmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT)vkGetInstanceProcAddr(instance, "vkCmdDebugMarkerEndEXT"); - pfn_vkCmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT)vkGetInstanceProcAddr(instance, "vkCmdDebugMarkerInsertEXT"); -#endif /* VK_EXT_debug_marker */ -#ifdef VK_AMD_draw_indirect_count - pfn_vkCmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)vkGetInstanceProcAddr(instance, "vkCmdDrawIndirectCountAMD"); - pfn_vkCmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD)vkGetInstanceProcAddr(instance, "vkCmdDrawIndexedIndirectCountAMD"); -#endif /* VK_AMD_draw_indirect_count */ -#ifdef VK_AMD_shader_info - pfn_vkGetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)vkGetInstanceProcAddr(instance, "vkGetShaderInfoAMD"); -#endif /* VK_AMD_shader_info */ -#ifdef VK_NV_external_memory_capabilities - pfn_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = (PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV"); -#endif /* VK_NV_external_memory_capabilities */ -#ifdef VK_NV_external_memory_win32 - pfn_vkGetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)vkGetInstanceProcAddr(instance, "vkGetMemoryWin32HandleNV"); -#endif /* VK_NV_external_memory_win32 */ -#ifdef VK_NN_vi_surface - pfn_vkCreateViSurfaceNN = (PFN_vkCreateViSurfaceNN)vkGetInstanceProcAddr(instance, "vkCreateViSurfaceNN"); -#endif /* VK_NN_vi_surface */ -#ifdef VK_NVX_device_generated_commands - pfn_vkCmdProcessCommandsNVX = (PFN_vkCmdProcessCommandsNVX)vkGetInstanceProcAddr(instance, "vkCmdProcessCommandsNVX"); - pfn_vkCmdReserveSpaceForCommandsNVX = (PFN_vkCmdReserveSpaceForCommandsNVX)vkGetInstanceProcAddr(instance, "vkCmdReserveSpaceForCommandsNVX"); - pfn_vkCreateIndirectCommandsLayoutNVX = (PFN_vkCreateIndirectCommandsLayoutNVX)vkGetInstanceProcAddr(instance, "vkCreateIndirectCommandsLayoutNVX"); - pfn_vkDestroyIndirectCommandsLayoutNVX = (PFN_vkDestroyIndirectCommandsLayoutNVX)vkGetInstanceProcAddr(instance, "vkDestroyIndirectCommandsLayoutNVX"); - pfn_vkCreateObjectTableNVX = (PFN_vkCreateObjectTableNVX)vkGetInstanceProcAddr(instance, "vkCreateObjectTableNVX"); - pfn_vkDestroyObjectTableNVX = (PFN_vkDestroyObjectTableNVX)vkGetInstanceProcAddr(instance, "vkDestroyObjectTableNVX"); - pfn_vkRegisterObjectsNVX = (PFN_vkRegisterObjectsNVX)vkGetInstanceProcAddr(instance, "vkRegisterObjectsNVX"); - pfn_vkUnregisterObjectsNVX = (PFN_vkUnregisterObjectsNVX)vkGetInstanceProcAddr(instance, "vkUnregisterObjectsNVX"); - pfn_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = (PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX"); -#endif /* VK_NVX_device_generated_commands */ -#ifdef VK_NV_clip_space_w_scaling - pfn_vkCmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV)vkGetInstanceProcAddr(instance, "vkCmdSetViewportWScalingNV"); -#endif /* VK_NV_clip_space_w_scaling */ -#ifdef VK_EXT_direct_mode_display - pfn_vkReleaseDisplayEXT = (PFN_vkReleaseDisplayEXT)vkGetInstanceProcAddr(instance, "vkReleaseDisplayEXT"); -#endif /* VK_EXT_direct_mode_display */ -#ifdef VK_EXT_acquire_xlib_display - pfn_vkAcquireXlibDisplayEXT = (PFN_vkAcquireXlibDisplayEXT)vkGetInstanceProcAddr(instance, "vkAcquireXlibDisplayEXT"); - pfn_vkGetRandROutputDisplayEXT = (PFN_vkGetRandROutputDisplayEXT)vkGetInstanceProcAddr(instance, "vkGetRandROutputDisplayEXT"); -#endif /* VK_EXT_acquire_xlib_display */ -#ifdef VK_EXT_display_surface_counter - pfn_vkGetPhysicalDeviceSurfaceCapabilities2EXT = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT"); -#endif /* VK_EXT_display_surface_counter */ -#ifdef VK_EXT_display_control - pfn_vkDisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT)vkGetInstanceProcAddr(instance, "vkDisplayPowerControlEXT"); - pfn_vkRegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT)vkGetInstanceProcAddr(instance, "vkRegisterDeviceEventEXT"); - pfn_vkRegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT)vkGetInstanceProcAddr(instance, "vkRegisterDisplayEventEXT"); - pfn_vkGetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT)vkGetInstanceProcAddr(instance, "vkGetSwapchainCounterEXT"); -#endif /* VK_EXT_display_control */ -#ifdef VK_GOOGLE_display_timing - pfn_vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)vkGetInstanceProcAddr(instance, "vkGetRefreshCycleDurationGOOGLE"); - pfn_vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)vkGetInstanceProcAddr(instance, "vkGetPastPresentationTimingGOOGLE"); -#endif /* VK_GOOGLE_display_timing */ -#ifdef VK_EXT_discard_rectangles - pfn_vkCmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)vkGetInstanceProcAddr(instance, "vkCmdSetDiscardRectangleEXT"); -#endif /* VK_EXT_discard_rectangles */ -#ifdef VK_EXT_hdr_metadata - pfn_vkSetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT)vkGetInstanceProcAddr(instance, "vkSetHdrMetadataEXT"); -#endif /* VK_EXT_hdr_metadata */ -#ifdef VK_MVK_ios_surface - pfn_vkCreateIOSSurfaceMVK = (PFN_vkCreateIOSSurfaceMVK)vkGetInstanceProcAddr(instance, "vkCreateIOSSurfaceMVK"); -#endif /* VK_MVK_ios_surface */ -#ifdef VK_MVK_macos_surface - pfn_vkCreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK)vkGetInstanceProcAddr(instance, "vkCreateMacOSSurfaceMVK"); -#endif /* VK_MVK_macos_surface */ -#ifdef VK_EXT_debug_utils - pfn_vkSetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT)vkGetInstanceProcAddr(instance, "vkSetDebugUtilsObjectNameEXT"); - pfn_vkSetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT)vkGetInstanceProcAddr(instance, "vkSetDebugUtilsObjectTagEXT"); - pfn_vkQueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT)vkGetInstanceProcAddr(instance, "vkQueueBeginDebugUtilsLabelEXT"); - pfn_vkQueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT)vkGetInstanceProcAddr(instance, "vkQueueEndDebugUtilsLabelEXT"); - pfn_vkQueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT)vkGetInstanceProcAddr(instance, "vkQueueInsertDebugUtilsLabelEXT"); - pfn_vkCmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT)vkGetInstanceProcAddr(instance, "vkCmdBeginDebugUtilsLabelEXT"); - pfn_vkCmdEndDebugUtilsLabelEXT = (PFN_vkCmdEndDebugUtilsLabelEXT)vkGetInstanceProcAddr(instance, "vkCmdEndDebugUtilsLabelEXT"); - pfn_vkCmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT)vkGetInstanceProcAddr(instance, "vkCmdInsertDebugUtilsLabelEXT"); - pfn_vkCreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT)vkGetInstanceProcAddr(instance, "vkCreateDebugUtilsMessengerEXT"); - pfn_vkDestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT)vkGetInstanceProcAddr(instance, "vkDestroyDebugUtilsMessengerEXT"); - pfn_vkSubmitDebugUtilsMessageEXT = (PFN_vkSubmitDebugUtilsMessageEXT)vkGetInstanceProcAddr(instance, "vkSubmitDebugUtilsMessageEXT"); -#endif /* VK_EXT_debug_utils */ -#ifdef VK_ANDROID_external_memory_android_hardware_buffer - pfn_vkGetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)vkGetInstanceProcAddr(instance, "vkGetAndroidHardwareBufferPropertiesANDROID"); - pfn_vkGetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)vkGetInstanceProcAddr(instance, "vkGetMemoryAndroidHardwareBufferANDROID"); -#endif /* VK_ANDROID_external_memory_android_hardware_buffer */ -#ifdef VK_EXT_sample_locations - pfn_vkCmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT)vkGetInstanceProcAddr(instance, "vkCmdSetSampleLocationsEXT"); - pfn_vkGetPhysicalDeviceMultisamplePropertiesEXT = (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT"); -#endif /* VK_EXT_sample_locations */ -#ifdef VK_EXT_validation_cache - pfn_vkCreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT)vkGetInstanceProcAddr(instance, "vkCreateValidationCacheEXT"); - pfn_vkDestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT)vkGetInstanceProcAddr(instance, "vkDestroyValidationCacheEXT"); - pfn_vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)vkGetInstanceProcAddr(instance, "vkMergeValidationCachesEXT"); - pfn_vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)vkGetInstanceProcAddr(instance, "vkGetValidationCacheDataEXT"); -#endif /* VK_EXT_validation_cache */ -#ifdef VK_EXT_external_memory_host - pfn_vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)vkGetInstanceProcAddr(instance, "vkGetMemoryHostPointerPropertiesEXT"); -#endif /* VK_EXT_external_memory_host */ -#ifdef VK_AMD_buffer_marker - pfn_vkCmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD)vkGetInstanceProcAddr(instance, "vkCmdWriteBufferMarkerAMD"); -#endif /* VK_AMD_buffer_marker */ -} - -void vkExtInitDevice(VkDevice device) -{ -#ifdef VK_KHR_surface - pfn_vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR)vkGetDeviceProcAddr(device, "vkDestroySurfaceKHR"); - pfn_vkGetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceSurfaceSupportKHR"); - pfn_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); - pfn_vkGetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceSurfaceFormatsKHR"); - pfn_vkGetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceSurfacePresentModesKHR"); -#endif /* VK_KHR_surface */ -#ifdef VK_KHR_swapchain - pfn_vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR)vkGetDeviceProcAddr(device, "vkCreateSwapchainKHR"); - pfn_vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR)vkGetDeviceProcAddr(device, "vkDestroySwapchainKHR"); - pfn_vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR)vkGetDeviceProcAddr(device, "vkGetSwapchainImagesKHR"); - pfn_vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR)vkGetDeviceProcAddr(device, "vkAcquireNextImageKHR"); - pfn_vkQueuePresentKHR = (PFN_vkQueuePresentKHR)vkGetDeviceProcAddr(device, "vkQueuePresentKHR"); - pfn_vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR)vkGetDeviceProcAddr(device, "vkGetDeviceGroupPresentCapabilitiesKHR"); - pfn_vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR)vkGetDeviceProcAddr(device, "vkGetDeviceGroupSurfacePresentModesKHR"); - pfn_vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDevicePresentRectanglesKHR"); - pfn_vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR)vkGetDeviceProcAddr(device, "vkAcquireNextImage2KHR"); -#endif /* VK_KHR_swapchain */ -#ifdef VK_KHR_display - pfn_vkGetPhysicalDeviceDisplayPropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceDisplayPropertiesKHR"); - pfn_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"); - pfn_vkGetDisplayPlaneSupportedDisplaysKHR = (PFN_vkGetDisplayPlaneSupportedDisplaysKHR)vkGetDeviceProcAddr(device, "vkGetDisplayPlaneSupportedDisplaysKHR"); - pfn_vkGetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR)vkGetDeviceProcAddr(device, "vkGetDisplayModePropertiesKHR"); - pfn_vkCreateDisplayModeKHR = (PFN_vkCreateDisplayModeKHR)vkGetDeviceProcAddr(device, "vkCreateDisplayModeKHR"); - pfn_vkGetDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR)vkGetDeviceProcAddr(device, "vkGetDisplayPlaneCapabilitiesKHR"); - pfn_vkCreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR)vkGetDeviceProcAddr(device, "vkCreateDisplayPlaneSurfaceKHR"); -#endif /* VK_KHR_display */ -#ifdef VK_KHR_display_swapchain - pfn_vkCreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR)vkGetDeviceProcAddr(device, "vkCreateSharedSwapchainsKHR"); -#endif /* VK_KHR_display_swapchain */ -#ifdef VK_KHR_xlib_surface - pfn_vkCreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR)vkGetDeviceProcAddr(device, "vkCreateXlibSurfaceKHR"); - pfn_vkGetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceXlibPresentationSupportKHR"); -#endif /* VK_KHR_xlib_surface */ -#ifdef VK_KHR_xcb_surface - pfn_vkCreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR)vkGetDeviceProcAddr(device, "vkCreateXcbSurfaceKHR"); - pfn_vkGetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); -#endif /* VK_KHR_xcb_surface */ -#ifdef VK_KHR_wayland_surface - pfn_vkCreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR)vkGetDeviceProcAddr(device, "vkCreateWaylandSurfaceKHR"); - pfn_vkGetPhysicalDeviceWaylandPresentationSupportKHR = (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceWaylandPresentationSupportKHR"); -#endif /* VK_KHR_wayland_surface */ -#ifdef VK_KHR_mir_surface - pfn_vkCreateMirSurfaceKHR = (PFN_vkCreateMirSurfaceKHR)vkGetDeviceProcAddr(device, "vkCreateMirSurfaceKHR"); - pfn_vkGetPhysicalDeviceMirPresentationSupportKHR = (PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceMirPresentationSupportKHR"); -#endif /* VK_KHR_mir_surface */ -#ifdef VK_KHR_android_surface - pfn_vkCreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR)vkGetDeviceProcAddr(device, "vkCreateAndroidSurfaceKHR"); -#endif /* VK_KHR_android_surface */ -#ifdef VK_KHR_win32_surface - pfn_vkCreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)vkGetDeviceProcAddr(device, "vkCreateWin32SurfaceKHR"); - pfn_vkGetPhysicalDeviceWin32PresentationSupportKHR = (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceWin32PresentationSupportKHR"); -#endif /* VK_KHR_win32_surface */ -#ifdef VK_KHR_get_physical_device_properties2 - pfn_vkGetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceFeatures2KHR"); - pfn_vkGetPhysicalDeviceProperties2KHR = (PFN_vkGetPhysicalDeviceProperties2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceProperties2KHR"); - pfn_vkGetPhysicalDeviceFormatProperties2KHR = (PFN_vkGetPhysicalDeviceFormatProperties2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceFormatProperties2KHR"); - pfn_vkGetPhysicalDeviceImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceImageFormatProperties2KHR"); - pfn_vkGetPhysicalDeviceQueueFamilyProperties2KHR = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"); - pfn_vkGetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceMemoryProperties2KHR"); - pfn_vkGetPhysicalDeviceSparseImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"); -#endif /* VK_KHR_get_physical_device_properties2 */ -#ifdef VK_KHR_device_group - pfn_vkGetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)vkGetDeviceProcAddr(device, "vkGetDeviceGroupPeerMemoryFeaturesKHR"); - pfn_vkCmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR)vkGetDeviceProcAddr(device, "vkCmdSetDeviceMaskKHR"); - pfn_vkCmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR)vkGetDeviceProcAddr(device, "vkCmdDispatchBaseKHR"); -#endif /* VK_KHR_device_group */ -#ifdef VK_KHR_maintenance1 - pfn_vkTrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR)vkGetDeviceProcAddr(device, "vkTrimCommandPoolKHR"); -#endif /* VK_KHR_maintenance1 */ -#ifdef VK_KHR_device_group_creation - pfn_vkEnumeratePhysicalDeviceGroupsKHR = (PFN_vkEnumeratePhysicalDeviceGroupsKHR)vkGetDeviceProcAddr(device, "vkEnumeratePhysicalDeviceGroupsKHR"); -#endif /* VK_KHR_device_group_creation */ -#ifdef VK_KHR_external_memory_capabilities - pfn_vkGetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"); -#endif /* VK_KHR_external_memory_capabilities */ -#ifdef VK_KHR_external_memory_win32 - pfn_vkGetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR)vkGetDeviceProcAddr(device, "vkGetMemoryWin32HandleKHR"); - pfn_vkGetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR)vkGetDeviceProcAddr(device, "vkGetMemoryWin32HandlePropertiesKHR"); -#endif /* VK_KHR_external_memory_win32 */ -#ifdef VK_KHR_external_memory_fd - pfn_vkGetMemoryFdKHR = (PFN_vkGetMemoryFdKHR)vkGetDeviceProcAddr(device, "vkGetMemoryFdKHR"); - pfn_vkGetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR)vkGetDeviceProcAddr(device, "vkGetMemoryFdPropertiesKHR"); -#endif /* VK_KHR_external_memory_fd */ -#ifdef VK_KHR_external_semaphore_capabilities - pfn_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); -#endif /* VK_KHR_external_semaphore_capabilities */ -#ifdef VK_KHR_external_semaphore_win32 - pfn_vkImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR)vkGetDeviceProcAddr(device, "vkImportSemaphoreWin32HandleKHR"); - pfn_vkGetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR)vkGetDeviceProcAddr(device, "vkGetSemaphoreWin32HandleKHR"); -#endif /* VK_KHR_external_semaphore_win32 */ -#ifdef VK_KHR_external_semaphore_fd - pfn_vkImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR)vkGetDeviceProcAddr(device, "vkImportSemaphoreFdKHR"); - pfn_vkGetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR)vkGetDeviceProcAddr(device, "vkGetSemaphoreFdKHR"); -#endif /* VK_KHR_external_semaphore_fd */ -#ifdef VK_KHR_push_descriptor - pfn_vkCmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR)vkGetDeviceProcAddr(device, "vkCmdPushDescriptorSetKHR"); - pfn_vkCmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR)vkGetDeviceProcAddr(device, "vkCmdPushDescriptorSetWithTemplateKHR"); -#endif /* VK_KHR_push_descriptor */ -#ifdef VK_KHR_descriptor_update_template - pfn_vkCreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR)vkGetDeviceProcAddr(device, "vkCreateDescriptorUpdateTemplateKHR"); - pfn_vkDestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR)vkGetDeviceProcAddr(device, "vkDestroyDescriptorUpdateTemplateKHR"); - pfn_vkUpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR)vkGetDeviceProcAddr(device, "vkUpdateDescriptorSetWithTemplateKHR"); -#endif /* VK_KHR_descriptor_update_template */ -#ifdef VK_KHR_shared_presentable_image - pfn_vkGetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR)vkGetDeviceProcAddr(device, "vkGetSwapchainStatusKHR"); -#endif /* VK_KHR_shared_presentable_image */ -#ifdef VK_KHR_external_fence_capabilities - pfn_vkGetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceExternalFencePropertiesKHR"); -#endif /* VK_KHR_external_fence_capabilities */ -#ifdef VK_KHR_external_fence_win32 - pfn_vkImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR)vkGetDeviceProcAddr(device, "vkImportFenceWin32HandleKHR"); - pfn_vkGetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR)vkGetDeviceProcAddr(device, "vkGetFenceWin32HandleKHR"); -#endif /* VK_KHR_external_fence_win32 */ -#ifdef VK_KHR_external_fence_fd - pfn_vkImportFenceFdKHR = (PFN_vkImportFenceFdKHR)vkGetDeviceProcAddr(device, "vkImportFenceFdKHR"); - pfn_vkGetFenceFdKHR = (PFN_vkGetFenceFdKHR)vkGetDeviceProcAddr(device, "vkGetFenceFdKHR"); -#endif /* VK_KHR_external_fence_fd */ -#ifdef VK_KHR_get_surface_capabilities2 - pfn_vkGetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"); - pfn_vkGetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceSurfaceFormats2KHR"); -#endif /* VK_KHR_get_surface_capabilities2 */ -#ifdef VK_KHR_get_memory_requirements2 - pfn_vkGetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR)vkGetDeviceProcAddr(device, "vkGetImageMemoryRequirements2KHR"); - pfn_vkGetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)vkGetDeviceProcAddr(device, "vkGetBufferMemoryRequirements2KHR"); - pfn_vkGetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR)vkGetDeviceProcAddr(device, "vkGetImageSparseMemoryRequirements2KHR"); -#endif /* VK_KHR_get_memory_requirements2 */ -#ifdef VK_KHR_sampler_ycbcr_conversion - pfn_vkCreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR)vkGetDeviceProcAddr(device, "vkCreateSamplerYcbcrConversionKHR"); - pfn_vkDestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR)vkGetDeviceProcAddr(device, "vkDestroySamplerYcbcrConversionKHR"); -#endif /* VK_KHR_sampler_ycbcr_conversion */ -#ifdef VK_KHR_bind_memory2 - pfn_vkBindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR)vkGetDeviceProcAddr(device, "vkBindBufferMemory2KHR"); - pfn_vkBindImageMemory2KHR = (PFN_vkBindImageMemory2KHR)vkGetDeviceProcAddr(device, "vkBindImageMemory2KHR"); -#endif /* VK_KHR_bind_memory2 */ -#ifdef VK_KHR_maintenance3 - pfn_vkGetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR)vkGetDeviceProcAddr(device, "vkGetDescriptorSetLayoutSupportKHR"); -#endif /* VK_KHR_maintenance3 */ -#ifdef VK_ANDROID_native_buffer - pfn_vkGetSwapchainGrallocUsageANDROID = (PFN_vkGetSwapchainGrallocUsageANDROID)vkGetDeviceProcAddr(device, "vkGetSwapchainGrallocUsageANDROID"); - pfn_vkAcquireImageANDROID = (PFN_vkAcquireImageANDROID)vkGetDeviceProcAddr(device, "vkAcquireImageANDROID"); - pfn_vkQueueSignalReleaseImageANDROID = (PFN_vkQueueSignalReleaseImageANDROID)vkGetDeviceProcAddr(device, "vkQueueSignalReleaseImageANDROID"); -#endif /* VK_ANDROID_native_buffer */ -#ifdef VK_EXT_debug_report - pfn_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetDeviceProcAddr(device, "vkCreateDebugReportCallbackEXT"); - pfn_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetDeviceProcAddr(device, "vkDestroyDebugReportCallbackEXT"); - pfn_vkDebugReportMessageEXT = (PFN_vkDebugReportMessageEXT)vkGetDeviceProcAddr(device, "vkDebugReportMessageEXT"); -#endif /* VK_EXT_debug_report */ -#ifdef VK_EXT_debug_marker - pfn_vkDebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)vkGetDeviceProcAddr(device, "vkDebugMarkerSetObjectTagEXT"); - pfn_vkDebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)vkGetDeviceProcAddr(device, "vkDebugMarkerSetObjectNameEXT"); - pfn_vkCmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerBeginEXT"); - pfn_vkCmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerEndEXT"); - pfn_vkCmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT)vkGetDeviceProcAddr(device, "vkCmdDebugMarkerInsertEXT"); -#endif /* VK_EXT_debug_marker */ -#ifdef VK_AMD_draw_indirect_count - pfn_vkCmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD)vkGetDeviceProcAddr(device, "vkCmdDrawIndirectCountAMD"); - pfn_vkCmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD)vkGetDeviceProcAddr(device, "vkCmdDrawIndexedIndirectCountAMD"); -#endif /* VK_AMD_draw_indirect_count */ -#ifdef VK_AMD_shader_info - pfn_vkGetShaderInfoAMD = (PFN_vkGetShaderInfoAMD)vkGetDeviceProcAddr(device, "vkGetShaderInfoAMD"); -#endif /* VK_AMD_shader_info */ -#ifdef VK_NV_external_memory_capabilities - pfn_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = (PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV"); -#endif /* VK_NV_external_memory_capabilities */ -#ifdef VK_NV_external_memory_win32 - pfn_vkGetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV)vkGetDeviceProcAddr(device, "vkGetMemoryWin32HandleNV"); -#endif /* VK_NV_external_memory_win32 */ -#ifdef VK_NN_vi_surface - pfn_vkCreateViSurfaceNN = (PFN_vkCreateViSurfaceNN)vkGetDeviceProcAddr(device, "vkCreateViSurfaceNN"); -#endif /* VK_NN_vi_surface */ -#ifdef VK_NVX_device_generated_commands - pfn_vkCmdProcessCommandsNVX = (PFN_vkCmdProcessCommandsNVX)vkGetDeviceProcAddr(device, "vkCmdProcessCommandsNVX"); - pfn_vkCmdReserveSpaceForCommandsNVX = (PFN_vkCmdReserveSpaceForCommandsNVX)vkGetDeviceProcAddr(device, "vkCmdReserveSpaceForCommandsNVX"); - pfn_vkCreateIndirectCommandsLayoutNVX = (PFN_vkCreateIndirectCommandsLayoutNVX)vkGetDeviceProcAddr(device, "vkCreateIndirectCommandsLayoutNVX"); - pfn_vkDestroyIndirectCommandsLayoutNVX = (PFN_vkDestroyIndirectCommandsLayoutNVX)vkGetDeviceProcAddr(device, "vkDestroyIndirectCommandsLayoutNVX"); - pfn_vkCreateObjectTableNVX = (PFN_vkCreateObjectTableNVX)vkGetDeviceProcAddr(device, "vkCreateObjectTableNVX"); - pfn_vkDestroyObjectTableNVX = (PFN_vkDestroyObjectTableNVX)vkGetDeviceProcAddr(device, "vkDestroyObjectTableNVX"); - pfn_vkRegisterObjectsNVX = (PFN_vkRegisterObjectsNVX)vkGetDeviceProcAddr(device, "vkRegisterObjectsNVX"); - pfn_vkUnregisterObjectsNVX = (PFN_vkUnregisterObjectsNVX)vkGetDeviceProcAddr(device, "vkUnregisterObjectsNVX"); - pfn_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = (PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX"); -#endif /* VK_NVX_device_generated_commands */ -#ifdef VK_NV_clip_space_w_scaling - pfn_vkCmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV)vkGetDeviceProcAddr(device, "vkCmdSetViewportWScalingNV"); -#endif /* VK_NV_clip_space_w_scaling */ -#ifdef VK_EXT_direct_mode_display - pfn_vkReleaseDisplayEXT = (PFN_vkReleaseDisplayEXT)vkGetDeviceProcAddr(device, "vkReleaseDisplayEXT"); -#endif /* VK_EXT_direct_mode_display */ -#ifdef VK_EXT_acquire_xlib_display - pfn_vkAcquireXlibDisplayEXT = (PFN_vkAcquireXlibDisplayEXT)vkGetDeviceProcAddr(device, "vkAcquireXlibDisplayEXT"); - pfn_vkGetRandROutputDisplayEXT = (PFN_vkGetRandROutputDisplayEXT)vkGetDeviceProcAddr(device, "vkGetRandROutputDisplayEXT"); -#endif /* VK_EXT_acquire_xlib_display */ -#ifdef VK_EXT_display_surface_counter - pfn_vkGetPhysicalDeviceSurfaceCapabilities2EXT = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceSurfaceCapabilities2EXT"); -#endif /* VK_EXT_display_surface_counter */ -#ifdef VK_EXT_display_control - pfn_vkDisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT)vkGetDeviceProcAddr(device, "vkDisplayPowerControlEXT"); - pfn_vkRegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT)vkGetDeviceProcAddr(device, "vkRegisterDeviceEventEXT"); - pfn_vkRegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT)vkGetDeviceProcAddr(device, "vkRegisterDisplayEventEXT"); - pfn_vkGetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT)vkGetDeviceProcAddr(device, "vkGetSwapchainCounterEXT"); -#endif /* VK_EXT_display_control */ -#ifdef VK_GOOGLE_display_timing - pfn_vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)vkGetDeviceProcAddr(device, "vkGetRefreshCycleDurationGOOGLE"); - pfn_vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)vkGetDeviceProcAddr(device, "vkGetPastPresentationTimingGOOGLE"); -#endif /* VK_GOOGLE_display_timing */ -#ifdef VK_EXT_discard_rectangles - pfn_vkCmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)vkGetDeviceProcAddr(device, "vkCmdSetDiscardRectangleEXT"); -#endif /* VK_EXT_discard_rectangles */ -#ifdef VK_EXT_hdr_metadata - pfn_vkSetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT)vkGetDeviceProcAddr(device, "vkSetHdrMetadataEXT"); -#endif /* VK_EXT_hdr_metadata */ -#ifdef VK_MVK_ios_surface - pfn_vkCreateIOSSurfaceMVK = (PFN_vkCreateIOSSurfaceMVK)vkGetDeviceProcAddr(device, "vkCreateIOSSurfaceMVK"); -#endif /* VK_MVK_ios_surface */ -#ifdef VK_MVK_macos_surface - pfn_vkCreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK)vkGetDeviceProcAddr(device, "vkCreateMacOSSurfaceMVK"); -#endif /* VK_MVK_macos_surface */ -#ifdef VK_EXT_debug_utils - pfn_vkSetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT)vkGetDeviceProcAddr(device, "vkSetDebugUtilsObjectNameEXT"); - pfn_vkSetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT)vkGetDeviceProcAddr(device, "vkSetDebugUtilsObjectTagEXT"); - pfn_vkQueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT)vkGetDeviceProcAddr(device, "vkQueueBeginDebugUtilsLabelEXT"); - pfn_vkQueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT)vkGetDeviceProcAddr(device, "vkQueueEndDebugUtilsLabelEXT"); - pfn_vkQueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT)vkGetDeviceProcAddr(device, "vkQueueInsertDebugUtilsLabelEXT"); - pfn_vkCmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT)vkGetDeviceProcAddr(device, "vkCmdBeginDebugUtilsLabelEXT"); - pfn_vkCmdEndDebugUtilsLabelEXT = (PFN_vkCmdEndDebugUtilsLabelEXT)vkGetDeviceProcAddr(device, "vkCmdEndDebugUtilsLabelEXT"); - pfn_vkCmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT)vkGetDeviceProcAddr(device, "vkCmdInsertDebugUtilsLabelEXT"); - pfn_vkCreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT)vkGetDeviceProcAddr(device, "vkCreateDebugUtilsMessengerEXT"); - pfn_vkDestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT)vkGetDeviceProcAddr(device, "vkDestroyDebugUtilsMessengerEXT"); - pfn_vkSubmitDebugUtilsMessageEXT = (PFN_vkSubmitDebugUtilsMessageEXT)vkGetDeviceProcAddr(device, "vkSubmitDebugUtilsMessageEXT"); -#endif /* VK_EXT_debug_utils */ -#ifdef VK_ANDROID_external_memory_android_hardware_buffer - pfn_vkGetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)vkGetDeviceProcAddr(device, "vkGetAndroidHardwareBufferPropertiesANDROID"); - pfn_vkGetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)vkGetDeviceProcAddr(device, "vkGetMemoryAndroidHardwareBufferANDROID"); -#endif /* VK_ANDROID_external_memory_android_hardware_buffer */ -#ifdef VK_EXT_sample_locations - pfn_vkCmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT)vkGetDeviceProcAddr(device, "vkCmdSetSampleLocationsEXT"); - pfn_vkGetPhysicalDeviceMultisamplePropertiesEXT = (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)vkGetDeviceProcAddr(device, "vkGetPhysicalDeviceMultisamplePropertiesEXT"); -#endif /* VK_EXT_sample_locations */ -#ifdef VK_EXT_validation_cache - pfn_vkCreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT)vkGetDeviceProcAddr(device, "vkCreateValidationCacheEXT"); - pfn_vkDestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT)vkGetDeviceProcAddr(device, "vkDestroyValidationCacheEXT"); - pfn_vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)vkGetDeviceProcAddr(device, "vkMergeValidationCachesEXT"); - pfn_vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)vkGetDeviceProcAddr(device, "vkGetValidationCacheDataEXT"); -#endif /* VK_EXT_validation_cache */ -#ifdef VK_EXT_external_memory_host - pfn_vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)vkGetDeviceProcAddr(device, "vkGetMemoryHostPointerPropertiesEXT"); -#endif /* VK_EXT_external_memory_host */ -#ifdef VK_AMD_buffer_marker - pfn_vkCmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD)vkGetDeviceProcAddr(device, "vkCmdWriteBufferMarkerAMD"); -#endif /* VK_AMD_buffer_marker */ -} - diff --git a/src/ext_loader/vulkan_ext.h b/src/ext_loader/vulkan_ext.h deleted file mode 100644 index b038cde5..00000000 --- a/src/ext_loader/vulkan_ext.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef VULKAN_EXT_H -#define VULKAN_EXT_H - -#ifdef __cplusplus -extern "C" { -#endif -/* -** Copyright (c) 2015-2018 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. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -/* -** This is a simple extension loader which provides the implementations for the -** extension prototypes declared in vulkan header. It supports loading extensions either -** for a single instance or a single device. Multiple instances are not yet supported. -** -** To use the loader add vulkan_ext.c to your solution and include . -** -** If your application is using a single instance, but multiple devices callParam -** -** vkExtInitInstance(instance); -** -** after initializing the instance. This way the extension loader will use the loaders -** trampoline functions to call the correct driver for each call. This method is safe -** if your application might use more than one device at the cost of one additional -** indirection, the dispatch table of each dispatchable object. -** -** If your application uses only a single device it's better to use -** -** vkExtInitDevice(device); -** -** once the device has been initialized. This will resolve the function pointers -** upfront and thus removes one indirection for each call into the driver. This *can* -** result in slightly more performance for calling overhead limited cases. -*/ - -#include - -void vkExtInitInstance(VkInstance instance); -void vkExtInitDevice(VkDevice device); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/xml/Makefile b/xml/Makefile index 122a7dc9..196fda94 100644 --- a/xml/Makefile +++ b/xml/Makefile @@ -53,10 +53,8 @@ PLATFORM_HEADERS = \ $(VULKAN)/vulkan_xlib.h \ $(VULKAN)/vulkan_xlib_xrandr.h HEADERS = $(VULKAN)/vulkan_core.h $(PLATFORM_HEADERS) -EXTLOADER = $(SRC)/ext_loader -EXTSRCS = $(EXTLOADER)/vulkan_ext.c -default install: $(HEADERS) $(EXTSRCS) +default install: $(HEADERS) ################################################ @@ -89,10 +87,12 @@ test: $(HEADERS) $(VULKAN)/vulkan.h $(VULKAN)/vk_platform.h ################################################ # Autogenerate extension loader from XML API description -# This also generates $(EXTLOADER)/vulkan_ext.h +# Also generates $(EXTLOADER)/vulkan_ext.h +# No longer supported. -#$(EXTLOADER)/vulkan_ext.c: $(VKH_DEPENDS) -$(EXTSRCS): $(VKH_DEPENDS) +EXTLOADER = $(SRC)/ext_loader +EXTSRCS = $(EXTLOADER)/vulkan_ext.c +extloader $(EXTSRCS): $(VKH_DEPENDS) $(PYTHON) genvk.py -registry vk.xml -o $(EXTLOADER) vulkan_ext.c ################################################ @@ -107,4 +107,4 @@ clean_dirt: # Clean generated targets as well as intermediates. clean clobber: clean_dirt - -rm -f $(HEADERS) $(PLATFORM_HEADERS) $(EXTSRCS) + -rm -f $(HEADERS) $(PLATFORM_HEADERS) diff --git a/xml/README.adoc b/xml/README.adoc index a8dec300..9c57166f 100644 --- a/xml/README.adoc +++ b/xml/README.adoc @@ -24,10 +24,8 @@ version of the API. * Create a git branch to work in locally * Edit `vk.xml` * `make ; make test` - ** This generates headers and source in `../include/vulkan` including - `vulkan_core.h`; a set of platform-dependent headers - `vulkan_.h`; and extension loader code in - `../src/ext_loader/vulkan_ext.[ch]` + ** This generates headers in `../include/vulkan` including `vulkan_core.h` + and a set of platform-dependent headers `vulkan_.h`. * `(cd .. && make generated)` ** This generates asciidoc includes for the spec. There are many ways to invoke the Makefile in the spec directory; this simple recipe only @@ -61,6 +59,9 @@ processing XML. * generator.py - output generator base class. ** cgenerator.py - C header output generator. ** docgenerator.py - Asciidoc interface language include generator. + ** extensionmetadocgenerator.py - Generator for Asciidoc extension + descriptions in spec appendices. + ** extensionStubSource.py - Simple loader C source generator. Unsupported. ** hostsyncgenerator.py - Asciidoc host sync table generator. ** pygenerator.py - Generates python encoding of the API description. ** validitygenerator.py - Asciidoc validity language generator. @@ -68,7 +69,6 @@ processing XML. header. * ../include/vulkan/vulkan_.h - Generated Vulkan platform API headers. - * ../src/ext_loader/vulkan_ext.[ch] - Extension loader code * indexExt.py - generate HTML index of all extensions for inclusion into the Vulkan registry index page. * extDependency.py - generate extension dependencies in Bash and Python @@ -87,6 +87,8 @@ processing XML. * `clean_dirt` - remove intermediate files. * `clean` - remove generated files. Usually done when preparing to merge to `master` branch via ```make clean ; make install```. + * `extloader` - generate simple extension loader source code in + `../src/vulkan_ext/`. Unsupported. If you have trouble running the Makefile on your platform, the following steps will build `vulkan_core.h` and test that it compiles: @@ -135,14 +137,18 @@ Windows is: [[history]] == Revision History + * 2018/05/21 - + Don't generate vulkan_ext.[ch] from the `install` target. Add a new + shortcut `extloader` target for people still using this code and needing + to regenerate it. * 2018/03/13 - Update for new directory structure. * 2018/03/06 - Update for Vulkan 1.1 release and `master` branch. * 2015/09/18 - - Split platform-specific headers into their own vulkan_.h files, - move vulkan.h to vulkan_core.h, and add a new (static) vulkan.h which - includes appropriate combinations of the other headers. + Split platform-specific headers into their own vulkan_.h + files, move vulkan.h to vulkan_core.h, and add a new (static) vulkan.h + which includes appropriate combinations of the other headers. * 2015/06/01 - The header that is generated has been improved relative to the first version. Function arguments are indented like the hand-generated header, @@ -154,8 +160,8 @@ Windows is: * 2015/06/02 - Per WG signoff, converted hex constant values to decimal (for non-bitmasks) and VK_BIT macros to 'bitpos' attributes in the XML and - hex constants in the header. Updated schema to match. Changed tag - to . + hex constants in the header. Updated schema to match. Changed + tag to . * 2015/06/03 - Moved into new 'vulkan' tree (did not bother preserving history in previous repo). Added semantic knowledge about structs and unions to diff --git a/xml/extensionStubSource.py b/xml/extensionStubSource.py index 2837f731..92eee0c4 100644 --- a/xml/extensionStubSource.py +++ b/xml/extensionStubSource.py @@ -19,6 +19,9 @@ from generator import * doc = """ /* +** This target is no longer maintained and supported. +** See README.adoc for discussion. +** ** This is a simple extension loader which provides the implementations for the ** extension prototypes declared in vulkan header. It supports loading extensions either ** for a single instance or a single device. Multiple instances are not yet supported. diff --git a/xml/genvk.py b/xml/genvk.py index 184ff0b4..6d7760b5 100755 --- a/xml/genvk.py +++ b/xml/genvk.py @@ -198,6 +198,8 @@ def makeGenOpts(args): ] # Extension stub source dispatcher + # This target is no longer maintained and supported. + # See README.adoc for discussion. genOpts['vulkan_ext.c'] = [ ExtensionStubSourceOutputGenerator, CGeneratorOptions( diff --git a/xml/vk.xml b/xml/vk.xml index 2d6f91c2..7018bbe8 100644 --- a/xml/vk.xml +++ b/xml/vk.xml @@ -153,7 +153,7 @@ server. // Vulkan 1.1 version number #define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 75 +#define VK_HEADER_VERSION 76 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -2544,6 +2544,32 @@ server. void* pNext VkSurfaceFormatKHR surfaceFormat + + VkStructureType sType + void* pNext + VkDisplayPropertiesKHR displayProperties + + + VkStructureType sType + void* pNext + VkDisplayPlanePropertiesKHR displayPlaneProperties + + + VkStructureType sType + void* pNext + VkDisplayModePropertiesKHR displayModeProperties + + + VkStructureType sType + const void* pNext + VkDisplayModeKHR mode + uint32_t planeIndex + + + VkStructureType sType + void* pNext + VkDisplayPlaneCapabilitiesKHR capabilities + VkStructureType sType void* pNext @@ -5837,6 +5863,31 @@ server. uint32_t* pSurfaceFormatCount VkSurfaceFormat2KHR* pSurfaceFormats + + VkResult vkGetPhysicalDeviceDisplayProperties2KHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayProperties2KHR* pProperties + + + VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayPlaneProperties2KHR* pProperties + + + VkResult vkGetDisplayModeProperties2KHR + VkPhysicalDevice physicalDevice + VkDisplayKHR display + uint32_t* pPropertyCount + VkDisplayModeProperties2KHR* pProperties + + + VkResult vkGetDisplayPlaneCapabilities2KHR + VkPhysicalDevice physicalDevice + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo + VkDisplayPlaneCapabilities2KHR* pCapabilities + void vkGetBufferMemoryRequirements2 VkDevice device @@ -6031,6 +6082,26 @@ server. const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo struct AHardwareBuffer** pBuffer + + void vkCmdDrawIndirectCountKHR + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkBuffer countBuffer + VkDeviceSize countBufferOffset + uint32_t maxDrawCount + uint32_t stride + + + void vkCmdDrawIndexedIndirectCountKHR + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkBuffer countBuffer + VkDeviceSize countBufferOffset + uint32_t maxDrawCount + uint32_t stride + @@ -7913,10 +7984,24 @@ server. - + - - + + + + + + + + + + + + + + + + @@ -8463,10 +8548,12 @@ server. - + - - + + + +