| | |
| | | // that if the loader is older, it should automatically fail a |
| | | // call for any API version > 1.0. Otherwise, the loader will |
| | | // manually determine if it can support the expected version. |
| | | #define CURRENT_LOADER_ICD_INTERFACE_VERSION 5 |
| | | // Version 6 - Add support for vk_icdEnumerateAdapterPhysicalDevices. |
| | | #define CURRENT_LOADER_ICD_INTERFACE_VERSION 6 |
| | | #define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0 |
| | | #define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4 |
| | | typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion); |
| | | |
| | | // Old typedefs that don't follow a proper naming convention but are preserved for compatibility |
| | | typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion); |
| | | // This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this |
| | | // file directly, it won't be found. |
| | | #ifndef PFN_GetPhysicalDeviceProcAddr |
| | | typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName); |
| | | #endif |
| | | |
| | | // Typedefs for loader/ICD interface |
| | | typedef VkResult (VKAPI_PTR *PFN_vk_icdNegotiateLoaderICDInterfaceVersion)(uint32_t* pVersion); |
| | | typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vk_icdGetInstanceProcAddr)(VkInstance instance, const char* pName); |
| | | typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vk_icdGetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName); |
| | | #if defined(VK_USE_PLATFORM_WIN32_KHR) |
| | | typedef VkResult (VKAPI_PTR *PFN_vk_icdEnumerateAdapterPhysicalDevices)(VkInstance instance, LUID adapterLUID, |
| | | uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); |
| | | #endif |
| | | |
| | | // Prototypes for loader/ICD interface |
| | | #if !defined(VK_NO_PROTOTYPES) |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion); |
| | | VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName); |
| | | VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance isntance, const char* pName); |
| | | #if defined(VK_USE_PLATFORM_WIN32_KHR) |
| | | VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID, |
| | | uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); |
| | | #endif |
| | | #ifdef __cplusplus |
| | | } |
| | | #endif |
| | | #endif |
| | | |
| | | /* |
| | |
| | | VK_ICD_WSI_PLATFORM_ANDROID, |
| | | VK_ICD_WSI_PLATFORM_MACOS, |
| | | VK_ICD_WSI_PLATFORM_IOS, |
| | | VK_ICD_WSI_PLATFORM_DISPLAY |
| | | VK_ICD_WSI_PLATFORM_DISPLAY, |
| | | VK_ICD_WSI_PLATFORM_HEADLESS, |
| | | VK_ICD_WSI_PLATFORM_METAL, |
| | | VK_ICD_WSI_PLATFORM_DIRECTFB, |
| | | VK_ICD_WSI_PLATFORM_VI, |
| | | } VkIcdWsiPlatform; |
| | | |
| | | typedef struct { |
| | |
| | | } VkIcdSurfaceXlib; |
| | | #endif // VK_USE_PLATFORM_XLIB_KHR |
| | | |
| | | #ifdef VK_USE_PLATFORM_DIRECTFB_EXT |
| | | typedef struct { |
| | | VkIcdSurfaceBase base; |
| | | IDirectFB *dfb; |
| | | IDirectFBSurface *surface; |
| | | } VkIcdSurfaceDirectFB; |
| | | #endif // VK_USE_PLATFORM_DIRECTFB_EXT |
| | | |
| | | #ifdef VK_USE_PLATFORM_ANDROID_KHR |
| | | typedef struct { |
| | | VkIcdSurfaceBase base; |
| | |
| | | VkExtent2D imageExtent; |
| | | } VkIcdSurfaceDisplay; |
| | | |
| | | typedef struct { |
| | | VkIcdSurfaceBase base; |
| | | } VkIcdSurfaceHeadless; |
| | | |
| | | #ifdef VK_USE_PLATFORM_METAL_EXT |
| | | typedef struct { |
| | | VkIcdSurfaceBase base; |
| | | const CAMetalLayer *pLayer; |
| | | } VkIcdSurfaceMetal; |
| | | #endif // VK_USE_PLATFORM_METAL_EXT |
| | | |
| | | #ifdef VK_USE_PLATFORM_VI_NN |
| | | typedef struct { |
| | | VkIcdSurfaceBase base; |
| | | void *window; |
| | | } VkIcdSurfaceVi; |
| | | #endif // VK_USE_PLATFORM_VI_NN |
| | | |
| | | #endif // VKICD_H |