tu: Don't expose KHR_present_id,KHR_present_wait without KHR_swapchain

VK_KHR_present_id and VK_KHR_present_wait depend on VK_KHR_swapchain
being present, which is not present at least on Android/KGSL.

Fixes:
src/vulkan/util/vk_extensions.h:450: void assert_device_extensions_requirements(
 const struct vk_device_extension_table *, const struct vk_instance_extension_table *):
 assertion "!device_ext->KHR_present_id || device_ext->KHR_swapchain" failed

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21345>
This commit is contained in:
Danylo Piliaiev
2023-02-15 19:09:29 +01:00
committed by Marge Bot
parent 09501fe5a7
commit c7f18e4183
+8 -4
View File
@@ -177,11 +177,15 @@ get_device_extensions(const struct tu_physical_device *device,
* If the instance only enables surface extensions that unconditionally support present wait,
* we can also expose the extension that way. */
.KHR_present_id =
driQueryOptionb(&device->instance->dri_options, "vk_khr_present_wait") ||
wsi_common_vk_instance_supports_present_wait(&device->instance->vk),
TU_HAS_SURFACE && (driQueryOptionb(&device->instance->dri_options,
"vk_khr_present_wait") ||
wsi_common_vk_instance_supports_present_wait(
&device->instance->vk)),
.KHR_present_wait =
driQueryOptionb(&device->instance->dri_options, "vk_khr_present_wait") ||
wsi_common_vk_instance_supports_present_wait(&device->instance->vk),
TU_HAS_SURFACE && (driQueryOptionb(&device->instance->dri_options,
"vk_khr_present_wait") ||
wsi_common_vk_instance_supports_present_wait(
&device->instance->vk)),
#ifndef TU_USE_KGSL
.KHR_timeline_semaphore = true,
#endif