venus: pre-initialize device groups
We don't need to worry about how vkEnumeratePhysicalDeviceGroups is called (props is NULL, props is non-NULL but count is 0, etc.) this way. It also allows us to fix up VkPhysicalDeviceGroupProperties easily. v2: let the for-loop increment (Yiwei) Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1) Reviewed-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637>
This commit is contained in:
@@ -779,6 +779,7 @@ vn_DestroyInstance(VkInstance _instance,
|
||||
return;
|
||||
|
||||
if (instance->physical_devices) {
|
||||
vk_free(alloc, instance->physical_device_groups);
|
||||
for (uint32_t i = 0; i < instance->physical_device_count; i++)
|
||||
vn_physical_device_fini(&instance->physical_devices[i]);
|
||||
vk_free(alloc, instance->physical_devices);
|
||||
|
||||
Reference in New Issue
Block a user