wsi/common: Allow present-wait to be unconditionally enabled.
If all potentially supported surface types support present wait, we can expose the extension. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no> Reviewed-by: Joshua Ashton <joshua@froggi.es> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
This commit is contained in:
committed by
Marge Bot
parent
d071279710
commit
c66248fb5b
@@ -1376,6 +1376,20 @@ wsi_GetDeviceGroupSurfacePresentModesKHR(VkDevice device,
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
bool
|
||||
wsi_common_vk_instance_supports_present_wait(const struct vk_instance *instance)
|
||||
{
|
||||
/* We can only expose KHR_present_wait and KHR_present_id
|
||||
* if we are guaranteed support on all potential VkSurfaceKHR objects. */
|
||||
if (instance->enabled_extensions.KHR_wayland_surface ||
|
||||
instance->enabled_extensions.KHR_win32_surface ||
|
||||
instance->enabled_extensions.KHR_android_surface) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
VkResult
|
||||
wsi_common_create_swapchain_image(const struct wsi_device *wsi,
|
||||
const VkImageCreateInfo *pCreateInfo,
|
||||
|
||||
@@ -87,6 +87,7 @@ struct wsi_memory_signal_submit_info {
|
||||
};
|
||||
|
||||
struct wsi_interface;
|
||||
struct vk_instance;
|
||||
|
||||
struct driOptionCache;
|
||||
|
||||
@@ -312,6 +313,9 @@ wsi_common_bind_swapchain_image(const struct wsi_device *wsi,
|
||||
VkSwapchainKHR _swapchain,
|
||||
uint32_t image_idx);
|
||||
|
||||
bool
|
||||
wsi_common_vk_instance_supports_present_wait(const struct vk_instance *instance);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user