nvk: Only expose VK_KHR_present_id/wait when we have WSI

Also update docs/features.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27785>
This commit is contained in:
Faith Ekstrand 2024-02-25 14:06:17 -06:00
parent 726ae2570c
commit b3fd66c889
2 changed files with 11 additions and 6 deletions

View file

@ -529,7 +529,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_performance_query DONE (anv, radv/gfx10.3+, tu, v3dv)
VK_KHR_pipeline_executable_properties DONE (anv, nvk, hasvk, radv, tu, v3dv)
VK_KHR_pipeline_library DONE (anv, lvp, radv, tu, vn)
VK_KHR_present_wait DONE (anv, radv, tu, x11/display)
VK_KHR_present_wait DONE (anv, nvk, radv, tu, x11/display)
VK_KHR_push_descriptor DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_KHR_ray_query DONE (anv/gfx12.5+, radv/gfx10.3+)
VK_KHR_ray_tracing_maintenance1 DONE (anv/gfx12.5+, radv/gfx10.3+)

View file

@ -113,15 +113,20 @@ nvk_get_device_extensions(const struct nvk_instance *instance,
.KHR_map_memory2 = true,
.KHR_multiview = true,
.KHR_pipeline_executable_properties = true,
/* Hide these behind dri configs for now since we cannot implement it reliably on
* all surfaces yet. There is no surface capability query for present wait/id,
* but the feature is useful enough to hide behind an opt-in mechanism for now.
* If the instance only enables surface extensions that unconditionally support present wait,
* we can also expose the extension that way. */
#ifdef NVK_USE_WSI_PLATFORM
/* Hide these behind dri configs for now since we cannot implement it
* reliably on all surfaces yet. There is no surface capability query
* for present wait/id, but the feature is useful enough to hide behind
* an opt-in mechanism for now. If the instance only enables surface
* extensions that unconditionally support present wait, we can also
* expose the extension that way.
*/
.KHR_present_id = driQueryOptionb(&instance->dri_options, "vk_khr_present_wait") ||
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),
#endif
.KHR_push_descriptor = true,
.KHR_relaxed_block_layout = true,
.KHR_sampler_mirror_clamp_to_edge = true,