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>
This commit is contained in:
committed by
Marge Bot
parent
3a7514ea09
commit
bafd0c680d
@@ -1394,8 +1394,7 @@ v3dv_CreateDevice(VkPhysicalDevice physicalDevice,
|
||||
vk_device_dispatch_table_from_entrypoints(&dispatch_table,
|
||||
&v3dv_device_entrypoints, true);
|
||||
result = vk_device_init(&device->vk, &physical_device->vk,
|
||||
&dispatch_table, pCreateInfo,
|
||||
&physical_device->vk.instance->alloc, pAllocator);
|
||||
&dispatch_table, pCreateInfo, pAllocator);
|
||||
if (result != VK_SUCCESS) {
|
||||
vk_free(&device->vk.alloc, device);
|
||||
return vk_error(instance, result);
|
||||
|
||||
Reference in New Issue
Block a user