zink: make physical device functions use a dynamic function pointers.
authorDuncan Hopkins <duncan@duncanhopkins.me.uk>
Wed, 4 Nov 2020 17:42:29 +0000 (17:42 +0000)
committerMarge Bot <eric+marge@anholt.net>
Sun, 8 Nov 2020 06:09:16 +0000 (06:09 +0000)
commitd377d844969b18264d3eeeeb1bbdf37131c69791
treea8172ab9f00ccb3335e10f079fc0a6c266471c83
parent91f9bc18e0cc3d608098b8d7e154cd245711bc90
zink: make physical device functions use a dynamic function pointers.

vkGetPhysicalDeviceFeatures2 and vkGetPhysicalDeviceProperties2 are not present on some MoltenVK versions.
VK_KHR_get_physical_device_properties2 exposes the KHR versions of the same functions.
These cannot be used via static linking, so we have to dynamically detect the loader version and then the extension
to work out which pointers to use.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7447>
src/gallium/drivers/zink/zink_device_info.py
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_screen.h