anv: implement ICD interface v4
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
19db95e78e
commit
3c1a24de07
|
@ -2021,6 +2021,31 @@ PFN_vkVoidFunction anv_GetDeviceProcAddr(
|
||||||
return device->dispatch.entrypoints[idx];
|
return device->dispatch.entrypoints[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* With version 4+ of the loader interface the ICD should expose
|
||||||
|
* vk_icdGetPhysicalDeviceProcAddr()
|
||||||
|
*/
|
||||||
|
PUBLIC
|
||||||
|
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(
|
||||||
|
VkInstance _instance,
|
||||||
|
const char* pName);
|
||||||
|
|
||||||
|
PFN_vkVoidFunction vk_icdGetPhysicalDeviceProcAddr(
|
||||||
|
VkInstance _instance,
|
||||||
|
const char* pName)
|
||||||
|
{
|
||||||
|
ANV_FROM_HANDLE(anv_instance, instance, _instance);
|
||||||
|
|
||||||
|
if (!pName || !instance)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
int idx = anv_get_physical_device_entrypoint_index(pName);
|
||||||
|
if (idx < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return instance->physicalDevice.dispatch.entrypoints[idx];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
VkResult
|
VkResult
|
||||||
anv_CreateDebugReportCallbackEXT(VkInstance _instance,
|
anv_CreateDebugReportCallbackEXT(VkInstance _instance,
|
||||||
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
|
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
|
||||||
|
@ -4090,7 +4115,10 @@ vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion)
|
||||||
* - The ICD must implement vkCreate{PLATFORM}SurfaceKHR(),
|
* - The ICD must implement vkCreate{PLATFORM}SurfaceKHR(),
|
||||||
* vkDestroySurfaceKHR(), and other API which uses VKSurfaceKHR,
|
* vkDestroySurfaceKHR(), and other API which uses VKSurfaceKHR,
|
||||||
* because the loader no longer does so.
|
* because the loader no longer does so.
|
||||||
|
*
|
||||||
|
* - Loader interface v4 differs from v3 in:
|
||||||
|
* - The ICD must implement vk_icdGetPhysicalDeviceProcAddr().
|
||||||
*/
|
*/
|
||||||
*pSupportedVersion = MIN2(*pSupportedVersion, 3u);
|
*pSupportedVersion = MIN2(*pSupportedVersion, 4u);
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue