vulkan: Enable PresentWait2 on many physical devices

PresentWait2 should be possible on any physical device, as it adds a
surface capability query that depends on common wsi code.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35414>
This commit is contained in:
Derek Foreman 2024-06-19 09:10:59 -05:00 committed by Marge Bot
parent 074ab1db29
commit 07881b085e
9 changed files with 16 additions and 0 deletions

View file

@ -557,6 +557,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_pipeline_executable_properties DONE (anv, hk, nvk, panvk, hasvk, radv, tu, v3dv)
VK_KHR_pipeline_library DONE (anv, hk, lvp, nvk, panvk, radv, tu, vn)
VK_KHR_present_wait DONE (anv, nvk, radv, tu, x11/display)
VK_KHR_present_wait2 DONE (anv, nvk, panvk, pvr, radv, tu, v3dv)
VK_KHR_ray_query DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, tu/a740+, vn)
VK_KHR_ray_tracing_maintenance1 DONE (anv/gfx12.5+, radv/gfx10.3+, tu/a740+, vn)
VK_KHR_ray_tracing_pipeline DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, vn)

View file

@ -47,3 +47,4 @@ VK_EXT_depth_clip_control on panvk
VK_KHR_maintenance9 on RADV
VK_KHR_unified_image_layouts on RADV (RDNA3+)
VK_KHR_vulkan_memory_model on panvk
VK_KHR_present_wait2

View file

@ -566,8 +566,10 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
* we can also expose the extension that way. */
.KHR_present_id =
instance->drirc.enable_khr_present_wait || wsi_common_vk_instance_supports_present_wait(&instance->vk),
.KHR_present_id2 = true,
.KHR_present_wait =
instance->drirc.enable_khr_present_wait || wsi_common_vk_instance_supports_present_wait(&instance->vk),
.KHR_present_wait2 = true,
.KHR_push_descriptor = true,
.KHR_ray_query = radv_enable_rt(pdev),
.KHR_ray_tracing_maintenance1 = radv_enable_rt(pdev),

View file

@ -193,6 +193,8 @@ get_device_extensions(const struct v3dv_physical_device *device,
.KHR_swapchain = true,
.KHR_swapchain_mutable_format = true,
.KHR_incremental_present = true,
.KHR_present_id2 = true,
.KHR_present_wait2 = true,
#endif
.KHR_variable_pointers = true,
.KHR_vertex_attribute_divisor = true,

View file

@ -224,8 +224,10 @@ get_device_extensions(const struct tu_physical_device *device,
* 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)),
.KHR_present_id2 = true,
.KHR_present_wait = (driQueryOptionb(&device->instance->dri_options, "vk_khr_present_wait") ||
wsi_common_vk_instance_supports_present_wait(&device->instance->vk)),
.KHR_present_wait2 = true,
#endif
.KHR_push_descriptor = true,
.KHR_ray_query = has_raytracing,

View file

@ -186,6 +186,8 @@ static void pvr_physical_device_get_supported_extensions(
.KHR_get_memory_requirements2 = true,
.KHR_image_format_list = true,
.KHR_index_type_uint8 = true,
.KHR_present_id2 = PVR_USE_WSI_PLATFORM,
.KHR_present_wait2 = PVR_USE_WSI_PLATFORM,
.KHR_shader_expect_assume = true,
.KHR_swapchain = PVR_USE_WSI_PLATFORM,
.KHR_timeline_semaphore = true,

View file

@ -220,6 +220,8 @@ get_device_extensions(const struct anv_physical_device *device,
driQueryOptionb(&device->instance->dri_options, "vk_khr_present_wait") ||
wsi_common_vk_instance_supports_present_wait(&device->instance->vk),
.KHR_push_descriptor = true,
.KHR_present_id2 = true,
.KHR_present_wait2 = true,
.KHR_ray_query = rt_enabled,
.KHR_ray_tracing_maintenance1 = rt_enabled,
.KHR_ray_tracing_pipeline = rt_enabled,

View file

@ -146,6 +146,8 @@ nvk_get_device_extensions(const struct nvk_instance *instance,
wsi_common_vk_instance_supports_present_wait(&instance->vk),
.KHR_present_wait = driQueryOptionb(&instance->dri_options, "vk_khr_present_wait") ||
wsi_common_vk_instance_supports_present_wait(&instance->vk),
.KHR_present_id2 = true,
.KHR_present_wait2 = true,
#endif
.KHR_push_descriptor = true,
.KHR_relaxed_block_layout = true,

View file

@ -273,6 +273,8 @@ get_device_extensions(const struct panvk_physical_device *device,
.KHR_spirv_1_4 = arch >= 10,
.KHR_storage_buffer_storage_class = true,
#ifdef PANVK_USE_WSI_PLATFORM
.KHR_present_id2 = true,
.KHR_present_wait2 = true,
.KHR_swapchain = true,
#endif
.KHR_synchronization2 = true,