summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorLenny Komow <[email protected]>2020-07-27 10:35:13 -0600
committerLenny Komow <[email protected]>2020-08-07 13:08:19 -0600
commit8971273d00ef14eeea7828bfbbb07fb8f9b174d7 (patch)
treee0c83f924b4d7f08fe851f78287b3b87c55716b3 /include
parenta6d08c75d21911fac557dc35d24b21bc896924fe (diff)
downloadVulkan-Headers-8971273d00ef14eeea7828bfbbb07fb8f9b174d7.tar.gz
Vulkan-Headers-8971273d00ef14eeea7828bfbbb07fb8f9b174d7.zip
Update vk_icd.h with typedefs and prototypes
Diffstat (limited to 'include')
-rw-r--r--include/vulkan/vk_icd.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/vulkan/vk_icd.h b/include/vulkan/vk_icd.h
index 00858a4..6b4007b 100644
--- a/include/vulkan/vk_icd.h
+++ b/include/vulkan/vk_icd.h
@@ -41,17 +41,39 @@
// 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)
+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
+#endif
+
/*
* The ICD must reserve space for a pointer for the loader's dispatch
* table, at the start of <each object>.