radv: add device->instance extension dependencies
authorNiklas Haas <git@haasn.xyz>
Thu, 22 Nov 2018 23:32:28 +0000 (00:32 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 27 Jan 2019 12:50:35 +0000 (13:50 +0100)
commit804cc44d09fb2a468b2ed317ab011c2456226091
treeaa6e3ccd33de6446845fa23a773b2e4275f78afb
parentd12dc3939620dcc942523a30a7fcc3271e751a6c
radv: add device->instance extension dependencies

From the vulkan spec 33.3 "Extension Dependencies":

"Any device extension that has an instance extension dependency that is
not enabled by vkCreateInstance is considered to be unsupported, hence
it must not be returned by vkEnumerateDeviceExtensionProperties for any
VkPhysicalDevice child of the instance."

Therefore we need to check whether the instance-level extensions are
actually enabled when deciding to support a device-level extension or
not.

Furthermore, we need to do this for all instance-level extensions of any
(transitive) device-level extension dependency, due to the following
paragraph:

"If an extension is supported (as queried by
vkEnumerateInstanceExtensionProperties or
vkEnumerateDeviceExtensionProperties), then required extensions of that
extension must also be supported for the same instance or physical
device."

Finally, because some of these vulkan extensions may be implicitly
promoted to future vulkan core API versions, we can also satisfy the
dependency if the vulkan API version is high enough.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_extensions.py