diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 62b5533..5f853f9 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -77,4 +77,10 @@ #include "vulkan_xlib_xrandr.h" #endif + +#ifdef VK_USE_PLATFORM_GGP +#include +#include "vulkan_ggp.h" +#endif + #endif // VULKAN_H_ diff --git a/include/vulkan/vulkan_android.h b/include/vulkan/vulkan_android.h index e70376c..1861802 100644 --- a/include/vulkan/vulkan_android.h +++ b/include/vulkan/vulkan_android.h @@ -27,14 +27,12 @@ extern "C" { */ + #define VK_KHR_android_surface 1 struct ANativeWindow; - #define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 #define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface" - typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; - typedef struct VkAndroidSurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; @@ -42,7 +40,6 @@ typedef struct VkAndroidSurfaceCreateInfoKHR { struct ANativeWindow* window; } VkAndroidSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES @@ -53,12 +50,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( VkSurfaceKHR* pSurface); #endif + #define VK_ANDROID_external_memory_android_hardware_buffer 1 struct AHardwareBuffer; - #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3 #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer" - typedef struct VkAndroidHardwareBufferUsageANDROID { VkStructureType sType; void* pNext; @@ -103,7 +99,6 @@ typedef struct VkExternalFormatANDROID { uint64_t externalFormat; } VkExternalFormatANDROID; - typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); diff --git a/include/vulkan/vulkan_core.h b/include/vulkan/vulkan_core.h index ec2a7b5..4de210e 100644 --- a/include/vulkan/vulkan_core.h +++ b/include/vulkan/vulkan_core.h @@ -27,9 +27,9 @@ extern "C" { */ + #define VK_VERSION_1_0 1 #include "vk_platform.h" - #define VK_MAKE_VERSION(major, minor, patch) \ (((major) << 22) | ((minor) << 12) | (patch)) @@ -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 103 +#define VK_HEADER_VERSION 105 #define VK_NULL_HANDLE 0 @@ -60,12 +60,10 @@ extern "C" { #endif #endif - typedef uint32_t VkFlags; typedef uint32_t VkBool32; typedef uint64_t VkDeviceSize; typedef uint32_t VkSampleMask; - VK_DEFINE_HANDLE(VkInstance) VK_DEFINE_HANDLE(VkPhysicalDevice) VK_DEFINE_HANDLE(VkDevice) @@ -91,7 +89,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) - #define VK_LOD_CLAMP_NONE 1000.0f #define VK_REMAINING_MIP_LEVELS (~0U) #define VK_REMAINING_ARRAY_LAYERS (~0U) @@ -108,7 +105,6 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) #define VK_MAX_EXTENSION_NAME_SIZE 256 #define VK_MAX_DESCRIPTION_SIZE 256 - typedef enum VkPipelineCacheHeaderVersion { VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, VK_PIPELINE_CACHE_HEADER_VERSION_BEGIN_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE, @@ -149,6 +145,7 @@ typedef enum VkResult { VK_ERROR_FRAGMENTATION_EXT = -1000161000, VK_ERROR_NOT_PERMITTED_EXT = -1000174001, VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = -1000244000, + VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = -1000255000, VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY, VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE, VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL, @@ -301,6 +298,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002, VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000, VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000, + VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, @@ -448,6 +446,8 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002, + VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000, + VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000192000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = 1000196000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = 1000197000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000, @@ -463,6 +463,8 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000, + VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD = 1000213000, + VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD = 1000213001, VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000, VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000, @@ -472,6 +474,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000, VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001, + VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV = 1000240000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = 1000244000, VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT = 1000244001, @@ -482,6 +485,10 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT = 1000252000, + VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT = 1000255000, + VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002, + VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = 1000261000, VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, @@ -1326,7 +1333,6 @@ typedef enum VkVendorId { VK_VENDOR_ID_RANGE_SIZE = (VK_VENDOR_ID_KAZAN - VK_VENDOR_ID_VIV + 1), VK_VENDOR_ID_MAX_ENUM = 0x7FFFFFFF } VkVendorId; - typedef VkFlags VkInstanceCreateFlags; typedef enum VkFormatFeatureFlagBits { @@ -1779,7 +1785,6 @@ typedef enum VkStencilFaceFlagBits { VK_STENCIL_FACE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkStencilFaceFlagBits; typedef VkFlags VkStencilFaceFlags; - typedef struct VkApplicationInfo { VkStructureType sType; const void* pNext; @@ -2895,7 +2900,6 @@ typedef struct VkBaseInStructure { const struct VkBaseInStructure* pNext; } VkBaseInStructure; - typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance); typedef void (VKAPI_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); @@ -3833,19 +3837,17 @@ VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands( const VkCommandBuffer* pCommandBuffers); #endif + #define VK_VERSION_1_1 1 // 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 - VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) - #define VK_MAX_DEVICE_GROUP_SIZE 32 #define VK_LUID_SIZE 8 #define VK_QUEUE_FAMILY_EXTERNAL (~0U-1) - typedef enum VkPointClippingBehavior { VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0, VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1, @@ -3917,7 +3919,6 @@ typedef enum VkDescriptorUpdateTemplateType { VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkDescriptorUpdateTemplateType; - typedef enum VkSubgroupFeatureFlagBits { VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001, VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002, @@ -4047,7 +4048,6 @@ typedef enum VkExternalSemaphoreFeatureFlagBits { VK_EXTERNAL_SEMAPHORE_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkExternalSemaphoreFeatureFlagBits; typedef VkFlags VkExternalSemaphoreFeatureFlags; - typedef struct VkPhysicalDeviceSubgroupProperties { VkStructureType sType; void* pNext; @@ -4534,7 +4534,6 @@ typedef struct VkPhysicalDeviceShaderDrawParameterFeatures { VkBool32 shaderDrawParameters; } VkPhysicalDeviceShaderDrawParameterFeatures; - typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t* pApiVersion); typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); @@ -4711,13 +4710,12 @@ VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport( VkDescriptorSetLayoutSupport* pSupport); #endif + #define VK_KHR_surface 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) - #define VK_KHR_SURFACE_SPEC_VERSION 25 #define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" - typedef enum VkColorSpaceKHR { VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0, VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, @@ -4734,6 +4732,7 @@ typedef enum VkColorSpaceKHR { VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014, + VK_COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000, VK_COLORSPACE_SRGB_NONLINEAR_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, @@ -4754,7 +4753,6 @@ typedef enum VkPresentModeKHR { VK_PRESENT_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkPresentModeKHR; - typedef enum VkSurfaceTransformFlagBitsKHR { VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, @@ -4777,7 +4775,6 @@ typedef enum VkCompositeAlphaFlagBitsKHR { VK_COMPOSITE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkCompositeAlphaFlagBitsKHR; typedef VkFlags VkCompositeAlphaFlagsKHR; - typedef struct VkSurfaceCapabilitiesKHR { uint32_t minImageCount; uint32_t maxImageCount; @@ -4796,7 +4793,6 @@ typedef struct VkSurfaceFormatKHR { VkColorSpaceKHR colorSpace; } VkSurfaceFormatKHR; - typedef void (VKAPI_PTR *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); @@ -4833,13 +4829,12 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR( VkPresentModeKHR* pPresentModes); #endif + #define VK_KHR_swapchain 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) - #define VK_KHR_SWAPCHAIN_SPEC_VERSION 70 #define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" - typedef enum VkSwapchainCreateFlagBitsKHR { VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001, VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002, @@ -4856,7 +4851,6 @@ typedef enum VkDeviceGroupPresentModeFlagBitsKHR { VK_DEVICE_GROUP_PRESENT_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkDeviceGroupPresentModeFlagBitsKHR; typedef VkFlags VkDeviceGroupPresentModeFlagsKHR; - typedef struct VkSwapchainCreateInfoKHR { VkStructureType sType; const void* pNext; @@ -4933,7 +4927,6 @@ typedef struct VkDeviceGroupSwapchainCreateInfoKHR { VkDeviceGroupPresentModeFlagsKHR modes; } VkDeviceGroupSwapchainCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); typedef void (VKAPI_PTR *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages); @@ -4995,14 +4988,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHR( uint32_t* pImageIndex); #endif + #define VK_KHR_display 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) - #define VK_KHR_DISPLAY_SPEC_VERSION 21 #define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display" - typedef enum VkDisplayPlaneAlphaFlagBitsKHR { VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, @@ -5013,7 +5005,6 @@ typedef enum VkDisplayPlaneAlphaFlagBitsKHR { typedef VkFlags VkDisplayPlaneAlphaFlagsKHR; typedef VkFlags VkDisplayModeCreateFlagsKHR; typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; - typedef struct VkDisplayPropertiesKHR { VkDisplayKHR display; const char* displayName; @@ -5071,7 +5062,6 @@ typedef struct VkDisplaySurfaceCreateInfoKHR { VkExtent2D imageExtent; } VkDisplaySurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays); @@ -5123,10 +5113,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR( VkSurfaceKHR* pSurface); #endif + #define VK_KHR_display_swapchain 1 #define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9 #define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain" - typedef struct VkDisplayPresentInfoKHR { VkStructureType sType; const void* pNext; @@ -5135,7 +5125,6 @@ typedef struct VkDisplayPresentInfoKHR { VkBool32 persistent; } VkDisplayPresentInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateSharedSwapchainsKHR)(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); #ifndef VK_NO_PROTOTYPES @@ -5147,6 +5136,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR( VkSwapchainKHR* pSwapchains); #endif + #define VK_KHR_sampler_mirror_clamp_to_edge 1 #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge" @@ -5155,7 +5145,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR( #define VK_KHR_multiview 1 #define VK_KHR_MULTIVIEW_SPEC_VERSION 1 #define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview" - typedef VkRenderPassMultiviewCreateInfo VkRenderPassMultiviewCreateInfoKHR; typedef VkPhysicalDeviceMultiviewFeatures VkPhysicalDeviceMultiviewFeaturesKHR; @@ -5167,7 +5156,6 @@ typedef VkPhysicalDeviceMultiviewProperties VkPhysicalDeviceMultiviewPropertiesK #define VK_KHR_get_physical_device_properties2 1 #define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 #define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" - typedef VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2KHR; typedef VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2KHR; @@ -5186,7 +5174,6 @@ typedef VkSparseImageFormatProperties2 VkSparseImageFormatProperties2KHR; typedef VkPhysicalDeviceSparseImageFormatInfo2 VkPhysicalDeviceSparseImageFormatInfo2KHR; - typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); @@ -5230,10 +5217,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR( VkSparseImageFormatProperties2* pProperties); #endif + #define VK_KHR_device_group 1 #define VK_KHR_DEVICE_GROUP_SPEC_VERSION 3 #define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group" - typedef VkPeerMemoryFeatureFlags VkPeerMemoryFeatureFlagsKHR; typedef VkPeerMemoryFeatureFlagBits VkPeerMemoryFeatureFlagBitsKHR; @@ -5242,7 +5229,6 @@ typedef VkMemoryAllocateFlags VkMemoryAllocateFlagsKHR; typedef VkMemoryAllocateFlagBits VkMemoryAllocateFlagBitsKHR; - typedef VkMemoryAllocateFlagsInfo VkMemoryAllocateFlagsInfoKHR; typedef VkDeviceGroupRenderPassBeginInfo VkDeviceGroupRenderPassBeginInfoKHR; @@ -5257,10 +5243,16 @@ typedef VkBindBufferMemoryDeviceGroupInfo VkBindBufferMemoryDeviceGroupInfoKHR; typedef VkBindImageMemoryDeviceGroupInfo VkBindImageMemoryDeviceGroupInfoKHR; +typedef struct VkPhysicalDeviceSurfaceInfo2KHR { + VkStructureType sType; + const void* pNext; + VkSurfaceKHR surface; +} VkPhysicalDeviceSurfaceInfo2KHR; typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHR)(VkCommandBuffer commandBuffer, uint32_t deviceMask); typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHR)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); +typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHR( @@ -5282,8 +5274,14 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR( uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT( + VkDevice device, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkDeviceGroupPresentModeFlagsKHR* pModes); #endif + #define VK_KHR_shader_draw_parameters 1 #define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 #define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" @@ -5292,10 +5290,8 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR( #define VK_KHR_maintenance1 1 #define VK_KHR_MAINTENANCE1_SPEC_VERSION 2 #define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" - typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR; - typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); #ifndef VK_NO_PROTOTYPES @@ -5305,16 +5301,15 @@ VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR( VkCommandPoolTrimFlags flags); #endif + #define VK_KHR_device_group_creation 1 #define VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION 1 #define VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHR_device_group_creation" #define VK_MAX_DEVICE_GROUP_SIZE_KHR VK_MAX_DEVICE_GROUP_SIZE - typedef VkPhysicalDeviceGroupProperties VkPhysicalDeviceGroupPropertiesKHR; typedef VkDeviceGroupDeviceCreateInfo VkDeviceGroupDeviceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroupsKHR)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); #ifndef VK_NO_PROTOTYPES @@ -5324,11 +5319,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR( VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); #endif + #define VK_KHR_external_memory_capabilities 1 #define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities" #define VK_LUID_SIZE_KHR VK_LUID_SIZE - typedef VkExternalMemoryHandleTypeFlags VkExternalMemoryHandleTypeFlagsKHR; typedef VkExternalMemoryHandleTypeFlagBits VkExternalMemoryHandleTypeFlagBitsKHR; @@ -5337,7 +5332,6 @@ typedef VkExternalMemoryFeatureFlags VkExternalMemoryFeatureFlagsKHR; typedef VkExternalMemoryFeatureFlagBits VkExternalMemoryFeatureFlagBitsKHR; - typedef VkExternalMemoryProperties VkExternalMemoryPropertiesKHR; typedef VkPhysicalDeviceExternalImageFormatInfo VkPhysicalDeviceExternalImageFormatInfoKHR; @@ -5350,7 +5344,6 @@ typedef VkExternalBufferProperties VkExternalBufferPropertiesKHR; typedef VkPhysicalDeviceIDProperties VkPhysicalDeviceIDPropertiesKHR; - typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties); #ifndef VK_NO_PROTOTYPES @@ -5360,11 +5353,11 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR( VkExternalBufferProperties* pExternalBufferProperties); #endif + #define VK_KHR_external_memory 1 #define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory" #define VK_QUEUE_FAMILY_EXTERNAL_KHR VK_QUEUE_FAMILY_EXTERNAL - typedef VkExternalMemoryImageCreateInfo VkExternalMemoryImageCreateInfoKHR; typedef VkExternalMemoryBufferCreateInfo VkExternalMemoryBufferCreateInfoKHR; @@ -5376,7 +5369,6 @@ typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR; #define VK_KHR_external_memory_fd 1 #define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd" - typedef struct VkImportMemoryFdInfoKHR { VkStructureType sType; const void* pNext; @@ -5397,7 +5389,6 @@ typedef struct VkMemoryGetFdInfoKHR { VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetFdInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdKHR)(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdPropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties); @@ -5414,10 +5405,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdPropertiesKHR( VkMemoryFdPropertiesKHR* pMemoryFdProperties); #endif + #define VK_KHR_external_semaphore_capabilities 1 #define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities" - typedef VkExternalSemaphoreHandleTypeFlags VkExternalSemaphoreHandleTypeFlagsKHR; typedef VkExternalSemaphoreHandleTypeFlagBits VkExternalSemaphoreHandleTypeFlagBitsKHR; @@ -5426,12 +5417,10 @@ typedef VkExternalSemaphoreFeatureFlags VkExternalSemaphoreFeatureFlagsKHR; typedef VkExternalSemaphoreFeatureFlagBits VkExternalSemaphoreFeatureFlagBitsKHR; - typedef VkPhysicalDeviceExternalSemaphoreInfo VkPhysicalDeviceExternalSemaphoreInfoKHR; typedef VkExternalSemaphoreProperties VkExternalSemaphorePropertiesKHR; - typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties); #ifndef VK_NO_PROTOTYPES @@ -5441,15 +5430,14 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( VkExternalSemaphoreProperties* pExternalSemaphoreProperties); #endif + #define VK_KHR_external_semaphore 1 #define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore" - typedef VkSemaphoreImportFlags VkSemaphoreImportFlagsKHR; typedef VkSemaphoreImportFlagBits VkSemaphoreImportFlagBitsKHR; - typedef VkExportSemaphoreCreateInfo VkExportSemaphoreCreateInfoKHR; @@ -5457,7 +5445,6 @@ typedef VkExportSemaphoreCreateInfo VkExportSemaphoreCreateInfoKHR; #define VK_KHR_external_semaphore_fd 1 #define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd" - typedef struct VkImportSemaphoreFdInfoKHR { VkStructureType sType; const void* pNext; @@ -5474,7 +5461,6 @@ typedef struct VkSemaphoreGetFdInfoKHR { VkExternalSemaphoreHandleTypeFlagBits handleType; } VkSemaphoreGetFdInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreFdKHR)(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreFdKHR)(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd); @@ -5489,17 +5475,16 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHR( int* pFd); #endif + #define VK_KHR_push_descriptor 1 #define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2 #define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" - typedef struct VkPhysicalDevicePushDescriptorPropertiesKHR { VkStructureType sType; void* pNext; uint32_t maxPushDescriptors; } VkPhysicalDevicePushDescriptorPropertiesKHR; - typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); @@ -5520,10 +5505,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR( const void* pData); #endif + #define VK_KHR_shader_float16_int8 1 #define VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION 1 #define VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME "VK_KHR_shader_float16_int8" - typedef struct VkPhysicalDeviceFloat16Int8FeaturesKHR { VkStructureType sType; void* pNext; @@ -5536,7 +5521,6 @@ typedef struct VkPhysicalDeviceFloat16Int8FeaturesKHR { #define VK_KHR_16bit_storage 1 #define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1 #define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage" - typedef VkPhysicalDevice16BitStorageFeatures VkPhysicalDevice16BitStorageFeaturesKHR; @@ -5544,7 +5528,6 @@ typedef VkPhysicalDevice16BitStorageFeatures VkPhysicalDevice16BitStorageFeature #define VK_KHR_incremental_present 1 #define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 #define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present" - typedef struct VkRectLayerKHR { VkOffset2D offset; VkExtent2D extent; @@ -5568,21 +5551,16 @@ typedef struct VkPresentRegionsKHR { #define VK_KHR_descriptor_update_template 1 typedef VkDescriptorUpdateTemplate VkDescriptorUpdateTemplateKHR; - #define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 #define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" - typedef VkDescriptorUpdateTemplateType VkDescriptorUpdateTemplateTypeKHR; - typedef VkDescriptorUpdateTemplateCreateFlags VkDescriptorUpdateTemplateCreateFlagsKHR; - typedef VkDescriptorUpdateTemplateEntry VkDescriptorUpdateTemplateEntryKHR; typedef VkDescriptorUpdateTemplateCreateInfo VkDescriptorUpdateTemplateCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); @@ -5606,10 +5584,10 @@ VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR( const void* pData); #endif + #define VK_KHR_create_renderpass2 1 #define VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION 1 #define VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME "VK_KHR_create_renderpass2" - typedef struct VkAttachmentDescription2KHR { VkStructureType sType; const void* pNext; @@ -5686,7 +5664,6 @@ typedef struct VkSubpassEndInfoKHR { const void* pNext; } VkSubpassEndInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass2KHR)(VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo); typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo, const VkSubpassEndInfoKHR* pSubpassEndInfo); @@ -5714,17 +5691,16 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2KHR( const VkSubpassEndInfoKHR* pSubpassEndInfo); #endif + #define VK_KHR_shared_presentable_image 1 #define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1 #define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image" - typedef struct VkSharedPresentSurfaceCapabilitiesKHR { VkStructureType sType; void* pNext; VkImageUsageFlags sharedPresentSupportedUsageFlags; } VkSharedPresentSurfaceCapabilitiesKHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainStatusKHR)(VkDevice device, VkSwapchainKHR swapchain); #ifndef VK_NO_PROTOTYPES @@ -5733,10 +5709,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainStatusKHR( VkSwapchainKHR swapchain); #endif + #define VK_KHR_external_fence_capabilities 1 #define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities" - typedef VkExternalFenceHandleTypeFlags VkExternalFenceHandleTypeFlagsKHR; typedef VkExternalFenceHandleTypeFlagBits VkExternalFenceHandleTypeFlagBitsKHR; @@ -5745,12 +5721,10 @@ typedef VkExternalFenceFeatureFlags VkExternalFenceFeatureFlagsKHR; typedef VkExternalFenceFeatureFlagBits VkExternalFenceFeatureFlagBitsKHR; - typedef VkPhysicalDeviceExternalFenceInfo VkPhysicalDeviceExternalFenceInfoKHR; typedef VkExternalFenceProperties VkExternalFencePropertiesKHR; - typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties); #ifndef VK_NO_PROTOTYPES @@ -5760,15 +5734,14 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR( VkExternalFenceProperties* pExternalFenceProperties); #endif + #define VK_KHR_external_fence 1 #define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence" - typedef VkFenceImportFlags VkFenceImportFlagsKHR; typedef VkFenceImportFlagBits VkFenceImportFlagBitsKHR; - typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR; @@ -5776,7 +5749,6 @@ typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR; #define VK_KHR_external_fence_fd 1 #define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd" - typedef struct VkImportFenceFdInfoKHR { VkStructureType sType; const void* pNext; @@ -5793,7 +5765,6 @@ typedef struct VkFenceGetFdInfoKHR { VkExternalFenceHandleTypeFlagBits handleType; } VkFenceGetFdInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkImportFenceFdKHR)(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetFenceFdKHR)(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd); @@ -5808,15 +5779,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR( int* pFd); #endif + #define VK_KHR_maintenance2 1 #define VK_KHR_MAINTENANCE2_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2" - typedef VkPointClippingBehavior VkPointClippingBehaviorKHR; typedef VkTessellationDomainOrigin VkTessellationDomainOriginKHR; - typedef VkPhysicalDevicePointClippingProperties VkPhysicalDevicePointClippingPropertiesKHR; typedef VkRenderPassInputAttachmentAspectCreateInfo VkRenderPassInputAttachmentAspectCreateInfoKHR; @@ -5832,13 +5802,6 @@ typedef VkPipelineTessellationDomainOriginStateCreateInfo VkPipelineTessellation #define VK_KHR_get_surface_capabilities2 1 #define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1 #define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2" - -typedef struct VkPhysicalDeviceSurfaceInfo2KHR { - VkStructureType sType; - const void* pNext; - VkSurfaceKHR surface; -} VkPhysicalDeviceSurfaceInfo2KHR; - typedef struct VkSurfaceCapabilities2KHR { VkStructureType sType; void* pNext; @@ -5851,7 +5814,6 @@ typedef struct VkSurfaceFormat2KHR { VkSurfaceFormatKHR surfaceFormat; } VkSurfaceFormat2KHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats); @@ -5868,10 +5830,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR( VkSurfaceFormat2KHR* pSurfaceFormats); #endif + #define VK_KHR_variable_pointers 1 #define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1 #define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers" - typedef VkPhysicalDeviceVariablePointerFeatures VkPhysicalDeviceVariablePointerFeaturesKHR; @@ -5879,7 +5841,6 @@ 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; @@ -5911,7 +5872,6 @@ typedef struct VkDisplayPlaneCapabilities2KHR { 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); @@ -5940,10 +5900,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilities2KHR( 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" - typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR; typedef VkMemoryDedicatedAllocateInfo VkMemoryDedicatedAllocateInfoKHR; @@ -5963,7 +5923,6 @@ typedef VkMemoryDedicatedAllocateInfo VkMemoryDedicatedAllocateInfoKHR; #define VK_KHR_get_memory_requirements2 1 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2" - typedef VkBufferMemoryRequirementsInfo2 VkBufferMemoryRequirementsInfo2KHR; typedef VkImageMemoryRequirementsInfo2 VkImageMemoryRequirementsInfo2KHR; @@ -5972,7 +5931,6 @@ typedef VkImageSparseMemoryRequirementsInfo2 VkImageSparseMemoryRequirementsInfo typedef VkSparseImageMemoryRequirements2 VkSparseImageMemoryRequirements2KHR; - typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2KHR)(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); @@ -5995,10 +5953,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR( VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); #endif + #define VK_KHR_image_format_list 1 #define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1 #define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list" - typedef struct VkImageFormatListCreateInfoKHR { VkStructureType sType; const void* pNext; @@ -6011,17 +5969,14 @@ typedef struct VkImageFormatListCreateInfoKHR { #define VK_KHR_sampler_ycbcr_conversion 1 typedef VkSamplerYcbcrConversion VkSamplerYcbcrConversionKHR; - #define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 1 #define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion" - typedef VkSamplerYcbcrModelConversion VkSamplerYcbcrModelConversionKHR; typedef VkSamplerYcbcrRange VkSamplerYcbcrRangeKHR; typedef VkChromaLocation VkChromaLocationKHR; - typedef VkSamplerYcbcrConversionCreateInfo VkSamplerYcbcrConversionCreateInfoKHR; typedef VkSamplerYcbcrConversionInfo VkSamplerYcbcrConversionInfoKHR; @@ -6034,7 +5989,6 @@ typedef VkPhysicalDeviceSamplerYcbcrConversionFeatures VkPhysicalDeviceSamplerYc typedef VkSamplerYcbcrConversionImageFormatProperties VkSamplerYcbcrConversionImageFormatPropertiesKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversionKHR)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversionKHR)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator); @@ -6051,15 +6005,14 @@ VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR( const VkAllocationCallbacks* pAllocator); #endif + #define VK_KHR_bind_memory2 1 #define VK_KHR_BIND_MEMORY_2_SPEC_VERSION 1 #define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME "VK_KHR_bind_memory2" - typedef VkBindBufferMemoryInfo VkBindBufferMemoryInfoKHR; typedef VkBindImageMemoryInfo VkBindImageMemoryInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); @@ -6075,15 +6028,14 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR( const VkBindImageMemoryInfo* pBindInfos); #endif + #define VK_KHR_maintenance3 1 #define VK_KHR_MAINTENANCE3_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE3_EXTENSION_NAME "VK_KHR_maintenance3" - typedef VkPhysicalDeviceMaintenance3Properties VkPhysicalDeviceMaintenance3PropertiesKHR; typedef VkDescriptorSetLayoutSupport VkDescriptorSetLayoutSupportKHR; - typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); #ifndef VK_NO_PROTOTYPES @@ -6093,10 +6045,10 @@ 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); @@ -6120,10 +6072,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR( uint32_t stride); #endif + #define VK_KHR_8bit_storage 1 #define VK_KHR_8BIT_STORAGE_SPEC_VERSION 1 #define VK_KHR_8BIT_STORAGE_EXTENSION_NAME "VK_KHR_8bit_storage" - typedef struct VkPhysicalDevice8BitStorageFeaturesKHR { VkStructureType sType; void* pNext; @@ -6137,7 +6089,6 @@ typedef struct VkPhysicalDevice8BitStorageFeaturesKHR { #define VK_KHR_shader_atomic_int64 1 #define VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION 1 #define VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME "VK_KHR_shader_atomic_int64" - typedef struct VkPhysicalDeviceShaderAtomicInt64FeaturesKHR { VkStructureType sType; void* pNext; @@ -6153,7 +6104,6 @@ typedef struct VkPhysicalDeviceShaderAtomicInt64FeaturesKHR { #define VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION 1 #define VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME "VK_KHR_driver_properties" - typedef enum VkDriverIdKHR { VK_DRIVER_ID_AMD_PROPRIETARY_KHR = 1, VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = 2, @@ -6165,12 +6115,12 @@ typedef enum VkDriverIdKHR { VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR = 8, VK_DRIVER_ID_ARM_PROPRIETARY_KHR = 9, VK_DRIVER_ID_GOOGLE_PASTEL_KHR = 10, + VK_DRIVER_ID_GGP_PROPRIETARY_KHR = 11, VK_DRIVER_ID_BEGIN_RANGE_KHR = VK_DRIVER_ID_AMD_PROPRIETARY_KHR, - VK_DRIVER_ID_END_RANGE_KHR = VK_DRIVER_ID_GOOGLE_PASTEL_KHR, - VK_DRIVER_ID_RANGE_SIZE_KHR = (VK_DRIVER_ID_GOOGLE_PASTEL_KHR - VK_DRIVER_ID_AMD_PROPRIETARY_KHR + 1), + VK_DRIVER_ID_END_RANGE_KHR = VK_DRIVER_ID_GGP_PROPRIETARY_KHR, + VK_DRIVER_ID_RANGE_SIZE_KHR = (VK_DRIVER_ID_GGP_PROPRIETARY_KHR - VK_DRIVER_ID_AMD_PROPRIETARY_KHR + 1), VK_DRIVER_ID_MAX_ENUM_KHR = 0x7FFFFFFF } VkDriverIdKHR; - typedef struct VkConformanceVersionKHR { uint8_t major; uint8_t minor; @@ -6192,7 +6142,6 @@ typedef struct VkPhysicalDeviceDriverPropertiesKHR { #define VK_KHR_shader_float_controls 1 #define VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION 1 #define VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME "VK_KHR_shader_float_controls" - typedef struct VkPhysicalDeviceFloatControlsPropertiesKHR { VkStructureType sType; void* pNext; @@ -6221,7 +6170,6 @@ typedef struct VkPhysicalDeviceFloatControlsPropertiesKHR { #define VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION 1 #define VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME "VK_KHR_depth_stencil_resolve" - typedef enum VkResolveModeFlagBitsKHR { VK_RESOLVE_MODE_NONE_KHR = 0, VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR = 0x00000001, @@ -6231,7 +6179,6 @@ typedef enum VkResolveModeFlagBitsKHR { VK_RESOLVE_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkResolveModeFlagBitsKHR; typedef VkFlags VkResolveModeFlagsKHR; - typedef struct VkSubpassDescriptionDepthStencilResolveKHR { VkStructureType sType; const void* pNext; @@ -6259,7 +6206,6 @@ typedef struct VkPhysicalDeviceDepthStencilResolvePropertiesKHR { #define VK_KHR_vulkan_memory_model 1 #define VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION 3 #define VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME "VK_KHR_vulkan_memory_model" - typedef struct VkPhysicalDeviceVulkanMemoryModelFeaturesKHR { VkStructureType sType; void* pNext; @@ -6270,13 +6216,22 @@ typedef struct VkPhysicalDeviceVulkanMemoryModelFeaturesKHR { +#define VK_KHR_surface_protected_capabilities 1 +#define VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION 1 +#define VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME "VK_KHR_surface_protected_capabilities" +typedef struct VkSurfaceProtectedCapabilitiesKHR { + VkStructureType sType; + const void* pNext; + VkBool32 supportsProtected; +} VkSurfaceProtectedCapabilitiesKHR; + + + #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) - #define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9 #define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report" - typedef enum VkDebugReportObjectTypeEXT { VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, @@ -6325,7 +6280,6 @@ typedef enum VkDebugReportObjectTypeEXT { VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugReportObjectTypeEXT; - typedef enum VkDebugReportFlagBitsEXT { VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, @@ -6335,7 +6289,6 @@ typedef enum VkDebugReportFlagBitsEXT { VK_DEBUG_REPORT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugReportFlagBitsEXT; typedef VkFlags VkDebugReportFlagsEXT; - typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, @@ -6354,7 +6307,6 @@ typedef struct VkDebugReportCallbackCreateInfoEXT { void* pUserData; } VkDebugReportCallbackCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage); @@ -6382,6 +6334,7 @@ VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT( const char* pMessage); #endif + #define VK_NV_glsl_shader 1 #define VK_NV_GLSL_SHADER_SPEC_VERSION 1 #define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader" @@ -6401,7 +6354,6 @@ VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT( #define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 #define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order" - typedef enum VkRasterizationOrderAMD { VK_RASTERIZATION_ORDER_STRICT_AMD = 0, VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, @@ -6410,7 +6362,6 @@ typedef enum VkRasterizationOrderAMD { VK_RASTERIZATION_ORDER_RANGE_SIZE_AMD = (VK_RASTERIZATION_ORDER_RELAXED_AMD - VK_RASTERIZATION_ORDER_STRICT_AMD + 1), VK_RASTERIZATION_ORDER_MAX_ENUM_AMD = 0x7FFFFFFF } VkRasterizationOrderAMD; - typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { VkStructureType sType; const void* pNext; @@ -6432,7 +6383,6 @@ typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { #define VK_EXT_debug_marker 1 #define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 #define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker" - typedef struct VkDebugMarkerObjectNameInfoEXT { VkStructureType sType; const void* pNext; @@ -6458,7 +6408,6 @@ typedef struct VkDebugMarkerMarkerInfoEXT { float color[4]; } VkDebugMarkerMarkerInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); @@ -6486,6 +6435,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT( const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); #endif + #define VK_AMD_gcn_shader 1 #define VK_AMD_GCN_SHADER_SPEC_VERSION 1 #define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" @@ -6494,7 +6444,6 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT( #define VK_NV_dedicated_allocation 1 #define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 #define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" - typedef struct VkDedicatedAllocationImageCreateInfoNV { VkStructureType sType; const void* pNext; @@ -6519,9 +6468,7 @@ typedef struct VkDedicatedAllocationMemoryAllocateInfoNV { #define VK_EXT_transform_feedback 1 #define VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION 1 #define VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME "VK_EXT_transform_feedback" - typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT; - typedef struct VkPhysicalDeviceTransformFeedbackFeaturesEXT { VkStructureType sType; void* pNext; @@ -6551,7 +6498,6 @@ typedef struct VkPipelineRasterizationStateStreamCreateInfoEXT { uint32_t rasterizationStream; } VkPipelineRasterizationStateStreamCreateInfoEXT; - typedef void (VKAPI_PTR *PFN_vkCmdBindTransformFeedbackBuffersEXT)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes); typedef void (VKAPI_PTR *PFN_vkCmdBeginTransformFeedbackEXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); typedef void (VKAPI_PTR *PFN_vkCmdEndTransformFeedbackEXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); @@ -6605,10 +6551,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectByteCountEXT( uint32_t vertexStride); #endif + #define VK_NVX_image_view_handle 1 #define VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION 1 #define VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME "VK_NVX_image_view_handle" - typedef struct VkImageViewHandleInfoNVX { VkStructureType sType; const void* pNext; @@ -6617,7 +6563,6 @@ typedef struct VkImageViewHandleInfoNVX { VkSampler sampler; } VkImageViewHandleInfoNVX; - typedef uint32_t (VKAPI_PTR *PFN_vkGetImageViewHandleNVX)(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); #ifndef VK_NO_PROTOTYPES @@ -6626,10 +6571,10 @@ VKAPI_ATTR uint32_t VKAPI_CALL vkGetImageViewHandleNVX( const VkImageViewHandleInfoNVX* pInfo); #endif + #define VK_AMD_draw_indirect_count 1 #define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 #define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" - typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); @@ -6653,6 +6598,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD( uint32_t stride); #endif + #define VK_AMD_negative_viewport_height 1 #define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 #define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" @@ -6671,7 +6617,6 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD( #define VK_AMD_texture_gather_bias_lod 1 #define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1 #define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod" - typedef struct VkTextureLODGatherFormatPropertiesAMD { VkStructureType sType; void* pNext; @@ -6684,7 +6629,6 @@ typedef struct VkTextureLODGatherFormatPropertiesAMD { #define VK_AMD_SHADER_INFO_SPEC_VERSION 1 #define VK_AMD_SHADER_INFO_EXTENSION_NAME "VK_AMD_shader_info" - typedef enum VkShaderInfoTypeAMD { VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0, VK_SHADER_INFO_TYPE_BINARY_AMD = 1, @@ -6694,7 +6638,6 @@ typedef enum VkShaderInfoTypeAMD { VK_SHADER_INFO_TYPE_RANGE_SIZE_AMD = (VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD - VK_SHADER_INFO_TYPE_STATISTICS_AMD + 1), VK_SHADER_INFO_TYPE_MAX_ENUM_AMD = 0x7FFFFFFF } VkShaderInfoTypeAMD; - typedef struct VkShaderResourceUsageAMD { uint32_t numUsedVgprs; uint32_t numUsedSgprs; @@ -6713,7 +6656,6 @@ typedef struct VkShaderStatisticsInfoAMD { uint32_t computeWorkGroupSize[3]; } VkShaderStatisticsInfoAMD; - typedef VkResult (VKAPI_PTR *PFN_vkGetShaderInfoAMD)(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); #ifndef VK_NO_PROTOTYPES @@ -6726,6 +6668,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD( void* pInfo); #endif + #define VK_AMD_shader_image_load_store_lod 1 #define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION 1 #define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME "VK_AMD_shader_image_load_store_lod" @@ -6734,7 +6677,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD( #define VK_NV_corner_sampled_image 1 #define VK_NV_CORNER_SAMPLED_IMAGE_SPEC_VERSION 2 #define VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME "VK_NV_corner_sampled_image" - typedef struct VkPhysicalDeviceCornerSampledImageFeaturesNV { VkStructureType sType; void* pNext; @@ -6752,7 +6694,6 @@ typedef struct VkPhysicalDeviceCornerSampledImageFeaturesNV { #define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 #define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" - typedef enum VkExternalMemoryHandleTypeFlagBitsNV { VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, @@ -6769,7 +6710,6 @@ typedef enum VkExternalMemoryFeatureFlagBitsNV { VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkExternalMemoryFeatureFlagBitsNV; typedef VkFlags VkExternalMemoryFeatureFlagsNV; - typedef struct VkExternalImageFormatPropertiesNV { VkImageFormatProperties imageFormatProperties; VkExternalMemoryFeatureFlagsNV externalMemoryFeatures; @@ -6777,7 +6717,6 @@ typedef struct VkExternalImageFormatPropertiesNV { VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes; } VkExternalImageFormatPropertiesNV; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); #ifndef VK_NO_PROTOTYPES @@ -6792,10 +6731,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceExternalImageFormatPropertiesN VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); #endif + #define VK_NV_external_memory 1 #define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 #define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" - typedef struct VkExternalMemoryImageCreateInfoNV { VkStructureType sType; const void* pNext; @@ -6814,7 +6753,6 @@ typedef struct VkExportMemoryAllocateInfoNV { #define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 #define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" - typedef enum VkValidationCheckEXT { VK_VALIDATION_CHECK_ALL_EXT = 0, VK_VALIDATION_CHECK_SHADERS_EXT = 1, @@ -6823,7 +6761,6 @@ typedef enum VkValidationCheckEXT { VK_VALIDATION_CHECK_RANGE_SIZE_EXT = (VK_VALIDATION_CHECK_SHADERS_EXT - VK_VALIDATION_CHECK_ALL_EXT + 1), VK_VALIDATION_CHECK_MAX_ENUM_EXT = 0x7FFFFFFF } VkValidationCheckEXT; - typedef struct VkValidationFlagsEXT { VkStructureType sType; const void* pNext; @@ -6846,7 +6783,6 @@ typedef struct VkValidationFlagsEXT { #define VK_EXT_astc_decode_mode 1 #define VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION 1 #define VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME "VK_EXT_astc_decode_mode" - typedef struct VkImageViewASTCDecodeModeEXT { VkStructureType sType; const void* pNext; @@ -6865,13 +6801,11 @@ typedef struct VkPhysicalDeviceASTCDecodeFeaturesEXT { #define VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION 1 #define VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME "VK_EXT_conditional_rendering" - typedef enum VkConditionalRenderingFlagBitsEXT { VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001, VK_CONDITIONAL_RENDERING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkConditionalRenderingFlagBitsEXT; typedef VkFlags VkConditionalRenderingFlagsEXT; - typedef struct VkConditionalRenderingBeginInfoEXT { VkStructureType sType; const void* pNext; @@ -6893,7 +6827,6 @@ typedef struct VkCommandBufferInheritanceConditionalRenderingInfoEXT { VkBool32 conditionalRenderingEnable; } VkCommandBufferInheritanceConditionalRenderingInfoEXT; - typedef void (VKAPI_PTR *PFN_vkCmdBeginConditionalRenderingEXT)(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); typedef void (VKAPI_PTR *PFN_vkCmdEndConditionalRenderingEXT)(VkCommandBuffer commandBuffer); @@ -6906,14 +6839,13 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEndConditionalRenderingEXT( VkCommandBuffer commandBuffer); #endif + #define VK_NVX_device_generated_commands 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) - #define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3 #define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" - typedef enum VkIndirectCommandsTokenTypeNVX { VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1, @@ -6941,7 +6873,6 @@ typedef enum VkObjectEntryTypeNVX { VK_OBJECT_ENTRY_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF } VkObjectEntryTypeNVX; - typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX { VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, @@ -6957,7 +6888,6 @@ typedef enum VkObjectEntryUsageFlagBitsNVX { VK_OBJECT_ENTRY_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF } VkObjectEntryUsageFlagBitsNVX; typedef VkFlags VkObjectEntryUsageFlagsNVX; - typedef struct VkDeviceGeneratedCommandsFeaturesNVX { VkStructureType sType; const void* pNext; @@ -7071,7 +7001,6 @@ typedef struct VkObjectTablePushConstantEntryNVX { VkShaderStageFlags stageFlags; } VkObjectTablePushConstantEntryNVX; - typedef void (VKAPI_PTR *PFN_vkCmdProcessCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo); typedef void (VKAPI_PTR *PFN_vkCmdReserveSpaceForCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo); typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutNVX)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout); @@ -7133,10 +7062,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( VkDeviceGeneratedCommandsLimitsNVX* pLimits); #endif + #define VK_NV_clip_space_w_scaling 1 #define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1 #define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling" - typedef struct VkViewportWScalingNV { float xcoeff; float ycoeff; @@ -7150,7 +7079,6 @@ typedef struct VkPipelineViewportWScalingStateCreateInfoNV { const VkViewportWScalingNV* pViewportWScalings; } VkPipelineViewportWScalingStateCreateInfoNV; - typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings); #ifndef VK_NO_PROTOTYPES @@ -7161,10 +7089,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV( const VkViewportWScalingNV* pViewportWScalings); #endif + #define VK_EXT_direct_mode_display 1 #define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1 #define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display" - typedef VkResult (VKAPI_PTR *PFN_vkReleaseDisplayEXT)(VkPhysicalDevice physicalDevice, VkDisplayKHR display); #ifndef VK_NO_PROTOTYPES @@ -7173,17 +7101,16 @@ VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT( VkDisplayKHR display); #endif + #define VK_EXT_display_surface_counter 1 #define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 #define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" - typedef enum VkSurfaceCounterFlagBitsEXT { VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkSurfaceCounterFlagBitsEXT; typedef VkFlags VkSurfaceCounterFlagsEXT; - typedef struct VkSurfaceCapabilities2EXT { VkStructureType sType; void* pNext; @@ -7200,7 +7127,6 @@ typedef struct VkSurfaceCapabilities2EXT { VkSurfaceCounterFlagsEXT supportedSurfaceCounters; } VkSurfaceCapabilities2EXT; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities); #ifndef VK_NO_PROTOTYPES @@ -7210,11 +7136,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT( VkSurfaceCapabilities2EXT* pSurfaceCapabilities); #endif + #define VK_EXT_display_control 1 #define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 #define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control" - typedef enum VkDisplayPowerStateEXT { VK_DISPLAY_POWER_STATE_OFF_EXT = 0, VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, @@ -7240,7 +7166,6 @@ typedef enum VkDisplayEventTypeEXT { VK_DISPLAY_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT - VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT + 1), VK_DISPLAY_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDisplayEventTypeEXT; - typedef struct VkDisplayPowerInfoEXT { VkStructureType sType; const void* pNext; @@ -7265,7 +7190,6 @@ typedef struct VkSwapchainCounterCreateInfoEXT { VkSurfaceCounterFlagsEXT surfaceCounters; } VkSwapchainCounterCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo); typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); @@ -7297,10 +7221,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT( uint64_t* pCounterValue); #endif + #define VK_GOOGLE_display_timing 1 #define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1 #define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing" - typedef struct VkRefreshCycleDurationGOOGLE { uint64_t refreshDuration; } VkRefreshCycleDurationGOOGLE; @@ -7325,7 +7249,6 @@ typedef struct VkPresentTimesInfoGOOGLE { const VkPresentTimeGOOGLE* pTimes; } VkPresentTimesInfoGOOGLE; - typedef VkResult (VKAPI_PTR *PFN_vkGetRefreshCycleDurationGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetPastPresentationTimingGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings); @@ -7342,6 +7265,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE( VkPastPresentationTimingGOOGLE* pPresentationTimings); #endif + #define VK_NV_sample_mask_override_coverage 1 #define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 #define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage" @@ -7360,7 +7284,6 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE( #define VK_NVX_multiview_per_view_attributes 1 #define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1 #define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes" - typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { VkStructureType sType; void* pNext; @@ -7373,7 +7296,6 @@ typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { #define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1 #define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle" - typedef enum VkViewportCoordinateSwizzleNV { VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, @@ -7388,9 +7310,7 @@ typedef enum VkViewportCoordinateSwizzleNV { VK_VIEWPORT_COORDINATE_SWIZZLE_RANGE_SIZE_NV = (VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV + 1), VK_VIEWPORT_COORDINATE_SWIZZLE_MAX_ENUM_NV = 0x7FFFFFFF } VkViewportCoordinateSwizzleNV; - typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV; - typedef struct VkViewportSwizzleNV { VkViewportCoordinateSwizzleNV x; VkViewportCoordinateSwizzleNV y; @@ -7412,7 +7332,6 @@ typedef struct VkPipelineViewportSwizzleStateCreateInfoNV { #define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1 #define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" - typedef enum VkDiscardRectangleModeEXT { VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, @@ -7421,9 +7340,7 @@ typedef enum VkDiscardRectangleModeEXT { VK_DISCARD_RECTANGLE_MODE_RANGE_SIZE_EXT = (VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT - VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT + 1), VK_DISCARD_RECTANGLE_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDiscardRectangleModeEXT; - typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT; - typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT { VkStructureType sType; void* pNext; @@ -7439,7 +7356,6 @@ typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT { const VkRect2D* pDiscardRectangles; } VkPipelineDiscardRectangleStateCreateInfoEXT; - typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); #ifndef VK_NO_PROTOTYPES @@ -7450,11 +7366,11 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT( const VkRect2D* pDiscardRectangles); #endif + #define VK_EXT_conservative_rasterization 1 #define VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION 1 #define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization" - typedef enum VkConservativeRasterizationModeEXT { VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0, VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1, @@ -7464,9 +7380,7 @@ typedef enum VkConservativeRasterizationModeEXT { VK_CONSERVATIVE_RASTERIZATION_MODE_RANGE_SIZE_EXT = (VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT - VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT + 1), VK_CONSERVATIVE_RASTERIZATION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkConservativeRasterizationModeEXT; - typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; - typedef struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT { VkStructureType sType; void* pNext; @@ -7494,9 +7408,7 @@ typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT { #define VK_EXT_depth_clip_enable 1 #define VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION 1 #define VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME "VK_EXT_depth_clip_enable" - typedef VkFlags VkPipelineRasterizationDepthClipStateCreateFlagsEXT; - typedef struct VkPhysicalDeviceDepthClipEnableFeaturesEXT { VkStructureType sType; void* pNext; @@ -7520,7 +7432,6 @@ typedef struct VkPipelineRasterizationDepthClipStateCreateInfoEXT { #define VK_EXT_hdr_metadata 1 #define VK_EXT_HDR_METADATA_SPEC_VERSION 1 #define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" - typedef struct VkXYColorEXT { float x; float y; @@ -7539,7 +7450,6 @@ typedef struct VkHdrMetadataEXT { float maxFrameAverageLightLevel; } VkHdrMetadataEXT; - typedef void (VKAPI_PTR *PFN_vkSetHdrMetadataEXT)(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata); #ifndef VK_NO_PROTOTYPES @@ -7550,6 +7460,7 @@ VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT( const VkHdrMetadataEXT* pMetadata); #endif + #define VK_EXT_external_memory_dma_buf 1 #define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION 1 #define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME "VK_EXT_external_memory_dma_buf" @@ -7563,10 +7474,8 @@ VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT( #define VK_EXT_debug_utils 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT) - #define VK_EXT_DEBUG_UTILS_SPEC_VERSION 1 #define VK_EXT_DEBUG_UTILS_EXTENSION_NAME "VK_EXT_debug_utils" - typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT; typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT; @@ -7586,7 +7495,6 @@ typedef enum VkDebugUtilsMessageTypeFlagBitsEXT { VK_DEBUG_UTILS_MESSAGE_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugUtilsMessageTypeFlagBitsEXT; typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT; - typedef struct VkDebugUtilsObjectNameInfoEXT { VkStructureType sType; const void* pNext; @@ -7643,7 +7551,6 @@ typedef struct VkDebugUtilsMessengerCreateInfoEXT { void* pUserData; } VkDebugUtilsMessengerCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectNameEXT)(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo); typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectTagEXT)(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo); typedef void (VKAPI_PTR *PFN_vkQueueBeginDebugUtilsLabelEXT)(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); @@ -7705,11 +7612,11 @@ VKAPI_ATTR void VKAPI_CALL vkSubmitDebugUtilsMessageEXT( const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); #endif + #define VK_EXT_sampler_filter_minmax 1 #define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1 #define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax" - typedef enum VkSamplerReductionModeEXT { VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0, VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1, @@ -7719,7 +7626,6 @@ typedef enum VkSamplerReductionModeEXT { VK_SAMPLER_REDUCTION_MODE_RANGE_SIZE_EXT = (VK_SAMPLER_REDUCTION_MODE_MAX_EXT - VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT + 1), VK_SAMPLER_REDUCTION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF } VkSamplerReductionModeEXT; - typedef struct VkSamplerReductionModeCreateInfoEXT { VkStructureType sType; const void* pNext; @@ -7753,7 +7659,6 @@ typedef struct VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT { #define VK_EXT_inline_uniform_block 1 #define VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION 1 #define VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME "VK_EXT_inline_uniform_block" - typedef struct VkPhysicalDeviceInlineUniformBlockFeaturesEXT { VkStructureType sType; void* pNext; @@ -7794,7 +7699,6 @@ typedef struct VkDescriptorPoolInlineUniformBlockCreateInfoEXT { #define VK_EXT_sample_locations 1 #define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1 #define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations" - typedef struct VkSampleLocationEXT { float x; float y; @@ -7851,7 +7755,6 @@ typedef struct VkMultisamplePropertiesEXT { VkExtent2D maxSampleLocationGridSize; } VkMultisamplePropertiesEXT; - typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEXT)(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties); @@ -7866,11 +7769,11 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT( VkMultisamplePropertiesEXT* pMultisampleProperties); #endif + #define VK_EXT_blend_operation_advanced 1 #define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2 #define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced" - typedef enum VkBlendOverlapEXT { VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0, VK_BLEND_OVERLAP_DISJOINT_EXT = 1, @@ -7880,7 +7783,6 @@ typedef enum VkBlendOverlapEXT { VK_BLEND_OVERLAP_RANGE_SIZE_EXT = (VK_BLEND_OVERLAP_CONJOINT_EXT - VK_BLEND_OVERLAP_UNCORRELATED_EXT + 1), VK_BLEND_OVERLAP_MAX_ENUM_EXT = 0x7FFFFFFF } VkBlendOverlapEXT; - typedef struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT { VkStructureType sType; void* pNext; @@ -7911,9 +7813,7 @@ typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT { #define VK_NV_fragment_coverage_to_color 1 #define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1 #define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color" - typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV; - typedef struct VkPipelineCoverageToColorStateCreateInfoNV { VkStructureType sType; const void* pNext; @@ -7928,7 +7828,6 @@ typedef struct VkPipelineCoverageToColorStateCreateInfoNV { #define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1 #define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples" - typedef enum VkCoverageModulationModeNV { VK_COVERAGE_MODULATION_MODE_NONE_NV = 0, VK_COVERAGE_MODULATION_MODE_RGB_NV = 1, @@ -7939,9 +7838,7 @@ typedef enum VkCoverageModulationModeNV { VK_COVERAGE_MODULATION_MODE_RANGE_SIZE_NV = (VK_COVERAGE_MODULATION_MODE_RGBA_NV - VK_COVERAGE_MODULATION_MODE_NONE_NV + 1), VK_COVERAGE_MODULATION_MODE_MAX_ENUM_NV = 0x7FFFFFFF } VkCoverageModulationModeNV; - typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV; - typedef struct VkPipelineCoverageModulationStateCreateInfoNV { VkStructureType sType; const void* pNext; @@ -7967,7 +7864,6 @@ typedef struct VkPipelineCoverageModulationStateCreateInfoNV { #define VK_EXT_image_drm_format_modifier 1 #define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION 1 #define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME "VK_EXT_image_drm_format_modifier" - typedef struct VkDrmFormatModifierPropertiesEXT { uint64_t drmFormatModifier; uint32_t drmFormatModifierPlaneCount; @@ -8011,7 +7907,6 @@ typedef struct VkImageDrmFormatModifierPropertiesEXT { uint64_t drmFormatModifier; } VkImageDrmFormatModifierPropertiesEXT; - typedef VkResult (VKAPI_PTR *PFN_vkGetImageDrmFormatModifierPropertiesEXT)(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties); #ifndef VK_NO_PROTOTYPES @@ -8021,13 +7916,12 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetImageDrmFormatModifierPropertiesEXT( VkImageDrmFormatModifierPropertiesEXT* pProperties); #endif + #define VK_EXT_validation_cache 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) - #define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1 #define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache" - typedef enum VkValidationCacheHeaderVersionEXT { VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1, VK_VALIDATION_CACHE_HEADER_VERSION_BEGIN_RANGE_EXT = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT, @@ -8035,9 +7929,7 @@ typedef enum VkValidationCacheHeaderVersionEXT { VK_VALIDATION_CACHE_HEADER_VERSION_RANGE_SIZE_EXT = (VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT - VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT + 1), VK_VALIDATION_CACHE_HEADER_VERSION_MAX_ENUM_EXT = 0x7FFFFFFF } VkValidationCacheHeaderVersionEXT; - typedef VkFlags VkValidationCacheCreateFlagsEXT; - typedef struct VkValidationCacheCreateInfoEXT { VkStructureType sType; const void* pNext; @@ -8052,7 +7944,6 @@ typedef struct VkShaderModuleValidationCacheCreateInfoEXT { VkValidationCacheEXT validationCache; } VkShaderModuleValidationCacheCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkCreateValidationCacheEXT)(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache); typedef void (VKAPI_PTR *PFN_vkDestroyValidationCacheEXT)(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator); typedef VkResult (VKAPI_PTR *PFN_vkMergeValidationCachesEXT)(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches); @@ -8083,11 +7974,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT( void* pData); #endif + #define VK_EXT_descriptor_indexing 1 #define VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION 2 #define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing" - typedef enum VkDescriptorBindingFlagBitsEXT { VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = 0x00000001, VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = 0x00000002, @@ -8096,7 +7987,6 @@ typedef enum VkDescriptorBindingFlagBitsEXT { VK_DESCRIPTOR_BINDING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF } VkDescriptorBindingFlagBitsEXT; typedef VkFlags VkDescriptorBindingFlagsEXT; - typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfoEXT { VkStructureType sType; const void* pNext; @@ -8181,7 +8071,6 @@ typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupportEXT { #define VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION 3 #define VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME "VK_NV_shading_rate_image" - typedef enum VkShadingRatePaletteEntryNV { VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0, VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1, @@ -8211,7 +8100,6 @@ typedef enum VkCoarseSampleOrderTypeNV { VK_COARSE_SAMPLE_ORDER_TYPE_RANGE_SIZE_NV = (VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV - VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV + 1), VK_COARSE_SAMPLE_ORDER_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkCoarseSampleOrderTypeNV; - typedef struct VkShadingRatePaletteNV { uint32_t shadingRatePaletteEntryCount; const VkShadingRatePaletteEntryNV* pShadingRatePaletteEntries; @@ -8261,7 +8149,6 @@ typedef struct VkPipelineViewportCoarseSampleOrderStateCreateInfoNV { const VkCoarseSampleOrderCustomNV* pCustomSampleOrders; } VkPipelineViewportCoarseSampleOrderStateCreateInfoNV; - typedef void (VKAPI_PTR *PFN_vkCmdBindShadingRateImageNV)(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); typedef void (VKAPI_PTR *PFN_vkCmdSetViewportShadingRatePaletteNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes); typedef void (VKAPI_PTR *PFN_vkCmdSetCoarseSampleOrderNV)(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); @@ -8285,14 +8172,13 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetCoarseSampleOrderNV( const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); #endif + #define VK_NV_ray_tracing 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureNV) - #define VK_NV_RAY_TRACING_SPEC_VERSION 3 #define VK_NV_RAY_TRACING_EXTENSION_NAME "VK_NV_ray_tracing" #define VK_SHADER_UNUSED_NV (~0U) - typedef enum VkRayTracingShaderGroupTypeNV { VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = 0, VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = 1, @@ -8340,7 +8226,6 @@ typedef enum VkAccelerationStructureMemoryRequirementsTypeNV { VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_MAX_ENUM_NV = 0x7FFFFFFF } VkAccelerationStructureMemoryRequirementsTypeNV; - typedef enum VkGeometryFlagBitsNV { VK_GEOMETRY_OPAQUE_BIT_NV = 0x00000001, VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = 0x00000002, @@ -8366,7 +8251,6 @@ typedef enum VkBuildAccelerationStructureFlagBitsNV { VK_BUILD_ACCELERATION_STRUCTURE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF } VkBuildAccelerationStructureFlagBitsNV; typedef VkFlags VkBuildAccelerationStructureFlagsNV; - typedef struct VkRayTracingShaderGroupCreateInfoNV { VkStructureType sType; const void* pNext; @@ -8483,7 +8367,6 @@ typedef struct VkPhysicalDeviceRayTracingPropertiesNV { uint32_t maxDescriptorSetAccelerationStructures; } VkPhysicalDeviceRayTracingPropertiesNV; - typedef VkResult (VKAPI_PTR *PFN_vkCreateAccelerationStructureNV)(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure); typedef void (VKAPI_PTR *PFN_vkDestroyAccelerationStructureNV)(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator); typedef void (VKAPI_PTR *PFN_vkGetAccelerationStructureMemoryRequirementsNV)(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements); @@ -8589,10 +8472,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCompileDeferredNV( uint32_t shader); #endif + #define VK_NV_representative_fragment_test 1 #define VK_NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION 1 #define VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME "VK_NV_representative_fragment_test" - typedef struct VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV { VkStructureType sType; void* pNext; @@ -8610,7 +8493,6 @@ typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV { #define VK_EXT_filter_cubic 1 #define VK_EXT_FILTER_CUBIC_SPEC_VERSION 1 #define VK_EXT_FILTER_CUBIC_EXTENSION_NAME "VK_EXT_filter_cubic" - typedef struct VkPhysicalDeviceImageViewImageFormatInfoEXT { VkStructureType sType; void* pNext; @@ -8630,7 +8512,6 @@ typedef struct VkFilterCubicImageViewImageFormatPropertiesEXT { #define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2 #define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority" - typedef enum VkQueueGlobalPriorityEXT { VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256, @@ -8641,7 +8522,6 @@ typedef enum VkQueueGlobalPriorityEXT { VK_QUEUE_GLOBAL_PRIORITY_RANGE_SIZE_EXT = (VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT - VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT + 1), VK_QUEUE_GLOBAL_PRIORITY_MAX_ENUM_EXT = 0x7FFFFFFF } VkQueueGlobalPriorityEXT; - typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT { VkStructureType sType; const void* pNext; @@ -8653,7 +8533,6 @@ typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT { #define VK_EXT_external_memory_host 1 #define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1 #define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host" - typedef struct VkImportMemoryHostPointerInfoEXT { VkStructureType sType; const void* pNext; @@ -8673,7 +8552,6 @@ typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT { VkDeviceSize minImportedHostPointerAlignment; } VkPhysicalDeviceExternalMemoryHostPropertiesEXT; - typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); #ifndef VK_NO_PROTOTYPES @@ -8684,10 +8562,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT( VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); #endif + #define VK_AMD_buffer_marker 1 #define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1 #define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker" - typedef void (VKAPI_PTR *PFN_vkCmdWriteBufferMarkerAMD)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); #ifndef VK_NO_PROTOTYPES @@ -8699,11 +8577,11 @@ VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD( uint32_t marker); #endif + #define VK_EXT_calibrated_timestamps 1 #define VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION 1 #define VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME "VK_EXT_calibrated_timestamps" - typedef enum VkTimeDomainEXT { VK_TIME_DOMAIN_DEVICE_EXT = 0, VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1, @@ -8714,14 +8592,12 @@ typedef enum VkTimeDomainEXT { VK_TIME_DOMAIN_RANGE_SIZE_EXT = (VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT - VK_TIME_DOMAIN_DEVICE_EXT + 1), VK_TIME_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF } VkTimeDomainEXT; - typedef struct VkCalibratedTimestampInfoEXT { VkStructureType sType; const void* pNext; VkTimeDomainEXT timeDomain; } VkCalibratedTimestampInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainEXT* pTimeDomains); typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsEXT)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation); @@ -8739,10 +8615,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsEXT( uint64_t* pMaxDeviation); #endif + #define VK_AMD_shader_core_properties 1 #define VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION 1 #define VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_AMD_shader_core_properties" - typedef struct VkPhysicalDeviceShaderCorePropertiesAMD { VkStructureType sType; void* pNext; @@ -8768,7 +8644,6 @@ typedef struct VkPhysicalDeviceShaderCorePropertiesAMD { #define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION 1 #define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME "VK_AMD_memory_overallocation_behavior" - typedef enum VkMemoryOverallocationBehaviorAMD { VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0, VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1, @@ -8778,7 +8653,6 @@ typedef enum VkMemoryOverallocationBehaviorAMD { VK_MEMORY_OVERALLOCATION_BEHAVIOR_RANGE_SIZE_AMD = (VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD - VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD + 1), VK_MEMORY_OVERALLOCATION_BEHAVIOR_MAX_ENUM_AMD = 0x7FFFFFFF } VkMemoryOverallocationBehaviorAMD; - typedef struct VkDeviceMemoryOverallocationCreateInfoAMD { VkStructureType sType; const void* pNext; @@ -8790,7 +8664,6 @@ typedef struct VkDeviceMemoryOverallocationCreateInfoAMD { #define VK_EXT_vertex_attribute_divisor 1 #define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 3 #define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor" - typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT { VkStructureType sType; void* pNext; @@ -8818,6 +8691,32 @@ typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT { +#define VK_EXT_pipeline_creation_feedback 1 +#define VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION 1 +#define VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME "VK_EXT_pipeline_creation_feedback" + +typedef enum VkPipelineCreationFeedbackFlagBitsEXT { + VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT = 0x00000001, + VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT = 0x00000002, + VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT = 0x00000004, + VK_PIPELINE_CREATION_FEEDBACK_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF +} VkPipelineCreationFeedbackFlagBitsEXT; +typedef VkFlags VkPipelineCreationFeedbackFlagsEXT; +typedef struct VkPipelineCreationFeedbackEXT { + VkPipelineCreationFeedbackFlagsEXT flags; + uint64_t duration; +} VkPipelineCreationFeedbackEXT; + +typedef struct VkPipelineCreationFeedbackCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkPipelineCreationFeedbackEXT* pPipelineCreationFeedback; + uint32_t pipelineStageCreationFeedbackCount; + VkPipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacks; +} VkPipelineCreationFeedbackCreateInfoEXT; + + + #define VK_NV_shader_subgroup_partitioned 1 #define VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION 1 #define VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME "VK_NV_shader_subgroup_partitioned" @@ -8826,7 +8725,6 @@ typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT { #define VK_NV_compute_shader_derivatives 1 #define VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION 1 #define VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME "VK_NV_compute_shader_derivatives" - typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesNV { VkStructureType sType; void* pNext; @@ -8839,7 +8737,6 @@ typedef struct VkPhysicalDeviceComputeShaderDerivativesFeaturesNV { #define VK_NV_mesh_shader 1 #define VK_NV_MESH_SHADER_SPEC_VERSION 1 #define VK_NV_MESH_SHADER_EXTENSION_NAME "VK_NV_mesh_shader" - typedef struct VkPhysicalDeviceMeshShaderFeaturesNV { VkStructureType sType; void* pNext; @@ -8870,7 +8767,6 @@ typedef struct VkDrawMeshTasksIndirectCommandNV { uint32_t firstTask; } VkDrawMeshTasksIndirectCommandNV; - typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksNV)(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask); typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectNV)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawMeshTasksIndirectCountNV)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); @@ -8898,10 +8794,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectCountNV( uint32_t stride); #endif + #define VK_NV_fragment_shader_barycentric 1 #define VK_NV_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION 1 #define VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME "VK_NV_fragment_shader_barycentric" - typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV { VkStructureType sType; void* pNext; @@ -8913,7 +8809,6 @@ typedef struct VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV { #define VK_NV_shader_image_footprint 1 #define VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION 1 #define VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME "VK_NV_shader_image_footprint" - typedef struct VkPhysicalDeviceShaderImageFootprintFeaturesNV { VkStructureType sType; void* pNext; @@ -8925,7 +8820,6 @@ typedef struct VkPhysicalDeviceShaderImageFootprintFeaturesNV { #define VK_NV_scissor_exclusive 1 #define VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION 1 #define VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME "VK_NV_scissor_exclusive" - typedef struct VkPipelineViewportExclusiveScissorStateCreateInfoNV { VkStructureType sType; const void* pNext; @@ -8939,7 +8833,6 @@ typedef struct VkPhysicalDeviceExclusiveScissorFeaturesNV { VkBool32 exclusiveScissor; } VkPhysicalDeviceExclusiveScissorFeaturesNV; - typedef void (VKAPI_PTR *PFN_vkCmdSetExclusiveScissorNV)(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors); #ifndef VK_NO_PROTOTYPES @@ -8950,10 +8843,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetExclusiveScissorNV( const VkRect2D* pExclusiveScissors); #endif + #define VK_NV_device_diagnostic_checkpoints 1 #define VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_SPEC_VERSION 2 #define VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME "VK_NV_device_diagnostic_checkpoints" - typedef struct VkQueueFamilyCheckpointPropertiesNV { VkStructureType sType; void* pNext; @@ -8967,7 +8860,6 @@ typedef struct VkCheckpointDataNV { void* pCheckpointMarker; } VkCheckpointDataNV; - typedef void (VKAPI_PTR *PFN_vkCmdSetCheckpointNV)(VkCommandBuffer commandBuffer, const void* pCheckpointMarker); typedef void (VKAPI_PTR *PFN_vkGetQueueCheckpointDataNV)(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData); @@ -8982,10 +8874,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointDataNV( VkCheckpointDataNV* pCheckpointData); #endif + #define VK_EXT_pci_bus_info 1 #define VK_EXT_PCI_BUS_INFO_SPEC_VERSION 2 #define VK_EXT_PCI_BUS_INFO_EXTENSION_NAME "VK_EXT_pci_bus_info" - typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT { VkStructureType sType; void* pNext; @@ -8997,10 +8889,33 @@ typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT { +#define VK_AMD_display_native_hdr 1 +#define VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION 1 +#define VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME "VK_AMD_display_native_hdr" +typedef struct VkDisplayNativeHdrSurfaceCapabilitiesAMD { + VkStructureType sType; + void* pNext; + VkBool32 localDimmingSupport; +} VkDisplayNativeHdrSurfaceCapabilitiesAMD; + +typedef struct VkSwapchainDisplayNativeHdrCreateInfoAMD { + VkStructureType sType; + const void* pNext; + VkBool32 localDimmingEnable; +} VkSwapchainDisplayNativeHdrCreateInfoAMD; + +typedef void (VKAPI_PTR *PFN_vkSetLocalDimmingAMD)(VkSwapchainKHR swapChain, VkBool32 localDimmingEnable); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkSetLocalDimmingAMD( + VkSwapchainKHR swapChain, + VkBool32 localDimmingEnable); +#endif + + #define VK_EXT_fragment_density_map 1 #define VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION 1 #define VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME "VK_EXT_fragment_density_map" - typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT { VkStructureType sType; void* pNext; @@ -9028,7 +8943,6 @@ typedef struct VkRenderPassFragmentDensityMapCreateInfoEXT { #define VK_EXT_scalar_block_layout 1 #define VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION 1 #define VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME "VK_EXT_scalar_block_layout" - typedef struct VkPhysicalDeviceScalarBlockLayoutFeaturesEXT { VkStructureType sType; void* pNext; @@ -9050,7 +8964,6 @@ typedef struct VkPhysicalDeviceScalarBlockLayoutFeaturesEXT { #define VK_EXT_memory_budget 1 #define VK_EXT_MEMORY_BUDGET_SPEC_VERSION 1 #define VK_EXT_MEMORY_BUDGET_EXTENSION_NAME "VK_EXT_memory_budget" - typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT { VkStructureType sType; void* pNext; @@ -9063,7 +8976,6 @@ typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT { #define VK_EXT_memory_priority 1 #define VK_EXT_MEMORY_PRIORITY_SPEC_VERSION 1 #define VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME "VK_EXT_memory_priority" - typedef struct VkPhysicalDeviceMemoryPriorityFeaturesEXT { VkStructureType sType; void* pNext; @@ -9081,7 +8993,6 @@ typedef struct VkMemoryPriorityAllocateInfoEXT { #define VK_NV_dedicated_allocation_image_aliasing 1 #define VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_SPEC_VERSION 1 #define VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME "VK_NV_dedicated_allocation_image_aliasing" - typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { VkStructureType sType; void* pNext; @@ -9092,10 +9003,8 @@ typedef struct VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { #define VK_EXT_buffer_device_address 1 typedef uint64_t VkDeviceAddress; - #define VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION 2 #define VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME "VK_EXT_buffer_device_address" - typedef struct VkPhysicalDeviceBufferAddressFeaturesEXT { VkStructureType sType; void* pNext; @@ -9113,10 +9022,9 @@ typedef struct VkBufferDeviceAddressInfoEXT { typedef struct VkBufferDeviceAddressCreateInfoEXT { VkStructureType sType; const void* pNext; - VkDeviceSize deviceAddress; + VkDeviceAddress deviceAddress; } VkBufferDeviceAddressCreateInfoEXT; - typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetBufferDeviceAddressEXT)(VkDevice device, const VkBufferDeviceAddressInfoEXT* pInfo); #ifndef VK_NO_PROTOTYPES @@ -9125,10 +9033,10 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressEXT( const VkBufferDeviceAddressInfoEXT* pInfo); #endif + #define VK_EXT_separate_stencil_usage 1 #define VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION 1 #define VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME "VK_EXT_separate_stencil_usage" - typedef struct VkImageStencilUsageCreateInfoEXT { VkStructureType sType; const void* pNext; @@ -9141,7 +9049,6 @@ typedef struct VkImageStencilUsageCreateInfoEXT { #define VK_EXT_VALIDATION_FEATURES_SPEC_VERSION 1 #define VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME "VK_EXT_validation_features" - typedef enum VkValidationFeatureEnableEXT { VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0, VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1, @@ -9164,7 +9071,6 @@ typedef enum VkValidationFeatureDisableEXT { VK_VALIDATION_FEATURE_DISABLE_RANGE_SIZE_EXT = (VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT - VK_VALIDATION_FEATURE_DISABLE_ALL_EXT + 1), VK_VALIDATION_FEATURE_DISABLE_MAX_ENUM_EXT = 0x7FFFFFFF } VkValidationFeatureDisableEXT; - typedef struct VkValidationFeaturesEXT { VkStructureType sType; const void* pNext; @@ -9180,7 +9086,6 @@ typedef struct VkValidationFeaturesEXT { #define VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION 1 #define VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME "VK_NV_cooperative_matrix" - typedef enum VkComponentTypeNV { VK_COMPONENT_TYPE_FLOAT16_NV = 0, VK_COMPONENT_TYPE_FLOAT32_NV = 1, @@ -9209,7 +9114,6 @@ typedef enum VkScopeNV { VK_SCOPE_RANGE_SIZE_NV = (VK_SCOPE_QUEUE_FAMILY_NV - VK_SCOPE_DEVICE_NV + 1), VK_SCOPE_MAX_ENUM_NV = 0x7FFFFFFF } VkScopeNV; - typedef struct VkCooperativeMatrixPropertiesNV { VkStructureType sType; void* pNext; @@ -9236,7 +9140,6 @@ typedef struct VkPhysicalDeviceCooperativeMatrixPropertiesNV { VkShaderStageFlags cooperativeMatrixSupportedStages; } VkPhysicalDeviceCooperativeMatrixPropertiesNV; - typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties); #ifndef VK_NO_PROTOTYPES @@ -9246,10 +9149,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesNV( VkCooperativeMatrixPropertiesNV* pProperties); #endif + #define VK_EXT_ycbcr_image_arrays 1 #define VK_EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION 1 #define VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME "VK_EXT_ycbcr_image_arrays" - typedef struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT { VkStructureType sType; void* pNext; @@ -9258,6 +9161,25 @@ typedef struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT { +#define VK_EXT_host_query_reset 1 +#define VK_EXT_HOST_QUERY_RESET_SPEC_VERSION 1 +#define VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME "VK_EXT_host_query_reset" +typedef struct VkPhysicalDeviceHostQueryResetFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 hostQueryReset; +} VkPhysicalDeviceHostQueryResetFeaturesEXT; + +typedef void (VKAPI_PTR *PFN_vkResetQueryPoolEXT)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkResetQueryPoolEXT( + VkDevice device, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount); +#endif + #ifdef __cplusplus } #endif diff --git a/include/vulkan/vulkan_fuchsia.h b/include/vulkan/vulkan_fuchsia.h index 1c335fd..4c62a7c 100644 --- a/include/vulkan/vulkan_fuchsia.h +++ b/include/vulkan/vulkan_fuchsia.h @@ -27,12 +27,11 @@ extern "C" { */ + #define VK_FUCHSIA_imagepipe_surface 1 #define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1 #define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface" - typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA; - typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA { VkStructureType sType; const void* pNext; @@ -40,7 +39,6 @@ typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA { zx_handle_t imagePipeHandle; } VkImagePipeSurfaceCreateInfoFUCHSIA; - typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES diff --git a/include/vulkan/vulkan_ggp.h b/include/vulkan/vulkan_ggp.h new file mode 100644 index 0000000..3d67c4b --- /dev/null +++ b/include/vulkan/vulkan_ggp.h @@ -0,0 +1,67 @@ +#ifndef VULKAN_GGP_H_ +#define VULKAN_GGP_H_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2015-2019 The Khronos Group Inc. +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +/* +** This header is generated from the Khronos Vulkan XML API Registry. +** +*/ + + + +#define VK_GGP_stream_descriptor_surface 1 +#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1 +#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface" +typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP; +typedef struct VkStreamDescriptorSurfaceCreateInfoGGP { + VkStructureType sType; + const void* pNext; + VkStreamDescriptorSurfaceCreateFlagsGGP flags; + GgpStreamDescriptor streamDescriptor; +} VkStreamDescriptorSurfaceCreateInfoGGP; + +typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP( + VkInstance instance, + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); +#endif + + +#define VK_GGP_frame_token 1 +#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1 +#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token" +typedef struct VkPresentFrameTokenGGP { + VkStructureType sType; + const void* pNext; + GgpFrameToken frameToken; +} VkPresentFrameTokenGGP; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/vulkan/vulkan_ios.h b/include/vulkan/vulkan_ios.h index d221a9b..1846df5 100644 --- a/include/vulkan/vulkan_ios.h +++ b/include/vulkan/vulkan_ios.h @@ -27,12 +27,11 @@ extern "C" { */ + #define VK_MVK_ios_surface 1 #define VK_MVK_IOS_SURFACE_SPEC_VERSION 2 #define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" - typedef VkFlags VkIOSSurfaceCreateFlagsMVK; - typedef struct VkIOSSurfaceCreateInfoMVK { VkStructureType sType; const void* pNext; @@ -40,7 +39,6 @@ typedef struct VkIOSSurfaceCreateInfoMVK { const void* pView; } VkIOSSurfaceCreateInfoMVK; - typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES diff --git a/include/vulkan/vulkan_macos.h b/include/vulkan/vulkan_macos.h index 5d6b6ae..dca623b 100644 --- a/include/vulkan/vulkan_macos.h +++ b/include/vulkan/vulkan_macos.h @@ -27,12 +27,11 @@ extern "C" { */ + #define VK_MVK_macos_surface 1 #define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2 #define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" - typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; - typedef struct VkMacOSSurfaceCreateInfoMVK { VkStructureType sType; const void* pNext; @@ -40,7 +39,6 @@ typedef struct VkMacOSSurfaceCreateInfoMVK { const void* pView; } VkMacOSSurfaceCreateInfoMVK; - typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES diff --git a/include/vulkan/vulkan_metal.h b/include/vulkan/vulkan_metal.h index 7915619..1650523 100644 --- a/include/vulkan/vulkan_metal.h +++ b/include/vulkan/vulkan_metal.h @@ -27,6 +27,7 @@ extern "C" { */ + #define VK_EXT_metal_surface 1 #ifdef __OBJC__ @@ -35,12 +36,9 @@ extern "C" { typedef void CAMetalLayer; #endif - #define VK_EXT_METAL_SURFACE_SPEC_VERSION 1 #define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface" - typedef VkFlags VkMetalSurfaceCreateFlagsEXT; - typedef struct VkMetalSurfaceCreateInfoEXT { VkStructureType sType; const void* pNext; @@ -48,7 +46,6 @@ typedef struct VkMetalSurfaceCreateInfoEXT { const CAMetalLayer* pLayer; } VkMetalSurfaceCreateInfoEXT; - typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES diff --git a/include/vulkan/vulkan_vi.h b/include/vulkan/vulkan_vi.h index 3e37bab..50aa27d 100644 --- a/include/vulkan/vulkan_vi.h +++ b/include/vulkan/vulkan_vi.h @@ -27,12 +27,11 @@ extern "C" { */ + #define VK_NN_vi_surface 1 #define VK_NN_VI_SURFACE_SPEC_VERSION 1 #define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" - typedef VkFlags VkViSurfaceCreateFlagsNN; - typedef struct VkViSurfaceCreateInfoNN { VkStructureType sType; const void* pNext; @@ -40,7 +39,6 @@ typedef struct VkViSurfaceCreateInfoNN { void* window; } VkViSurfaceCreateInfoNN; - typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); #ifndef VK_NO_PROTOTYPES diff --git a/include/vulkan/vulkan_wayland.h b/include/vulkan/vulkan_wayland.h index 33a22de..12a5f04 100644 --- a/include/vulkan/vulkan_wayland.h +++ b/include/vulkan/vulkan_wayland.h @@ -27,12 +27,11 @@ extern "C" { */ + #define VK_KHR_wayland_surface 1 #define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6 #define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface" - typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; - typedef struct VkWaylandSurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; @@ -41,7 +40,6 @@ typedef struct VkWaylandSurfaceCreateInfoKHR { struct wl_surface* surface; } VkWaylandSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display); diff --git a/include/vulkan/vulkan_win32.h b/include/vulkan/vulkan_win32.h index b9d63d4..d5e2741 100644 --- a/include/vulkan/vulkan_win32.h +++ b/include/vulkan/vulkan_win32.h @@ -27,12 +27,11 @@ extern "C" { */ + #define VK_KHR_win32_surface 1 #define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6 #define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface" - typedef VkFlags VkWin32SurfaceCreateFlagsKHR; - typedef struct VkWin32SurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; @@ -41,7 +40,6 @@ typedef struct VkWin32SurfaceCreateInfoKHR { HWND hwnd; } VkWin32SurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); @@ -57,10 +55,10 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( uint32_t queueFamilyIndex); #endif + #define VK_KHR_external_memory_win32 1 #define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32" - typedef struct VkImportMemoryWin32HandleInfoKHR { VkStructureType sType; const void* pNext; @@ -90,7 +88,6 @@ typedef struct VkMemoryGetWin32HandleInfoKHR { VkExternalMemoryHandleTypeFlagBits handleType; } VkMemoryGetWin32HandleInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); @@ -107,10 +104,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR( VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); #endif + #define VK_KHR_win32_keyed_mutex 1 #define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1 #define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex" - typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { VkStructureType sType; const void* pNext; @@ -128,7 +125,6 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { #define VK_KHR_external_semaphore_win32 1 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32" - typedef struct VkImportSemaphoreWin32HandleInfoKHR { VkStructureType sType; const void* pNext; @@ -163,7 +159,6 @@ typedef struct VkSemaphoreGetWin32HandleInfoKHR { VkExternalSemaphoreHandleTypeFlagBits handleType; } VkSemaphoreGetWin32HandleInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); @@ -178,10 +173,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR( HANDLE* pHandle); #endif + #define VK_KHR_external_fence_win32 1 #define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32" - typedef struct VkImportFenceWin32HandleInfoKHR { VkStructureType sType; const void* pNext; @@ -207,7 +202,6 @@ typedef struct VkFenceGetWin32HandleInfoKHR { VkExternalFenceHandleTypeFlagBits handleType; } VkFenceGetWin32HandleInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); @@ -222,10 +216,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR( HANDLE* pHandle); #endif + #define VK_NV_external_memory_win32 1 #define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 #define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" - typedef struct VkImportMemoryWin32HandleInfoNV { VkStructureType sType; const void* pNext; @@ -240,7 +234,6 @@ typedef struct VkExportMemoryWin32HandleInfoNV { DWORD dwAccess; } VkExportMemoryWin32HandleInfoNV; - typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); #ifndef VK_NO_PROTOTYPES @@ -251,10 +244,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV( HANDLE* pHandle); #endif + #define VK_NV_win32_keyed_mutex 1 #define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 #define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" - typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { VkStructureType sType; const void* pNext; @@ -269,6 +262,70 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { +#define VK_EXT_full_screen_exclusive 1 +#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 3 +#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive" + +typedef enum VkFullScreenExclusiveEXT { + VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0, + VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1, + VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2, + VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3, + VK_FULL_SCREEN_EXCLUSIVE_BEGIN_RANGE_EXT = VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT, + VK_FULL_SCREEN_EXCLUSIVE_END_RANGE_EXT = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT, + VK_FULL_SCREEN_EXCLUSIVE_RANGE_SIZE_EXT = (VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT - VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT + 1), + VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF +} VkFullScreenExclusiveEXT; +typedef struct VkSurfaceFullScreenExclusiveInfoEXT { + VkStructureType sType; + void* pNext; + VkFullScreenExclusiveEXT fullScreenExclusive; +} VkSurfaceFullScreenExclusiveInfoEXT; + +typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT { + VkStructureType sType; + void* pNext; + VkBool32 fullScreenExclusiveSupported; +} VkSurfaceCapabilitiesFullScreenExclusiveEXT; + +typedef struct VkPhysicalDeviceSurfaceInfo2KHR { + VkStructureType sType; + const void* pNext; + VkSurfaceKHR surface; +} VkPhysicalDeviceSurfaceInfo2KHR; + +typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT { + VkStructureType sType; + const void* pNext; + HMONITOR hmonitor; +} VkSurfaceFullScreenExclusiveWin32InfoEXT; + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); +typedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain); +typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain); +typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pPresentModeCount, + VkPresentModeKHR* pPresentModes); + +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT( + VkDevice device, + VkSwapchainKHR swapchain); + +VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT( + VkDevice device, + VkSwapchainKHR swapchain); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT( + VkDevice device, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkDeviceGroupPresentModeFlagsKHR* pModes); +#endif + #ifdef __cplusplus } #endif diff --git a/include/vulkan/vulkan_xcb.h b/include/vulkan/vulkan_xcb.h index f212909..7d6905d 100644 --- a/include/vulkan/vulkan_xcb.h +++ b/include/vulkan/vulkan_xcb.h @@ -27,12 +27,11 @@ extern "C" { */ + #define VK_KHR_xcb_surface 1 #define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 #define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface" - typedef VkFlags VkXcbSurfaceCreateFlagsKHR; - typedef struct VkXcbSurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; @@ -41,7 +40,6 @@ typedef struct VkXcbSurfaceCreateInfoKHR { xcb_window_t window; } VkXcbSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id); diff --git a/include/vulkan/vulkan_xlib.h b/include/vulkan/vulkan_xlib.h index ce3d36d..7a05d29 100644 --- a/include/vulkan/vulkan_xlib.h +++ b/include/vulkan/vulkan_xlib.h @@ -27,12 +27,11 @@ extern "C" { */ + #define VK_KHR_xlib_surface 1 #define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 #define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface" - typedef VkFlags VkXlibSurfaceCreateFlagsKHR; - typedef struct VkXlibSurfaceCreateInfoKHR { VkStructureType sType; const void* pNext; @@ -41,7 +40,6 @@ typedef struct VkXlibSurfaceCreateInfoKHR { Window window; } VkXlibSurfaceCreateInfoKHR; - typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID); diff --git a/include/vulkan/vulkan_xlib_xrandr.h b/include/vulkan/vulkan_xlib_xrandr.h index 25efb07..3a20953 100644 --- a/include/vulkan/vulkan_xlib_xrandr.h +++ b/include/vulkan/vulkan_xlib_xrandr.h @@ -27,10 +27,10 @@ extern "C" { */ + #define VK_EXT_acquire_xlib_display 1 #define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 #define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" - typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); diff --git a/registry/cgenerator.py b/registry/cgenerator.py index ab0c779..7f2d9bc 100644 --- a/registry/cgenerator.py +++ b/registry/cgenerator.py @@ -14,8 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os,re,sys,pdb -from generator import * +import os +import re +import sys +from generator import (GeneratorOptions, OutputGenerator, noneStr, + regSortFeatures, write) # CGeneratorOptions - subclass of GeneratorOptions. # @@ -51,9 +54,16 @@ from generator import * # parameter on a separate line # alignFuncParam - if nonzero and parameters are being put on a # separate line, align parameter names at the specified column +# genEnumBeginEndRange - True if BEGIN_RANGE / END_RANGE macros should +# be generated for enumerated types +# genAliasMacro - True if the OpenXR alias macro should be generated +# for aliased types (unclear what other circumstances this is useful) +# aliasMacro - alias macro to inject when genAliasMacro is True class CGeneratorOptions(GeneratorOptions): """Represents options during C interface generation for headers""" + def __init__(self, + conventions = None, filename = None, directory = '.', apiname = None, @@ -76,8 +86,12 @@ class CGeneratorOptions(GeneratorOptions): apientryp = '', indentFuncProto = True, indentFuncPointer = False, - alignFuncParam = 0): - GeneratorOptions.__init__(self, filename, directory, apiname, profile, + alignFuncParam = 0, + genEnumBeginEndRange = False, + genAliasMacro = False, + aliasMacro = '' + ): + GeneratorOptions.__init__(self, conventions, filename, directory, apiname, profile, versions, emitversions, defaultExtensions, addExtensions, removeExtensions, emitExtensions, sortProcedure) @@ -93,6 +107,9 @@ class CGeneratorOptions(GeneratorOptions): self.indentFuncProto = indentFuncProto self.indentFuncPointer = indentFuncPointer self.alignFuncParam = alignFuncParam + self.genEnumBeginEndRange = genEnumBeginEndRange + self.genAliasMacro = genAliasMacro + self.aliasMacro = aliasMacro # COutputGenerator - subclass of OutputGenerator. # Generates C-language API interfaces. @@ -116,21 +133,25 @@ class COutputGenerator(OutputGenerator): TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum', 'group', 'bitmask', 'funcpointer', 'struct'] ALL_SECTIONS = TYPE_SECTIONS + ['commandPointer', 'command'] + def __init__(self, errFile = sys.stderr, warnFile = sys.stderr, diagFile = sys.stdout): OutputGenerator.__init__(self, errFile, warnFile, diagFile) # Internal state - accumulators for different inner block text - self.sections = dict([(section, []) for section in self.ALL_SECTIONS]) - # + self.sections = {section: [] for section in self.ALL_SECTIONS} + self.feature_not_empty = False + self.need_platform_include = False + self.may_alias = None + def beginFile(self, genOpts): OutputGenerator.beginFile(self, genOpts) # C-specific # # Multiple inclusion protection & C++ wrappers. - if (genOpts.protectFile and self.genOpts.filename): - headerSym = re.sub('\.h', '_h_', + if genOpts.protectFile and self.genOpts.filename: + headerSym = re.sub(r'\.h', '_h_', os.path.basename(self.genOpts.filename)).upper() write('#ifndef', headerSym, file=self.outFile) write('#define', headerSym, '1', file=self.outFile) @@ -139,26 +160,12 @@ class COutputGenerator(OutputGenerator): write('extern "C" {', file=self.outFile) write('#endif', file=self.outFile) self.newline() - # + # User-supplied prefix text, if any (list of strings) - if (genOpts.prefixText): + if genOpts.prefixText: for s in genOpts.prefixText: write(s, file=self.outFile) - # - # Some boilerplate describing what was generated - this - # will probably be removed later since the extensions - # pattern may be very long. - # write('/* Generated C header for:', file=self.outFile) - # write(' * API:', genOpts.apiname, file=self.outFile) - # if (genOpts.profile): - # write(' * Profile:', genOpts.profile, file=self.outFile) - # write(' * Versions considered:', genOpts.versions, file=self.outFile) - # write(' * Versions emitted:', genOpts.emitversions, file=self.outFile) - # write(' * Default extensions included:', genOpts.defaultExtensions, file=self.outFile) - # write(' * Additional extensions included:', genOpts.addExtensions, file=self.outFile) - # write(' * Extensions removed:', genOpts.removeExtensions, file=self.outFile) - # write(' * Extensions emitted:', genOpts.emitExtensions, file=self.outFile) - # write(' */', file=self.outFile) + def endFile(self): # C-specific # Finish C++ wrapper and multiple inclusion protection @@ -166,11 +173,12 @@ class COutputGenerator(OutputGenerator): write('#ifdef __cplusplus', file=self.outFile) write('}', file=self.outFile) write('#endif', file=self.outFile) - if (self.genOpts.protectFile and self.genOpts.filename): + if self.genOpts.protectFile and self.genOpts.filename: self.newline() write('#endif', file=self.outFile) # Finish processing in superclass OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): # Start processing in superclass OutputGenerator.beginFeature(self, interface, emit) @@ -178,55 +186,68 @@ class COutputGenerator(OutputGenerator): # Accumulate includes, defines, types, enums, function pointer typedefs, # end function prototypes separately for this feature. They're only # printed in endFeature(). - self.sections = dict([(section, []) for section in self.ALL_SECTIONS]) + self.sections = {section: [] for section in self.ALL_SECTIONS} + self.feature_not_empty = False + def endFeature(self): # C-specific # Actually write the interface to the output file. - if (self.emit): - self.newline() - if (self.genOpts.protectFeature): - write('#ifndef', self.featureName, file=self.outFile) - # If type declarations are needed by other features based on - # this one, it may be necessary to suppress the ExtraProtect, - # or move it below the 'for section...' loop. - if (self.featureExtraProtect != None): - write('#ifdef', self.featureExtraProtect, file=self.outFile) - write('#define', self.featureName, '1', file=self.outFile) - for section in self.TYPE_SECTIONS: - contents = self.sections[section] - if contents: - write('\n'.join(contents), file=self.outFile) + if self.emit: + if self.feature_not_empty: + if self.genOpts.conventions.writeFeature(self.featureExtraProtect, self.genOpts.filename): self.newline() - if (self.genOpts.genFuncPointers and self.sections['commandPointer']): - write('\n'.join(self.sections['commandPointer']), file=self.outFile) - self.newline() - if (self.sections['command']): - if (self.genOpts.protectProto): - write(self.genOpts.protectProto, - self.genOpts.protectProtoStr, file=self.outFile) - write('\n'.join(self.sections['command']), end='', file=self.outFile) - if (self.genOpts.protectProto): - write('#endif', file=self.outFile) - else: + if self.genOpts.protectFeature: + write('#ifndef', self.featureName, file=self.outFile) + # If type declarations are needed by other features based on + # this one, it may be necessary to suppress the ExtraProtect, + # or move it below the 'for section...' loop. + if self.featureExtraProtect is not None: + write('#ifdef', self.featureExtraProtect, file=self.outFile) self.newline() - if (self.featureExtraProtect != None): - write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile) - if (self.genOpts.protectFeature): - write('#endif /*', self.featureName, '*/', file=self.outFile) + write('#define', self.featureName, '1', file=self.outFile) + for section in self.TYPE_SECTIONS: + # OpenXR: + # If we need the explicit include of the external platform header, + # put it right before the function pointer definitions + if section == "funcpointer" and self.need_platform_include: + write('// Include for OpenXR Platform-Specific Types', file=self.outFile) + write('#include "openxr_platform.h"', file=self.outFile) + self.newline() + self.need_platform_include = False + contents = self.sections[section] + if contents: + write('\n'.join(contents), file=self.outFile) + if self.genOpts.genFuncPointers and self.sections['commandPointer']: + write('\n'.join(self.sections['commandPointer']), file=self.outFile) + self.newline() + if self.sections['command']: + if self.genOpts.protectProto: + write(self.genOpts.protectProto, + self.genOpts.protectProtoStr, file=self.outFile) + write('\n'.join(self.sections['command']), end='', file=self.outFile) + if self.genOpts.protectProto: + write('#endif', file=self.outFile) + else: + self.newline() + if self.featureExtraProtect is not None: + write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile) + if self.genOpts.protectFeature: + write('#endif /*', self.featureName, '*/', file=self.outFile) # Finish processing in superclass OutputGenerator.endFeature(self) - # + # Append a definition to the specified section def appendSection(self, section, text): # self.sections[section].append('SECTION: ' + section + '\n') self.sections[section].append(text) - # self.logMsg('diag', 'appendSection(section =', section, 'text =', text) - # + self.feature_not_empty = True + # Type generation def genType(self, typeinfo, name, alias): OutputGenerator.genType(self, typeinfo, name, alias) typeElem = typeinfo.elem + # Vulkan: # Determine the category of the type, and the type section to add # its definition to. # 'funcpointer' is added to the 'struct' section as a workaround for @@ -238,11 +259,12 @@ class COutputGenerator(OutputGenerator): else: section = category - if category == 'struct' or category == 'union': + if category in ('struct', 'union'): # If the type is a struct type, generate it using the # special-purpose generator. self.genStruct(typeinfo, name, alias) else: + # OpenXR: this section was not under 'else:' previously, just fell through if alias: # If the type is an alias, just emit a typedef declaration body = 'typedef ' + alias + ' ' + name + ';\n' @@ -252,17 +274,65 @@ class COutputGenerator(OutputGenerator): # If the resulting text is an empty string, don't emit it. body = noneStr(typeElem.text) for elem in typeElem: - if (elem.tag == 'apientry'): + if elem.tag == 'apientry': body += self.genOpts.apientry + noneStr(elem.tail) else: body += noneStr(elem.text) + noneStr(elem.tail) - if body: # Add extra newline after multi-line entries. if '\n' in body[0:-1]: body += '\n' self.appendSection(section, body) - # + + # Protection string generation + # Protection strings are the strings defining the OS/Platform/Graphics + # requirements for a given OpenXR command. When generating the + # language header files, we need to make sure the items specific to a + # graphics API or OS platform are properly wrapped in #ifs. + def genProtectString(self, protect_str): + protect_if_str = '' + protect_end_str = '' + protect_list = [] + if protect_str: + if ',' in protect_str: + protect_list.extend(protect_str.split(",")) + protect_def_str = '' + count = 0 + for protect_define in protect_list: + if count > 0: + protect_def_str += ' &&' + protect_def_str += ' defined(%s)' % protect_define + count = count + 1 + count = count + 1 + protect_if_str = '#if' + protect_if_str += protect_def_str + protect_if_str += '\n' + protect_end_str = '#endif //' + protect_end_str += protect_def_str + protect_end_str += '\n' + else: + protect_if_str += '#ifdef %s\n' % protect_str + protect_end_str += '#endif // %s\n' % protect_str + return (protect_if_str, protect_end_str) + + def typeMayAlias(self, typeName): + if not self.may_alias: + # First time we've asked if a type may alias. + # So, let's populate the set of all names of types that may. + + # Everyone with an explicit mayalias="true" + self.may_alias = set(typeName + for typeName, data in self.registry.typedict.items() + if data.elem.get('mayalias') == 'true') + + # Every type mentioned in some other type's parentstruct attribute. + self.may_alias.update(set(x for x in + [otherType.elem.get('parentstruct') + for _, otherType in self.registry.typedict.items()] + if x is not None + )) + return typeName in self.may_alias + # Struct (e.g. C "struct" type) generation. # This is a special case of the tag where the contents are # interpreted as a set of tags instead of freeform C @@ -270,7 +340,7 @@ class COutputGenerator(OutputGenerator): # tags - they are a declaration of a struct or union member. # Only simple member declarations are supported (no nested # structs etc.) - # If alias != None, then this struct aliases another; just + # If alias is not None, then this struct aliases another; just # generate a typedef of that alias. def genStruct(self, typeinfo, typeName, alias): OutputGenerator.genStruct(self, typeinfo, typeName, alias) @@ -280,127 +350,65 @@ class COutputGenerator(OutputGenerator): if alias: body = 'typedef ' + alias + ' ' + typeName + ';\n' else: - body = 'typedef ' + typeElem.get('category') + ' ' + typeName + ' {\n' + body = '' + (protect_begin, protect_end) = self.genProtectString(typeElem.get('protect')) + if protect_begin: + body += protect_begin + body += 'typedef ' + typeElem.get('category') - targetLen = 0; + # This is an OpenXR-specific alternative where aliasing refers + # to an inheritance hierarchy of types rather than C-level type + # aliases. + if self.genOpts.genAliasMacro and self.typeMayAlias(typeName): + body += ' ' + self.genOpts.aliasMacro + + body += ' ' + typeName + ' {\n' + + targetLen = 0 for member in typeElem.findall('.//member'): targetLen = max(targetLen, self.getCParamTypeLength(member)) for member in typeElem.findall('.//member'): body += self.makeCParamDecl(member, targetLen + 4) body += ';\n' body += '} ' + typeName + ';\n' + if protect_end: + body += protect_end self.appendSection('struct', body) - # + # Group (e.g. C "enum" type) generation. # These are concatenated together with other types. - # If alias != None, it is the name of another group type + # If alias is not None, it is the name of another group type # which aliases this type; just generate that alias. def genGroup(self, groupinfo, groupName, alias = None): OutputGenerator.genGroup(self, groupinfo, groupName, alias) groupElem = groupinfo.elem - if alias: - # If the group name is aliased, just emit a typedef declaration - # for the alias. - body = 'typedef ' + alias + ' ' + groupName + ';\n' - else: - self.logMsg('diag', 'CGenerator.genGroup group =', groupName, 'alias =', alias) - - # Otherwise, emit an actual enumerated type declaration - expandName = re.sub(r'([0-9a-z_])([A-Z0-9])',r'\1_\2',groupName).upper() - - expandPrefix = expandName - expandSuffix = '' - expandSuffixMatch = re.search(r'[A-Z][A-Z]+$',groupName) - if expandSuffixMatch: - expandSuffix = '_' + expandSuffixMatch.group() - # Strip off the suffix from the prefix - expandPrefix = expandName.rsplit(expandSuffix, 1)[0] - - # Prefix - body = "\ntypedef enum " + groupName + " {\n" - - # @@ Should use the type="bitmask" attribute instead - isEnum = ('FLAG_BITS' not in expandPrefix) - - # Get a list of nested 'enum' tags. - enums = groupElem.findall('enum') - - # Check for and report duplicates, and return a list with them - # removed. - enums = self.checkDuplicateEnums(enums) - - # Loop over the nested 'enum' tags. Keep track of the minimum and - # maximum numeric values, if they can be determined; but only for - # core API enumerants, not extension enumerants. This is inferred - # by looking for 'extends' attributes. - minName = None - - # Accumulate non-numeric enumerant values separately and append - # them following the numeric values, to allow for aliases. - # NOTE: this doesn't do a topological sort yet, so aliases of - # aliases can still get in the wrong order. - aliasText = "" - - for elem in enums: - # Convert the value to an integer and use that to track min/max. - (numVal,strVal) = self.enumToValue(elem, True) - name = elem.get('name') - - # Extension enumerants are only included if they are required - if self.isEnumRequired(elem): - decl = " " + name + " = " + strVal + ",\n" - if numVal != None: - body += decl - else: - aliasText += decl - - # Don't track min/max for non-numbers (numVal == None) - if isEnum and numVal != None and elem.get('extends') is None: - if minName == None: - minName = maxName = name - minValue = maxValue = numVal - elif numVal < minValue: - minName = name - minValue = numVal - elif numVal > maxValue: - maxName = name - maxValue = numVal - - # Now append the non-numeric enumerant values - body += aliasText - - # Generate min/max value tokens and a range-padding enum. Need some - # additional padding to generate correct names... - if isEnum: - body += " " + expandPrefix + "_BEGIN_RANGE" + expandSuffix + " = " + minName + ",\n" - body += " " + expandPrefix + "_END_RANGE" + expandSuffix + " = " + maxName + ",\n" - body += " " + expandPrefix + "_RANGE_SIZE" + expandSuffix + " = (" + maxName + " - " + minName + " + 1),\n" - - body += " " + expandPrefix + "_MAX_ENUM" + expandSuffix + " = 0x7FFFFFFF\n" - - # Postfix - body += "} " + groupName + ";" - # After either enumerated type or alias paths, add the declaration # to the appropriate section for the group being defined. if groupElem.get('type') == 'bitmask': section = 'bitmask' else: section = 'group' - self.appendSection(section, body) + + if alias: + # If the group name is aliased, just emit a typedef declaration + # for the alias. + body = 'typedef ' + alias + ' ' + groupName + ';\n' + self.appendSection(section, body) + else: + (section, body) = self.buildEnumCDecl(self.genOpts.genEnumBeginEndRange, groupinfo, groupName) + self.appendSection(section, "\n" + body) # Enumerant generation # tags may specify their values in several ways, but are usually # just integers. def genEnum(self, enuminfo, name, alias): OutputGenerator.genEnum(self, enuminfo, name, alias) - (numVal,strVal) = self.enumToValue(enuminfo.elem, False) + (_, strVal) = self.enumToValue(enuminfo.elem, False) body = '#define ' + name.ljust(33) + ' ' + strVal self.appendSection('enum', body) - # # Command generation def genCmd(self, cmdinfo, name, alias): OutputGenerator.genCmd(self, cmdinfo, name, alias) @@ -413,5 +421,5 @@ class COutputGenerator(OutputGenerator): prefix = '' decls = self.makeCDecls(cmdinfo.elem) self.appendSection('command', prefix + decls[0] + '\n') - if (self.genOpts.genFuncPointers): + if self.genOpts.genFuncPointers: self.appendSection('commandPointer', decls[1]) diff --git a/registry/conventions.py b/registry/conventions.py new file mode 100644 index 0000000..7c0ac9f --- /dev/null +++ b/registry/conventions.py @@ -0,0 +1,132 @@ +#!/usr/bin/python3 -i +# +# Copyright (c) 2013-2019 The Khronos Group Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Base class for working-group-specific style conventions, +# used in generation. + +from abc import ABC, abstractmethod + + +class ConventionsBase(ABC): + """WG-specific conventions.""" + + @abstractmethod + def formatExtension(self, name): + """Mark up a name as an extension for the spec.""" + raise NotImplementedError + + @property + @abstractmethod + def null(self): + """Preferred spelling of NULL.""" + raise NotImplementedError + + def makeProseList(self, elements, connective='and'): + """Make a (comma-separated) list for use in prose. + + Adds a connective (by default, 'and') + before the last element if there are more than 1. + + Override with a different method or different call to + _implMakeProseList if you want to add a comma for two elements, + or not use a serial comma. + """ + return self._implMakeProseList(elements, connective) + + @property + def struct_macro(self): + """Get the appropriate format macro for a structure. + + May override. + """ + return 'sname:' + + def makeStructName(self, name): + """Prepend the appropriate format macro for a structure to a structure type name. + + Uses struct_macro, so just override that if you want to change behavior. + """ + return self.struct_macro + name + + @property + def external_macro(self): + """Get the appropriate format macro for an external type like uint32_t. + + May override. + """ + return 'basetype:' + + def makeExternalTypeName(self, name): + """Prepend the appropriate format macro for an external type like uint32_t to a type name. + + Uses external_macro, so just override that if you want to change behavior. + """ + return self.external_macro + name + + def _implMakeProseList(self, elements, connective, comma_for_two_elts=False, serial_comma=True): + """Internal-use implementation to make a (comma-separated) list for use in prose. + + Adds a connective (by default, 'and') + before the last element if there are more than 1, + and only includes commas if there are more than 2 + (if comma_for_two_elts is False). + + Don't edit these defaults, override self.makeProseList(). + """ + assert(serial_comma) # didn't implement what we didn't need + my_elts = list(elements) + if len(my_elts) > 1: + my_elts[-1] = '{} {}'.format(connective, my_elts[-1]) + + if not comma_for_two_elts and len(my_elts) <= 2: + return ' '.join(my_elts) + return ', '.join(my_elts) + + @property + @abstractmethod + def file_suffix(self): + """Return suffix of generated Asciidoctor files""" + raise NotImplementedError + + @property + @abstractmethod + def api_name(self): + """Return API name""" + raise NotImplementedError + + @property + @abstractmethod + def api_prefix(self): + """Return API token prefix""" + raise NotImplementedError + + @property + @abstractmethod + def api_version_prefix(self): + """Return API core version token prefix""" + raise NotImplementedError + + @property + @abstractmethod + def KHR_prefix(self): + """Return extension name prefix for KHR extensions""" + raise NotImplementedError + + @property + @abstractmethod + def EXT_prefix(self): + """Return extension name prefix for EXT extensions""" + raise NotImplementedError diff --git a/registry/generator.py b/registry/generator.py index fbd4f8d..d6a1afe 100644 --- a/registry/generator.py +++ b/registry/generator.py @@ -15,35 +15,34 @@ # limitations under the License. from __future__ import unicode_literals -import io,os,re,sys,pdb + +import io +import os +import re +import pdb +import sys +from pathlib import Path def write( *args, **kwargs ): file = kwargs.pop('file',sys.stdout) end = kwargs.pop('end','\n') - file.write(' '.join([str(arg) for arg in args])) + file.write(' '.join(str(arg) for arg in args)) file.write(end) # noneStr - returns string argument, or "" if argument is None. # Used in converting etree Elements into text. -# str - string to convert -def noneStr(str): - if (str): - return str - else: - return "" +# s - string to convert +def noneStr(s): + if s: + return s + return "" # enquote - returns string argument with surrounding quotes, # for serialization into Python code. -def enquote(str): - if (str): - return "'" + str + "'" - else: - return None - -# apiName - returns True if name is a Vulkan name (vk/Vk/VK prefix, or a -# function pointer type), False otherwise. -def apiName(str): - return str[0:2].lower() == 'vk' or str[0:3] == 'PFN' +def enquote(s): + if s: + return "'{}'".format(s) + return None # Primary sort key for regSortFeatures. # Sorts by category of the feature name string: @@ -52,14 +51,14 @@ def apiName(str): # other (EXT/vendor extensions) # This will need changing for Vulkan! def regSortCategoryKey(feature): - if (feature.elem.tag == 'feature'): + if feature.elem.tag == 'feature': return 0 - elif (feature.category == 'ARB' or - feature.category == 'KHR' or - feature.category == 'OES'): + if (feature.category == 'ARB' or + feature.category == 'KHR' or + feature.category == 'OES'): return 1 - else: - return 2 + + return 2 # Secondary sort key for regSortFeatures. # Sorts by extension name. @@ -90,6 +89,8 @@ def regSortFeatures(featureList): # Registry.apiGen() and by base OutputGenerator objects. # # Members +# conventions - may be mandatory for some generators: +# an object that implements ConventionsBase # filename - basename of file to generate, or None to write to stdout. # directory - directory in which to generate filename # apiname - string matching 'apiname' attribute, e.g. 'gl'. @@ -119,7 +120,9 @@ def regSortFeatures(featureList): # nothing. class GeneratorOptions: """Represents options during header production from an API registry""" + def __init__(self, + conventions = None, filename = None, directory = '.', apiname = None, @@ -131,6 +134,7 @@ class GeneratorOptions: removeExtensions = None, emitExtensions = None, sortProcedure = regSortFeatures): + self.conventions = conventions self.filename = filename self.directory = directory self.apiname = apiname @@ -142,14 +146,14 @@ class GeneratorOptions: self.removeExtensions = self.emptyRegex(removeExtensions) self.emitExtensions = self.emptyRegex(emitExtensions) self.sortProcedure = sortProcedure - # + # Substitute a regular expression which matches no version # or extension names for None or the empty string. - def emptyRegex(self,pat): - if (pat == None or pat == ''): + def emptyRegex(self, pat): + if pat is None or pat == '': return '_nomatch_^' - else: - return pat + + return pat # OutputGenerator - base class for generating API interfaces. # Manages basic logic, logging, and output file control @@ -195,7 +199,7 @@ class GeneratorOptions: # class OutputGenerator: """Generate specified API interfaces in a specific style, such as a C header""" - # + # categoryToPath - map XML 'category' to include file directory name categoryToPath = { 'bitmask' : 'flags', @@ -205,7 +209,7 @@ class OutputGenerator: 'define' : 'defines', 'basetype' : 'basetypes', } - # + # Constructor def __init__(self, errFile = sys.stderr, @@ -223,7 +227,7 @@ class OutputGenerator: self.extBase = 1000000000 self.extBlockSize = 1000 self.madeDirs = {} - # + # logMsg - write a message of different categories to different # destinations. # level - @@ -233,22 +237,22 @@ class OutputGenerator: # *args - print()-style arguments to direct to corresponding log def logMsg(self, level, *args): """Log a message at the given level. Can be ignored or log to a file""" - if (level == 'error'): + if level == 'error': strfile = io.StringIO() write('ERROR:', *args, file=strfile) - if (self.errFile != None): + if self.errFile is not None: write(strfile.getvalue(), file=self.errFile) raise UserWarning(strfile.getvalue()) - elif (level == 'warn'): - if (self.warnFile != None): + elif level == 'warn': + if self.warnFile is not None: write('WARNING:', *args, file=self.warnFile) - elif (level == 'diag'): - if (self.diagFile != None): + elif level == 'diag': + if self.diagFile is not None: write('DIAG:', *args, file=self.diagFile) else: raise UserWarning( '*** FATAL ERROR in Generator.logMsg: unknown level:' + level) - # + # enumToValue - parses and converts an tag into a value. # Returns a list # first element - integer representation of the value, or None @@ -264,39 +268,41 @@ class OutputGenerator: # 'extbase' extension name, which is then cast to the # typename specified by 'extends'. This requires probing # the registry database, and imbeds knowledge of the - # Vulkan extension enum scheme in this function. + # API extension enum scheme in this function. # A 'alias' attribute contains the name of another enum # which this is an alias of. The other enum must be # declared first when emitting this enum. def enumToValue(self, elem, needsNum): name = elem.get('name') numVal = None - if ('value' in elem.keys()): + if 'value' in elem.keys(): value = elem.get('value') # print('About to translate value =', value, 'type =', type(value)) - if (needsNum): + if needsNum: numVal = int(value, 0) # If there's a non-integer, numeric 'type' attribute (e.g. 'u' or # 'ull'), append it to the string value. # t = enuminfo.elem.get('type') - # if (t != None and t != '' and t != 'i' and t != 's'): + # if t is not None and t != '' and t != 'i' and t != 's': # value += enuminfo.type self.logMsg('diag', 'Enum', name, '-> value [', numVal, ',', value, ']') return [numVal, value] - if ('bitpos' in elem.keys()): + if 'bitpos' in elem.keys(): value = elem.get('bitpos') - numVal = int(value, 0) - numVal = 1 << numVal + bitpos = int(value, 0) + numVal = 1 << bitpos value = '0x%08x' % numVal + if( bitpos >= 32 ): + value = value + 'ULL' self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']') return [numVal, value] - if ('offset' in elem.keys()): + if 'offset' in elem.keys(): # Obtain values in the mapping from the attributes enumNegative = False offset = int(elem.get('offset'),0) extnumber = int(elem.get('extnumber'),0) extends = elem.get('extends') - if ('dir' in elem.keys()): + if 'dir' in elem.keys(): enumNegative = True self.logMsg('diag', 'Enum', name, 'offset =', offset, 'extnumber =', extnumber, 'extends =', extends, @@ -304,8 +310,8 @@ class OutputGenerator: # Now determine the actual enumerant value, as defined # in the "Layers and Extensions" appendix of the spec. numVal = self.extBase + (extnumber - 1) * self.extBlockSize + offset - if (enumNegative): - numVal = -numVal + if enumNegative: + numVal *= -1 value = '%d' % numVal # More logic needed! self.logMsg('diag', 'Enum', name, '-> offset [', numVal, ',', value, ']') @@ -313,7 +319,7 @@ class OutputGenerator: if 'alias' in elem.keys(): return [None, elem.get('alias')] return [None, None] - # + # checkDuplicateEnums - sanity check for enumerated values # enums - list of Elements # returns the list with duplicates stripped @@ -336,7 +342,7 @@ class OutputGenerator: # Duplicate enum values for the same name are benign. This # happens when defining the same enum conditionally in # several extension blocks. - if (strVal2 == strVal or (numVal != None and + if (strVal2 == strVal or (numVal is not None and numVal == numVal2)): True # self.logMsg('info', 'checkDuplicateEnums: Duplicate enum (' + name + @@ -361,7 +367,7 @@ class OutputGenerator: # Track this enum to detect followon duplicates nameMap[name] = [ elem, numVal, strVal ] - if numVal != None: + if numVal is not None: valueMap[numVal] = [ elem, numVal, strVal ] # Add this enum to the list @@ -369,58 +375,194 @@ class OutputGenerator: # Return the list return stripped - # + + # buildEnumCDecl + # Generates the C declaration for an enum + def buildEnumCDecl(self, expand, groupinfo, groupName): + groupElem = groupinfo.elem + + if self.genOpts.conventions.constFlagBits and groupElem.get('type') == 'bitmask': + return self.buildEnumCDecl_Bitmask( groupinfo, groupName) + else: + return self.buildEnumCDecl_Enum(expand, groupinfo, groupName) + + # buildEnumCDecl_Bitmask + # Generates the C declaration for an "enum" that is actually a + # set of flag bits + def buildEnumCDecl_Bitmask(self, groupinfo, groupName): + groupElem = groupinfo.elem + flagTypeName = groupinfo.flagType.elem.get('name') + + # Prefix + body = "// Flag bits for " + flagTypeName + "\n" + + # Loop over the nested 'enum' tags. + for elem in groupElem.findall('enum'): + # Convert the value to an integer and use that to track min/max. + # Values of form -(number) are accepted but nothing more complex. + # Should catch exceptions here for more complex constructs. Not yet. + (_, strVal) = self.enumToValue(elem, True) + name = elem.get('name') + body += "static const " + flagTypeName + " " + name + " = " + strVal + ";\n" + + # Postfix + + return ("bitmask", body) + + # Generates the C declaration for an enumerated type + def buildEnumCDecl_Enum(self, expand, groupinfo, groupName): + groupElem = groupinfo.elem + + # Break the group name into prefix and suffix portions for range + # enum generation + expandName = re.sub(r'([0-9a-z_])([A-Z0-9])',r'\1_\2',groupName).upper() + expandPrefix = expandName + expandSuffix = '' + expandSuffixMatch = re.search(r'[A-Z][A-Z]+$',groupName) + if expandSuffixMatch: + expandSuffix = '_' + expandSuffixMatch.group() + # Strip off the suffix from the prefix + expandPrefix = expandName.rsplit(expandSuffix, 1)[0] + + # Prefix + body = "typedef enum " + groupName + " {\n" + + # @@ Should use the type="bitmask" attribute instead + isEnum = ('FLAG_BITS' not in expandPrefix) + + # Get a list of nested 'enum' tags. + enums = groupElem.findall('enum') + + # Check for and report duplicates, and return a list with them + # removed. + enums = self.checkDuplicateEnums(enums) + + # Loop over the nested 'enum' tags. Keep track of the minimum and + # maximum numeric values, if they can be determined; but only for + # core API enumerants, not extension enumerants. This is inferred + # by looking for 'extends' attributes. + minName = None + + # Accumulate non-numeric enumerant values separately and append + # them following the numeric values, to allow for aliases. + # NOTE: this doesn't do a topological sort yet, so aliases of + # aliases can still get in the wrong order. + aliasText = "" + + for elem in enums: + # Convert the value to an integer and use that to track min/max. + # Values of form -(number) are accepted but nothing more complex. + # Should catch exceptions here for more complex constructs. Not yet. + (numVal,strVal) = self.enumToValue(elem, True) + name = elem.get('name') + + # Extension enumerants are only included if they are required + if self.isEnumRequired(elem): + decl = " " + name + " = " + strVal + ",\n" + if numVal is not None: + body += decl + else: + aliasText += decl + + # Don't track min/max for non-numbers (numVal is None) + if isEnum and numVal is not None and elem.get('extends') is None: + if minName is None: + minName = maxName = name + minValue = maxValue = numVal + elif numVal < minValue: + minName = name + minValue = numVal + elif numVal > maxValue: + maxName = name + maxValue = numVal + + # Now append the non-numeric enumerant values + body += aliasText + + # Generate min/max value tokens and a range-padding enum. Need some + # additional padding to generate correct names... + if isEnum and expand: + body += " " + expandPrefix + "_BEGIN_RANGE" + expandSuffix + " = " + minName + ",\n" + body += " " + expandPrefix + "_END_RANGE" + expandSuffix + " = " + maxName + ",\n" + body += " " + expandPrefix + "_RANGE_SIZE" + expandSuffix + " = (" + maxName + " - " + minName + " + 1),\n" + + # Always generate this to make sure the enumerated type is 32 bits + body += " " + expandPrefix + "_MAX_ENUM" + expandSuffix + " = 0x7FFFFFFF\n" + + # Postfix + body += "} " + groupName + ";" + + # Determine appropriate section for this declaration + if groupElem.get('type') == 'bitmask': + section = 'bitmask' + else: + section = 'group' + + return (section, body) + def makeDir(self, path): self.logMsg('diag', 'OutputGenerator::makeDir(' + path + ')') - if not (path in self.madeDirs.keys()): + if path not in self.madeDirs: # This can get race conditions with multiple writers, see # https://stackoverflow.com/questions/273192/ if not os.path.exists(path): os.makedirs(path) self.madeDirs[path] = None - # + def beginFile(self, genOpts): self.genOpts = genOpts - # + # Open specified output file. Not done in constructor since a # Generator can be used without writing to a file. - if (self.genOpts.filename != None): - filename = self.genOpts.directory + '/' + self.genOpts.filename - self.outFile = io.open(filename, 'w', encoding='utf-8') + if self.genOpts.filename is not None: + if sys.platform == 'win32': + directory = Path(self.genOpts.directory) + if not os.path.exists(directory): + os.makedirs(directory) + self.outFile = io.open(directory / self.genOpts.filename, 'w', encoding='utf-8') + else: + filename = self.genOpts.directory + '/' + self.genOpts.filename + self.outFile = io.open(filename, 'w', encoding='utf-8') else: self.outFile = sys.stdout + def endFile(self): - self.errFile and self.errFile.flush() - self.warnFile and self.warnFile.flush() - self.diagFile and self.diagFile.flush() + if self.errFile: + self.errFile.flush() + if self.warnFile: + self.warnFile.flush() + if self.diagFile: + self.diagFile.flush() self.outFile.flush() - if (self.outFile != sys.stdout and self.outFile != sys.stderr): + if self.outFile != sys.stdout and self.outFile != sys.stderr: self.outFile.close() self.genOpts = None - # + def beginFeature(self, interface, emit): self.emit = emit self.featureName = interface.get('name') # If there's an additional 'protect' attribute in the feature, save it self.featureExtraProtect = interface.get('protect') + def endFeature(self): # Derived classes responsible for emitting feature self.featureName = None self.featureExtraProtect = None + # Utility method to validate we're generating something only inside a # tag def validateFeature(self, featureType, featureName): - if (self.featureName == None): + if self.featureName is None: raise UserWarning('Attempt to generate', featureType, - featureName, 'when not in feature') - # + featureName, 'when not in feature') + # Type generation def genType(self, typeinfo, name, alias): self.validateFeature('type', name) - # + # Struct (e.g. C "struct" type) generation - def genStruct(self, typeinfo, name, alias): - self.validateFeature('struct', name) + def genStruct(self, typeinfo, typeName, alias): + self.validateFeature('struct', typeName) # The mixed-mode tags may contain no-op tags. # It is convenient to remove them here where all output generators @@ -428,28 +570,29 @@ class OutputGenerator: for member in typeinfo.elem.findall('.//member'): for comment in member.findall('comment'): member.remove(comment) - # + # Group (e.g. C "enum" type) generation - def genGroup(self, groupinfo, name, alias): - self.validateFeature('group', name) - # + def genGroup(self, groupinfo, groupName, alias): + self.validateFeature('group', groupName) + # Enumerant (really, constant) generation - def genEnum(self, enuminfo, name, alias): - self.validateFeature('enum', name) - # + def genEnum(self, enuminfo, typeName, alias): + self.validateFeature('enum', typeName) + # Command generation - def genCmd(self, cmd, name, alias): - self.validateFeature('command', name) - # + def genCmd(self, cmd, cmdinfo, alias): + self.validateFeature('command', cmdinfo) + # Utility functions - turn a into C-language prototype # and typedef declarations for that name. # name - contents of tag # tail - whatever text follows that tag in the Element def makeProtoName(self, name, tail): return self.genOpts.apientry + name + tail + def makeTypedefName(self, name, tail): - return '(' + self.genOpts.apientryp + 'PFN_' + name + tail + ')' - # + return '(' + self.genOpts.apientryp + 'PFN_' + name + tail + ')' + # makeCParamDecl - return a string which is an indented, formatted # declaration for a or block (e.g. function parameter # or structure/union member). @@ -461,7 +604,11 @@ class OutputGenerator: for elem in param: text = noneStr(elem.text) tail = noneStr(elem.tail) - if (elem.tag == 'name' and aligncol > 0): + + if self.genOpts.conventions.is_voidpointer_alias(elem.tag, text, tail): + # OpenXR-specific macro insertion + tail = self.genOpts.conventions.make_voidpointer_alias(tail) + if elem.tag == 'name' and aligncol > 0: self.logMsg('diag', 'Aligning parameter', elem.text, 'to column', self.genOpts.alignFuncParam) # Align at specified column, if possible paramdecl = paramdecl.rstrip() @@ -474,7 +621,7 @@ class OutputGenerator: self.logMsg('diag', 'Adjust length of parameter decl from', oldLen, 'to', newLen, ':', paramdecl) paramdecl += text + tail return paramdecl - # + # getCParamTypeLength - return the length of the type field is an indented, formatted # declaration for a or block (e.g. function parameter # or structure/union member). @@ -484,18 +631,23 @@ class OutputGenerator: for elem in param: text = noneStr(elem.text) tail = noneStr(elem.tail) - if (elem.tag == 'name'): + + if self.genOpts.conventions.is_voidpointer_alias(elem.tag, text, tail): + # OpenXR-specific macro insertion + tail = self.genOpts.conventions.make_voidpointer_alias(tail) + if elem.tag == 'name': # Align at specified column, if possible newLen = len(paramdecl.rstrip()) self.logMsg('diag', 'Identifying length of', elem.text, 'as', newLen) paramdecl += text + tail + return newLen - # + # isEnumRequired(elem) - return True if this element is # required, False otherwise # elem - element to test def isEnumRequired(self, elem): - required = elem.get('required') != None + required = elem.get('required') is not None self.logMsg('diag', 'isEnumRequired:', elem.get('name'), '->', required) return required @@ -520,7 +672,6 @@ class OutputGenerator: return required - # # makeCDecls - return C prototype and function pointer typedef for a # command, as a two-element list of strings. # cmd - Element containing a tag @@ -531,7 +682,7 @@ class OutputGenerator: # Begin accumulating prototype and typedef strings pdecl = self.genOpts.apicall tdecl = 'typedef ' - # + # Insert the function return type/name. # For prototypes, add APIENTRY macro before the name # For typedefs, add (APIENTRY *) around the name and @@ -547,7 +698,7 @@ class OutputGenerator: for elem in proto: text = noneStr(elem.text) tail = noneStr(elem.tail) - if (elem.tag == 'name'): + if elem.tag == 'name': pdecl += self.makeProtoName(text, tail) tdecl += self.makeTypedefName(text, tail) else: @@ -560,36 +711,28 @@ class OutputGenerator: # Uses: self.indentFuncProto # self.indentFuncPointer # self.alignFuncParam - # Might be able to doubly-nest the joins, e.g. - # ','.join(('_'.join([l[i] for i in range(0,len(l))]) n = len(params) # Indented parameters if n > 0: indentdecl = '(\n' - for i in range(0,n): - paramdecl = self.makeCParamDecl(params[i], self.genOpts.alignFuncParam) - if (i < n - 1): - paramdecl += ',\n' - else: - paramdecl += ');' - indentdecl += paramdecl + indentdecl += ',\n'.join(self.makeCParamDecl(p, self.genOpts.alignFuncParam) + for p in params) + indentdecl += ');' else: indentdecl = '(void);' # Non-indented parameters paramdecl = '(' if n > 0: - for i in range(0,n): - paramdecl += ''.join([t for t in params[i].itertext()]) - if (i < n - 1): - paramdecl += ', ' + paramnames = (''.join(t for t in p.itertext()) + for p in params) + paramdecl += ', '.join(paramnames) else: paramdecl += 'void' - paramdecl += ");"; + paramdecl += ");" return [ pdecl + indentdecl, tdecl + paramdecl ] - # + def newline(self): write('', file=self.outFile) def setRegistry(self, registry): self.registry = registry - # diff --git a/registry/genvk.py b/registry/genvk.py index 7034a3d..5fbeb47 100644 --- a/registry/genvk.py +++ b/registry/genvk.py @@ -23,7 +23,7 @@ from extensionmetadocgenerator import ExtensionMetaDocGeneratorOptions, Extensio from pygenerator import PyOutputGenerator from validitygenerator import ValidityOutputGenerator from hostsyncgenerator import HostSynchronizationOutputGenerator -from extensionStubSource import ExtensionStubSourceOutputGenerator +from vkconventions import VulkanConventions # Simple timer functions startTime = None @@ -122,6 +122,9 @@ def makeGenOpts(args): protectFeature = protect protectProto = protect + # An API style conventions object + conventions = VulkanConventions() + # API include files for spec and ref pages # Overwrites include subdirectories in spec source tree # The generated include files do not include the calling convention @@ -132,6 +135,7 @@ def makeGenOpts(args): genOpts['apiinc'] = [ DocOutputGenerator, DocGeneratorOptions( + conventions = conventions, filename = 'timeMarker', directory = directory, apiname = 'vulkan', @@ -154,6 +158,7 @@ def makeGenOpts(args): genOpts['vkapi.py'] = [ PyOutputGenerator, DocGeneratorOptions( + conventions = conventions, filename = 'vkapi.py', directory = directory, apiname = 'vulkan', @@ -170,6 +175,7 @@ def makeGenOpts(args): genOpts['validinc'] = [ ValidityOutputGenerator, DocGeneratorOptions( + conventions = conventions, filename = 'timeMarker', directory = directory, apiname = 'vulkan', @@ -186,6 +192,7 @@ def makeGenOpts(args): genOpts['hostsyncinc'] = [ HostSynchronizationOutputGenerator, DocGeneratorOptions( + conventions = conventions, filename = 'timeMarker', directory = directory, apiname = 'vulkan', @@ -198,30 +205,11 @@ def makeGenOpts(args): emitExtensions = emitExtensionsPat) ] - # Extension stub source dispatcher - # This target is no longer maintained and supported. - # See README.adoc for discussion. - genOpts['vulkan_ext.c'] = [ - ExtensionStubSourceOutputGenerator, - CGeneratorOptions( - filename = 'vulkan_ext.c', - directory = directory, - apiname = 'vulkan', - profile = None, - versions = featuresPat, - emitversions = None, - defaultExtensions = None, - addExtensions = '.*', - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - prefixText = prefixStrings + vkPrefixStrings, - alignFuncParam = 48) - ] - # Extension metainformation for spec extension appendices genOpts['extinc'] = [ ExtensionMetaDocOutputGenerator, ExtensionMetaDocGeneratorOptions( + conventions = conventions, filename = 'timeMarker', directory = directory, apiname = 'vulkan', @@ -256,11 +244,13 @@ def makeGenOpts(args): 'VK_ANDROID_external_memory_android_hardware_buffer' ], commonSuppressExtensions ], [ 'vulkan_fuchsia.h', [ 'VK_FUCHSIA_imagepipe_surface'], commonSuppressExtensions ], + [ 'vulkan_ggp.h', [ 'VK_GGP_stream_descriptor_surface', + 'VK_GGP_frame_token' ], commonSuppressExtensions ], [ 'vulkan_ios.h', [ 'VK_MVK_ios_surface' ], commonSuppressExtensions ], [ 'vulkan_macos.h', [ 'VK_MVK_macos_surface' ], commonSuppressExtensions ], [ 'vulkan_vi.h', [ 'VK_NN_vi_surface' ], commonSuppressExtensions ], [ 'vulkan_wayland.h', [ 'VK_KHR_wayland_surface' ], commonSuppressExtensions ], - [ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)' ], commonSuppressExtensions + [ 'VK_KHR_external_semaphore', 'VK_KHR_external_memory_capabilities', 'VK_KHR_external_fence', 'VK_KHR_external_fence_capabilities', 'VK_NV_external_memory_capabilities' ] ], + [ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)', 'VK_EXT_full_screen_exclusive'], commonSuppressExtensions + [ 'VK_KHR_external_semaphore', 'VK_KHR_external_memory_capabilities', 'VK_KHR_external_fence', 'VK_KHR_external_fence_capabilities', 'VK_NV_external_memory_capabilities' ] ], [ 'vulkan_xcb.h', [ 'VK_KHR_xcb_surface' ], commonSuppressExtensions ], [ 'vulkan_xlib.h', [ 'VK_KHR_xlib_surface' ], commonSuppressExtensions ], [ 'vulkan_xlib_xrandr.h', [ 'VK_EXT_acquire_xlib_display' ], commonSuppressExtensions ], @@ -276,6 +266,7 @@ def makeGenOpts(args): emitPlatformExtensionsRE = makeREstring(platform[1]) opts = CGeneratorOptions( + conventions = conventions, filename = headername, directory = directory, apiname = 'vulkan', @@ -295,7 +286,8 @@ def makeGenOpts(args): apicall = 'VKAPI_ATTR ', apientry = 'VKAPI_CALL ', apientryp = 'VKAPI_PTR *', - alignFuncParam = 48) + alignFuncParam = 48, + genEnumBeginEndRange = True) genOpts[headername] = [ COutputGenerator, opts ] @@ -312,6 +304,7 @@ def makeGenOpts(args): genOpts['vulkan_core.h'] = [ COutputGenerator, CGeneratorOptions( + conventions = conventions, filename = 'vulkan_core.h', directory = directory, apiname = 'vulkan', @@ -331,7 +324,8 @@ def makeGenOpts(args): apicall = 'VKAPI_ATTR ', apientry = 'VKAPI_CALL ', apientryp = 'VKAPI_PTR *', - alignFuncParam = 48) + alignFuncParam = 48, + genEnumBeginEndRange = True) ] # Unused - vulkan10.h target. @@ -342,6 +336,7 @@ def makeGenOpts(args): genOpts['vulkan10.h'] = [ COutputGenerator, CGeneratorOptions( + conventions = conventions, filename = 'vulkan10.h', directory = directory, apiname = 'vulkan', @@ -367,6 +362,7 @@ def makeGenOpts(args): genOpts['alias.h'] = [ COutputGenerator, CGeneratorOptions( + conventions = conventions, filename = 'alias.h', directory = directory, apiname = 'vulkan', @@ -404,7 +400,7 @@ def genTarget(args): # Create generator options with specified parameters makeGenOpts(args) - if (args.target in genOpts.keys()): + if args.target in genOpts.keys(): createGenerator = genOpts[args.target][0] options = genOpts[args.target][1] @@ -504,27 +500,27 @@ if __name__ == '__main__': reg.loadElementTree(tree) endTimer(args.time, '* Time to parse ElementTree =') - if (args.validate): + if args.validate: reg.validateGroups() - if (args.dump): + if args.dump: write('* Dumping registry to regdump.txt', file=sys.stderr) reg.dumpReg(filehandle = open('regdump.txt', 'w', encoding='utf-8')) # create error/warning & diagnostic files - if (args.errfile): + if args.errfile: errWarn = open(args.errfile, 'w', encoding='utf-8') else: errWarn = sys.stderr - if (args.diagfile): + if args.diagfile: diag = open(args.diagfile, 'w', encoding='utf-8') else: diag = None - if (args.debug): + if args.debug: pdb.run('genTarget(args)') - elif (args.profile): + elif args.profile: import cProfile, pstats cProfile.run('genTarget(args)', 'profile.txt') p = pstats.Stats('profile.txt') diff --git a/registry/reg.py b/registry/reg.py index f0c27a7..29d610f 100644 --- a/registry/reg.py +++ b/registry/reg.py @@ -14,9 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import io,os,pdb,re,string,sys,copy +import copy +import re +import sys import xml.etree.ElementTree as etree -from collections import defaultdict +from collections import defaultdict, namedtuple +from generator import OutputGenerator, write # matchAPIProfile - returns whether an API and profile # being generated matches an element's profile @@ -48,20 +51,21 @@ from collections import defaultdict # like "gl(core)|gles1(common-lite)". def matchAPIProfile(api, profile, elem): """Match a requested API & profile name to a api & profile attributes of an Element""" - match = True # Match 'api', if present - if ('api' in elem.attrib): - if (api == None): + elem_api = elem.get('api') + if elem_api: + if api is None: raise UserWarning("No API requested, but 'api' attribute is present with value '" + - elem.get('api') + "'") - elif (api != elem.get('api')): + elem_api + "'") + elif api != elem_api: # Requested API doesn't match attribute return False - if ('profile' in elem.attrib): - if (profile == None): + elem_profile = elem.get('profile') + if elem_profile: + if profile is None: raise UserWarning("No profile requested, but 'profile' attribute is present with value '" + - elem.get('profile') + "'") - elif (profile != elem.get('profile')): + elem_profile + "'") + elif profile != elem_profile: # Requested profile doesn't match attribute return False return True @@ -134,7 +138,7 @@ class EnumInfo(BaseInfo): def __init__(self, elem): BaseInfo.__init__(self, elem) self.type = elem.get('type') - if (self.type == None): + if self.type is None: self.type = '' # CmdInfo - registry information about a command @@ -168,7 +172,7 @@ class FeatureInfo(BaseInfo): self.name = elem.get('name') # Determine element category (vendor). Only works # for elements. - if (elem.tag == 'feature'): + if elem.tag == 'feature': self.category = 'VERSION' self.version = elem.get('name') self.versionNumber = elem.get('number') @@ -182,8 +186,6 @@ class FeatureInfo(BaseInfo): self.supported = elem.get('supported') self.emit = False -from generator import write, GeneratorOptions, OutputGenerator - # Registry - object representing an API registry, loaded from an XML file # Members # tree - ElementTree containing the root @@ -229,7 +231,15 @@ class Registry: self.apidict = {} self.extensions = [] self.requiredextensions = [] # Hack - can remove it after validity generator goes away + # ** Global types for automatic source generation ** + # Length Member data + self.commandextensiontuple = namedtuple('commandextensiontuple', + ['command', # The name of the command being modified + 'value', # The value to append to the command + 'extension']) # The name of the extension that added it self.validextensionstructs = defaultdict(list) + self.commandextensionsuccesses = [] + self.commandextensionerrors = [] self.extdict = {} # A default output generator, so commands prior to apiGen can report # errors via the generator object. @@ -238,14 +248,17 @@ class Registry: self.emitFeatures = False self.breakPat = None # self.breakPat = re.compile('VkFenceImportFlagBits.*') + def loadElementTree(self, tree): """Load ElementTree into a Registry object and parse it""" self.tree = tree self.parseTree() + def loadFile(self, file): """Load an API registry XML file into a Registry object and parse it""" self.tree = etree.parse(file) self.parseTree() + def setGenerator(self, gen): """Specify output generator object. None restores the default generator""" self.gen = gen @@ -263,9 +276,9 @@ class Registry: def addElementInfo(self, elem, info, infoName, dictionary): # self.gen.logMsg('diag', 'Adding ElementInfo.required =', # info.required, 'name =', elem.get('name')) - - if ('api' in elem.attrib): - key = (elem.get('name'),elem.get('api')) + api = elem.get('api') + if api: + key = (elem.get('name'), api) else: key = elem.get('name') if key in dictionary: @@ -277,28 +290,30 @@ class Registry: # 'with identical value') else: dictionary[key] = info - # + # lookupElementInfo - find a {Type|Enum|Cmd}Info object by name. # If an object qualified by API name exists, use that. # fname - name of type / enum / command # dictionary - self.{type|enum|cmd}dict def lookupElementInfo(self, fname, dictionary): key = (fname, self.genOpts.apiname) - if (key in dictionary): + if key in dictionary: # self.gen.logMsg('diag', 'Found API-specific element for feature', fname) return dictionary[key] - elif (fname in dictionary): + if fname in dictionary: # self.gen.logMsg('diag', 'Found generic element for feature', fname) return dictionary[fname] - else: - return None + + return None + def breakOnName(self, regexp): self.breakPat = re.compile(regexp) + def parseTree(self): """Parse the registry Element, once created""" # This must be the Element for the root self.reg = self.tree.getroot() - # + # Create dictionary of registry types from toplevel tags # and add 'name' attribute to each tag (where missing) # based on its element. @@ -306,13 +321,13 @@ class Registry: # There's usually one block; more are OK # Required attributes: 'name' or nested tag contents self.typedict = {} - for type in self.reg.findall('types/type'): + for type_elem in self.reg.findall('types/type'): # If the doesn't already have a 'name' attribute, set # it from contents of its tag. - if (type.get('name') == None): - type.attrib['name'] = type.find('name').text - self.addElementInfo(type, TypeInfo(type), 'type', self.typedict) - # + if type_elem.get('name') is None: + type_elem.set('name', type_elem.find('name').text) + self.addElementInfo(type_elem, TypeInfo(type_elem), 'type', self.typedict) + # Create dictionary of registry enum groups from tags. # # Required attributes: 'name'. If no name is given, one is @@ -321,7 +336,7 @@ class Registry: self.groupdict = {} for group in self.reg.findall('enums'): self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict) - # + # Create dictionary of registry enums from tags # # tags usually define different namespaces for the values @@ -333,14 +348,12 @@ class Registry: # a better scheme for tagging core and extension enums is created. self.enumdict = {} for enums in self.reg.findall('enums'): - required = (enums.get('type') != None) + required = (enums.get('type') is not None) for enum in enums.findall('enum'): enumInfo = EnumInfo(enum) enumInfo.required = required self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) - # self.gen.logMsg('diag', 'parseTree: marked req =', - # required, 'for', enum.get('name')) - # + # Create dictionary of registry commands from tags # and add 'name' attribute to each tag (where missing) # based on its element. @@ -356,13 +369,14 @@ class Registry: # If the doesn't already have a 'name' attribute, set # it from contents of its tag. name = cmd.get('name') - if name == None: - name = cmd.attrib['name'] = cmd.find('proto/name').text + if name is None: + name = cmd.set('name', cmd.find('proto/name').text) ci = CmdInfo(cmd) self.addElementInfo(cmd, ci, 'command', self.cmddict) alias = cmd.get('alias') if alias: cmdAlias.append([name, alias, cmd]) + # Now loop over aliases, injecting a copy of the aliased command's # Element with the aliased prototype name replaced with the command # name - if it exists. @@ -372,8 +386,8 @@ class Registry: aliasInfo = self.cmddict[alias] cmdElem = copy.deepcopy(aliasInfo.elem) cmdElem.find('proto/name').text = name - cmdElem.attrib['name'] = name - cmdElem.attrib['alias'] = alias + cmdElem.set('name', name) + cmdElem.set('alias', alias) ci = CmdInfo(cmdElem) # Replace the dictionary entry for the CmdInfo element self.cmddict[name] = ci @@ -384,10 +398,8 @@ class Registry: self.gen.logMsg('warn', 'No matching found for command', cmd.get('name'), 'alias', alias) - # # Create dictionaries of API and extension interfaces # from toplevel and tags. - # self.apidict = {} for feature in self.reg.findall('feature'): featureInfo = FeatureInfo(feature) @@ -418,36 +430,35 @@ class Registry: # add an EnumInfo record to the dictionary. That works because # output generation of constants is purely dependency-based, and # doesn't need to iterate through the XML tags. - # for elem in feature.findall('require'): - for enum in elem.findall('enum'): - addEnumInfo = False - groupName = enum.get('extends') - if (groupName != None): - # self.gen.logMsg('diag', 'Found extension enum', - # enum.get('name')) - # Add version number attribute to the element - enum.attrib['version'] = featureInfo.version - # Look up the GroupInfo with matching groupName - if (groupName in self.groupdict.keys()): - # self.gen.logMsg('diag', 'Matching group', - # groupName, 'found, adding element...') - gi = self.groupdict[groupName] - gi.elem.append(enum) - # Remove element from parent tag - # This should be a no-op in lxml.etree - elem.remove(enum) - else: - self.gen.logMsg('warn', 'NO matching group', - groupName, 'for enum', enum.get('name'), 'found.') - addEnumInfo = True - elif (enum.get('value') or enum.get('bitpos') or enum.get('alias')): - # self.gen.logMsg('diag', 'Adding extension constant "enum"', - # enum.get('name')) - addEnumInfo = True - if (addEnumInfo): - enumInfo = EnumInfo(enum) - self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) + for enum in elem.findall('enum'): + addEnumInfo = False + groupName = enum.get('extends') + if groupName is not None: + # self.gen.logMsg('diag', 'Found extension enum', + # enum.get('name')) + # Add version number attribute to the element + enum.set('version', featureInfo.version) + # Look up the GroupInfo with matching groupName + if groupName in self.groupdict: + # self.gen.logMsg('diag', 'Matching group', + # groupName, 'found, adding element...') + gi = self.groupdict[groupName] + gi.elem.append(enum) + # Remove element from parent tag + # This should be a no-op in lxml.etree + elem.remove(enum) + else: + self.gen.logMsg('warn', 'NO matching group', + groupName, 'for enum', enum.get('name'), 'found.') + addEnumInfo = True + elif enum.get('value') or enum.get('bitpos') or enum.get('alias'): + # self.gen.logMsg('diag', 'Adding extension constant "enum"', + # enum.get('name')) + addEnumInfo = True + if addEnumInfo: + enumInfo = EnumInfo(enum) + self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) self.extensions = self.reg.findall('extensions/extension') self.extdict = {} @@ -461,58 +472,57 @@ class Registry: # # This code also adds a 'extnumber' attribute containing the # extension number, used for enumerant value calculation. - # for elem in feature.findall('require'): - for enum in elem.findall('enum'): - addEnumInfo = False - groupName = enum.get('extends') - if (groupName != None): - # self.gen.logMsg('diag', 'Found extension enum', - # enum.get('name')) + for enum in elem.findall('enum'): + addEnumInfo = False + groupName = enum.get('extends') + if groupName is not None: + # self.gen.logMsg('diag', 'Found extension enum', + # enum.get('name')) - # Add block's extension number attribute to - # the element unless specified explicitly, such - # as when redefining an enum in another extension. - extnumber = enum.get('extnumber') - if not extnumber: - enum.attrib['extnumber'] = featureInfo.number + # Add block's extension number attribute to + # the element unless specified explicitly, such + # as when redefining an enum in another extension. + extnumber = enum.get('extnumber') + if not extnumber: + enum.set('extnumber', featureInfo.number) - enum.attrib['extname'] = featureInfo.name - enum.attrib['supported'] = featureInfo.supported - # Look up the GroupInfo with matching groupName - if (groupName in self.groupdict.keys()): - # self.gen.logMsg('diag', 'Matching group', - # groupName, 'found, adding element...') - gi = self.groupdict[groupName] - gi.elem.append(enum) - # Remove element from parent tag - # This should be a no-op in lxml.etree - elem.remove(enum) - else: - self.gen.logMsg('warn', 'NO matching group', - groupName, 'for enum', enum.get('name'), 'found.') - addEnumInfo = True - elif (enum.get('value') or enum.get('bitpos') or enum.get('alias')): - # self.gen.logMsg('diag', 'Adding extension constant "enum"', - # enum.get('name')) - addEnumInfo = True - if (addEnumInfo): - enumInfo = EnumInfo(enum) - self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) + enum.set('extname', featureInfo.name) + enum.set('supported', featureInfo.supported) + # Look up the GroupInfo with matching groupName + if groupName in self.groupdict: + # self.gen.logMsg('diag', 'Matching group', + # groupName, 'found, adding element...') + gi = self.groupdict[groupName] + gi.elem.append(enum) + # Remove element from parent tag + # This should be a no-op in lxml.etree + elem.remove(enum) + else: + self.gen.logMsg('warn', 'NO matching group', + groupName, 'for enum', enum.get('name'), 'found.') + addEnumInfo = True + elif enum.get('value') or enum.get('bitpos') or enum.get('alias'): + # self.gen.logMsg('diag', 'Adding extension constant "enum"', + # enum.get('name')) + addEnumInfo = True + if addEnumInfo: + enumInfo = EnumInfo(enum) + self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) # Construct a "validextensionstructs" list for parent structures # based on "structextends" tags in child structures disabled_types = [] for disabled_ext in self.reg.findall('extensions/extension[@supported="disabled"]'): - for type in disabled_ext.findall("*/type"): - disabled_types.append(type.get('name')) - for type in self.reg.findall('types/type'): - if type.get('name') not in disabled_types: - parentStructs = type.get('structextends') - if (parentStructs != None): + for type_elem in disabled_ext.findall("*/type"): + disabled_types.append(type_elem.get('name')) + for type_elem in self.reg.findall('types/type'): + if type_elem.get('name') not in disabled_types: + parentStructs = type_elem.get('structextends') + if parentStructs is not None: for parent in parentStructs.split(','): # self.gen.logMsg('diag', type.get('name'), 'extends', parent) - self.validextensionstructs[parent].append(type.get('name')) + self.validextensionstructs[parent].append(type_elem.get('name')) # Sort the lists so they don't depend on the XML order for parent in self.validextensionstructs: self.validextensionstructs[parent].sort() @@ -550,26 +560,26 @@ class Registry: # write(' ** Dumping XML ElementTree **', file=filehandle) # write('***************************************', file=filehandle) # write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle) - # + # typename - name of type # required - boolean (to tag features as required or not) def markTypeRequired(self, typename, required): """Require (along with its dependencies) or remove (but not its dependencies) a type""" self.gen.logMsg('diag', 'tagging type:', typename, '-> required =', required) # Get TypeInfo object for tag corresponding to typename - type = self.lookupElementInfo(typename, self.typedict) - if (type != None): - if (required): + typeinfo = self.lookupElementInfo(typename, self.typedict) + if typeinfo is not None: + if required: # Tag type dependencies in 'alias' and 'required' attributes as # required. This DOES NOT un-tag dependencies in a # tag. See comments in markRequired() below for the reason. - for attrib in [ 'requires', 'alias' ]: - depname = type.elem.get(attrib) + for attrib_name in [ 'requires', 'alias' ]: + depname = typeinfo.elem.get(attrib_name) if depname: self.gen.logMsg('diag', 'Generating dependent type', - depname, 'for', attrib, 'type', typename) + depname, 'for', attrib_name, 'type', typename) # Don't recurse on self-referential structures. - if (typename != depname): + if typename != depname: self.markTypeRequired(depname, required) else: self.gen.logMsg('diag', 'type', typename, 'is self-referential') @@ -577,27 +587,39 @@ class Registry: # tags) # Look for in entire tree, # not just immediate children - for subtype in type.elem.findall('.//type'): + for subtype in typeinfo.elem.findall('.//type'): self.gen.logMsg('diag', 'markRequired: type requires dependent ', subtype.text) - if (typename != subtype.text): + if typename != subtype.text: self.markTypeRequired(subtype.text, required) else: self.gen.logMsg('diag', 'type', typename, 'is self-referential') # Tag enums used in defining this type, for example in # member[MEMBER_SIZE] - for subenum in type.elem.findall('.//enum'): + for subenum in typeinfo.elem.findall('.//enum'): self.gen.logMsg('diag', 'markRequired: type requires dependent ', subenum.text) self.markEnumRequired(subenum.text, required) - type.required = required - else: + # Tag type dependency in 'bitvalues' attributes as + # required. This ensures that the bit values for a flag + # are emitted + depType = typeinfo.elem.get('bitvalues') + if depType: + self.gen.logMsg('diag', 'Generating bitflag type', + depType, 'for type', typename) + self.markTypeRequired(depType, required) + group = self.lookupElementInfo(depType, self.groupdict) + if group is not None: + group.flagType = typeinfo + + typeinfo.required = required + elif '.h' not in typename: self.gen.logMsg('warn', 'type:', typename , 'IS NOT DEFINED') - # + # enumname - name of enum # required - boolean (to tag features as required or not) def markEnumRequired(self, enumname, required): self.gen.logMsg('diag', 'tagging enum:', enumname, '-> required =', required) enum = self.lookupElementInfo(enumname, self.enumdict) - if (enum != None): + if enum is not None: enum.required = required # Tag enum dependencies in 'alias' attribute as required depname = enum.elem.get('alias') @@ -607,13 +629,13 @@ class Registry: self.markEnumRequired(depname, required) else: self.gen.logMsg('warn', 'enum:', enumname , 'IS NOT DEFINED') - # + # cmdname - name of command # required - boolean (to tag features as required or not) def markCmdRequired(self, cmdname, required): self.gen.logMsg('diag', 'tagging command:', cmdname, '-> required =', required) cmd = self.lookupElementInfo(cmdname, self.cmddict) - if (cmd != None): + if cmd is not None: cmd.required = required # Tag command dependencies in 'alias' attribute as required depname = cmd.elem.get('alias') @@ -626,67 +648,88 @@ class Registry: # tag, because many other commands may use the same type. # We could be more clever and reference count types, # instead of using a boolean. - if (required): + if required: # Look for in entire tree, # not just immediate children - for type in cmd.elem.findall('.//type'): - self.gen.logMsg('diag', 'markRequired: command implicitly requires dependent type', type.text) - self.markTypeRequired(type.text, required) + for type_elem in cmd.elem.findall('.//type'): + self.gen.logMsg('diag', 'markRequired: command implicitly requires dependent type', type_elem.text) + self.markTypeRequired(type_elem.text, required) else: self.gen.logMsg('warn', 'command:', name, 'IS NOT DEFINED') - # - # features - Element for or tag + + # featurename - name of the feature + # feature - Element for or tag # required - boolean (to tag features as required or not) - def markRequired(self, features, required): + def markRequired(self, featurename, feature, required): """Require or remove features specified in the Element""" - self.gen.logMsg('diag', 'markRequired (features = , required =', required, ')') + self.gen.logMsg('diag', 'markRequired (feature = , required =', required, ')') + # Loop over types, enums, and commands in the tag # @@ It would be possible to respect 'api' and 'profile' attributes # in individual features, but that's not done yet. - for typeElem in features.findall('type'): + for typeElem in feature.findall('type'): self.markTypeRequired(typeElem.get('name'), required) - for enumElem in features.findall('enum'): + for enumElem in feature.findall('enum'): self.markEnumRequired(enumElem.get('name'), required) - for cmdElem in features.findall('command'): + for cmdElem in feature.findall('command'): self.markCmdRequired(cmdElem.get('name'), required) - # + + # Extensions may need to extend existing commands or other items in the future. + # So, look for extend tags. + for extendElem in feature.findall('extend'): + extendType = extendElem.get('type') + if extendType == 'command': + commandName = extendElem.get('name') + successExtends = extendElem.get('successcodes') + if successExtends is not None: + for success in successExtends.split(','): + self.commandextensionsuccesses.append(self.commandextensiontuple(command=commandName, + value=success, + extension=featurename)) + errorExtends = extendElem.get('errorcodes') + if errorExtends is not None: + for error in errorExtends.split(','): + self.commandextensionerrors.append(self.commandextensiontuple(command=commandName, + value=error, + extension=featurename)) + else: + self.gen.logMsg('warn', 'extend type:', extendType, 'IS NOT SUPPORTED') + # interface - Element for or , containing # and tags + # featurename - name of the feature # api - string specifying API name being generated # profile - string specifying API profile being generated - def requireAndRemoveFeatures(self, interface, api, profile): - """Process and tags for a or """ + def requireAndRemoveFeatures(self, interface, featurename, api, profile): + """Process and tags for a or """ # marks things that are required by this version/profile for feature in interface.findall('require'): - if (matchAPIProfile(api, profile, feature)): - self.markRequired(feature,True) + if matchAPIProfile(api, profile, feature): + self.markRequired(featurename, feature, True) # marks things that are removed by this version/profile for feature in interface.findall('remove'): - if (matchAPIProfile(api, profile, feature)): - self.markRequired(feature,False) + if matchAPIProfile(api, profile, feature): + self.markRequired(featurename, feature, False) def assignAdditionalValidity(self, interface, api, profile): - # # Loop over all usage inside all tags. for feature in interface.findall('require'): - if (matchAPIProfile(api, profile, feature)): + if matchAPIProfile(api, profile, feature): for v in feature.findall('usage'): if v.get('command'): self.cmddict[v.get('command')].additionalValidity.append(copy.deepcopy(v)) if v.get('struct'): self.typedict[v.get('struct')].additionalValidity.append(copy.deepcopy(v)) - # # Loop over all usage inside all tags. for feature in interface.findall('remove'): - if (matchAPIProfile(api, profile, feature)): + if matchAPIProfile(api, profile, feature): for v in feature.findall('usage'): if v.get('command'): self.cmddict[v.get('command')].removedValidity.append(copy.deepcopy(v)) if v.get('struct'): self.typedict[v.get('struct')].removedValidity.append(copy.deepcopy(v)) - # # generateFeature - generate a single type / enum group / enum / command, # and all its dependencies as needed. # fname - name of feature (//) @@ -699,17 +742,17 @@ class Registry: self.gen.logMsg('diag', 'generateFeature: generating', ftype, fname) f = self.lookupElementInfo(fname, dictionary) - if (f == None): + if f is None: # No such feature. This is an error, but reported earlier self.gen.logMsg('diag', 'No entry found for feature', fname, 'returning!') return - # + # If feature isn't required, or has already been declared, return - if (not f.required): + if not f.required: self.gen.logMsg('diag', 'Skipping', ftype, fname, '(not required)') return - if (f.declared): + if f.declared: self.gen.logMsg('diag', 'Skipping', ftype, fname, '(already declared)') return # Always mark feature declared, as though actually emitted @@ -720,23 +763,25 @@ class Registry: if alias: self.gen.logMsg('diag', fname, 'is an alias of', alias) - # # Pull in dependent declaration(s) of the feature. - # For types, there may be one type in the 'required' attribute of + # For types, there may be one type in the 'requires' attribute of # the element, one in the 'alias' attribute, and many in - # imbedded and tags within the element. + # embedded and tags within the element. # For commands, there may be many in tags within the element. # For enums, no dependencies are allowed (though perhaps if you # have a uint64 enum, it should require that type). genProc = None - if (ftype == 'type'): + followupFeature = None + if ftype == 'type': genProc = self.gen.genType - # Generate type dependencies in 'alias' and 'required' attributes + # Generate type dependencies in 'alias' and 'requires' attributes if alias: self.generateFeature(alias, 'type', self.typedict) requires = f.elem.get('requires') if requires: + self.gen.logMsg('diag', 'Generating required dependent type', + requires) self.generateFeature(requires, 'type', self.typedict) # Generate types used in defining this type (e.g. in nested @@ -757,10 +802,10 @@ class Registry: # If the type is an enum group, look up the corresponding # group in the group dictionary and generate that instead. - if (f.elem.get('category') == 'enum'): + if f.elem.get('category') == 'enum': self.gen.logMsg('diag', 'Type', fname, 'is an enum group, so generate that instead') group = self.lookupElementInfo(fname, self.groupdict) - if alias != None: + if alias is not None: # An alias of another group name. # Pass to genGroup with 'alias' parameter = aliased name self.gen.logMsg('diag', 'Generating alias', fname, @@ -769,7 +814,7 @@ class Registry: # with an additional parameter which is the alias name. genProc = self.gen.genGroup f = self.lookupElementInfo(alias, self.groupdict) - elif group == None: + elif group is None: self.gen.logMsg('warn', 'Skipping enum type', fname, ': No matching enumerant group') return @@ -817,7 +862,7 @@ class Registry: self.gen.logMsg('diag', '* required =', required, 'for', name) if required: # Mark this element as required (in the element, not the EnumInfo) - elem.attrib['required'] = 'true' + elem.set('required', 'true') # If it's an alias, track that for later use enumAlias = elem.get('alias') if enumAlias: @@ -825,20 +870,22 @@ class Registry: for elem in enums: name = elem.get('name') if name in enumAliases: - elem.attrib['required'] = 'true' + elem.set('required', 'true') self.gen.logMsg('diag', '* also need to require alias', name) - elif (ftype == 'command'): + if f.elem.get('category') == 'bitmask': + followupFeature = f.elem.get( 'bitvalues' ) + elif ftype == 'command': # Generate command dependencies in 'alias' attribute if alias: self.generateFeature(alias, 'command', self.cmddict) genProc = self.gen.genCmd - for type in f.elem.findall('.//type'): - depname = type.text + for type_elem in f.elem.findall('.//type'): + depname = type_elem.text self.gen.logMsg('diag', 'Generating required parameter type', depname) self.generateFeature(depname, 'type', self.typedict) - elif (ftype == 'enum'): + elif ftype == 'enum': # Generate enum dependencies in 'alias' attribute if alias: self.generateFeature(alias, 'enum', self.enumdict) @@ -846,19 +893,23 @@ class Registry: # Actually generate the type only if emitting declarations if self.emitFeatures: - self.gen.logMsg('diag', 'Emitting', ftype, fname, 'declaration') + self.gen.logMsg('diag', 'Emitting', ftype, 'decl for', fname) genProc(f, fname, alias) else: self.gen.logMsg('diag', 'Skipping', ftype, fname, '(should not be emitted)') - # + + if followupFeature : + self.gen.logMsg('diag', 'Generating required bitvalues ', + followupFeature) + self.generateFeature(followupFeature, "type", self.typedict) + # generateRequiredInterface - generate all interfaces required # by an API version or extension # interface - Element for or def generateRequiredInterface(self, interface): """Generate required C interface for specified API version/extension""" - # # Loop over all features inside all tags. for features in interface.findall('require'): for t in features.findall('type'): @@ -868,30 +919,29 @@ class Registry: for c in features.findall('command'): self.generateFeature(c.get('name'), 'command', self.cmddict) - # # apiGen(genOpts) - generate interface for specified versions # genOpts - GeneratorOptions object with parameters used # by the Generator object. def apiGen(self, genOpts): """Generate interfaces for the specified API type and range of versions""" - # + self.gen.logMsg('diag', '*******************************************') self.gen.logMsg('diag', ' Registry.apiGen file:', genOpts.filename, 'api:', genOpts.apiname, 'profile:', genOpts.profile) self.gen.logMsg('diag', '*******************************************') - # + self.genOpts = genOpts # Reset required/declared flags for all features self.apiReset() - # + # Compile regexps used to select versions & extensions regVersions = re.compile(self.genOpts.versions) regEmitVersions = re.compile(self.genOpts.emitversions) regAddExtensions = re.compile(self.genOpts.addExtensions) regRemoveExtensions = re.compile(self.genOpts.removeExtensions) regEmitExtensions = re.compile(self.genOpts.emitExtensions) - # + # Get all matching API feature names & add to list of FeatureInfo # Note we used to select on feature version attributes, not names. features = [] @@ -899,15 +949,15 @@ class Registry: for key in self.apidict: fi = self.apidict[key] api = fi.elem.get('api') - if (api == self.genOpts.apiname): + if api == self.genOpts.apiname: apiMatch = True - if (regVersions.match(fi.name)): + if regVersions.match(fi.name): # Matches API & version #s being generated. Mark for # emission and add to the features[] list . # @@ Could use 'declared' instead of 'emit'? - fi.emit = (regEmitVersions.match(fi.name) != None) + fi.emit = (regEmitVersions.match(fi.name) is not None) features.append(fi) - if (not fi.emit): + if not fi.emit: self.gen.logMsg('diag', 'NOT tagging feature api =', api, 'name =', fi.name, 'version =', fi.version, 'for emission (does not match emitversions pattern)') @@ -923,9 +973,9 @@ class Registry: self.gen.logMsg('diag', 'NOT including feature api =', api, 'name =', fi.name, '(does not match requested API)') - if (not apiMatch): + if not apiMatch: self.gen.logMsg('warn', 'No matching API versions found!') - # + # Get all matching extensions, in order by their extension number, # and add to the list of features. # Start with extensions tagged with 'api' pattern matching the API @@ -935,7 +985,7 @@ class Registry: for (extName,ei) in sorted(self.extdict.items(),key = lambda x : x[1].number): extName = ei.name include = False - # + # Include extension if defaultExtensions is not None and if the # 'supported' attribute matches defaultExtensions. The regexp in # 'supported' must exactly match defaultExtensions, so bracket @@ -946,12 +996,12 @@ class Registry: self.gen.logMsg('diag', 'Including extension', extName, "(defaultExtensions matches the 'supported' attribute)") include = True - # + # Include additional extensions if the extension name matches # the regexp specified in the generator options. This allows # forcing extensions into an interface even if they're not # tagged appropriately in the registry. - if (regAddExtensions.match(extName) != None): + if regAddExtensions.match(extName) is not None: self.gen.logMsg('diag', 'Including extension', extName, '(matches explicitly requested extensions to add)') include = True @@ -959,20 +1009,21 @@ class Registry: # in generator options. This allows forcing removal of # extensions from an interface even if they're tagged that # way in the registry. - if (regRemoveExtensions.match(extName) != None): + if regRemoveExtensions.match(extName) is not None: self.gen.logMsg('diag', 'Removing extension', extName, '(matches explicitly requested extensions to remove)') include = False - # + # If the extension is to be included, add it to the # extension features list. - if (include): - ei.emit = (regEmitExtensions.match(extName) != None) + if include: + ei.emit = (regEmitExtensions.match(extName) is not None) features.append(ei) - if (not ei.emit): + if not ei.emit: self.gen.logMsg('diag', 'NOT tagging extension', extName, 'for emission (does not match emitextensions pattern)') + # Hack - can be removed when validity generator goes away # (Jon) I'm not sure what this does, or if it should respect # the ei.emit flag above. @@ -980,11 +1031,11 @@ class Registry: else: self.gen.logMsg('diag', 'NOT including extension', extName, '(does not match api attribute or explicitly requested extensions)') - # + # Sort the extension features list, if a sort procedure is defined - if (self.genOpts.sortProcedure): + if self.genOpts.sortProcedure: self.genOpts.sortProcedure(features) - # + # Pass 1: loop over requested API versions and extensions tagging # types/commands/features as required (in an block) or no # longer required (in an block). It is possible to remove @@ -993,23 +1044,23 @@ class Registry: # If a profile other than 'None' is being generated, it must # match the profile attribute (if any) of the and # tags. - self.gen.logMsg('diag', '*******PASS 1: TAG FEATURES **********') + self.gen.logMsg('diag', 'PASS 1: TAG FEATURES') for f in features: self.gen.logMsg('diag', 'PASS 1: Tagging required and removed features for', f.name) - self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile) + self.requireAndRemoveFeatures(f.elem, f.name, self.genOpts.apiname, self.genOpts.profile) self.assignAdditionalValidity(f.elem, self.genOpts.apiname, self.genOpts.profile) - # + # Pass 2: loop over specified API versions and extensions printing # declarations for required things which haven't already been # generated. - self.gen.logMsg('diag', '*******PASS 2: GENERATE INTERFACES FOR FEATURES **********') + self.gen.logMsg('diag', 'PASS 2: GENERATE INTERFACES FOR FEATURES') self.gen.beginFile(self.genOpts) for f in features: self.gen.logMsg('diag', 'PASS 2: Generating interface for', f.name) emit = self.emitFeatures = f.emit - if (not emit): + if not emit: self.gen.logMsg('diag', 'PASS 2: NOT declaring feature', f.elem.get('name'), 'because it is not tagged for emission') # Generate the interface (or just tag its elements as having been @@ -1018,54 +1069,51 @@ class Registry: self.generateRequiredInterface(f.elem) self.gen.endFeature() self.gen.endFile() - # + # apiReset - use between apiGen() calls to reset internal state - # def apiReset(self): """Reset type/enum/command dictionaries before generating another API""" - for type in self.typedict: - self.typedict[type].resetState() + for datatype in self.typedict: + self.typedict[datatype].resetState() for enum in self.enumdict: self.enumdict[enum].resetState() for cmd in self.cmddict: self.cmddict[cmd].resetState() for cmd in self.apidict: self.apidict[cmd].resetState() - # + # validateGroups - check that group= attributes match actual groups - # def validateGroups(self): """Validate group= attributes on and tags""" # Keep track of group names not in tags badGroup = {} - self.gen.logMsg('diag', 'VALIDATING GROUP ATTRIBUTES ***') + self.gen.logMsg('diag', 'VALIDATING GROUP ATTRIBUTES') for cmd in self.reg.findall('commands/command'): proto = cmd.find('proto') - funcname = cmd.find('proto/name').text - if ('group' in proto.attrib.keys()): - group = proto.get('group') - # self.gen.logMsg('diag', 'Command ', funcname, ' has return group ', group) - if (group not in self.groupdict.keys()): - # self.gen.logMsg('diag', 'Command ', funcname, ' has UNKNOWN return group ', group) - if (group not in badGroup.keys()): + # funcname = cmd.find('proto/name').text + group = proto.get('group') + if group is not None and group not in self.groupdict: + # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group) + if group not in badGroup: + badGroup[group] = 1 + else: + badGroup[group] = badGroup[group] + 1 + + for param in cmd.findall('param'): + pname = param.find('name') + if pname is not None: + pname = pname.text + else: + pname = param.get('name') + group = param.get('group') + if group is not None and group not in self.groupdict: + # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) + if group not in badGroup: badGroup[group] = 1 else: badGroup[group] = badGroup[group] + 1 - for param in cmd.findall('param'): - pname = param.find('name') - if (pname != None): - pname = pname.text - else: - pname = type.get('name') - if ('group' in param.attrib.keys()): - group = param.get('group') - if (group not in self.groupdict.keys()): - # self.gen.logMsg('diag', 'Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) - if (group not in badGroup.keys()): - badGroup[group] = 1 - else: - badGroup[group] = badGroup[group] + 1 - if (len(badGroup.keys()) > 0): - self.gen.logMsg('diag', 'SUMMARY OF UNRECOGNIZED GROUPS ***') + + if badGroup: + self.gen.logMsg('diag', 'SUMMARY OF UNRECOGNIZED GROUPS') for key in sorted(badGroup.keys()): self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times') diff --git a/registry/validusage.json b/registry/validusage.json index e90c0f0..46f209d 100644 --- a/registry/validusage.json +++ b/registry/validusage.json @@ -1,9 +1,9 @@ { "version info": { "schema version": 2, - "api version": "1.1.103", - "comment": "from git branch: github-master commit: 4ad4fd17161efd9bfd1125c0c9d17db6fb276216", - "date": "2019-03-11 09:10:44Z" + "api version": "1.1.105", + "comment": "from git branch: github-master commit: 1f1a557801f170971868735dcbf8484a684abba7", + "date": "2019-03-19 09:15:00Z" }, "validation": { "vkGetInstanceProcAddr": { @@ -362,7 +362,7 @@ }, { "vuid": "VUID-VkDeviceCreateInfo-pNext-pNext", - "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupDeviceCreateInfo, VkDeviceMemoryOverallocationCreateInfoAMD, VkPhysicalDevice16BitStorageFeatures, VkPhysicalDevice8BitStorageFeaturesKHR, VkPhysicalDeviceASTCDecodeFeaturesEXT, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, VkPhysicalDeviceBufferAddressFeaturesEXT, VkPhysicalDeviceComputeShaderDerivativesFeaturesNV, VkPhysicalDeviceConditionalRenderingFeaturesEXT, VkPhysicalDeviceCooperativeMatrixFeaturesNV, VkPhysicalDeviceCornerSampledImageFeaturesNV, VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, VkPhysicalDeviceDepthClipEnableFeaturesEXT, VkPhysicalDeviceDescriptorIndexingFeaturesEXT, VkPhysicalDeviceExclusiveScissorFeaturesNV, VkPhysicalDeviceFeatures2, VkPhysicalDeviceFloat16Int8FeaturesKHR, VkPhysicalDeviceFragmentDensityMapFeaturesEXT, VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV, VkPhysicalDeviceInlineUniformBlockFeaturesEXT, VkPhysicalDeviceMemoryPriorityFeaturesEXT, VkPhysicalDeviceMeshShaderFeaturesNV, VkPhysicalDeviceMultiviewFeatures, VkPhysicalDeviceProtectedMemoryFeatures, VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV, VkPhysicalDeviceSamplerYcbcrConversionFeatures, VkPhysicalDeviceScalarBlockLayoutFeaturesEXT, VkPhysicalDeviceShaderAtomicInt64FeaturesKHR, VkPhysicalDeviceShaderDrawParameterFeatures, VkPhysicalDeviceShaderImageFootprintFeaturesNV, VkPhysicalDeviceShadingRateImageFeaturesNV, VkPhysicalDeviceTransformFeedbackFeaturesEXT, VkPhysicalDeviceVariablePointerFeatures, VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT, VkPhysicalDeviceVulkanMemoryModelFeaturesKHR, or VkPhysicalDeviceYcbcrImageArraysFeaturesEXT" + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupDeviceCreateInfo, VkDeviceMemoryOverallocationCreateInfoAMD, VkPhysicalDevice16BitStorageFeatures, VkPhysicalDevice8BitStorageFeaturesKHR, VkPhysicalDeviceASTCDecodeFeaturesEXT, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, VkPhysicalDeviceBufferAddressFeaturesEXT, VkPhysicalDeviceComputeShaderDerivativesFeaturesNV, VkPhysicalDeviceConditionalRenderingFeaturesEXT, VkPhysicalDeviceCooperativeMatrixFeaturesNV, VkPhysicalDeviceCornerSampledImageFeaturesNV, VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, VkPhysicalDeviceDepthClipEnableFeaturesEXT, VkPhysicalDeviceDescriptorIndexingFeaturesEXT, VkPhysicalDeviceExclusiveScissorFeaturesNV, VkPhysicalDeviceFeatures2, VkPhysicalDeviceFloat16Int8FeaturesKHR, VkPhysicalDeviceFragmentDensityMapFeaturesEXT, VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV, VkPhysicalDeviceHostQueryResetFeaturesEXT, VkPhysicalDeviceInlineUniformBlockFeaturesEXT, VkPhysicalDeviceMemoryPriorityFeaturesEXT, VkPhysicalDeviceMeshShaderFeaturesNV, VkPhysicalDeviceMultiviewFeatures, VkPhysicalDeviceProtectedMemoryFeatures, VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV, VkPhysicalDeviceSamplerYcbcrConversionFeatures, VkPhysicalDeviceScalarBlockLayoutFeaturesEXT, VkPhysicalDeviceShaderAtomicInt64FeaturesKHR, VkPhysicalDeviceShaderDrawParameterFeatures, VkPhysicalDeviceShaderImageFootprintFeaturesNV, VkPhysicalDeviceShadingRateImageFeaturesNV, VkPhysicalDeviceTransformFeedbackFeaturesEXT, VkPhysicalDeviceVariablePointerFeatures, VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT, VkPhysicalDeviceVulkanMemoryModelFeaturesKHR, or VkPhysicalDeviceYcbcrImageArraysFeaturesEXT" }, { "vuid": "VUID-VkDeviceCreateInfo-sType-unique", @@ -982,7 +982,7 @@ }, { "vuid": "VUID-vkQueueSubmit-pSubmits-02207", - "text": " If any element of pSubmitspCommandBuffers includes a Queue Family Transfer Acquire Operation, there must exist a previously submitted Queue Family Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens before the acquire operation." + "text": " If any element of pSubmits->pCommandBuffers includes a Queue Family Transfer Acquire Operation, there must exist a previously submitted Queue Family Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens before the acquire operation." }, { "vuid": "VUID-vkQueueSubmit-queue-parameter", @@ -3122,7 +3122,7 @@ }, { "vuid": "VUID-VkRenderPassCreateInfo-pNext-02512", - "text": " If the pNext chain includes an instance of VkRenderPassMultiviewCreateInfo, for any element of pDependencies with a dependencyFlags member that doesn’t include VK_DEPENDENCY_VIEW_LOCAL_BIT, the corresponding element of the pViewOffsets member of that VkRenderPassMultiviewCreateInfo instance must be 0" + "text": " If the pNext chain includes an instance of VkRenderPassMultiviewCreateInfo, for any element of pDependencies with a dependencyFlags member that does not include VK_DEPENDENCY_VIEW_LOCAL_BIT, the corresponding element of the pViewOffsets member of that VkRenderPassMultiviewCreateInfo instance must be 0" }, { "vuid": "VUID-VkRenderPassCreateInfo-pNext-02513", @@ -3276,7 +3276,7 @@ "(VK_VERSION_1_1,VK_KHR_maintenance2)+(VK_EXT_image_drm_format_modifier)": [ { "vuid": "VUID-VkInputAttachmentAspectReference-aspectMask-02250", - "text": " aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i." + "text": " aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i." } ] }, @@ -5040,7 +5040,7 @@ }, { "vuid": "VUID-VkComputePipelineCreateInfo-pNext-pNext", - "text": " pNext must be NULL" + "text": " pNext must be NULL or a pointer to a valid instance of VkPipelineCreationFeedbackCreateInfoEXT" }, { "vuid": "VUID-VkComputePipelineCreateInfo-flags-parameter", @@ -5376,7 +5376,7 @@ }, { "vuid": "VUID-VkGraphicsPipelineCreateInfo-pNext-pNext", - "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineDiscardRectangleStateCreateInfoEXT or VkPipelineRepresentativeFragmentTestStateCreateInfoNV" + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineCreationFeedbackCreateInfoEXT, VkPipelineDiscardRectangleStateCreateInfoEXT, or VkPipelineRepresentativeFragmentTestStateCreateInfoNV" }, { "vuid": "VUID-VkGraphicsPipelineCreateInfo-sType-unique", @@ -5962,7 +5962,7 @@ }, { "vuid": "VUID-VkRayTracingPipelineCreateInfoNV-pNext-pNext", - "text": " pNext must be NULL" + "text": " pNext must be NULL or a pointer to a valid instance of VkPipelineCreationFeedbackCreateInfoEXT" }, { "vuid": "VUID-VkRayTracingPipelineCreateInfoNV-flags-parameter", @@ -6090,6 +6090,40 @@ } ] }, + "VkPipelineCreationFeedbackCreateInfoEXT": { + "(VK_EXT_pipeline_creation_feedback)": [ + { + "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02668", + "text": " When chained to VkGraphicsPipelineCreateInfo, VkPipelineCreationFeedbackEXT::pipelineStageCreationFeedbackCount must equal VkGraphicsPipelineCreateInfo::stageCount" + }, + { + "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02669", + "text": " When chained to VkComputePipelineCreateInfo, VkPipelineCreationFeedbackEXT::pipelineStageCreationFeedbackCount must equal 1" + }, + { + "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT" + }, + { + "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pPipelineCreationFeedback-parameter", + "text": " pPipelineCreationFeedback must be a valid pointer to a VkPipelineCreationFeedbackEXT structure" + }, + { + "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pPipelineStageCreationFeedbacks-parameter", + "text": " pPipelineStageCreationFeedbacks must be a valid pointer to an array of pipelineStageCreationFeedbackCount VkPipelineCreationFeedbackEXT structures" + }, + { + "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-arraylength", + "text": " pipelineStageCreationFeedbackCount must be greater than 0" + } + ], + "(VK_EXT_pipeline_creation_feedback)+(VK_NV_ray_tracing)": [ + { + "vuid": "VUID-VkPipelineCreationFeedbackCreateInfoEXT-pipelineStageCreationFeedbackCount-02670", + "text": " When chained to VkRayTracingPipelineCreateInfoNV, VkPipelineCreationFeedbackEXT::pipelineStageCreationFeedbackCount must equal VkRayTracingPipelineCreateInfoNV::stageCount" + } + ] + }, "VkAllocationCallbacks": { "core": [ { @@ -8180,7 +8214,7 @@ }, { "vuid": "VUID-vkGetImageSubresourceLayout-tiling-02271", - "text": " If the tiling of the image is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the aspectMask member of pSubresource must be VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT and the index i must be less than the drmFormatModifierPlaneCount associated with the image’s format and drmFormatModifier." + "text": " If the tiling of the image is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the aspectMask member of pSubresource must be VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT and the index i must be less than the drmFormatModifierPlaneCount associated with the image’s format and drmFormatModifier." } ], "core": [ @@ -8638,7 +8672,7 @@ "(VK_EXT_image_drm_format_modifier)": [ { "vuid": "VUID-VkImageSubresourceRange-aspectMask-02278", - "text": " aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i." + "text": " aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i." } ] }, @@ -12008,6 +12042,34 @@ } ] }, + "vkResetQueryPoolEXT": { + "(VK_EXT_host_query_reset)": [ + { + "vuid": "VUID-vkResetQueryPoolEXT-None-02665", + "text": " The hostQueryReset feature must be enabled" + }, + { + "vuid": "VUID-vkResetQueryPoolEXT-firstQuery-02666", + "text": " firstQuery must be less than the number of queries in queryPool" + }, + { + "vuid": "VUID-vkResetQueryPoolEXT-firstQuery-02667", + "text": " The sum of firstQuery and queryCount must be less than or equal to the number of queries in queryPool" + }, + { + "vuid": "VUID-vkResetQueryPoolEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkResetQueryPoolEXT-queryPool-parameter", + "text": " queryPool must be a valid VkQueryPool handle" + }, + { + "vuid": "VUID-vkResetQueryPoolEXT-queryPool-parent", + "text": " queryPool must have been created, allocated, or retrieved from device" + } + ] + }, "vkCmdBeginQuery": { "core": [ { @@ -12776,7 +12838,7 @@ "(VK_EXT_image_drm_format_modifier)": [ { "vuid": "VUID-VkClearAttachment-aspectMask-02246", - "text": " aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i." + "text": " aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i." } ] }, @@ -13458,7 +13520,7 @@ "(VK_EXT_image_drm_format_modifier)": [ { "vuid": "VUID-VkImageSubresourceLayers-aspectMask-02247", - "text": " aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i." + "text": " aspectMask must not include VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for any index i." } ] }, @@ -14576,7 +14638,7 @@ }, { "vuid": "VUID-vkCmdDraw-filterCubicMinmax-02614", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_VERSION_1_1,VK_KHR_multiview)": [ @@ -14722,7 +14784,7 @@ }, { "vuid": "VUID-vkCmdDrawIndexed-filterCubicMinmax-02616", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_VERSION_1_1,VK_KHR_multiview)": [ @@ -14904,7 +14966,7 @@ }, { "vuid": "VUID-vkCmdDrawIndirect-filterCubicMinmax-02618", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_VERSION_1_1,VK_KHR_multiview)": [ @@ -15110,7 +15172,7 @@ }, { "vuid": "VUID-vkCmdDrawIndirectCountKHR-filterCubicMinmax-02620", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_KHR_draw_indirect_count)+(VK_VERSION_1_1,VK_KHR_multiview)": [ @@ -15460,7 +15522,7 @@ }, { "vuid": "VUID-vkCmdDrawIndexedIndirect-filterCubicMinmax-02622", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_VERSION_1_1,VK_KHR_multiview)": [ @@ -15670,7 +15732,7 @@ }, { "vuid": "VUID-vkCmdDrawIndexedIndirectCountKHR-filterCubicMinmax-02624", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_KHR_draw_indirect_count)+(VK_VERSION_1_1,VK_KHR_multiview)": [ @@ -15996,7 +16058,7 @@ }, { "vuid": "VUID-vkCmdDrawIndirectByteCountEXT-filterCubicMinmax-02626", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_EXT_transform_feedback)+(VK_VERSION_1_1,VK_KHR_multiview)": [ @@ -18442,7 +18504,7 @@ }, { "vuid": "VUID-vkCmdDispatch-filterCubicMinmax-02610", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_VERSION_1_1)": [ @@ -18568,7 +18630,7 @@ }, { "vuid": "VUID-vkCmdDispatchIndirect-filterCubicMinmax-02612", - "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" + "text": " Any VkImageView being sampled with VK_FILTER_CUBIC_EXT with a reduction mode of either VK_SAMPLER_REDUCTION_MODE_MIN_EXT or VK_SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2" } ], "(VK_VERSION_1_1)": [ @@ -20052,6 +20114,46 @@ } ] }, + "vkCreateStreamDescriptorSurfaceGGP": { + "(VK_KHR_surface)+(VK_GGP_stream_descriptor_surface)": [ + { + "vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-instance-parameter", + "text": " instance must be a valid VkInstance handle" + }, + { + "vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pCreateInfo-parameter", + "text": " pCreateInfo must be a valid pointer to a valid VkStreamDescriptorSurfaceCreateInfoGGP structure" + }, + { + "vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pAllocator-parameter", + "text": " If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure" + }, + { + "vuid": "VUID-vkCreateStreamDescriptorSurfaceGGP-pSurface-parameter", + "text": " pSurface must be a valid pointer to a VkSurfaceKHR handle" + } + ] + }, + "VkStreamDescriptorSurfaceCreateInfoGGP": { + "(VK_KHR_surface)+(VK_GGP_stream_descriptor_surface)": [ + { + "vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-streamDescriptor-02681", + "text": " streamDescriptor must be a valid GgpStreamDescriptor" + }, + { + "vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP" + }, + { + "vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-pNext-pNext", + "text": " pNext must be NULL" + }, + { + "vuid": "VUID-VkStreamDescriptorSurfaceCreateInfoGGP-flags-zerobitmask", + "text": " flags must be 0" + } + ] + }, "vkCreateIOSSurfaceMVK": { "(VK_KHR_surface)+(VK_MVK_ios_surface)": [ { @@ -20769,6 +20871,12 @@ ] }, "vkGetPhysicalDeviceSurfaceCapabilities2KHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive,VK_KHR_win32_surface)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-pNext-02671", + "text": " If an instance of VkSurfaceCapabilitiesFullScreenExclusiveEXT is included in the pNext chain of pSurfaceCapabilities, an instance of VkSurfaceFullScreenExclusiveWin32InfoEXT must be included in the pNext chain of pSurfaceInfo." + } + ], "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [ { "vuid": "VUID-vkGetPhysicalDeviceSurfaceCapabilities2KHR-physicalDevice-parameter", @@ -20785,6 +20893,12 @@ ] }, "VkPhysicalDeviceSurfaceInfo2KHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_KHR_win32_surface,VK_EXT_full_screen_exclusive)": [ + { + "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-02672", + "text": " If the pNext chain includes an instance of VkSurfaceFullScreenExclusiveInfoEXT with its fullScreenExclusive member set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT, and surface was created using vkCreateWin32SurfaceKHR, an instance of VkSurfaceFullScreenExclusiveWin32InfoEXT must be present in the pNext chain" + } + ], "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [ { "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-sType", @@ -20792,7 +20906,11 @@ }, { "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-pNext-pNext", - "text": " pNext must be NULL" + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkSurfaceFullScreenExclusiveInfoEXT or VkSurfaceFullScreenExclusiveWin32InfoEXT" + }, + { + "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-sType-unique", + "text": " Each sType member in the pNext chain must be unique" }, { "vuid": "VUID-VkPhysicalDeviceSurfaceInfo2KHR-surface-parameter", @@ -20800,6 +20918,30 @@ } ] }, + "VkSurfaceFullScreenExclusiveInfoEXT": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)": [ + { + "vuid": "VUID-VkSurfaceFullScreenExclusiveInfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT" + }, + { + "vuid": "VUID-VkSurfaceFullScreenExclusiveInfoEXT-fullScreenExclusive-parameter", + "text": " fullScreenExclusive must be a valid VkFullScreenExclusiveEXT value" + } + ] + }, + "VkSurfaceFullScreenExclusiveWin32InfoEXT": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)+(VK_KHR_win32_surface)": [ + { + "vuid": "VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-hmonitor-02673", + "text": " hmonitor must be a valid HMONITOR" + }, + { + "vuid": "VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT" + } + ] + }, "VkSurfaceCapabilities2KHR": { "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)": [ { @@ -20808,7 +20950,19 @@ }, { "vuid": "VUID-VkSurfaceCapabilities2KHR-pNext-pNext", - "text": " pNext must be NULL or a pointer to a valid instance of VkSharedPresentSurfaceCapabilitiesKHR" + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDisplayNativeHdrSurfaceCapabilitiesAMD, VkSharedPresentSurfaceCapabilitiesKHR, VkSurfaceCapabilitiesFullScreenExclusiveEXT, or VkSurfaceProtectedCapabilitiesKHR" + }, + { + "vuid": "VUID-VkSurfaceCapabilities2KHR-sType-unique", + "text": " Each sType member in the pNext chain must be unique" + } + ] + }, + "VkSurfaceProtectedCapabilitiesKHR": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_KHR_surface_protected_capabilities)": [ + { + "vuid": "VUID-VkSurfaceProtectedCapabilitiesKHR-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR" } ] }, @@ -20820,6 +20974,22 @@ } ] }, + "VkDisplayNativeHdrSurfaceCapabilitiesAMD": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_AMD_display_native_hdr)": [ + { + "vuid": "VUID-VkDisplayNativeHdrSurfaceCapabilitiesAMD-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD" + } + ] + }, + "VkSurfaceCapabilitiesFullScreenExclusiveEXT": { + "(VK_KHR_surface)+(VK_KHR_get_surface_capabilities2)+(VK_EXT_full_screen_exclusive)": [ + { + "vuid": "VUID-VkSurfaceCapabilitiesFullScreenExclusiveEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT" + } + ] + }, "vkGetPhysicalDeviceSurfaceCapabilities2EXT": { "(VK_KHR_surface)+(VK_EXT_display_surface_counter)": [ { @@ -20936,6 +21106,66 @@ } ] }, + "vkGetPhysicalDeviceSurfacePresentModes2EXT": { + "(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [ + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-physicalDevice-parameter", + "text": " physicalDevice must be a valid VkPhysicalDevice handle" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pSurfaceInfo-parameter", + "text": " pSurfaceInfo must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pPresentModeCount-parameter", + "text": " pPresentModeCount must be a valid pointer to a uint32_t value" + }, + { + "vuid": "VUID-vkGetPhysicalDeviceSurfacePresentModes2EXT-pPresentModes-parameter", + "text": " If the value referenced by pPresentModeCount is not 0, and pPresentModes is not NULL, pPresentModes must be a valid pointer to an array of pPresentModeCount VkPresentModeKHR values" + } + ] + }, + "vkAcquireFullScreenExclusiveModeEXT": { + "(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [ + { + "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02674", + "text": " swapchain must not be in the retired state" + }, + { + "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02675", + "text": " swapchain must be a swapchain created with an instance of VkSurfaceFullScreenExclusiveInfoEXT, with fullScreenExclusive set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT" + }, + { + "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-02676", + "text": " swapchain must not currently have exclusive full-screen access" + }, + { + "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-swapchain-parameter", + "text": " swapchain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkAcquireFullScreenExclusiveModeEXT-commonparent", + "text": " Both of device, and swapchain must have been created, allocated, or retrieved from the same VkInstance" + } + ] + }, + "vkReleaseFullScreenExclusiveModeEXT": { + "(VK_KHR_surface)+(VK_EXT_full_screen_exclusive)": [ + { + "vuid": "VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-02677", + "text": " swapchain must not be in the retired state" + }, + { + "vuid": "VUID-vkReleaseFullScreenExclusiveModeEXT-swapchain-02678", + "text": " swapchain must be a swapchain created with an instance of VkSurfaceFullScreenExclusiveInfoEXT, with fullScreenExclusive set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT" + } + ] + }, "vkGetDeviceGroupPresentCapabilitiesKHR": { "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)": [ { @@ -20980,6 +21210,22 @@ } ] }, + "vkGetDeviceGroupSurfacePresentModes2EXT": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)+(VK_EXT_full_screen_exclusive)": [ + { + "vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-device-parameter", + "text": " device must be a valid VkDevice handle" + }, + { + "vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pSurfaceInfo-parameter", + "text": " pSurfaceInfo must be a valid pointer to a valid VkPhysicalDeviceSurfaceInfo2KHR structure" + }, + { + "vuid": "VUID-vkGetDeviceGroupSurfacePresentModes2EXT-pModes-parameter", + "text": " pModes must be a valid pointer to a VkDeviceGroupPresentModeFlagsKHR value" + } + ] + }, "vkGetPhysicalDevicePresentRectanglesKHR": { "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_VERSION_1_1,VK_KHR_device_group)": [ { @@ -21088,11 +21334,11 @@ "(VK_KHR_surface)+(VK_KHR_swapchain)": [ { "vuid": "VUID-VkSwapchainCreateInfoKHR-surface-01270", - "text": " surface must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR" + "text": " surface must be a surface that is supported by the device as determined using vkGetPhysicalDeviceSurfaceSupportKHR" }, { "vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01271", - "text": " minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface" + "text": " minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface" }, { "vuid": "VUID-VkSwapchainCreateInfoKHR-minImageCount-01272", @@ -21148,7 +21394,7 @@ }, { "vuid": "VUID-VkSwapchainCreateInfoKHR-pNext-pNext", - "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupSwapchainCreateInfoKHR, VkImageFormatListCreateInfoKHR, or VkSwapchainCounterCreateInfoEXT" + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupSwapchainCreateInfoKHR, VkImageFormatListCreateInfoKHR, VkSurfaceFullScreenExclusiveInfoEXT, VkSurfaceFullScreenExclusiveWin32InfoEXT, VkSwapchainCounterCreateInfoEXT, or VkSwapchainDisplayNativeHdrCreateInfoAMD" }, { "vuid": "VUID-VkSwapchainCreateInfoKHR-sType-unique", @@ -21250,6 +21496,18 @@ "vuid": "VUID-VkSwapchainCreateInfoKHR-flags-03168", "text": " If flags contains VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR then the pNext chain must contain an instance of VkImageFormatListCreateInfoKHR with a viewFormatCount greater than zero and pViewFormats must have an element equal to imageFormat" } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_surface_protected_capabilities)": [ + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-flags-03187", + "text": " If flags contains VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR, then VkSurfaceProtectedCapabilitiesKHR::supportsProtected must be VK_TRUE in the VkSurfaceProtectedCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilities2KHR for surface" + } + ], + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_full_screen_exclusive,VK_KHR_win32_surface)": [ + { + "vuid": "VUID-VkSwapchainCreateInfoKHR-pNext-02679", + "text": " If the pNext chain includes an instance of VkSurfaceFullScreenExclusiveInfoEXT with its fullScreenExclusive member set to VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT, and surface was created using vkCreateWin32SurfaceKHR, an instance of VkSurfaceFullScreenExclusiveWin32InfoEXT must be present in the pNext chain" + } ] }, "VkDeviceGroupSwapchainCreateInfoKHR": { @@ -21268,6 +21526,30 @@ } ] }, + "VkSwapchainDisplayNativeHdrCreateInfoAMD": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_AMD_display_native_hdr)": [ + { + "vuid": "VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD" + }, + { + "vuid": "VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-localDimmingEnable-XXXXX", + "text": " It is only valid to set localDimmingEnable to VK_TRUE if VkDisplayNativeHdrSurfaceCapabilitiesAMD::localDimmingSupport is supported." + } + ] + }, + "vkSetLocalDimmingAMD": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_AMD_display_native_hdr)": [ + { + "vuid": "VUID-vkSetLocalDimmingAMD-swapChain-parameter", + "text": " swapChain must be a valid VkSwapchainKHR handle" + }, + { + "vuid": "VUID-vkSetLocalDimmingAMD-XXXXX", + "text": " It is only valid to call vkSetLocalDimmingAMD if VkDisplayNativeHdrSurfaceCapabilitiesAMD::localDimmingSupport is supported." + } + ] + }, "VkSwapchainCounterCreateInfoEXT": { "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_display_control)": [ { @@ -21578,7 +21860,7 @@ }, { "vuid": "VUID-VkPresentInfoKHR-pNext-pNext", - "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupPresentInfoKHR, VkDisplayPresentInfoKHR, VkPresentRegionsKHR, or VkPresentTimesInfoGOOGLE" + "text": " Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupPresentInfoKHR, VkDisplayPresentInfoKHR, VkPresentFrameTokenGGP, VkPresentRegionsKHR, or VkPresentTimesInfoGOOGLE" }, { "vuid": "VUID-VkPresentInfoKHR-sType-unique", @@ -21734,6 +22016,18 @@ } ] }, + "VkPresentFrameTokenGGP": { + "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_GGP_frame_token)": [ + { + "vuid": "VUID-VkPresentFrameTokenGGP-frameToken-02680", + "text": " frameToken must be a valid GgpFrameToken" + }, + { + "vuid": "VUID-VkPresentFrameTokenGGP-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP" + } + ] + }, "vkSetHdrMetadataEXT": { "(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_EXT_hdr_metadata)": [ { @@ -22472,6 +22766,14 @@ } ] }, + "VkPhysicalDeviceHostQueryResetFeaturesEXT": { + "(VK_EXT_host_query_reset)": [ + { + "vuid": "VUID-VkPhysicalDeviceHostQueryResetFeaturesEXT-sType-sType", + "text": " sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT" + } + ] + }, "VkPhysicalDevicePushDescriptorPropertiesKHR": { "(VK_KHR_push_descriptor)": [ { diff --git a/registry/vk.xml b/registry/vk.xml index ef45ce5..7647e00 100644 --- a/registry/vk.xml +++ b/registry/vk.xml @@ -56,6 +56,7 @@ server. + @@ -74,6 +75,7 @@ server. + @@ -100,6 +102,7 @@ server. + In the current header structure, each platform's interfaces are confined to a platform-specific header (vulkan_xlib.h, @@ -125,6 +128,7 @@ server. + @@ -133,6 +137,8 @@ server. + + #define VK_MAKE_VERSION(major, minor, patch) \ (((major) << 22) | ((minor) << 12) | (patch)) @@ -147,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 103 +#define VK_HEADER_VERSION 105 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -259,6 +265,7 @@ typedef void CAMetalLayer; typedef VkFlags VkDescriptorUpdateTemplateCreateFlags; + typedef VkFlags VkPipelineCreationFeedbackFlagsEXT; WSI extensions typedef VkFlags VkCompositeAlphaFlagsKHR; @@ -277,6 +284,7 @@ typedef void CAMetalLayer; typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; typedef VkFlags VkMetalSurfaceCreateFlagsEXT; typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA; + typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP; typedef VkFlags VkPeerMemoryFeatureFlags; typedef VkFlags VkMemoryAllocateFlags; @@ -487,6 +495,7 @@ typedef void CAMetalLayer; + WSI extensions @@ -541,6 +550,7 @@ typedef void CAMetalLayer; + Enumerated types in the header, but not used by the API @@ -1697,6 +1707,12 @@ typedef void CAMetalLayer; VkImagePipeSurfaceCreateFlagsFUCHSIA flags zx_handle_t imagePipeHandle + + VkStructureType sType + const void* pNext + VkStreamDescriptorSurfaceCreateFlagsGGP flags + GgpStreamDescriptor streamDescriptor + VkFormat formatSupported pair of rendering format VkColorSpaceKHR colorSpaceand color space for the surface @@ -2496,6 +2512,16 @@ typedef void CAMetalLayer; float maxContentLightLevelContent maximum luminance float maxFrameAverageLightLevel + + VkStructureType sType + void* pNext + VkBool32 localDimmingSupport + + + VkStructureType sType + const void* pNext + VkBool32 localDimmingEnable + uint64_t refreshDurationNumber of nanoseconds from the start of one refresh cycle to the next @@ -2645,12 +2671,12 @@ typedef void CAMetalLayer; - VkStructureType sType - void* pNext - uint32_t subgroupSizeThe size of a subgroup for this queue. - VkShaderStageFlags supportedStagesBitfield of what shader stages support subgroup operations - VkSubgroupFeatureFlags supportedOperationsBitfield of what subgroup operations are supported. - VkBool32 quadOperationsInAllStagesFlag to specify whether quad operations are available in all stages. + VkStructureType sType + void* pNext + uint32_t subgroupSizeThe size of a subgroup for this queue. + VkShaderStageFlags supportedStagesBitfield of what shader stages support subgroup operations + VkSubgroupFeatureFlags supportedOperationsBitfield of what subgroup operations are supported. + VkBool32 quadOperationsInAllStagesFlag to specify whether quad operations are available in all stages. VkStructureType sType @@ -2977,6 +3003,11 @@ typedef void CAMetalLayer; VkBool32 shaderRoundingModeRTZFloat32 VkBool32 shaderRoundingModeRTZFloat64 + + VkStructureType sType + void* pNext + VkBool32 hostQueryReset + VkStructureType sType const void* pNext @@ -3698,6 +3729,11 @@ typedef void CAMetalLayer; void* pNext VkBool32 scalarBlockLayout + + VkStructureType sType + const void* pNext + VkBool32 supportsProtectedRepresents if surface can be protected + VkStructureType sType void* pNextPointer to next structure @@ -3740,7 +3776,7 @@ typedef void CAMetalLayer; VkStructureType sType const void* pNext - VkDeviceSize deviceAddress + VkDeviceAddress deviceAddress VkStructureType sType @@ -3788,6 +3824,37 @@ typedef void CAMetalLayer; VkDescriptorType descriptorType VkSampler sampler + + VkStructureType sType + const void* pNext + GgpFrameToken frameToken + + + VkPipelineCreationFeedbackFlagsEXT flags + uint64_t duration + + + VkStructureType sType + const void* pNext + VkPipelineCreationFeedbackEXT* pPipelineCreationFeedbackOutput pipeline creation feedback. + uint32_t pipelineStageCreationFeedbackCount + VkPipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacksOne entry for each shader stage specified in the parent Vk*PipelineCreateInfo struct + + + VkStructureType sType + void* pNext + VkFullScreenExclusiveEXT fullScreenExclusive + + + VkStructureType sType + const void* pNext + HMONITOR hmonitor + + + VkStructureType sType + void* pNext + VkBool32 fullScreenExclusiveSupported + Vulkan enumerant (token) definitions @@ -4916,6 +4983,7 @@ typedef void CAMetalLayer; + @@ -5010,6 +5078,17 @@ typedef void CAMetalLayer; + + + + + + + + + + + VkResult vkCreateInstance @@ -5333,6 +5412,13 @@ typedef void CAMetalLayer; VkDeviceSize stride VkQueryResultFlags flags + + void vkResetQueryPoolEXT + VkDevice device + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + VkResult vkCreateBuffer VkDevice device @@ -6066,7 +6152,7 @@ typedef void CAMetalLayer; uint32_t* pPresentModeCount VkPresentModeKHR* pPresentModes - + VkResult vkCreateSwapchainKHR VkDevice device const VkSwapchainCreateInfoKHR* pCreateInfo @@ -6086,7 +6172,7 @@ typedef void CAMetalLayer; uint32_t* pSwapchainImageCount VkImage* pSwapchainImages - + VkResult vkAcquireNextImageKHR VkDevice device VkSwapchainKHR swapchain @@ -6095,7 +6181,7 @@ typedef void CAMetalLayer; VkFence fence uint32_t* pImageIndex - + VkResult vkQueuePresentKHR VkQueue queue const VkPresentInfoKHR* pPresentInfo @@ -6167,6 +6253,13 @@ typedef void CAMetalLayer; const VkAllocationCallbacks* pAllocator VkSurfaceKHR* pSurface + + VkResult vkCreateStreamDescriptorSurfaceGGP + VkInstance instance + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + VkResult vkCreateDebugReportCallbackEXT VkInstance instance @@ -6564,7 +6657,7 @@ typedef void CAMetalLayer; VkSurfaceKHR surface VkDeviceGroupPresentModeFlagsKHR* pModes - + VkResult vkAcquireNextImage2KHR VkDevice device const VkAcquireNextImageInfoKHR* pAcquireInfo @@ -6594,7 +6687,7 @@ typedef void CAMetalLayer; const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo const VkAllocationCallbacks* pAllocator VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate - + void vkDestroyDescriptorUpdateTemplate @@ -6626,7 +6719,7 @@ typedef void CAMetalLayer; const VkSwapchainKHR* pSwapchains const VkHdrMetadataEXT* pMetadata - + VkResult vkGetSwapchainStatusKHR VkDevice device VkSwapchainKHR swapchain @@ -6837,6 +6930,11 @@ typedef void CAMetalLayer; size_t* pInfoSize void* pInfo + + void vkSetLocalDimmingAMD + VkSwapchainKHR swapChain + VkBool32 localDimmingEnable + VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT VkPhysicalDevice physicalDevice @@ -7216,6 +7314,30 @@ typedef void CAMetalLayer; VkDevice device const VkImageViewHandleInfoNVX* pInfo + + VkResult vkGetPhysicalDeviceSurfacePresentModes2EXT + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo + uint32_t* pPresentModeCount + VkPresentModeKHR* pPresentModes + + + VkResult vkGetDeviceGroupSurfacePresentModes2EXT + VkDevice device + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo + VkDeviceGroupPresentModeFlagsKHR* pModes + + + VkResult vkAcquireFullScreenExclusiveModeEXT + VkDevice device + VkSwapchainKHR swapchain + + + VkResult vkReleaseFullScreenExclusiveModeEXT + VkDevice device + VkSwapchainKHR swapchain + + @@ -7985,7 +8107,7 @@ typedef void CAMetalLayer; - + @@ -8268,10 +8390,14 @@ typedef void CAMetalLayer; - + - - + + + + + + @@ -8454,6 +8580,9 @@ typedef void CAMetalLayer; + + + @@ -10052,16 +10181,23 @@ typedef void CAMetalLayer; - + - - + + + + - + - - + + + + + + + @@ -10233,10 +10369,16 @@ typedef void CAMetalLayer; - + - - + + + + + + + + @@ -10421,10 +10563,12 @@ typedef void CAMetalLayer; - + - - + + + + @@ -10544,10 +10688,26 @@ typedef void CAMetalLayer; - + - - + + + + + + + + + + + + + + + + + + @@ -10580,5 +10740,14 @@ typedef void CAMetalLayer; + + + + + + + + + diff --git a/registry/vkconventions.py b/registry/vkconventions.py new file mode 100644 index 0000000..64b4dd4 --- /dev/null +++ b/registry/vkconventions.py @@ -0,0 +1,214 @@ +#!/usr/bin/python3 -i +# +# Copyright (c) 2013-2019 The Khronos Group Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Working-group-specific style conventions, +# used in generation. + +from conventions import ConventionsBase + + +class VulkanConventions(ConventionsBase): + def formatExtension(self, name): + """Mark up a name as an extension for the spec.""" + return '`<<{}>>`'.format(name) + + @property + def null(self): + """Preferred spelling of NULL.""" + return '`NULL`' + + @property + def constFlagBits(self): + """Returns True if static const flag bits should be generated, False if an enumerated type should be generated.""" + return False + + @property + def struct_macro(self): + return 'sname:' + + @property + def external_macro(self): + return 'code:' + + @property + def structtype_member_name(self): + """Return name of the structure type member""" + return 'sType' + + @property + def nextpointer_member_name(self): + """Return name of the structure pointer chain member""" + return 'pNext' + + @property + def valid_pointer_prefix(self): + """Return prefix to pointers which must themselves be valid""" + return 'valid' + + def is_structure_type_member(self, paramtype, paramname): + """Determine if member type and name match the structure type member.""" + return paramtype == 'VkStructureType' and paramname == self.structtype_member_name + + def is_nextpointer_member(self, paramtype, paramname): + """Determine if member type and name match the next pointer chain member.""" + return paramtype == 'void' and paramname == self.nextpointer_member_name + + @property + def warning_comment(self): + """Return warning comment to be placed in header of generated Asciidoctor files""" + return '// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry' + + @property + def file_suffix(self): + """Return suffix of generated Asciidoctor files""" + return '.txt' + + @property + def api_name(self): + """Return API name""" + return 'Vulkan' + + @property + def xml_supported_name_of_api(self): + """Return the supported= attribute used in API XML""" + return 'vulkan' + + @property + def api_prefix(self): + """Return API token prefix""" + return 'VK_' + + @property + def api_version_prefix(self): + """Return API core version token prefix""" + return 'VK_VERSION_' + + @property + def KHR_prefix(self): + """Return extension name prefix for KHR extensions""" + return 'VK_KHR_' + + @property + def EXT_prefix(self): + """Return extension name prefix for EXT extensions""" + return 'VK_EXT_' + + @property + def write_contacts(self): + """Return whether contact list should be written to extension appendices""" + return True + + @property + def write_refpage_include(self): + """Return whether refpage include should be written to extension appendices""" + return True + + def writeFeature(self, featureExtraProtect, filename): + """Returns True if OutputGenerator.endFeature should write this feature. + Used in COutputGenerator + """ + return True + + def requires_error_validation(self, return_type): + """Returns True if the return_type element is an API result code + requiring error validation. + """ + return False + + @property + def required_errors(self): + """Return a list of required error codes for validation.""" + return [] + + def is_externsync_command(self, protoname): + """Returns True if the protoname element is an API command requiring + external synchronization + """ + return protoname is not None and 'vkCmd' in protoname + + def is_api_name(self, name): + """Returns True if name is in the reserved API namespace. + For Vulkan, these are names with a case-insensitive 'vk' prefix, or + a 'PFN_vk' function pointer type prefix. + """ + return name[0:2].lower() == 'vk' or name[0:6] == 'PFN_vk' + + def is_voidpointer_alias(self, tag, text, tail): + """Return True if the declaration components (tag,text,tail) of an + element represents a void * type + """ + return tag == 'type' and text == 'void' and tail.startswith('*') + + def make_voidpointer_alias(self, tail): + """Reformat a void * declaration to include the API alias macro. + Vulkan doesn't have an API alias macro, so do nothing. + """ + return tail + + @property + def specURL(self): + """Return public registry URL which ref pages should link to for the + current all-extensions HTML specification, so xrefs in the + asciidoc source that aren't to ref pages can link into it + instead. N.b. this may need to change on a per-refpage basis if + there are multiple documents involved. + """ + return 'https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html' + + @property + def xml_api_name(self): + """Return the name used in the default API XML registry for the default API""" + return 'vulkan' + + @property + def registry_path(self): + """Return relpath to the default API XML registry in this project.""" + return 'xml/vk.xml' + + @property + def specification_path(self): + """Return relpath to the Asciidoctor specification sources in this project.""" + return '../appendices/meta' + + @property + def extra_refpage_headers(self): + """Return any extra text to add to refpage headers.""" + return 'include::../config/attribs.txt[]' + + @property + def extension_index_prefixes(self): + """Return a list of extension prefixes used to group extension refpages.""" + return ['VK_KHR', 'VK_EXT', 'VK'] + + @property + def unified_flag_refpages(self): + """Returns True if Flags/FlagBits refpages are unified, False if + they're separate. + """ + return False + + @property + def spec_reflow_path(self): + """Return the relative path to the spec source folder to reflow""" + return '.' + + @property + def spec_no_reflow_dirs(self): + """Return a set of directories not to automatically descend into + when reflowing spec text + """ + return ('scripts', 'style') +