vulkan: Rework vk_device_init and friends
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 29 Jan 2021 18:30:34 +0000 (12:30 -0600)
committerMarge Bot <eric+marge@anholt.net>
Mon, 1 Feb 2021 18:54:25 +0000 (18:54 +0000)
commitbafd0c680d20c61e180e5469a882d201352abc15
treee32ddb816188dba0b747579691fb15a7305574e7
parent3a7514ea099eb4982f4376213debb88a191132a7
vulkan: Rework vk_device_init and friends

Now that all drivers are converted over, we can make a few changes.
First off, vk_device_init no longer takes two separate allocators
because we can assume that the parent instance is non-null and it can
pull the instance allocator from that.  Second, dispatch tables and the
instance extension table are no longer optional.  We leave the device
extension table optional for now because we don't do any verification at
vk_init_physical_device time and some drivers find it more convenient to
set the extensions later in their own physical_device_init for various
reasons.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
src/amd/vulkan/radv_device.c
src/broadcom/vulkan/v3dv_device.c
src/freedreno/vulkan/tu_device.c
src/gallium/frontends/lavapipe/lvp_device.c
src/intel/vulkan/anv_device.c
src/vulkan/util/vk_device.c
src/vulkan/util/vk_device.h
src/vulkan/util/vk_instance.c
src/vulkan/util/vk_physical_device.c