Update for Vulkan-Docs 1.4.319

This commit is contained in:
Jon Leech 2025-06-20 13:17:34 +01:00 committed by Jon Leech
parent b39ab380a4
commit 10739e8e00
38 changed files with 184363 additions and 135674 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -35,12 +35,14 @@ typedef struct VkAndroidSurfaceCreateInfoKHR {
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
VkInstance instance, VkInstance instance,
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif #endif
#endif
// VK_ANDROID_external_memory_android_hardware_buffer is a preprocessor guard. Do not pass it to API calls. // VK_ANDROID_external_memory_android_hardware_buffer is a preprocessor guard. Do not pass it to API calls.
@ -109,16 +111,20 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(Vk
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID( VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
VkDevice device, VkDevice device,
const struct AHardwareBuffer* buffer, const struct AHardwareBuffer* buffer,
VkAndroidHardwareBufferPropertiesANDROID* pProperties); VkAndroidHardwareBufferPropertiesANDROID* pProperties);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID( VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
VkDevice device, VkDevice device,
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
struct AHardwareBuffer** pBuffer); struct AHardwareBuffer** pBuffer);
#endif #endif
#endif
// VK_ANDROID_external_format_resolve is a preprocessor guard. Do not pass it to API calls. // VK_ANDROID_external_format_resolve is a preprocessor guard. Do not pass it to API calls.

View file

