diff options
author | Mark Young <[email protected]> | 2017-04-18 19:52:18 -0600 |
---|---|---|
committer | Mark Lobodzinski <[email protected]> | 2018-05-04 09:23:50 -0600 |
commit | c253f7b76005303008e5723bbf6a6fb8a7840efb (patch) | |
tree | 5880b9072f68011c1a8b4b0f45b397a8865428fb /include/vulkan/vk_icd.h | |
parent | 1e7d756b7ddc5d58acf7f08c9cd547357de339c2 (diff) | |
download | Vulkan-Headers-c253f7b76005303008e5723bbf6a6fb8a7840efb.tar.gz Vulkan-Headers-c253f7b76005303008e5723bbf6a6fb8a7840efb.zip |
loader: Add validation for apiVersion
Add a check to determine if the API version being requested can be
handled by the loader. If it can't, then we return incompatible driver.
If we can, we continue along our merry way.
An addendum is that we also bumped the Loader/ICD interface version.
This was requested by Nvidia so that the ICDs know that we pay attention
to the version in the loader. If they don't see the new Loader/ICD
interface version, they will handle the failing on all non-1.0 API
requests.
Change-Id: Icb7dd45e754c9f6a6c8186198333bacc68077b93
Diffstat (limited to 'include/vulkan/vk_icd.h')
-rw-r--r-- | include/vulkan/vk_icd.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/vulkan/vk_icd.h b/include/vulkan/vk_icd.h index 668a4d1..1983e5d 100644 --- a/include/vulkan/vk_icd.h +++ b/include/vulkan/vk_icd.h @@ -35,7 +35,13 @@ // Version 3 - Add ICD creation/destruction of KHR_surface objects. // Version 4 - Add unknown physical device extension qyering via // vk_icdGetPhysicalDeviceProcAddr. -#define CURRENT_LOADER_ICD_INTERFACE_VERSION 4 +// Version 5 - Tells ICDs that the loader is now paying attention to the +// application version of Vulkan passed into the ApplicationInfo +// structure during vkCreateInstance. This will tell the ICD +// 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 #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); |