anv/radv: Resolving 'GetInstanceProcAddr' should not require a valid instance
authorEduardo Lima Mitev <elima@igalia.com>
Sat, 21 Mar 2020 19:18:56 +0000 (20:18 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Apr 2020 09:09:14 +0000 (09:09 +0000)
commit4dc7b7627671eeaefda55b21bc9a7a5a06b43c30
tree2983f72e4b6401e1d663e953e6ddf69a6317c001
parent665250e8300e2b0f3eae27628a9a6f2666e650dd
anv/radv: Resolving 'GetInstanceProcAddr' should not require a valid instance

Since vk_icdGetInstanceProcAddr() is wired through
vkGetInstanceProcAddr() in both drivers, we lost the ability for
'GetInstanceProcAddr' to resolve itself prior to having a valid
instance.

An upcoming spec change will fix that and allow
vkGetInstanceProcAddr() to resolve itself passing NULL as
instance. See https://gitlab.khronos.org/vulkan/vulkan/issues/2057
for details.

This patch implements the change in both radv and anvil.

CTS changes have already landed:
https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/2278

vulkan-loader changes have also landed:
https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/2278

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4273>
src/amd/vulkan/radv_device.c
src/intel/vulkan/anv_device.c