@ -120,7 +120,7 @@ typedef struct VkPipelineShaderStageNodeCreateInfoAMDX {
uint32_t index; uint32_t index;
} VkPipelineShaderStageNodeCreateInfoAMDX; } VkPipelineShaderStageNodeCreateInfoAMDX;
typedef VkResult (VKAPI_PTR *PFN_vkCreateExecutionGraphPipelinesAMDX)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); typedef VkResult (VKAPI_PTR *PFN_vkCreateExecutionGraphPipelinesAMDX)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex); typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex);
typedef void (VKAPI_PTR *PFN_vkCmdInitializeGraphScratchMemoryAMDX)(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize); typedef void (VKAPI_PTR *PFN_vkCmdInitializeGraphScratchMemoryAMDX)(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize);
@ -129,6 +129,7 @@ typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectAMDX)(VkCommandBuffer
typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectCountAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo); typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectCountAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateExecutionGraphPipelinesAMDX( VKAPI_ATTR VkResult VKAPI_CALL vkCreateExecutionGraphPipelinesAMDX(
VkDevice device, VkDevice device,
VkPipelineCache pipelineCache, VkPipelineCache pipelineCache,
@ -136,42 +137,55 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateExecutionGraphPipelinesAMDX(
const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkPipeline* pPipelines); VkPipeline* pPipelines);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineScratchSizeAMDX( VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineScratchSizeAMDX(
VkDevice device, VkDevice device,
VkPipeline executionGraph, VkPipeline executionGraph,
VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo); VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineNodeIndexAMDX( VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineNodeIndexAMDX(
VkDevice device, VkDevice device,
VkPipeline executionGraph, VkPipeline executionGraph,
const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo,
uint32_t* pNodeIndex); uint32_t* pNodeIndex);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkCmdInitializeGraphScratchMemoryAMDX( VKAPI_ATTR void VKAPI_CALL vkCmdInitializeGraphScratchMemoryAMDX(
VkCommandBuffer commandBuffer, VkCommandBuffer commandBuffer,
VkPipeline executionGraph, VkPipeline executionGraph,
VkDeviceAddress scratch, VkDeviceAddress scratch,
VkDeviceSize scratchSize); VkDeviceSize scratchSize);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphAMDX( VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphAMDX(
VkCommandBuffer commandBuffer, VkCommandBuffer commandBuffer,
VkDeviceAddress scratch, VkDeviceAddress scratch,
VkDeviceSize scratchSize, VkDeviceSize scratchSize,
const VkDispatchGraphCountInfoAMDX* pCountInfo); const VkDispatchGraphCountInfoAMDX* pCountInfo);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectAMDX( VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectAMDX(
VkCommandBuffer commandBuffer, VkCommandBuffer commandBuffer,
VkDeviceAddress scratch, VkDeviceAddress scratch,
VkDeviceSize scratchSize, VkDeviceSize scratchSize,
const VkDispatchGraphCountInfoAMDX* pCountInfo); const VkDispatchGraphCountInfoAMDX* pCountInfo);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectCountAMDX( VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectCountAMDX(
VkCommandBuffer commandBuffer, VkCommandBuffer commandBuffer,
VkDeviceAddress scratch, VkDeviceAddress scratch,
VkDeviceSize scratchSize, VkDeviceSize scratchSize,
VkDeviceAddress countInfo); VkDeviceAddress countInfo);
#endif #endif
#endif
// VK_NV_cuda_kernel_launch is a preprocessor guard. Do not pass it to API calls. // VK_NV_cuda_kernel_launch is a preprocessor guard. Do not pass it to API calls.
@ -232,38 +246,50 @@ typedef void (VKAPI_PTR *PFN_vkDestroyCudaFunctionNV)(VkDevice device, VkCudaFun
typedef void (VKAPI_PTR *PFN_vkCmdCudaLaunchKernelNV)(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo); typedef void (VKAPI_PTR *PFN_vkCmdCudaLaunchKernelNV)(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaModuleNV( VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaModuleNV(
VkDevice device, VkDevice device,
const VkCudaModuleCreateInfoNV* pCreateInfo, const VkCudaModuleCreateInfoNV* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkCudaModuleNV* pModule); VkCudaModuleNV* pModule);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetCudaModuleCacheNV( VKAPI_ATTR VkResult VKAPI_CALL vkGetCudaModuleCacheNV(
VkDevice device, VkDevice device,
VkCudaModuleNV module, VkCudaModuleNV module,
size_t* pCacheSize, size_t* pCacheSize,
void* pCacheData); void* pCacheData);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaFunctionNV( VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaFunctionNV(
VkDevice device, VkDevice device,
const VkCudaFunctionCreateInfoNV* pCreateInfo, const VkCudaFunctionCreateInfoNV* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkCudaFunctionNV* pFunction); VkCudaFunctionNV* pFunction);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkDestroyCudaModuleNV( VKAPI_ATTR void VKAPI_CALL vkDestroyCudaModuleNV(
VkDevice device, VkDevice device,
VkCudaModuleNV module, VkCudaModuleNV module,
const VkAllocationCallbacks* pAllocator); const VkAllocationCallbacks* pAllocator);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkDestroyCudaFunctionNV( VKAPI_ATTR void VKAPI_CALL vkDestroyCudaFunctionNV(
VkDevice device, VkDevice device,
VkCudaFunctionNV function, VkCudaFunctionNV function,
const VkAllocationCallbacks* pAllocator); const VkAllocationCallbacks* pAllocator);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkCmdCudaLaunchKernelNV( VKAPI_ATTR void VKAPI_CALL vkCmdCudaLaunchKernelNV(
VkCommandBuffer commandBuffer, VkCommandBuffer commandBuffer,
const VkCudaLaunchInfoNV* pLaunchInfo); const VkCudaLaunchInfoNV* pLaunchInfo);
#endif #endif
#endif
// VK_NV_displacement_micromap is a preprocessor guard. Do not pass it to API calls. // VK_NV_displacement_micromap is a preprocessor guard. Do not pass it to API calls.

File diff suppressed because it is too large Load diff

View file

@ -36,17 +36,21 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateDirectFBSurfaceEXT)(VkInstance instance
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT( VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT(
VkInstance instance, VkInstance instance,
const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT( VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex, uint32_t queueFamilyIndex,
IDirectFB* dfb); IDirectFB* dfb);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -34,12 +34,14 @@ typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
VkInstance instance, VkInstance instance,
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif #endif
#endif
// VK_FUCHSIA_external_memory is a preprocessor guard. Do not pass it to API calls. // VK_FUCHSIA_external_memory is a preprocessor guard. Do not pass it to API calls.
@ -70,17 +72,21 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandleFUCHSIA)(VkDevice device
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandleFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandleFUCHSIA(
VkDevice device, VkDevice device,
const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
zx_handle_t* pZirconHandle); zx_handle_t* pZirconHandle);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA(
VkDevice device, VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType, VkExternalMemoryHandleTypeFlagBits handleType,
zx_handle_t zirconHandle, zx_handle_t zirconHandle,
VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties);
#endif #endif
#endif
// VK_FUCHSIA_external_semaphore is a preprocessor guard. Do not pass it to API calls. // VK_FUCHSIA_external_semaphore is a preprocessor guard. Do not pass it to API calls.
@ -107,15 +113,19 @@ typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreZirconHandleFUCHSIA)(VkDevice
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA(
VkDevice device, VkDevice device,
const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo); const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA(
VkDevice device, VkDevice device,
const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
zx_handle_t* pZirconHandle); zx_handle_t* pZirconHandle);
#endif #endif
#endif
// VK_FUCHSIA_buffer_collection is a preprocessor guard. Do not pass it to API calls. // VK_FUCHSIA_buffer_collection is a preprocessor guard. Do not pass it to API calls.
@ -228,32 +238,42 @@ typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device,
typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA(
VkDevice device, VkDevice device,
const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkBufferCollectionFUCHSIA* pCollection); VkBufferCollectionFUCHSIA* pCollection);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA(
VkDevice device, VkDevice device,
VkBufferCollectionFUCHSIA collection, VkBufferCollectionFUCHSIA collection,
const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA(
VkDevice device, VkDevice device,
VkBufferCollectionFUCHSIA collection, VkBufferCollectionFUCHSIA collection,
const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA( VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA(
VkDevice device, VkDevice device,
VkBufferCollectionFUCHSIA collection, VkBufferCollectionFUCHSIA collection,
const VkAllocationCallbacks* pAllocator); const VkAllocationCallbacks* pAllocator);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA( VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA(
VkDevice device, VkDevice device,
VkBufferCollectionFUCHSIA collection, VkBufferCollectionFUCHSIA collection,
VkBufferCollectionPropertiesFUCHSIA* pProperties); VkBufferCollectionPropertiesFUCHSIA* pProperties);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

File diff suppressed because it is too large Load diff

View file

@ -34,12 +34,14 @@ typedef struct VkStreamDescriptorSurfaceCreateInfoGGP {
typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP( VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(
VkInstance instance, VkInstance instance,
const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif #endif
#endif
// VK_GGP_frame_token is a preprocessor guard. Do not pass it to API calls. // VK_GGP_frame_token is a preprocessor guard. Do not pass it to API calls.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,10 @@
// Copyright 2015-2025 The Khronos Group Inc. // Copyright 2015-2025 The Khronos Group Inc.
// //
// SPDX-License-Identifier: Apache-2.0 OR MIT // SPDX-License-Identifier: Apache-2.0 OR MIT
// //
// This header is generated from the Khronos Vulkan XML API Registry. // This header is generated from the Khronos Vulkan XML API Registry.
#ifndef VULKAN_HPP_MACROS_HPP #ifndef VULKAN_HPP_MACROS_HPP
#define VULKAN_HPP_MACROS_HPP #define VULKAN_HPP_MACROS_HPP
@ -93,11 +92,12 @@
#endif #endif
#ifndef VK_USE_64_BIT_PTR_DEFINES #ifndef VK_USE_64_BIT_PTR_DEFINES
#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) || (defined(__riscv) && __riscv_xlen == 64) # if defined( __LP64__ ) || defined( _WIN64 ) || ( defined( __x86_64__ ) && !defined( __ILP32__ ) ) || defined( _M_X64 ) || defined( __ia64 ) || \
#define VK_USE_64_BIT_PTR_DEFINES 1 defined( _M_IA64 ) || defined( __aarch64__ ) || defined( __powerpc64__ ) || ( defined( __riscv ) && __riscv_xlen == 64 )
#else # define VK_USE_64_BIT_PTR_DEFINES 1
#define VK_USE_64_BIT_PTR_DEFINES 0 # else
#endif # define VK_USE_64_BIT_PTR_DEFINES 0
# endif
#endif #endif
// 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default. // 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default.
@ -259,7 +259,7 @@ namespace VULKAN_HPP_NAMESPACE
{ {
namespace detail namespace detail
{ {
class DispatchLoaderDynamic; class DispatchLoaderDynamic;
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER ) #if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 # if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
@ -323,5 +323,4 @@ namespace VULKAN_HPP_NAMESPACE
# define VULKAN_HPP_RAII_CREATE_NOEXCEPT # define VULKAN_HPP_RAII_CREATE_NOEXCEPT
#endif #endif
#endif
#endif

View file

@ -34,12 +34,14 @@ typedef struct VkIOSSurfaceCreateInfoMVK {
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
VkInstance instance, VkInstance instance,
const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -34,12 +34,14 @@ typedef struct VkMacOSSurfaceCreateInfoMVK {
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
VkInstance instance, VkInstance instance,
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -40,12 +40,14 @@ typedef struct VkMetalSurfaceCreateInfoEXT {
typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT( VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
VkInstance instance, VkInstance instance,
const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkMetalSurfaceCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif #endif
#endif
// VK_EXT_metal_objects is a preprocessor guard. Do not pass it to API calls. // VK_EXT_metal_objects is a preprocessor guard. Do not pass it to API calls.
@ -183,10 +185,12 @@ typedef struct VkImportMetalSharedEventInfoEXT {
typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT( VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT(
VkDevice device, VkDevice device,
VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
#endif #endif
#endif
// VK_EXT_external_memory_metal is a preprocessor guard. Do not pass it to API calls. // VK_EXT_external_memory_metal is a preprocessor guard. Do not pass it to API calls.
@ -217,17 +221,21 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandleEXT)(VkDevice device, con
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandlePropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHandle, VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandlePropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHandle, VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandleEXT( VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandleEXT(
VkDevice device, VkDevice device,
const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo, const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo,
void** pHandle); void** pHandle);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandlePropertiesEXT( VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandlePropertiesEXT(
VkDevice device, VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType, VkExternalMemoryHandleTypeFlagBits handleType,
const void* pHandle, const void* pHandle,
VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties); VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -37,12 +37,14 @@ typedef VkOHSurfaceCreateInfoOHOS VkSurfaceCreateInfoOHOS;
typedef VkResult (VKAPI_PTR *PFN_vkCreateSurfaceOHOS)(VkInstance instance, const VkSurfaceCreateInfoOHOS* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkResult (VKAPI_PTR *PFN_vkCreateSurfaceOHOS)(VkInstance instance, const VkSurfaceCreateInfoOHOS* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateSurfaceOHOS( VKAPI_ATTR VkResult VKAPI_CALL vkCreateSurfaceOHOS(
VkInstance instance, VkInstance instance,
const VkSurfaceCreateInfoOHOS* pCreateInfo, const VkSurfaceCreateInfoOHOS* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

File diff suppressed because it is too large Load diff

View file

@ -36,17 +36,21 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateScreenSurfaceQNX)(VkInstance instance,
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX( VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX(
VkInstance instance, VkInstance instance,
const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkScreenSurfaceCreateInfoQNX* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX( VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex, uint32_t queueFamilyIndex,
struct _screen_window* window); struct _screen_window* window);
#endif #endif
#endif
// VK_QNX_external_memory_screen_buffer is a preprocessor guard. Do not pass it to API calls. // VK_QNX_external_memory_screen_buffer is a preprocessor guard. Do not pass it to API calls.
@ -95,11 +99,13 @@ typedef struct VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX {
typedef VkResult (VKAPI_PTR *PFN_vkGetScreenBufferPropertiesQNX)(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetScreenBufferPropertiesQNX)(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetScreenBufferPropertiesQNX( VKAPI_ATTR VkResult VKAPI_CALL vkGetScreenBufferPropertiesQNX(
VkDevice device, VkDevice device,
const struct _screen_buffer* buffer, const struct _screen_buffer* buffer,
VkScreenBufferPropertiesQNX* pProperties); VkScreenBufferPropertiesQNX* pProperties);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -34,12 +34,14 @@ typedef struct VkViSurfaceCreateInfoNN {
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
VkInstance instance, VkInstance instance,
const VkViSurfaceCreateInfoNN* pCreateInfo, const VkViSurfaceCreateInfoNN* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -36,17 +36,21 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance,
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR( VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
VkInstance instance, VkInstance instance,
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR( VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex, uint32_t queueFamilyIndex,
struct wl_display* display); struct wl_display* display);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -36,16 +36,20 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, c
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR( VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
VkInstance instance, VkInstance instance,
const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex); uint32_t queueFamilyIndex);
#endif #endif
#endif
// VK_KHR_external_memory_win32 is a preprocessor guard. Do not pass it to API calls. // VK_KHR_external_memory_win32 is a preprocessor guard. Do not pass it to API calls.
@ -85,17 +89,21 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, con
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR( VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
VkDevice device, VkDevice device,
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle); HANDLE* pHandle);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR( VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
VkDevice device, VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType, VkExternalMemoryHandleTypeFlagBits handleType,
HANDLE handle, HANDLE handle,
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
#endif #endif
#endif
// VK_KHR_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls. // VK_KHR_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls.
@ -158,15 +166,19 @@ typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice devic
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR( VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
VkDevice device, VkDevice device,
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR( VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
VkDevice device, VkDevice device,
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle); HANDLE* pHandle);
#endif #endif
#endif
// VK_KHR_external_fence_win32 is a preprocessor guard. Do not pass it to API calls. // VK_KHR_external_fence_win32 is a preprocessor guard. Do not pass it to API calls.
@ -202,15 +214,19 @@ typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, c
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR( VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
VkDevice device, VkDevice device,
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR( VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
VkDevice device, VkDevice device,
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle); HANDLE* pHandle);
#endif #endif
#endif
// VK_NV_external_memory_win32 is a preprocessor guard. Do not pass it to API calls. // VK_NV_external_memory_win32 is a preprocessor guard. Do not pass it to API calls.
@ -234,12 +250,14 @@ typedef struct VkExportMemoryWin32HandleInfoNV {
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV( VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
VkDevice device, VkDevice device,
VkDeviceMemory memory, VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagsNV handleType, VkExternalMemoryHandleTypeFlagsNV handleType,
HANDLE* pHandle); HANDLE* pHandle);
#endif #endif
#endif
// VK_NV_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls. // VK_NV_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls.
@ -296,25 +314,33 @@ typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice d
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes); typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT( VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
uint32_t* pPresentModeCount, uint32_t* pPresentModeCount,
VkPresentModeKHR* pPresentModes); VkPresentModeKHR* pPresentModes);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT( VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(
VkDevice device, VkDevice device,
VkSwapchainKHR swapchain); VkSwapchainKHR swapchain);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT( VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(
VkDevice device, VkDevice device,
VkSwapchainKHR swapchain); VkSwapchainKHR swapchain);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT( VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
VkDevice device, VkDevice device,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
VkDeviceGroupPresentModeFlagsKHR* pModes); VkDeviceGroupPresentModeFlagsKHR* pModes);
#endif #endif
#endif
// VK_NV_acquire_winrt_display is a preprocessor guard. Do not pass it to API calls. // VK_NV_acquire_winrt_display is a preprocessor guard. Do not pass it to API calls.
@ -325,15 +351,19 @@ typedef VkResult (VKAPI_PTR *PFN_vkAcquireWinrtDisplayNV)(VkPhysicalDevice physi
typedef VkResult (VKAPI_PTR *PFN_vkGetWinrtDisplayNV)(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay); typedef VkResult (VKAPI_PTR *PFN_vkGetWinrtDisplayNV)(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireWinrtDisplayNV( VKAPI_ATTR VkResult VKAPI_CALL vkAcquireWinrtDisplayNV(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
VkDisplayKHR display); VkDisplayKHR display);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetWinrtDisplayNV( VKAPI_ATTR VkResult VKAPI_CALL vkGetWinrtDisplayNV(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
uint32_t deviceRelativeId, uint32_t deviceRelativeId,
VkDisplayKHR* pDisplay); VkDisplayKHR* pDisplay);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -36,18 +36,22 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, con
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR( VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
VkInstance instance, VkInstance instance,
const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR( VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex, uint32_t queueFamilyIndex,
xcb_connection_t* connection, xcb_connection_t* connection,
xcb_visualid_t visual_id); xcb_visualid_t visual_id);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -36,18 +36,22 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, co
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID); typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR( VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
VkInstance instance, VkInstance instance,
const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator, const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface); VkSurfaceKHR* pSurface);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR( VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex, uint32_t queueFamilyIndex,
Display* dpy, Display* dpy,
VisualID visualID); VisualID visualID);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -27,17 +27,21 @@ typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physi
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
#ifndef VK_NO_PROTOTYPES #ifndef VK_NO_PROTOTYPES
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT( VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
Display* dpy, Display* dpy,
VkDisplayKHR display); VkDisplayKHR display);
#endif
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT( VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
VkPhysicalDevice physicalDevice, VkPhysicalDevice physicalDevice,
Display* dpy, Display* dpy,
RROutput rrOutput, RROutput rrOutput,
VkDisplayKHR* pDisplay); VkDisplayKHR* pDisplay);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -9,7 +9,7 @@ import os
import tempfile import tempfile
from vulkan_object import (VulkanObject, from vulkan_object import (VulkanObject,
Extension, Version, Deprecate, Handle, Param, Queues, CommandScope, Command, Extension, Version, Deprecate, Handle, Param, Queues, CommandScope, Command,
EnumField, Enum, Flag, Bitmask, Flags, Member, Struct, EnumField, Enum, Flag, Bitmask, ExternSync, Flags, Member, Struct,
FormatComponent, FormatPlane, Format, FormatComponent, FormatPlane, Format,
SyncSupport, SyncEquivalent, SyncStage, SyncAccess, SyncPipelineStage, SyncPipeline, SyncSupport, SyncEquivalent, SyncStage, SyncAccess, SyncPipelineStage, SyncPipeline,
SpirvEnables, Spirv) SpirvEnables, Spirv)
@ -35,6 +35,30 @@ def intIfGet(elem, name):
def boolGet(elem, name) -> bool: def boolGet(elem, name) -> bool:
return elem.get(name) is not None and elem.get(name) == "true" return elem.get(name) is not None and elem.get(name) == "true"
def externSyncGet(elem):
value = elem.get('externsync')
if value is None:
return (ExternSync.NONE, None)
if value == 'true':
return (ExternSync.ALWAYS, None)
if value == 'maybe':
return (ExternSync.MAYBE, None)
# There are no cases where multiple members of the param are marked as
# externsync. Supporting that with maybe: requires more than
# ExternSync.SUBTYPE_MAYBE (which is only one bit of information), which is
# not currently done as there are no users.
#
# If this assert is hit, please consider simplifying the design such that
# externsync can move to the struct itself and so external synchronization
# requirements do not depend on the context.
assert ',' not in value
if value.startswith('maybe:'):
return (ExternSync.SUBTYPE_MAYBE, value.removeprefix('maybe:'))
return (ExternSync.SUBTYPE, value)
def getQueues(elem) -> Queues: def getQueues(elem) -> Queues:
queues = 0 queues = 0
queues_list = splitIfGet(elem, 'queues') queues_list = splitIfGet(elem, 'queues')
@ -139,6 +163,10 @@ class BaseGenerator(OutputGenerator):
self.currentExtension = None self.currentExtension = None
self.currentVersion = None self.currentVersion = None
# We need to flag extensions that we ignore because they are disabled or not
# supported in the target API(s)
self.unsupportedExtension = False
# Will map alias to promoted name # Will map alias to promoted name
# ex. ['VK_FILTER_CUBIC_IMG' : 'VK_FILTER_CUBIC_EXT'] # ex. ['VK_FILTER_CUBIC_IMG' : 'VK_FILTER_CUBIC_EXT']
# When generating any code, there is no reason so use the old name # When generating any code, there is no reason so use the old name
@ -437,6 +465,17 @@ class BaseGenerator(OutputGenerator):
name = interface.get('name') name = interface.get('name')
if interface.tag == 'extension': if interface.tag == 'extension':
# Generator scripts built on BaseGenerator do not handle the `supported` attribute of extensions
# therefore historically the `generate_source.py` in individual ecosystem components hacked the
# registry by removing non-applicable or disabled extensions from the loaded XML already before
# reg.py parsed it. That broke the general behavior of reg.py for certain use cases so we now
# filter extensions here instead (after parsing) in order to no longer need the filtering hack
# in downstream `generate_source.py` scripts.
enabledApiList = [ globalApiName ] + ([] if mergedApiNames is None else mergedApiNames.split(','))
if (sup := interface.get('supported')) is not None and all(api not in sup.split(',') for api in enabledApiList):
self.unsupportedExtension = True
return
instance = interface.get('type') == 'instance' instance = interface.get('type') == 'instance'
device = not instance device = not instance
depends = interface.get('depends') depends = interface.get('depends')
@ -468,12 +507,17 @@ class BaseGenerator(OutputGenerator):
OutputGenerator.endFeature(self) OutputGenerator.endFeature(self)
self.currentExtension = None self.currentExtension = None
self.currentVersion = None self.currentVersion = None
self.unsupportedExtension = False
# #
# All <command> from XML # All <command> from XML
def genCmd(self, cmdinfo, name, alias): def genCmd(self, cmdinfo, name, alias):
OutputGenerator.genCmd(self, cmdinfo, name, alias) OutputGenerator.genCmd(self, cmdinfo, name, alias)
# Do not include APIs from unsupported extensions
if self.unsupportedExtension:
return
params = [] params = []
for param in cmdinfo.elem.findall('param'): for param in cmdinfo.elem.findall('param'):
paramName = param.find('name').text paramName = param.find('name').text
@ -505,12 +549,8 @@ class BaseGenerator(OutputGenerator):
optional = optionalValues is not None and optionalValues[0].lower() == "true" optional = optionalValues is not None and optionalValues[0].lower() == "true"
optionalPointer = optionalValues is not None and len(optionalValues) > 1 and optionalValues[1].lower() == "true" optionalPointer = optionalValues is not None and len(optionalValues) > 1 and optionalValues[1].lower() == "true"
# externsync will be 'true' or expression # externsync will be 'true', 'maybe', '<expression>' or 'maybe:<expression>'
# if expression, it should be same as 'true' (externSync, externSyncPointer) = externSyncGet(param)
externSync = boolGet(param, 'externsync')
externSyncPointer = None if externSync else splitIfGet(param, 'externsync')
if not externSync and externSyncPointer is not None:
externSync = True
params.append(Param(paramName, paramAlias, paramType, paramFullType, paramNoautovalidity, params.append(Param(paramName, paramAlias, paramType, paramFullType, paramNoautovalidity,
paramConst, length, nullTerminated, pointer, fixedSizeArray, paramConst, length, nullTerminated, pointer, fixedSizeArray,
@ -566,6 +606,10 @@ class BaseGenerator(OutputGenerator):
# List the enum for the commands # List the enum for the commands
# TODO - Seems empty groups like `VkDeviceDeviceMemoryReportCreateInfoEXT` do not show up in here # TODO - Seems empty groups like `VkDeviceDeviceMemoryReportCreateInfoEXT` do not show up in here
def genGroup(self, groupinfo, groupName, alias): def genGroup(self, groupinfo, groupName, alias):
# Do not include APIs from unsupported extensions
if self.unsupportedExtension:
return
# There can be case where the Enum/Bitmask is in a protect, but the individual # There can be case where the Enum/Bitmask is in a protect, but the individual
# fields also have their own protect # fields also have their own protect
groupProtect = self.currentExtension.protect if hasattr(self.currentExtension, 'protect') and self.currentExtension.protect is not None else None groupProtect = self.currentExtension.protect if hasattr(self.currentExtension, 'protect') and self.currentExtension.protect is not None else None
@ -580,6 +624,15 @@ class BaseGenerator(OutputGenerator):
for elem in enumElem.findall('enum'): for elem in enumElem.findall('enum'):
fieldName = elem.get('name') fieldName = elem.get('name')
# Do not include non-required enum constants
# reg.py emits the enum constants of the entire type, even constants that are part of unsupported
# extensions or those that are removed by <remove> elements in a given API. reg.py correctly tracks
# down these and also alias dependencies and marks the enum constants that are actually required
# with the 'required' attribute. Therefore we also have to verify that here to make sure we only
# include enum constants that are actually required in the target API(s).
if elem.get('required') is None:
continue
if elem.get('alias') is not None: if elem.get('alias') is not None:
self.enumFieldAliasMap[fieldName] = elem.get('alias') self.enumFieldAliasMap[fieldName] = elem.get('alias')
continue continue
@ -604,6 +657,15 @@ class BaseGenerator(OutputGenerator):
for elem in enumElem.findall('enum'): for elem in enumElem.findall('enum'):
flagName = elem.get('name') flagName = elem.get('name')
# Do not include non-required enum constants
# reg.py emits the enum constants of the entire type, even constants that are part of unsupported
# extensions or those that are removed by <remove> elements in a given API. reg.py correctly tracks
# down these and also alias dependencies and marks the enum constants that are actually required
# with the 'required' attribute. Therefore we also have to verify that here to make sure we only
# include enum constants that are actually required in the target API(s).
if elem.get('required') is None:
continue
if elem.get('alias') is not None: if elem.get('alias') is not None:
self.flagAliasMap[flagName] = elem.get('alias') self.flagAliasMap[flagName] = elem.get('alias')
continue continue
@ -628,6 +690,11 @@ class BaseGenerator(OutputGenerator):
def genType(self, typeInfo, typeName, alias): def genType(self, typeInfo, typeName, alias):
OutputGenerator.genType(self, typeInfo, typeName, alias) OutputGenerator.genType(self, typeInfo, typeName, alias)
# Do not include APIs from unsupported extensions
if self.unsupportedExtension:
return
typeElem = typeInfo.elem typeElem = typeInfo.elem
protect = self.currentExtension.protect if hasattr(self.currentExtension, 'protect') and self.currentExtension.protect is not None else None protect = self.currentExtension.protect if hasattr(self.currentExtension, 'protect') and self.currentExtension.protect is not None else None
extension = [self.currentExtension] if self.currentExtension is not None else [] extension = [self.currentExtension] if self.currentExtension is not None else []
@ -656,10 +723,13 @@ class BaseGenerator(OutputGenerator):
name = textIfFind(member, 'name') name = textIfFind(member, 'name')
type = textIfFind(member, 'type') type = textIfFind(member, 'type')
sType = member.get('values') if member.get('values') is not None else sType sType = member.get('values') if member.get('values') is not None else sType
externSync = boolGet(member, 'externsync')
noautovalidity = boolGet(member, 'noautovalidity') noautovalidity = boolGet(member, 'noautovalidity')
limittype = member.get('limittype') limittype = member.get('limittype')
(externSync, externSyncPointer) = externSyncGet(member)
# No cases currently where a subtype of a struct is marked as externally synchronized.
assert externSyncPointer is None
nullTerminated = False nullTerminated = False
length = member.get('altlen') if member.get('altlen') is not None else member.get('len') length = member.get('altlen') if member.get('altlen') is not None else member.get('len')
if length: if length:

View file

@ -27,6 +27,8 @@ class CGeneratorOptions(GeneratorOptions):
protectProtoStr=None, protectProtoStr=None,
protectExtensionProto=None, protectExtensionProto=None,
protectExtensionProtoStr=None, protectExtensionProtoStr=None,
protectExportName=None,
protectExportProtoStr=None,
apicall='', apicall='',
apientry='', apientry='',
apientryp='', apientryp='',
@ -66,6 +68,12 @@ class CGeneratorOptions(GeneratorOptions):
set to None set to None
- protectExtensionProtoStr - #ifdef/#ifndef symbol to use around - protectExtensionProtoStr - #ifdef/#ifndef symbol to use around
extension prototype declarations, if protectExtensionProto is set extension prototype declarations, if protectExtensionProto is set
- protectExportName - name used to determine if a command is
exported matching an entry in the XML 'export' attribute.
Set to None if no matching should be done.
- protectExportProtoStr - #ifndef symbol to use around prototypes
for commands that are not exported.
Set to None if no protection is wanted.
- apicall - string to use for the function declaration prefix, - apicall - string to use for the function declaration prefix,
such as APICALL on Windows such as APICALL on Windows
- apientry - string to use for the calling convention macro, - apientry - string to use for the calling convention macro,
@ -115,6 +123,12 @@ class CGeneratorOptions(GeneratorOptions):
self.protectExtensionProtoStr = protectExtensionProtoStr self.protectExtensionProtoStr = protectExtensionProtoStr
"""#ifdef/#ifndef symbol to use around extension prototype declarations, if protectExtensionProto is set""" """#ifdef/#ifndef symbol to use around extension prototype declarations, if protectExtensionProto is set"""
self.protectExportName = protectExportName
"""Export name for commands which are exported"""
self.protectExportProtoStr = protectExportProtoStr
"""#ifndef symbol to use around prototypes for commands which are not exported"""
self.apicall = apicall self.apicall = apicall
"""string to use for the function declaration prefix, such as APICALL on Windows.""" """string to use for the function declaration prefix, such as APICALL on Windows."""
@ -507,6 +521,23 @@ class COutputGenerator(OutputGenerator):
prefix = '' prefix = ''
decls = self.makeCDecls(cmdinfo.elem) decls = self.makeCDecls(cmdinfo.elem)
# If the 'export' attribute is not set for this command, or does not
# match the export name selected during generation, wrap the command
# prototype in a C conditional which can be enabled to make the
# prototype not appear at compile time.
export = cmdinfo.elem.get('export','')
protect_prefix = protect_suffix = ''
if export is None or self.genOpts.protectExportName not in export.split(','):
if self.genOpts.protectExportProtoStr is not None:
# Command is not exported, so should not be visible if
# suppressed by this symbol
protect_prefix = f'#ifndef {self.genOpts.protectExportProtoStr}\n'
protect_suffix = '\n#endif'
decls[0] = protect_prefix + decls[0] + protect_suffix
self.appendSection('command', f"{prefix + decls[0]}\n") self.appendSection('command', f"{prefix + decls[0]}\n")
if self.genOpts.genFuncPointers: if self.genOpts.genFuncPointers:
self.appendSection('commandPointer', decls[1]) self.appendSection('commandPointer', decls[1])

View file

@ -1413,6 +1413,7 @@ class OutputGenerator:
else: else:
paramdecl += 'void' paramdecl += 'void'
paramdecl += ");" paramdecl += ");"
return [pdecl + indentdecl, tdecl + paramdecl] return [pdecl + indentdecl, tdecl + paramdecl]
def newline(self): def newline(self):

View file

@ -210,7 +210,7 @@ class BaseInfo:
self.elem = elem self.elem = elem
"etree Element for this feature" "etree Element for this feature"
self.deprecatedbyversion = None self.deprecatedbyversion = None
self.deprecatedbyextensions = [] self.deprecatedbyextensions = []
self.deprecatedlink = None self.deprecatedlink = None
@ -353,7 +353,7 @@ class FeatureInfo(BaseInfo):
self.number = 0 self.number = 0
self.supported = None self.supported = None
self.deprecates = elem.findall('deprecate') self.deprecates = elem.findall('deprecate')
else: else:
# Extract vendor portion of <APIprefix>_<vendor>_<name> # Extract vendor portion of <APIprefix>_<vendor>_<name>
@ -688,6 +688,9 @@ class Registry:
# Now loop over aliases, injecting a copy of the aliased command's # Now loop over aliases, injecting a copy of the aliased command's
# Element with the aliased prototype name replaced with the command # Element with the aliased prototype name replaced with the command
# name - if it exists. # name - if it exists.
# Copy the 'export' sttribute (whether it exists or not) from the
# original, aliased command, since that can be different for a
# command and its alias.
for (name, alias, cmd) in cmdAlias: for (name, alias, cmd) in cmdAlias:
if alias in self.cmddict: if alias in self.cmddict:
aliasInfo = self.cmddict[alias] aliasInfo = self.cmddict[alias]
@ -695,6 +698,14 @@ class Registry:
cmdElem.find('proto/name').text = name cmdElem.find('proto/name').text = name
cmdElem.set('name', name) cmdElem.set('name', name)
cmdElem.set('alias', alias) cmdElem.set('alias', alias)
export = cmd.get('export')
if export is not None:
# Replicate the command's 'export' attribute
cmdElem.set('export', export)
elif cmdElem.get('export') is not None:
# Remove the 'export' attribute, if the alias has one but
# the command does not.
del cmdElem.attrib['export']
ci = CmdInfo(cmdElem) ci = CmdInfo(cmdElem)
# Replace the dictionary entry for the CmdInfo element # Replace the dictionary entry for the CmdInfo element
self.cmddict[name] = ci self.cmddict[name] = ci
@ -1264,7 +1275,7 @@ class Registry:
- featurename - name of the feature - featurename - name of the feature
- api - string specifying API name being generated - api - string specifying API name being generated
- profile - string specifying API profile being generated""" - profile - string specifying API profile being generated"""
versionmatch = APIConventions().is_api_version_name(featurename) versionmatch = APIConventions().is_api_version_name(featurename)
# <deprecate> marks things that are deprecated by this version/profile # <deprecate> marks things that are deprecated by this version/profile

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -81,6 +81,13 @@ class Handle:
def __lt__(self, other): def __lt__(self, other):
return self.name < other.name return self.name < other.name
class ExternSync(Enum):
NONE = auto() # no externsync attribute
ALWAYS = auto() # externsync="true"
MAYBE = auto() # externsync="maybe"
SUBTYPE = auto() # externsync="param->member"
SUBTYPE_MAYBE = auto() # externsync="maybe:param->member"
@dataclass @dataclass
class Param: class Param:
"""<command/param>""" """<command/param>"""
@ -110,8 +117,9 @@ class Param:
optional: bool optional: bool
optionalPointer: bool # if type contains a pointer, is the pointer value optional optionalPointer: bool # if type contains a pointer, is the pointer value optional
externSync: bool externSync: ExternSync
externSyncPointer: list[str] # if type contains a pointer, might only specific members modified externSyncPointer: (str | None) # if type contains a pointer (externSync is SUBTYPE*),
# only a specific member is externally synchronized.
# C string of member, example: # C string of member, example:
# - const void* pNext # - const void* pNext
@ -217,7 +225,7 @@ class Member:
optional: bool optional: bool
optionalPointer: bool # if type contains a pointer, is the pointer value optional optionalPointer: bool # if type contains a pointer, is the pointer value optional
externSync: bool externSync: ExternSync
# C string of member, example: # C string of member, example:
# - const void* pNext # - const void* pNext