tu: Fix KHR_present_id and KHR_present_wait being used without initialization

KHR_present_id and KHR_present_wait were set in get_device_extensions() but uninitialized
in tu_get_features(). This causes presentId and presentWait to be false at all times. Fix it.

Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Co-Authored-By: Xilin Wu <wuxilin123@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26097>
This commit is contained in:
Molly Sophia 2023-11-10 00:51:01 +00:00 committed by Marge Bot
parent 56451ce773
commit 424df6a68d

View file

@ -674,12 +674,6 @@ tu_physical_device_init(struct tu_physical_device *device,
fd_get_driver_uuid(device->driver_uuid);
fd_get_device_uuid(device->device_uuid, &device->dev_id);
struct vk_device_extension_table supported_extensions;
get_device_extensions(device, &supported_extensions);
struct vk_features supported_features;
tu_get_features(device, &supported_features);
struct vk_physical_device_dispatch_table dispatch_table;
vk_physical_device_dispatch_table_from_entrypoints(
&dispatch_table, &tu_physical_device_entrypoints, true);
@ -687,13 +681,14 @@ tu_physical_device_init(struct tu_physical_device *device,
&dispatch_table, &wsi_physical_device_entrypoints, false);
result = vk_physical_device_init(&device->vk, &instance->vk,
&supported_extensions,
&supported_features,
NULL,
NULL, NULL, NULL, /* We set up extensions later */
&dispatch_table);
if (result != VK_SUCCESS)
goto fail_free_name;
get_device_extensions(device, &device->vk.supported_extensions);
tu_get_features(device, &device->vk.supported_features);
device->vk.supported_sync_types = device->sync_types;
#if TU_HAS_SURFACE