wsi/wayland: Do not assert that all present IDs have been waited on.

EXT_swapchain_maintenance1 allows destruction when the swapchain fence
is complete. That may signal before we have dispatched all present
waits. Just discard those presentation feedbacks.

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/22682>
This commit is contained in:
Hans-Kristian Arntzen
2023-05-02 13:31:37 +02:00
committed by Marge Bot
parent 577b3c7bb2
commit 11a853e912
+11 -1
View File
@@ -2118,7 +2118,17 @@ wsi_wl_swapchain_chain_free(struct wsi_wl_swapchain *chain,
if (chain->present_ids.wp_presentation) {
assert(!chain->present_ids.dispatch_in_progress);
assert(wl_list_empty(&chain->present_ids.outstanding_list));
/* In VK_EXT_swapchain_maintenance1 there is no requirement to wait for all present IDs to be complete.
* Waiting for the swapchain fence is enough.
* Just clean up anything user did not wait for. */
struct wsi_wl_present_id *id, *tmp;
wl_list_for_each_safe(id, tmp, &chain->present_ids.outstanding_list, link) {
wp_presentation_feedback_destroy(id->feedback);
wl_list_remove(&id->link);
vk_free(id->alloc, id);
}
wl_proxy_wrapper_destroy(chain->present_ids.wp_presentation);
pthread_cond_destroy(&chain->present_ids.list_advanced);
pthread_mutex_destroy(&chain->present_ids.lock);