From 07fe297a3e70d3a8a9a908317eea4455885f2fa3 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 4 Aug 2025 11:20:43 +0200 Subject: [PATCH] vulkan: fix missing presentId2/presentWait2 enable features Fixes recent VKCTS changes for dEQP-VK.info.device_mandatory_features. Fixes: 07881b085e6 ("vulkan: Enable PresentWait2 on many physical devices") Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_physical_device.c | 6 ++++++ src/broadcom/vulkan/v3dv_device.c | 6 ++++++ src/freedreno/vulkan/tu_device.cc | 6 ++++++ src/imagination/vulkan/pvr_device.c | 6 ++++++ src/intel/vulkan/anv_physical_device.c | 6 ++++++ src/nouveau/vulkan/nvk_physical_device.c | 6 ++++++ src/panfrost/vulkan/panvk_vX_physical_device.c | 8 ++++++++ 7 files changed, 44 insertions(+) diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index e14caf5b036..7e9a7cb1bc1 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -1376,6 +1376,12 @@ radv_physical_device_get_features(const struct radv_physical_device *pdev, struc /* VK_KHR_video_encode_av1 */ .videoEncodeAV1 = true, + + /* VK_KHR_present_id2 */ + .presentId2 = true, + + /* VK_KHR_present_wait2 */ + .presentWait2 = true, }; } diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index 2430ef01d8b..481540a4eb7 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -510,6 +510,12 @@ get_features(const struct v3dv_physical_device *physical_device, #ifdef V3DV_USE_WSI_PLATFORM /* VK_EXT_swapchain_maintenance1 */ .swapchainMaintenance1 = true, + + /* VK_KHR_present_id2 */ + .presentId2 = true, + + /* VK_KHR_present_wait2 */ + .presentWait2 = true, #endif /* VK_KHR_shader_relaxed_extended_instruction */ diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index 7ca30450e96..8207695cc4e 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -753,6 +753,12 @@ tu_get_features(struct tu_physical_device *pdevice, #ifdef TU_USE_WSI_PLATFORM /* VK_EXT_swapchain_maintenance1 */ features->swapchainMaintenance1 = true; + + /* VK_KHR_present_id2 */ + features->presentId2 = true; + + /* VK_KHR_present_wait2 */ + features->presentWait2 = true; #endif /* VK_EXT_texel_buffer_alignment */ diff --git a/src/imagination/vulkan/pvr_device.c b/src/imagination/vulkan/pvr_device.c index 36bd2be2783..f597c76bb67 100644 --- a/src/imagination/vulkan/pvr_device.c +++ b/src/imagination/vulkan/pvr_device.c @@ -283,6 +283,12 @@ static void pvr_physical_device_get_supported_features( /* VK_KHR_shader_expect_assume */ .shaderExpectAssume = false, + + /* VK_KHR_present_id2 */ + .presentId2 = PVR_USE_WSI_PLATFORM, + + /* VK_KHR_present_wait2 */ + .presentWait2 = PVR_USE_WSI_PLATFORM, }; } diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index 59284030eec..d9c638375f3 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -974,6 +974,12 @@ get_features(const struct anv_physical_device *pdevice, /* VK_KHR_maintenance9 */ .maintenance9 = true, + + /* VK_KHR_present_id2 */ + .presentId2 = true, + + /* VK_KHR_present_wait2 */ + .presentWait2 = true, }; /* The new DOOM and Wolfenstein games require depthBounds without diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index f372b21a917..d5e4b31ed46 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -717,6 +717,12 @@ nvk_get_device_features(const struct nv_device_info *info, /* VK_NV_shader_sm_builtins */ .shaderSMBuiltins = true, + + /* VK_KHR_present_id2 */ + .presentId2 = supported_extensions->KHR_present_id2, + + /* VK_KHR_present_wait2 */ + .presentWait2 = supported_extensions->KHR_present_wait2, }; } diff --git a/src/panfrost/vulkan/panvk_vX_physical_device.c b/src/panfrost/vulkan/panvk_vX_physical_device.c index 2172abe12e7..2a46074486c 100644 --- a/src/panfrost/vulkan/panvk_vX_physical_device.c +++ b/src/panfrost/vulkan/panvk_vX_physical_device.c @@ -495,6 +495,14 @@ panvk_per_arch(get_physical_device_features)( /* VK_EXT_mutable_descriptor_type */ .mutableDescriptorType = PAN_ARCH >= 9, + +#ifdef PANVK_USE_WSI_PLATFORM + /* VK_KHR_present_id2 */ + .presentId2 = true, + + /* VK_KHR_present_wait2 */ + .presentWait2 = true, +#endif }; }