From 8be5ea7bf83403cedd77150fa8ab348f729ab294 Mon Sep 17 00:00:00 2001 From: Bouke Sybren Haarsma Date: Sun, 19 May 2024 14:55:13 +0200 Subject: [PATCH 1/3] mesa-chimeraos 24.1.0-rc4-chos1 --- ...wapchain-override-for-gamescope-lim.patch} | 20 +- ...yland-refactor-wayland-dispatch-code.patch | 575 ------------------ ...nd-Use-commit_timing-commit_queue-pr.patch | 339 ----------- .../0003-hack-rip-out-commit-timing-v1.patch | 139 ----- ...d-gamescope-commit-queue-v1-protocol.patch | 343 ----------- ...swapchain-override-for-gamescope-lim.patch | 1 + ...yland-refactor-wayland-dispatch-code.patch | 1 - ...nd-Use-commit_timing-commit_queue-pr.patch | 1 - .../0003-hack-rip-out-commit-timing-v1.patch | 1 - ...d-gamescope-commit-queue-v1-protocol.patch | 1 - ...swapchain-override-for-gamescope-lim.patch | 1 - lib32-mesa/PKGBUILD | 33 +- ...swapchain-override-for-gamescope-lim.patch | 1 + ...yland-refactor-wayland-dispatch-code.patch | 1 - ...nd-Use-commit_timing-commit_queue-pr.patch | 1 - mesa/0003-hack-rip-out-commit-timing-v1.patch | 1 - ...d-gamescope-commit-queue-v1-protocol.patch | 1 - ...swapchain-override-for-gamescope-lim.patch | 1 - mesa/PKGBUILD | 32 +- ...swapchain-override-for-gamescope-lim.patch | 1 - ...yland-refactor-wayland-dispatch-code.patch | 1 - ...nd-Use-commit_timing-commit_queue-pr.patch | 1 - .../0003-hack-rip-out-commit-timing-v1.patch | 1 - ...d-gamescope-commit-queue-v1-protocol.patch | 1 - 24 files changed, 39 insertions(+), 1459 deletions(-) rename common/{0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch => 0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch} (87%) delete mode 100644 common/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch delete mode 100644 common/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch delete mode 100644 common/0003-hack-rip-out-commit-timing-v1.patch delete mode 100644 common/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch create mode 120000 lib32-mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch delete mode 120000 lib32-mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch delete mode 120000 lib32-mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch delete mode 120000 lib32-mesa/0003-hack-rip-out-commit-timing-v1.patch delete mode 120000 lib32-mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch delete mode 120000 lib32-mesa/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch create mode 120000 mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch delete mode 120000 mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch delete mode 120000 mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch delete mode 120000 mesa/0003-hack-rip-out-commit-timing-v1.patch delete mode 120000 mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch delete mode 120000 mesa/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch delete mode 120000 mesa/src/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch delete mode 120000 mesa/src/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch delete mode 120000 mesa/src/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch delete mode 120000 mesa/src/0003-hack-rip-out-commit-timing-v1.patch delete mode 120000 mesa/src/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch diff --git a/common/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch b/common/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch similarity index 87% rename from common/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch rename to common/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch index 4302bac..360cb7a 100644 --- a/common/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch +++ b/common/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch @@ -1,14 +1,18 @@ -From ac6ba78c7399aa738f9cc7bac082f2ca0e2d5115 Mon Sep 17 00:00:00 2001 -From: Bas Nieuwenhuizen -Date: Mon, 21 Feb 2022 18:43:54 +0100 -Subject: [PATCH 5/5] STEAMOS: Dynamic swapchain override for gamescope limiter +From 037c35841d89fbb8150f839960e34a1e20810b3f Mon Sep 17 00:00:00 2001 +From: Samuel Pitoiset +Date: Thu, 22 Feb 2024 22:32:45 +0100 +Subject: [PATCH] STEAMOS: Dynamic swapchain override for gamescope limiter for + DRI3 only +The original patch (from Bas) contained WSI VK support too but it's +been removed because the Gamescope WSI layer already handles that. + +Signed-off-by: Samuel Pitoiset --- src/loader/loader_dri3_helper.c | 42 +++++++++++++++++++++++++++++++-- src/loader/loader_dri3_helper.h | 1 + src/loader/meson.build | 2 +- - src/vulkan/wsi/wsi_common_x11.c | 38 +++++++++++++++++++++++++++++ - 4 files changed, 80 insertions(+), 3 deletions(-) + 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index dc1db4fa8be..38e55dc23ae 100644 @@ -99,7 +103,7 @@ index cc2362dd599..fe73b3f329c 100644 struct loader_dri3_extensions *ext; const struct loader_dri3_vtable *vtable; diff --git a/src/loader/meson.build b/src/loader/meson.build -index 043cc852112..8391ff38936 100644 +index ffb970f26be..326e2b5b9fd 100644 --- a/src/loader/meson.build +++ b/src/loader/meson.build @@ -29,7 +29,7 @@ if with_platform_x11 and with_dri3 @@ -112,5 +116,5 @@ index 043cc852112..8391ff38936 100644 build_by_default : false, ) -- -2.43.0 +2.45.0 diff --git a/common/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch b/common/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch deleted file mode 100644 index 484edfd..0000000 --- a/common/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch +++ /dev/null @@ -1,575 +0,0 @@ -From 34e1eb1878c1efa9da4a756acf46c646b10c0199 Mon Sep 17 00:00:00 2001 -From: Derek Foreman -Date: Wed, 20 Sep 2023 10:40:33 -0500 -Subject: [PATCH 1/5] vulkan/wsi/wayland: refactor wayland dispatch code - -We currently have two similar but different bits of code to dispatch -wayland event queues. Pull out as much common code as possible. - -Signed-off-by: Derek Foreman ---- - src/vulkan/wsi/wsi_common_wayland.c | 405 ++++++++++++++-------------- - 1 file changed, 210 insertions(+), 195 deletions(-) - -diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c -index a11cbd21adb..e80ac56cfe8 100644 ---- a/src/vulkan/wsi/wsi_common_wayland.c -+++ b/src/vulkan/wsi/wsi_common_wayland.c -@@ -96,6 +96,11 @@ struct wsi_wl_display { - struct wl_display *wl_display; - /* Actually a proxy wrapper around the event queue */ - struct wl_display *wl_display_wrapper; -+ -+ pthread_mutex_t wl_fd_lock; -+ pthread_cond_t wl_fd_reader_finished; -+ bool wl_fd_read_in_progress; -+ - struct wl_event_queue *queue; - - struct wl_shm *wl_shm; -@@ -157,6 +162,8 @@ struct wsi_wl_surface { - struct wsi_wl_swapchain { - struct wsi_swapchain base; - -+ struct wl_event_queue *queue; -+ - struct wsi_wl_surface *wsi_wl_surface; - struct wp_tearing_control_v1 *tearing_control; - -@@ -180,10 +187,7 @@ struct wsi_wl_swapchain { - pthread_mutex_t lock; /* protects all members */ - uint64_t max_completed; - struct wl_list outstanding_list; -- pthread_cond_t list_advanced; -- struct wl_event_queue *queue; - struct wp_presentation *wp_presentation; -- bool dispatch_in_progress; - } present_ids; - - struct wsi_wl_image images[0]; -@@ -208,6 +212,135 @@ find_format(struct u_vector *formats, VkFormat format) - return NULL; - } - -+static int -+wsi_wl_display_read_queue_with_timeout_internal(struct wsi_wl_display *wsi_wl_display, -+ struct wl_event_queue *queue, -+ uint64_t atimeout) -+{ -+ uint64_t current_time_nsec; -+ struct timespec rel_timeout, end_time, current_time; -+ int ret; -+ -+ if (wl_display_prepare_read_queue(wsi_wl_display->wl_display, queue) < 0) { -+ /* Another thread might have read events for our queue already. Go -+ * back to dispatch them. -+ */ -+ pthread_mutex_unlock(&wsi_wl_display->wl_fd_lock); -+ if (errno == EAGAIN) -+ return VK_SUCCESS; -+ -+ return VK_ERROR_OUT_OF_DATE_KHR; -+ } -+ -+ wsi_wl_display->wl_fd_read_in_progress = true; -+ pthread_mutex_unlock(&wsi_wl_display->wl_fd_lock); -+ -+ while (1) { -+ struct pollfd pollfd = { -+ .fd = wl_display_get_fd(wsi_wl_display->wl_display), -+ .events = POLLIN -+ }; -+ -+ current_time_nsec = os_time_get_nano(); -+ if (current_time_nsec > atimeout) { -+ rel_timeout.tv_sec = 0; -+ rel_timeout.tv_nsec = 0; -+ } else { -+ timespec_from_nsec(¤t_time, current_time_nsec); -+ timespec_from_nsec(&end_time, atimeout); -+ timespec_sub(&rel_timeout, &end_time, ¤t_time); -+ } -+ -+ ret = ppoll(&pollfd, 1, &rel_timeout, NULL); -+ if (ret < 0) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ -+ ret = VK_ERROR_OUT_OF_DATE_KHR; -+ } else if (ret == 0) -+ ret = VK_TIMEOUT; -+ else -+ ret = VK_SUCCESS; -+ -+ break; -+ } -+ -+ if (ret != VK_SUCCESS) { -+ wl_display_cancel_read(wsi_wl_display->wl_display); -+ } else { -+ ret = wl_display_read_events(wsi_wl_display->wl_display); -+ if (ret != 0) -+ ret = VK_ERROR_OUT_OF_DATE_KHR; -+ } -+ -+ pthread_mutex_lock(&wsi_wl_display->wl_fd_lock); -+ wsi_wl_display->wl_fd_read_in_progress = false; -+ pthread_cond_broadcast(&wsi_wl_display->wl_fd_reader_finished); -+ return ret; -+} -+ -+static int -+wsi_wl_display_dispatch_queue_with_timeout(struct wsi_wl_display *wsi_wl_display, -+ struct wl_event_queue *queue, -+ uint64_t timeout) -+{ -+ int err; -+ int n_events; -+ uint64_t atimeout, now; -+ -+ if (timeout == UINT64_MAX) -+ atimeout = timeout; -+ else -+ atimeout = os_time_get_absolute_timeout(timeout); -+ -+ while (1) { -+ n_events = wl_display_dispatch_queue_pending(wsi_wl_display->wl_display, -+ queue); -+ if (n_events > 0) { -+ err = VK_SUCCESS; -+ break; -+ } -+ pthread_mutex_lock(&wsi_wl_display->wl_fd_lock); -+ -+ if (wsi_wl_display->wl_fd_read_in_progress) { -+ struct timespec end_time; -+ -+ timespec_from_nsec(&end_time, atimeout); -+ -+ err = pthread_cond_timedwait(&wsi_wl_display->wl_fd_reader_finished, -+ &wsi_wl_display->wl_fd_lock, -+ &end_time); -+ if (err) { -+ if (errno == ETIMEDOUT) -+ err = VK_TIMEOUT; -+ else -+ err = VK_ERROR_OUT_OF_DATE_KHR; -+ } else { -+ /* We don't know if the other thread actually -+ * dispatched anything, so let the caller decide -+ * whether it should continue. -+ */ -+ err = VK_INCOMPLETE; -+ } -+ } else { -+ err = wsi_wl_display_read_queue_with_timeout_internal(wsi_wl_display, -+ queue, -+ timeout); -+ } -+ -+ pthread_mutex_unlock(&wsi_wl_display->wl_fd_lock); -+ -+ now = os_time_get_nano(); -+ if (now > atimeout) { -+ err = VK_TIMEOUT; -+ break; -+ } -+ -+ } -+ -+ return err; -+} -+ - static struct wsi_wl_format * - wsi_wl_display_add_vk_format(struct wsi_wl_display *display, - struct u_vector *formats, -@@ -833,6 +966,8 @@ wsi_wl_display_finish(struct wsi_wl_display *display) - wl_proxy_wrapper_destroy(display->wl_display_wrapper); - if (display->queue) - wl_event_queue_destroy(display->queue); -+ pthread_mutex_destroy(&display->wl_fd_lock); -+ pthread_cond_destroy(&display->wl_fd_reader_finished); - } - - static VkResult -@@ -851,6 +986,11 @@ wsi_wl_display_init(struct wsi_wayland *wsi_wl, - display->wl_display = wl_display; - display->sw = sw; - -+ display->wl_fd_read_in_progress = false; -+ pthread_mutex_init(&display->wl_fd_lock, NULL); -+ if (!wsi_init_pthread_cond_monotonic(&display->wl_fd_reader_finished)) -+ goto fail; -+ - display->queue = wl_display_create_queue(wl_display); - if (!display->queue) { - result = VK_ERROR_OUT_OF_HOST_MEMORY; -@@ -951,6 +1091,7 @@ fail_registry: - wl_registry_destroy(registry); - - fail: -+ pthread_mutex_destroy(&display->wl_fd_lock); - wsi_wl_display_finish(display); - return result; - } -@@ -1672,19 +1813,15 @@ wsi_wl_swapchain_wait_for_present(struct wsi_swapchain *wsi_chain, - uint64_t timeout) - { - struct wsi_wl_swapchain *chain = (struct wsi_wl_swapchain *)wsi_chain; -- struct wl_display *wl_display = chain->wsi_wl_surface->display->wl_display; -- struct timespec end_time; -- int wl_fd = wl_display_get_fd(wl_display); -- VkResult ret; -- int err; -+ uint64_t end_time, time_left, now; -+ int ret; -+ bool expired = false; -+ bool finished; - -- uint64_t atimeout; -- if (timeout == 0 || timeout == UINT64_MAX) -- atimeout = timeout; -+ if (timeout == UINT64_MAX) -+ end_time = timeout; - else -- atimeout = os_time_get_absolute_timeout(timeout); -- -- timespec_from_nsec(&end_time, atimeout); -+ end_time = os_time_get_absolute_timeout(timeout); - - /* Need to observe that the swapchain semaphore has been unsignalled, - * as this is guaranteed when a present is complete. */ -@@ -1700,141 +1837,45 @@ wsi_wl_swapchain_wait_for_present(struct wsi_swapchain *wsi_chain, - return VK_SUCCESS; - } - -+ while (1) { -+ ret = wl_display_dispatch_queue_pending(chain->wsi_wl_surface->display->wl_display, -+ chain->queue); -+ if (ret < 0) -+ return VK_ERROR_OUT_OF_DATE_KHR; -+ - /* PresentWait can be called concurrently. - * If there is contention on this mutex, it means there is currently a dispatcher in flight holding the lock. - * The lock is only held while there is forward progress processing events from Wayland, - * so there should be no problem locking without timeout. - * We would like to be able to support timeout = 0 to query the current max_completed count. - * A timedlock with no timeout can be problematic in that scenario. */ -- err = pthread_mutex_lock(&chain->present_ids.lock); -- if (err != 0) -- return VK_ERROR_OUT_OF_DATE_KHR; -- -- if (chain->present_ids.max_completed >= present_id) { -+ pthread_mutex_lock(&chain->present_ids.lock); -+ finished = chain->present_ids.max_completed >= present_id; - pthread_mutex_unlock(&chain->present_ids.lock); -- return VK_SUCCESS; -- } -- -- /* Someone else is dispatching events; wait for them to update the chain -- * status and wake us up. */ -- while (chain->present_ids.dispatch_in_progress) { -- /* We only own the lock when the wait succeeds. */ -- err = pthread_cond_timedwait(&chain->present_ids.list_advanced, -- &chain->present_ids.lock, &end_time); -- -- if (err == ETIMEDOUT) { -- pthread_mutex_unlock(&chain->present_ids.lock); -- return VK_TIMEOUT; -- } else if (err != 0) { -- pthread_mutex_unlock(&chain->present_ids.lock); -- return VK_ERROR_OUT_OF_DATE_KHR; -- } -- -- if (chain->present_ids.max_completed >= present_id) { -- pthread_mutex_unlock(&chain->present_ids.lock); -+ if (finished) - return VK_SUCCESS; -- } -- -- /* Whoever was previously dispatching the events isn't anymore, so we -- * will take over and fall through below. */ -- if (!chain->present_ids.dispatch_in_progress) -- break; -- } -- -- assert(!chain->present_ids.dispatch_in_progress); -- chain->present_ids.dispatch_in_progress = true; -- -- /* Whether or not we were dispatching the events before, we are now: pull -- * all the new events from our event queue, post them, and wake up everyone -- * else who might be waiting. */ -- while (1) { -- ret = wl_display_dispatch_queue_pending(wl_display, chain->present_ids.queue); -- if (ret < 0) { -- ret = VK_ERROR_OUT_OF_DATE_KHR; -- goto relinquish_dispatch; -- } -- -- /* Some events dispatched: check the new completions. */ -- if (ret > 0) { -- /* Completed our own present; stop our own dispatching and let -- * someone else pick it up. */ -- if (chain->present_ids.max_completed >= present_id) { -- ret = VK_SUCCESS; -- goto relinquish_dispatch; -- } -- -- /* Wake up other waiters who may have been unblocked by the events -- * we just read. */ -- pthread_cond_broadcast(&chain->present_ids.list_advanced); -- } -- -- /* Check for timeout, and relinquish the dispatch to another thread -- * if we're over our budget. */ -- uint64_t current_time_nsec = os_time_get_nano(); -- if (current_time_nsec > atimeout) { -- ret = VK_TIMEOUT; -- goto relinquish_dispatch; -- } -- -- /* To poll and read from WL fd safely, we must be cooperative. -- * See wl_display_prepare_read_queue in https://wayland.freedesktop.org/docs/html/apb.html */ -- -- /* Try to read events from the server. */ -- ret = wl_display_prepare_read_queue(wl_display, chain->present_ids.queue); -- if (ret < 0) { -- /* Another thread might have read events for our queue already. Go -- * back to dispatch them. -- */ -- if (errno == EAGAIN) -- continue; -- ret = VK_ERROR_OUT_OF_DATE_KHR; -- goto relinquish_dispatch; -- } - -- /* Drop the lock around poll, so people can wait whilst we sleep. */ -- pthread_mutex_unlock(&chain->present_ids.lock); -- -- struct pollfd pollfd = { -- .fd = wl_fd, -- .events = POLLIN -- }; -- struct timespec current_time, rel_timeout; -- timespec_from_nsec(¤t_time, current_time_nsec); -- timespec_sub(&rel_timeout, &end_time, ¤t_time); -- ret = ppoll(&pollfd, 1, &rel_timeout, NULL); -+ if (expired) -+ return VK_TIMEOUT; - -- /* Re-lock after poll; either we're dispatching events under the lock or -- * bouncing out from an error also under the lock. We can't use timedlock -- * here because we need to acquire to clear dispatch_in_progress. */ -- pthread_mutex_lock(&chain->present_ids.lock); -+ now = os_time_get_nano(); -+ if (now > end_time) -+ time_left = 0; -+ else -+ time_left = end_time - now; - -- if (ret <= 0) { -- int lerrno = errno; -- wl_display_cancel_read(wl_display); -- if (ret < 0) { -- /* If ppoll() was interrupted, try again. */ -- if (lerrno == EINTR || lerrno == EAGAIN) -- continue; -- ret = VK_ERROR_OUT_OF_DATE_KHR; -- goto relinquish_dispatch; -- } -- assert(ret == 0); -+ ret = wsi_wl_display_dispatch_queue_with_timeout(chain->wsi_wl_surface->display, -+ chain->queue, -+ time_left); -+ if (ret == VK_INCOMPLETE) - continue; -- } - -- ret = wl_display_read_events(wl_display); -- if (ret < 0) { -- ret = VK_ERROR_OUT_OF_DATE_KHR; -- goto relinquish_dispatch; -- } -- } -+ if (ret != VK_SUCCESS && ret != VK_TIMEOUT) -+ return ret; - --relinquish_dispatch: -- assert(chain->present_ids.dispatch_in_progress); -- chain->present_ids.dispatch_in_progress = false; -- pthread_cond_broadcast(&chain->present_ids.list_advanced); -- pthread_mutex_unlock(&chain->present_ids.lock); -- return ret; -+ if (time_left == 0) -+ expired = true; -+ } - } - - static VkResult -@@ -1844,19 +1885,18 @@ wsi_wl_swapchain_acquire_next_image(struct wsi_swapchain *wsi_chain, - { - struct wsi_wl_swapchain *chain = (struct wsi_wl_swapchain *)wsi_chain; - struct wsi_wl_surface *wsi_wl_surface = chain->wsi_wl_surface; -- struct timespec start_time, end_time; -- struct timespec rel_timeout; -- int wl_fd = wl_display_get_fd(wsi_wl_surface->display->wl_display); -- -- timespec_from_nsec(&rel_timeout, info->timeout); -+ uint64_t end_time, time_left, now; -+ bool expired = false; -+ int ret; - -- clock_gettime(CLOCK_MONOTONIC, &start_time); -- timespec_add(&end_time, &rel_timeout, &start_time); -+ if (info->timeout == UINT64_MAX) -+ end_time = info->timeout; -+ else -+ end_time = os_time_get_absolute_timeout(info->timeout); - - while (1) { -- /* Try to dispatch potential events. */ -- int ret = wl_display_dispatch_queue_pending(wsi_wl_surface->display->wl_display, -- wsi_wl_surface->display->queue); -+ ret = wl_display_dispatch_queue_pending(wsi_wl_surface->display->wl_display, -+ wsi_wl_surface->display->queue); - if (ret < 0) - return VK_ERROR_OUT_OF_DATE_KHR; - -@@ -1870,46 +1910,26 @@ wsi_wl_swapchain_acquire_next_image(struct wsi_swapchain *wsi_chain, - } - } - -- /* Check for timeout. */ -- struct timespec current_time; -- clock_gettime(CLOCK_MONOTONIC, ¤t_time); -- if (timespec_after(¤t_time, &end_time)) -- return (info->timeout ? VK_TIMEOUT : VK_NOT_READY); -+ if (expired) -+ return info->timeout ? VK_TIMEOUT : VK_NOT_READY; - -- /* Try to read events from the server. */ -- ret = wl_display_prepare_read_queue(wsi_wl_surface->display->wl_display, -- wsi_wl_surface->display->queue); -- if (ret < 0) { -- /* Another thread might have read events for our queue already. Go -- * back to dispatch them. -- */ -- if (errno == EAGAIN) -- continue; -- return VK_ERROR_OUT_OF_DATE_KHR; -- } -+ now = os_time_get_nano(); -+ if (now > end_time) -+ time_left = 0; -+ else -+ time_left = end_time - now; - -- struct pollfd pollfd = { -- .fd = wl_fd, -- .events = POLLIN -- }; -- timespec_sub(&rel_timeout, &end_time, ¤t_time); -- ret = ppoll(&pollfd, 1, &rel_timeout, NULL); -- if (ret <= 0) { -- int lerrno = errno; -- wl_display_cancel_read(wsi_wl_surface->display->wl_display); -- if (ret < 0) { -- /* If ppoll() was interrupted, try again. */ -- if (lerrno == EINTR || lerrno == EAGAIN) -- continue; -- return VK_ERROR_OUT_OF_DATE_KHR; -- } -- assert(ret == 0); -+ ret = wsi_wl_display_dispatch_queue_with_timeout(wsi_wl_surface->display, -+ wsi_wl_surface->display->queue, -+ time_left); -+ if (ret == VK_ERROR_OUT_OF_DATE_KHR) -+ return ret; -+ -+ if (ret == VK_INCOMPLETE) - continue; -- } - -- ret = wl_display_read_events(wsi_wl_surface->display->wl_display); -- if (ret < 0) -- return VK_ERROR_OUT_OF_DATE_KHR; -+ if (ret == VK_TIMEOUT) -+ expired = true; - } - } - -@@ -1930,9 +1950,10 @@ presentation_handle_presented(void *data, - { - struct wsi_wl_present_id *id = data; - -- /* present_ids.lock already held around dispatch */ -+ pthread_mutex_lock(&id->chain->present_ids.lock); - if (id->present_id > id->chain->present_ids.max_completed) - id->chain->present_ids.max_completed = id->present_id; -+ pthread_mutex_unlock(&id->chain->present_ids.lock); - - wp_presentation_feedback_destroy(feedback); - wl_list_remove(&id->link); -@@ -1945,9 +1966,10 @@ presentation_handle_discarded(void *data, - { - struct wsi_wl_present_id *id = data; - -- /* present_ids.lock already held around dispatch */ -+ pthread_mutex_lock(&id->chain->present_ids.lock); - if (id->present_id > id->chain->present_ids.max_completed) - id->chain->present_ids.max_completed = id->present_id; -+ pthread_mutex_unlock(&id->chain->present_ids.lock); - - wp_presentation_feedback_destroy(feedback); - wl_list_remove(&id->link); -@@ -2195,8 +2217,6 @@ wsi_wl_swapchain_chain_free(struct wsi_wl_swapchain *chain, - chain->wsi_wl_surface->chain = NULL; - - if (chain->present_ids.wp_presentation) { -- assert(!chain->present_ids.dispatch_in_progress); -- - /* 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. */ -@@ -2208,12 +2228,11 @@ wsi_wl_swapchain_chain_free(struct wsi_wl_swapchain *chain, - } - - wl_proxy_wrapper_destroy(chain->present_ids.wp_presentation); -- pthread_cond_destroy(&chain->present_ids.list_advanced); - pthread_mutex_destroy(&chain->present_ids.lock); - } - -- if (chain->present_ids.queue) -- wl_event_queue_destroy(chain->present_ids.queue); -+ if (chain->queue) -+ wl_event_queue_destroy(chain->queue); - - vk_free(pAllocator, (void *)chain->drm_modifiers); - -@@ -2386,20 +2405,16 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, - chain->drm_modifiers = drm_modifiers_copy; - } - -+ chain->queue = wl_display_create_queue(chain->wsi_wl_surface->display->wl_display); -+ - if (chain->wsi_wl_surface->display->wp_presentation_notwrapped) { -- if (!wsi_init_pthread_cond_monotonic(&chain->present_ids.list_advanced)) { -- result = VK_ERROR_OUT_OF_HOST_MEMORY; -- goto fail_free_wl_chain; -- } - pthread_mutex_init(&chain->present_ids.lock, NULL); - - wl_list_init(&chain->present_ids.outstanding_list); -- chain->present_ids.queue = -- wl_display_create_queue(chain->wsi_wl_surface->display->wl_display); - chain->present_ids.wp_presentation = - wl_proxy_create_wrapper(chain->wsi_wl_surface->display->wp_presentation_notwrapped); - wl_proxy_set_queue((struct wl_proxy *) chain->present_ids.wp_presentation, -- chain->present_ids.queue); -+ chain->queue); - } - - chain->fifo_ready = true; --- -2.43.0 - diff --git a/common/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch b/common/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch deleted file mode 100644 index 7b14b71..0000000 --- a/common/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch +++ /dev/null @@ -1,339 +0,0 @@ -From d65354a4b06d573b34a5485b9207d3492c48ff27 Mon Sep 17 00:00:00 2001 -From: Derek Foreman -Date: Fri, 10 Nov 2023 07:25:35 -0600 -Subject: [PATCH 2/5] vulkan/wsi/wayland: Use commit_timing/commit_queue - protocol for FIFO - -The commit_timing protocol allows us to set a presentation timestamp, -and the commit_queue protocol allows us to request FIFO semantics for -committed state (instead of the default mailbox). - -I these are available, use them to implement Vulkan's FIFO presentation -mode. - -Signed-off-by: Derek Foreman ---- - src/egl/wayland/wayland-drm/meson.build | 2 + - src/vulkan/wsi/meson.build | 2 + - src/vulkan/wsi/wsi_common_wayland.c | 139 +++++++++++++++++++++--- - 3 files changed, 130 insertions(+), 13 deletions(-) - -diff --git a/src/egl/wayland/wayland-drm/meson.build b/src/egl/wayland/wayland-drm/meson.build -index ac822acec67..8b6044f09e5 100644 ---- a/src/egl/wayland/wayland-drm/meson.build -+++ b/src/egl/wayland/wayland-drm/meson.build -@@ -59,6 +59,8 @@ libwayland_drm = static_library( - # here for now as the maybe-least-bad solution. - wp_dir = dep_wl_protocols.get_variable(pkgconfig : 'pkgdatadir', internal : 'pkgdatadir') - wp_protos = { -+ 'commit-queue-v1': 'staging/commit-queue/commit-queue-v1.xml', -+ 'commit-timing-v1': 'staging/commit-timing/commit-timing-v1.xml', - 'linux-dmabuf-unstable-v1': 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', - 'presentation-time': 'stable/presentation-time/presentation-time.xml', - 'tearing-control-v1': 'staging/tearing-control/tearing-control-v1.xml', -diff --git a/src/vulkan/wsi/meson.build b/src/vulkan/wsi/meson.build -index c8206eac996..48ea09b99aa 100644 ---- a/src/vulkan/wsi/meson.build -+++ b/src/vulkan/wsi/meson.build -@@ -31,6 +31,8 @@ endif - - if with_platform_wayland - files_vulkan_wsi += files('wsi_common_wayland.c') -+ files_vulkan_wsi += wp_files['commit-queue-v1'] -+ files_vulkan_wsi += wp_files['commit-timing-v1'] - files_vulkan_wsi += wp_files['linux-dmabuf-unstable-v1'] - files_vulkan_wsi += wp_files['presentation-time'] - files_vulkan_wsi += wp_files['tearing-control-v1'] -diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c -index e80ac56cfe8..28f8f3b5e8f 100644 ---- a/src/vulkan/wsi/wsi_common_wayland.c -+++ b/src/vulkan/wsi/wsi_common_wayland.c -@@ -41,6 +41,8 @@ - #include "vk_util.h" - #include "wsi_common_entrypoints.h" - #include "wsi_common_private.h" -+#include "commit-queue-v1-client-protocol.h" -+#include "commit-timing-v1-client-protocol.h" - #include "linux-dmabuf-unstable-v1-client-protocol.h" - #include "presentation-time-client-protocol.h" - #include "tearing-control-v1-client-protocol.h" -@@ -113,6 +115,9 @@ struct wsi_wl_display { - /* users want per-chain wsi_wl_swapchain->present_ids.wp_presentation */ - struct wp_presentation *wp_presentation_notwrapped; - -+ struct wp_commit_queue_manager_v1 *commit_queue_manager; -+ struct wp_commit_timing_manager_v1 *commit_timing_manager; -+ - struct wsi_wayland *wsi_wl; - - /* Formats populated by zwp_linux_dmabuf_v1 or wl_shm interfaces */ -@@ -135,6 +140,7 @@ struct wsi_wayland { - - struct wsi_wl_image { - struct wsi_image base; -+ struct wsi_wl_swapchain *chain; - struct wl_buffer *buffer; - bool busy; - int shm_fd; -@@ -166,6 +172,9 @@ struct wsi_wl_swapchain { - - struct wsi_wl_surface *wsi_wl_surface; - struct wp_tearing_control_v1 *tearing_control; -+ struct wp_commit_queue_v1 *commit_queue; -+ struct wp_commit_timer_v1 *commit_timer; -+ bool can_timestamp; - - struct wl_callback *frame; - -@@ -181,13 +190,17 @@ struct wsi_wl_swapchain { - const uint64_t *drm_modifiers; - - VkPresentModeKHR present_mode; -- bool fifo_ready; -+ bool legacy_fifo_ready; -+ -+ uint64_t last_target_time; - - struct { - pthread_mutex_t lock; /* protects all members */ - uint64_t max_completed; - struct wl_list outstanding_list; - struct wp_presentation *wp_presentation; -+ uint64_t phase_time; -+ unsigned int refresh_nsec; - } present_ids; - - struct wsi_wl_image images[0]; -@@ -934,6 +947,12 @@ registry_handle_global(void *data, struct wl_registry *registry, - } else if (strcmp(interface, wp_tearing_control_manager_v1_interface.name) == 0) { - display->tearing_control_manager = - wl_registry_bind(registry, name, &wp_tearing_control_manager_v1_interface, 1); -+ } else if (strcmp(interface, wp_commit_timing_manager_v1_interface.name) == 0) { -+ display->commit_timing_manager = -+ wl_registry_bind(registry, name, &wp_commit_timing_manager_v1_interface, 1); -+ } else if (strcmp(interface, wp_commit_queue_manager_v1_interface.name) == 0) { -+ display->commit_queue_manager = -+ wl_registry_bind(registry, name, &wp_commit_queue_manager_v1_interface, 1); - } - } - -@@ -960,6 +979,10 @@ wsi_wl_display_finish(struct wsi_wl_display *display) - zwp_linux_dmabuf_v1_destroy(display->wl_dmabuf); - if (display->wp_presentation_notwrapped) - wp_presentation_destroy(display->wp_presentation_notwrapped); -+ if (display->commit_queue_manager) -+ wp_commit_queue_manager_v1_destroy(display->commit_queue_manager); -+ if (display->commit_timing_manager) -+ wp_commit_timing_manager_v1_destroy(display->commit_timing_manager); - if (display->tearing_control_manager) - wp_tearing_control_manager_v1_destroy(display->tearing_control_manager); - if (display->wl_display_wrapper) -@@ -1919,6 +1942,16 @@ wsi_wl_swapchain_acquire_next_image(struct wsi_swapchain *wsi_chain, - else - time_left = end_time - now; - -+ /* If we can use timestamps, we want to make sure to dispatch the queue -+ * feedback events are in so we can get a refresh rate and a vsync time to -+ * phase lock to */ -+ if (chain->can_timestamp) { -+ ret = wl_display_dispatch_queue_pending(wsi_wl_surface->display->wl_display, -+ chain->queue); -+ if (ret < 0) -+ return VK_ERROR_OUT_OF_DATE_KHR; -+ } -+ - ret = wsi_wl_display_dispatch_queue_with_timeout(wsi_wl_surface->display, - wsi_wl_surface->display->queue, - time_left); -@@ -1949,10 +1982,16 @@ presentation_handle_presented(void *data, - uint32_t flags) - { - struct wsi_wl_present_id *id = data; -+ struct timespec presentation_time; - - pthread_mutex_lock(&id->chain->present_ids.lock); - if (id->present_id > id->chain->present_ids.max_completed) - id->chain->present_ids.max_completed = id->present_id; -+ -+ presentation_time.tv_sec = ((uint64_t)tv_sec_hi << 32) + tv_sec_lo; -+ presentation_time.tv_nsec = tv_nsec; -+ id->chain->present_ids.phase_time = timespec_to_nsec(&presentation_time); -+ id->chain->present_ids.refresh_nsec = refresh; - pthread_mutex_unlock(&id->chain->present_ids.lock); - - wp_presentation_feedback_destroy(feedback); -@@ -1988,8 +2027,10 @@ frame_handle_done(void *data, struct wl_callback *callback, uint32_t serial) - { - struct wsi_wl_swapchain *chain = data; - -+ assert(!chain->can_timestamp); -+ - chain->frame = NULL; -- chain->fifo_ready = true; -+ chain->legacy_fifo_ready = true; - - wl_callback_destroy(callback); - } -@@ -1998,6 +2039,46 @@ static const struct wl_callback_listener frame_listener = { - frame_handle_done, - }; - -+static void -+set_timestamp(struct wsi_wl_swapchain *chain) -+{ -+ uint64_t now, target; -+ struct timespec target_ts; -+ uint64_t refresh; -+ uint64_t phase_time; -+ -+ now = os_time_get_nano(); -+ -+ pthread_mutex_lock(&chain->present_ids.lock); -+ phase_time = chain->present_ids.phase_time; -+ refresh = chain->present_ids.refresh_nsec; -+ pthread_mutex_unlock(&chain->present_ids.lock); -+ -+ if (refresh == 0) -+ refresh = 16666666; -+ -+ target = chain->last_target_time + refresh; -+ -+ if (now > target) { -+ uint64_t offset; -+ -+ if (phase_time > now) -+ now = phase_time; -+ -+ offset = (now - phase_time) % refresh; -+ target = now - offset + refresh; -+ } -+ -+ timespec_from_nsec(&target_ts, target); -+ wp_commit_timer_v1_set_timestamp(chain->commit_timer, -+ target_ts.tv_sec >> 32, target_ts.tv_sec, -+ target_ts.tv_nsec); -+ -+ wp_commit_queue_v1_set_queue_mode(chain->commit_queue, -+ WP_COMMIT_QUEUE_V1_QUEUE_MODE_FIFO); -+ chain->last_target_time = target; -+} -+ - static VkResult - wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain, - uint32_t image_index, -@@ -2006,6 +2087,7 @@ wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain, - { - struct wsi_wl_swapchain *chain = (struct wsi_wl_swapchain *)wsi_chain; - struct wsi_wl_surface *wsi_wl_surface = chain->wsi_wl_surface; -+ bool mode_fifo = chain->base.present_mode == VK_PRESENT_MODE_FIFO_KHR; - - if (chain->buffer_type == WSI_WL_BUFFER_SHM_MEMCPY) { - struct wsi_wl_image *image = &chain->images[image_index]; -@@ -2015,7 +2097,7 @@ wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain, - - /* For EXT_swapchain_maintenance1. We might have transitioned from FIFO to MAILBOX. - * In this case we need to let the FIFO request complete, before presenting MAILBOX. */ -- while (!chain->fifo_ready) { -+ while (!chain->can_timestamp && !chain->legacy_fifo_ready) { - int ret = wl_display_dispatch_queue(wsi_wl_surface->display->wl_display, - wsi_wl_surface->display->queue); - if (ret < 0) -@@ -2038,16 +2120,19 @@ wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain, - wl_surface_damage(wsi_wl_surface->surface, 0, 0, INT32_MAX, INT32_MAX); - } - -- if (chain->base.present_mode == VK_PRESENT_MODE_FIFO_KHR) { -- chain->frame = wl_surface_frame(wsi_wl_surface->surface); -- wl_callback_add_listener(chain->frame, &frame_listener, chain); -- chain->fifo_ready = false; -- } else { -- /* If we present MAILBOX, any subsequent presentation in FIFO can replace this image. */ -- chain->fifo_ready = true; -+ if (!chain->can_timestamp) { -+ if (mode_fifo) { -+ chain->frame = wl_surface_frame(wsi_wl_surface->surface); -+ wl_callback_add_listener(chain->frame, &frame_listener, chain); -+ chain->legacy_fifo_ready = false; -+ } else { -+ /* If we present MAILBOX, any subsequent presentation in FIFO can replace this image. */ -+ chain->legacy_fifo_ready = true; -+ } - } - -- if (present_id > 0 && chain->present_ids.wp_presentation) { -+ if (chain->present_ids.wp_presentation && -+ (present_id > 0 || (chain->can_timestamp && mode_fifo))) { - struct wsi_wl_present_id *id = - vk_zalloc(chain->wsi_wl_surface->display->wsi_wl->alloc, sizeof(*id), sizeof(uintptr_t), - VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); -@@ -2066,6 +2151,10 @@ wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain, - } - - chain->images[image_index].busy = true; -+ -+ if (chain->can_timestamp && mode_fifo) -+ set_timestamp(chain); -+ - wl_surface_commit(wsi_wl_surface->surface); - wl_display_flush(wsi_wl_surface->display->wl_display); - -@@ -2181,6 +2270,7 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain, - goto fail_image; - - wl_buffer_add_listener(image->buffer, &buffer_listener, image); -+ image->chain = chain; - - return VK_SUCCESS; - -@@ -2234,8 +2324,13 @@ wsi_wl_swapchain_chain_free(struct wsi_wl_swapchain *chain, - if (chain->queue) - wl_event_queue_destroy(chain->queue); - -- vk_free(pAllocator, (void *)chain->drm_modifiers); -+ if (chain->commit_queue) -+ wp_commit_queue_v1_destroy(chain->commit_queue); -+ -+ if (chain->commit_timer) -+ wp_commit_timer_v1_destroy(chain->commit_timer); - -+ vk_free(pAllocator, (void *)chain->drm_modifiers); - wsi_swapchain_finish(&chain->base); - } - -@@ -2291,6 +2386,15 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, - wp_tearing_control_v1_destroy(old_chain->tearing_control); - old_chain->tearing_control = NULL; - } -+ if (old_chain->commit_queue) { -+ wp_commit_queue_v1_destroy(old_chain->commit_queue); -+ old_chain->commit_queue = NULL; -+ old_chain->can_timestamp = false; -+ } -+ if (old_chain->commit_timer) { -+ wp_commit_timer_v1_destroy(old_chain->commit_timer); -+ old_chain->commit_timer = NULL; -+ } - } - - /* Take ownership of the wsi_wl_surface */ -@@ -2417,7 +2521,16 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, - chain->queue); - } - -- chain->fifo_ready = true; -+ chain->legacy_fifo_ready = true; -+ struct wsi_wl_display *dpy = chain->wsi_wl_surface->display; -+ if (dpy->commit_queue_manager && -+ dpy->commit_timing_manager) { -+ chain->commit_queue = wp_commit_queue_manager_v1_get_queue_controller(dpy->commit_queue_manager, -+ chain->wsi_wl_surface->surface); -+ chain->commit_timer = wp_commit_timing_manager_v1_get_timer(dpy->commit_timing_manager, -+ chain->wsi_wl_surface->surface); -+ chain->can_timestamp = true; -+ } - - for (uint32_t i = 0; i < chain->base.image_count; i++) { - result = wsi_wl_image_init(chain, &chain->images[i], --- -2.43.0 - diff --git a/common/0003-hack-rip-out-commit-timing-v1.patch b/common/0003-hack-rip-out-commit-timing-v1.patch deleted file mode 100644 index 44f94de..0000000 --- a/common/0003-hack-rip-out-commit-timing-v1.patch +++ /dev/null @@ -1,139 +0,0 @@ -From c1b8ebce704dde66c6ad78e0301afcb7ec1bb379 Mon Sep 17 00:00:00 2001 -From: Simon Ser -Date: Sat, 25 Nov 2023 16:25:58 +0100 -Subject: [PATCH 3/5] hack: rip out commit-timing-v1 - ---- - src/egl/wayland/wayland-drm/meson.build | 2 +- - src/vulkan/wsi/meson.build | 2 +- - src/vulkan/wsi/wsi_common_wayland.c | 23 ++--------------------- - 3 files changed, 4 insertions(+), 23 deletions(-) - -diff --git a/src/egl/wayland/wayland-drm/meson.build b/src/egl/wayland/wayland-drm/meson.build -index 8b6044f09e5..83a63385274 100644 ---- a/src/egl/wayland/wayland-drm/meson.build -+++ b/src/egl/wayland/wayland-drm/meson.build -@@ -60,7 +60,7 @@ libwayland_drm = static_library( - wp_dir = dep_wl_protocols.get_variable(pkgconfig : 'pkgdatadir', internal : 'pkgdatadir') - wp_protos = { - 'commit-queue-v1': 'staging/commit-queue/commit-queue-v1.xml', -- 'commit-timing-v1': 'staging/commit-timing/commit-timing-v1.xml', -+ #'commit-timing-v1': 'staging/commit-timing/commit-timing-v1.xml', - 'linux-dmabuf-unstable-v1': 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', - 'presentation-time': 'stable/presentation-time/presentation-time.xml', - 'tearing-control-v1': 'staging/tearing-control/tearing-control-v1.xml', -diff --git a/src/vulkan/wsi/meson.build b/src/vulkan/wsi/meson.build -index 48ea09b99aa..5caea0e8f4f 100644 ---- a/src/vulkan/wsi/meson.build -+++ b/src/vulkan/wsi/meson.build -@@ -32,7 +32,7 @@ endif - if with_platform_wayland - files_vulkan_wsi += files('wsi_common_wayland.c') - files_vulkan_wsi += wp_files['commit-queue-v1'] -- files_vulkan_wsi += wp_files['commit-timing-v1'] -+ #files_vulkan_wsi += wp_files['commit-timing-v1'] - files_vulkan_wsi += wp_files['linux-dmabuf-unstable-v1'] - files_vulkan_wsi += wp_files['presentation-time'] - files_vulkan_wsi += wp_files['tearing-control-v1'] -diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c -index 28f8f3b5e8f..e06f71e3e83 100644 ---- a/src/vulkan/wsi/wsi_common_wayland.c -+++ b/src/vulkan/wsi/wsi_common_wayland.c -@@ -42,7 +42,6 @@ - #include "wsi_common_entrypoints.h" - #include "wsi_common_private.h" - #include "commit-queue-v1-client-protocol.h" --#include "commit-timing-v1-client-protocol.h" - #include "linux-dmabuf-unstable-v1-client-protocol.h" - #include "presentation-time-client-protocol.h" - #include "tearing-control-v1-client-protocol.h" -@@ -116,7 +115,6 @@ struct wsi_wl_display { - struct wp_presentation *wp_presentation_notwrapped; - - struct wp_commit_queue_manager_v1 *commit_queue_manager; -- struct wp_commit_timing_manager_v1 *commit_timing_manager; - - struct wsi_wayland *wsi_wl; - -@@ -173,7 +171,6 @@ struct wsi_wl_swapchain { - struct wsi_wl_surface *wsi_wl_surface; - struct wp_tearing_control_v1 *tearing_control; - struct wp_commit_queue_v1 *commit_queue; -- struct wp_commit_timer_v1 *commit_timer; - bool can_timestamp; - - struct wl_callback *frame; -@@ -947,9 +944,6 @@ registry_handle_global(void *data, struct wl_registry *registry, - } else if (strcmp(interface, wp_tearing_control_manager_v1_interface.name) == 0) { - display->tearing_control_manager = - wl_registry_bind(registry, name, &wp_tearing_control_manager_v1_interface, 1); -- } else if (strcmp(interface, wp_commit_timing_manager_v1_interface.name) == 0) { -- display->commit_timing_manager = -- wl_registry_bind(registry, name, &wp_commit_timing_manager_v1_interface, 1); - } else if (strcmp(interface, wp_commit_queue_manager_v1_interface.name) == 0) { - display->commit_queue_manager = - wl_registry_bind(registry, name, &wp_commit_queue_manager_v1_interface, 1); -@@ -981,8 +975,6 @@ wsi_wl_display_finish(struct wsi_wl_display *display) - wp_presentation_destroy(display->wp_presentation_notwrapped); - if (display->commit_queue_manager) - wp_commit_queue_manager_v1_destroy(display->commit_queue_manager); -- if (display->commit_timing_manager) -- wp_commit_timing_manager_v1_destroy(display->commit_timing_manager); - if (display->tearing_control_manager) - wp_tearing_control_manager_v1_destroy(display->tearing_control_manager); - if (display->wl_display_wrapper) -@@ -2070,9 +2062,6 @@ set_timestamp(struct wsi_wl_swapchain *chain) - } - - timespec_from_nsec(&target_ts, target); -- wp_commit_timer_v1_set_timestamp(chain->commit_timer, -- target_ts.tv_sec >> 32, target_ts.tv_sec, -- target_ts.tv_nsec); - - wp_commit_queue_v1_set_queue_mode(chain->commit_queue, - WP_COMMIT_QUEUE_V1_QUEUE_MODE_FIFO); -@@ -2088,6 +2077,7 @@ wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain, - struct wsi_wl_swapchain *chain = (struct wsi_wl_swapchain *)wsi_chain; - struct wsi_wl_surface *wsi_wl_surface = chain->wsi_wl_surface; - bool mode_fifo = chain->base.present_mode == VK_PRESENT_MODE_FIFO_KHR; -+ //fprintf(stderr, "FIFO = %d\n", mode_fifo); - - if (chain->buffer_type == WSI_WL_BUFFER_SHM_MEMCPY) { - struct wsi_wl_image *image = &chain->images[image_index]; -@@ -2327,8 +2317,6 @@ wsi_wl_swapchain_chain_free(struct wsi_wl_swapchain *chain, - if (chain->commit_queue) - wp_commit_queue_v1_destroy(chain->commit_queue); - -- if (chain->commit_timer) -- wp_commit_timer_v1_destroy(chain->commit_timer); - - vk_free(pAllocator, (void *)chain->drm_modifiers); - wsi_swapchain_finish(&chain->base); -@@ -2391,10 +2379,6 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, - old_chain->commit_queue = NULL; - old_chain->can_timestamp = false; - } -- if (old_chain->commit_timer) { -- wp_commit_timer_v1_destroy(old_chain->commit_timer); -- old_chain->commit_timer = NULL; -- } - } - - /* Take ownership of the wsi_wl_surface */ -@@ -2523,12 +2507,9 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, - - chain->legacy_fifo_ready = true; - struct wsi_wl_display *dpy = chain->wsi_wl_surface->display; -- if (dpy->commit_queue_manager && -- dpy->commit_timing_manager) { -+ if (dpy->commit_queue_manager) { - chain->commit_queue = wp_commit_queue_manager_v1_get_queue_controller(dpy->commit_queue_manager, - chain->wsi_wl_surface->surface); -- chain->commit_timer = wp_commit_timing_manager_v1_get_timer(dpy->commit_timing_manager, -- chain->wsi_wl_surface->surface); - chain->can_timestamp = true; - } - --- -2.43.0 - diff --git a/common/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch b/common/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch deleted file mode 100644 index 9321635..0000000 --- a/common/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch +++ /dev/null @@ -1,343 +0,0 @@ -From 5a48b862ce1024797c5d96ea78896ee44d5ac7f5 Mon Sep 17 00:00:00 2001 -From: Joshua Ashton -Date: Wed, 29 Nov 2023 11:06:51 +0000 -Subject: [PATCH 4/5] wsi: Use vendored gamescope-commit-queue-v1 protocol - ---- - .../wayland-drm/gamescope-commit-queue-v1.xml | 181 ++++++++++++++++++ - src/egl/wayland/wayland-drm/meson.build | 22 ++- - src/vulkan/wsi/meson.build | 2 +- - src/vulkan/wsi/wsi_common_wayland.c | 22 +-- - 4 files changed, 214 insertions(+), 13 deletions(-) - create mode 100644 src/egl/wayland/wayland-drm/gamescope-commit-queue-v1.xml - -diff --git a/src/egl/wayland/wayland-drm/gamescope-commit-queue-v1.xml b/src/egl/wayland/wayland-drm/gamescope-commit-queue-v1.xml -new file mode 100644 -index 00000000000..d460e0bc10f ---- /dev/null -+++ b/src/egl/wayland/wayland-drm/gamescope-commit-queue-v1.xml -@@ -0,0 +1,181 @@ -+ -+ -+ -+ Copyright © 2023 Valve Corporation -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the "Software"), -+ to deal in the Software without restriction, including without limitation -+ the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ and/or sell copies of the Software, and to permit persons to whom the -+ Software is furnished to do so, subject to the following conditions: -+ -+ The above copyright notice and this permission notice (including the next -+ paragraph) shall be included in all copies or substantial portions of the -+ Software. -+ -+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ DEALINGS IN THE SOFTWARE. -+ -+ -+ -+ -+ By design Wayland uses a "mailbox" style presentation model. Under -+ the mailbox model, when wl_surface.commit is called, the currently -+ pending state is intended to replace the current state immediately. -+ -+ If state is committed many times before the compositor repaints a -+ scene, each commit takes place immediately, updating the existing -+ state. When the compositor repaints the display only the most -+ recent accumulation of state is visible. This may lead to client -+ buffers being released without presentation if they were replaced -+ before being displayed. -+ -+ There are other presentation models such as FIFO (First In First -+ Out) in which state commits are explicitly queued for future -+ repaint intervals, and client buffers should not be released -+ without being displayed. -+ -+ Graphics APIs such as Vulkan aim to support these presentation -+ models, but they are not implementable on top of our mailbox model -+ without the ability to change the default surface state handling -+ behaviour. -+ -+ This interface provides a way to control the compositor's surface -+ state handling to enable presentation models other than mailbox. -+ -+ It does so by exposing control of a compositor surface state queue, -+ and specifying for each call of wl_surface.commit whether the -+ pending state should be handled in a mailbox or a FIFO fashion. -+ -+ Warning! The protocol described in this file is currently in the testing -+ phase. Backward compatible changes may be added together with the -+ corresponding interface version bump. Backward incompatible changes can -+ only be done by creating a new major version of the extension. -+ -+ -+ -+ These fatal protocol errors may be emitted in response to -+ illegal requests. -+ -+ -+ -+ -+ -+ -+ Informs the server that the client will no longer be using -+ this protocol object. Existing objects created by this object -+ are not affected. -+ -+ -+ -+ -+ -+ Establish a queue controller for a surface. -+ -+ Graphics APIs (EGL, Vulkan) will likely use this protocol -+ internally, so clients using them shouldn't directly use this -+ protocol on surfaces managed by those APIs, or a -+ queue_controller_already_exists protocol error will occur. -+ -+ -+ -+ -+ -+ -+ -+ -+ A queue controller for a surface. -+ -+ A wayland compositor may implicitly queue surface state to -+ allow it to pick the most recently ready state at repaint time, -+ or to allow surface state to contain timing information. -+ -+ The commit queue controller object allows explicit control over -+ the queue of upcoming surface state by allowing a client to attach -+ a queue drain mode to pending surface state before it calls -+ wl_surface.commit. -+ -+ -+ -+ -+ These fatal protocol errors may be emitted in response to -+ illegal requests. -+ -+ -+ -+ -+ -+ -+ This enum is used to choose how the compositor processes a queue -+ entry at output repaint time. -+ -+ -+ -+ State from this queue slot may be updated immediately (without -+ completing a repaint) if newer state is ready to display at -+ repaint time. -+ -+ -+ -+ -+ This queue slot will be the last state update for this surface -+ that the compositor will process during the repaint in which -+ it is ready for display. -+ -+ If the compositor is presenting with tearing, the surface state -+ must be made current for an iteration of the compositor's repaint -+ loop. This may result in the state being visible for a very short -+ duration, with visible artifacts, or even not visible at all for -+ surfaces that aren't full screen. -+ -+ The compositor must not cause state processing to stall indefinitely -+ for a surface that is occluded or otherwise not visible. Instead, -+ if the compositor is choosing not to present a surface for reasons -+ unrelated to state readiness, the FIFO condition must be considered -+ satisfied at the moment new state becomes ready to replace the -+ undisplayed state. -+ -+ -+ -+ -+ -+ -+ This request adds a queue drain mode to the pending surface -+ state, which will be commit by the next wl_surface.commit. -+ -+ This request tells the compositor how to process the state -+ from that commit when handling its internal state queue. -+ -+ If the drain mode is "mailbox", the compositor may continue -+ processing the next state in the queue before it repaints -+ the display. -+ -+ If the drain mode is "fifo", the compositor should ensure the -+ queue is not advanced until after this state has been current -+ for a repaint. The queue may be advance without repaint in the -+ case of off-screen or occluded surfaces. -+ -+ The default drain mode when none is specified is "mailbox". -+ -+ -+ -+ -+ -+ -+ Informs the server that the client will no longer be using -+ this protocol object. -+ -+ Surface state changes previously made by this protocol are -+ unaffected by this object's destruction. -+ -+ -+ -+ -diff --git a/src/egl/wayland/wayland-drm/meson.build b/src/egl/wayland/wayland-drm/meson.build -index 83a63385274..caba51b22a7 100644 ---- a/src/egl/wayland/wayland-drm/meson.build -+++ b/src/egl/wayland/wayland-drm/meson.build -@@ -59,7 +59,7 @@ libwayland_drm = static_library( - # here for now as the maybe-least-bad solution. - wp_dir = dep_wl_protocols.get_variable(pkgconfig : 'pkgdatadir', internal : 'pkgdatadir') - wp_protos = { -- 'commit-queue-v1': 'staging/commit-queue/commit-queue-v1.xml', -+ #'commit-queue-v1': 'staging/commit-queue/commit-queue-v1.xml', - #'commit-timing-v1': 'staging/commit-timing/commit-timing-v1.xml', - 'linux-dmabuf-unstable-v1': 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', - 'presentation-time': 'stable/presentation-time/presentation-time.xml', -@@ -81,3 +81,23 @@ foreach name, xml : wp_protos - ) - wp_files += { name: [code, header] } - endforeach -+ -+gamescope_protos = { -+ 'gamescope-commit-queue-v1': 'gamescope-commit-queue-v1.xml', -+} -+foreach name, xml : gamescope_protos -+ code = custom_target( -+ name + '-protocol.c', -+ input : xml, -+ output : name + '-protocol.c', -+ command : [prog_wl_scanner, wl_scanner_arg, '@INPUT@', '@OUTPUT@'], -+ ) -+ header = custom_target( -+ name + '-client-protocol.h', -+ input : xml, -+ output : name + '-client-protocol.h', -+ command : [prog_wl_scanner, 'client-header', '@INPUT@', '@OUTPUT@'], -+ ) -+ wp_files += { name: [code, header] } -+endforeach -+ -diff --git a/src/vulkan/wsi/meson.build b/src/vulkan/wsi/meson.build -index 5caea0e8f4f..d90722be253 100644 ---- a/src/vulkan/wsi/meson.build -+++ b/src/vulkan/wsi/meson.build -@@ -31,7 +31,7 @@ endif - - if with_platform_wayland - files_vulkan_wsi += files('wsi_common_wayland.c') -- files_vulkan_wsi += wp_files['commit-queue-v1'] -+ files_vulkan_wsi += wp_files['gamescope-commit-queue-v1'] - #files_vulkan_wsi += wp_files['commit-timing-v1'] - files_vulkan_wsi += wp_files['linux-dmabuf-unstable-v1'] - files_vulkan_wsi += wp_files['presentation-time'] -diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c -index e06f71e3e83..ac6065cb13c 100644 ---- a/src/vulkan/wsi/wsi_common_wayland.c -+++ b/src/vulkan/wsi/wsi_common_wayland.c -@@ -41,7 +41,7 @@ - #include "vk_util.h" - #include "wsi_common_entrypoints.h" - #include "wsi_common_private.h" --#include "commit-queue-v1-client-protocol.h" -+#include "gamescope-commit-queue-v1-client-protocol.h" - #include "linux-dmabuf-unstable-v1-client-protocol.h" - #include "presentation-time-client-protocol.h" - #include "tearing-control-v1-client-protocol.h" -@@ -114,7 +114,7 @@ struct wsi_wl_display { - /* users want per-chain wsi_wl_swapchain->present_ids.wp_presentation */ - struct wp_presentation *wp_presentation_notwrapped; - -- struct wp_commit_queue_manager_v1 *commit_queue_manager; -+ struct gamescope_commit_queue_manager_v1 *commit_queue_manager; - - struct wsi_wayland *wsi_wl; - -@@ -170,7 +170,7 @@ struct wsi_wl_swapchain { - - struct wsi_wl_surface *wsi_wl_surface; - struct wp_tearing_control_v1 *tearing_control; -- struct wp_commit_queue_v1 *commit_queue; -+ struct gamescope_commit_queue_v1 *commit_queue; - bool can_timestamp; - - struct wl_callback *frame; -@@ -944,9 +944,9 @@ registry_handle_global(void *data, struct wl_registry *registry, - } else if (strcmp(interface, wp_tearing_control_manager_v1_interface.name) == 0) { - display->tearing_control_manager = - wl_registry_bind(registry, name, &wp_tearing_control_manager_v1_interface, 1); -- } else if (strcmp(interface, wp_commit_queue_manager_v1_interface.name) == 0) { -+ } else if (strcmp(interface, gamescope_commit_queue_manager_v1_interface.name) == 0) { - display->commit_queue_manager = -- wl_registry_bind(registry, name, &wp_commit_queue_manager_v1_interface, 1); -+ wl_registry_bind(registry, name, &gamescope_commit_queue_manager_v1_interface, 1); - } - } - -@@ -974,7 +974,7 @@ wsi_wl_display_finish(struct wsi_wl_display *display) - if (display->wp_presentation_notwrapped) - wp_presentation_destroy(display->wp_presentation_notwrapped); - if (display->commit_queue_manager) -- wp_commit_queue_manager_v1_destroy(display->commit_queue_manager); -+ gamescope_commit_queue_manager_v1_destroy(display->commit_queue_manager); - if (display->tearing_control_manager) - wp_tearing_control_manager_v1_destroy(display->tearing_control_manager); - if (display->wl_display_wrapper) -@@ -2063,8 +2063,8 @@ set_timestamp(struct wsi_wl_swapchain *chain) - - timespec_from_nsec(&target_ts, target); - -- wp_commit_queue_v1_set_queue_mode(chain->commit_queue, -- WP_COMMIT_QUEUE_V1_QUEUE_MODE_FIFO); -+ gamescope_commit_queue_v1_set_queue_mode(chain->commit_queue, -+ GAMESCOPE_COMMIT_QUEUE_V1_QUEUE_MODE_FIFO); - chain->last_target_time = target; - } - -@@ -2315,7 +2315,7 @@ wsi_wl_swapchain_chain_free(struct wsi_wl_swapchain *chain, - wl_event_queue_destroy(chain->queue); - - if (chain->commit_queue) -- wp_commit_queue_v1_destroy(chain->commit_queue); -+ gamescope_commit_queue_v1_destroy(chain->commit_queue); - - - vk_free(pAllocator, (void *)chain->drm_modifiers); -@@ -2375,7 +2375,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, - old_chain->tearing_control = NULL; - } - if (old_chain->commit_queue) { -- wp_commit_queue_v1_destroy(old_chain->commit_queue); -+ gamescope_commit_queue_v1_destroy(old_chain->commit_queue); - old_chain->commit_queue = NULL; - old_chain->can_timestamp = false; - } -@@ -2508,7 +2508,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, - chain->legacy_fifo_ready = true; - struct wsi_wl_display *dpy = chain->wsi_wl_surface->display; - if (dpy->commit_queue_manager) { -- chain->commit_queue = wp_commit_queue_manager_v1_get_queue_controller(dpy->commit_queue_manager, -+ chain->commit_queue = gamescope_commit_queue_manager_v1_get_queue_controller(dpy->commit_queue_manager, - chain->wsi_wl_surface->surface); - chain->can_timestamp = true; - } --- -2.43.0 - diff --git a/lib32-mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch b/lib32-mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch new file mode 120000 index 0000000..f2d6b97 --- /dev/null +++ b/lib32-mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch @@ -0,0 +1 @@ +../common/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch \ No newline at end of file diff --git a/lib32-mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch b/lib32-mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch deleted file mode 120000 index a982234..0000000 --- a/lib32-mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch \ No newline at end of file diff --git a/lib32-mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch b/lib32-mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch deleted file mode 120000 index 5057c39..0000000 --- a/lib32-mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch \ No newline at end of file diff --git a/lib32-mesa/0003-hack-rip-out-commit-timing-v1.patch b/lib32-mesa/0003-hack-rip-out-commit-timing-v1.patch deleted file mode 120000 index 3e6a065..0000000 --- a/lib32-mesa/0003-hack-rip-out-commit-timing-v1.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0003-hack-rip-out-commit-timing-v1.patch \ No newline at end of file diff --git a/lib32-mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch b/lib32-mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch deleted file mode 120000 index c6b943b..0000000 --- a/lib32-mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch \ No newline at end of file diff --git a/lib32-mesa/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch b/lib32-mesa/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch deleted file mode 120000 index 98a2611..0000000 --- a/lib32-mesa/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch \ No newline at end of file diff --git a/lib32-mesa/PKGBUILD b/lib32-mesa/PKGBUILD index 4904112..6247a31 100644 --- a/lib32-mesa/PKGBUILD +++ b/lib32-mesa/PKGBUILD @@ -17,7 +17,7 @@ pkgname=( 'lib32-mesa-vdpau' 'lib32-mesa' ) -_mesaver=24.0.7 +_mesaver=24.1.0-rc4 pkgver=${_mesaver//-/.}.chos1 pkgrel=1 epoch=1 @@ -57,6 +57,7 @@ makedepends=( 'lib32-zstd' # shared between mesa and lib32-mesa + 'cbindgen' 'clang' 'cmake' 'elfutils' @@ -77,11 +78,7 @@ options=( source=( https://mesa.freedesktop.org/archive/mesa-${_mesaver}.tar.xz{,.sig} LICENSE - 0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch - 0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch - 0003-hack-rip-out-commit-timing-v1.patch - 0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch - 0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch + 0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch ) validpgpkeys=( '8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D' # Emil Velikov @@ -98,35 +95,30 @@ declare -A _crates=( quote 1.0.33 syn 2.0.39 unicode-ident 1.0.12 + paste 1.0.14 ) for _crate in "${!_crates[@]}"; do source+=($_crate-${_crates[$_crate]}.tar.gz::https://crates.io/api/v1/crates/$_crate/${_crates[$_crate]}/download) done -sha256sums=('7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a' +sha256sums=('57b29989fa446f788b716d5175f6e168a28241f79ccc8b14835d4e491c017294' 'SKIP' '7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537' - 'c8eb8202b9b557df61c98ff1bd9c79652fa9d0cdd2fe13c1426f94102408b698' - '8e4e483f002db7f22ab0ff87d7836b88a21e61ed9c224dd3224074998c13a668' - 'f80cf29bd8acba1a67b2c4a8f0c173e9972a3c84847a8159b6de7b7ff62956c4' - '0041667fcf70058edbce93532ef446806b423d1e591f6db9242f1bd4609b0366' - 'fb795805ae90549af2b0cd856c253124c4fce4e1fff006e9ccbfefc703a682b5' + 'f1343e521907006dc482e619dff5b43db616977febd9ba80af8ef7511da5b6b5' '39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b' '3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b' '5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae' + 'de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c' '23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a') -b2sums=('d9438e533b471445b2403e01e1fd593d83c0013b0991585f718122f1cadc6ac6bb1fb913f0fb257354ae21ddd9fe1f970ad9ac46f05d756c223ed56a11b9c9ce' +b2sums=('66c09358acc3fa27ff74ae71a999777b93d28b0cc0f34f43c36710994b73fdc6f922977ab6062a6b46c34a29a5276896ff2e6393fa12af1312ae5cba1b1deaa3' 'SKIP' '1ecf007b82260710a7bf5048f47dd5d600c168824c02c595af654632326536a6527fbe0738670ee7b921dd85a70425108e0f471ba85a8e1ca47d294ad74b4adb' - 'b439afd5317b14f3107c4b1e8725e680f082ac21c8483494611a62661f0f7ce866f6bed9e40a0362cff9c3f1f3d4dc14036017c26a5d0da4700887aa01679678' - '08b1555de5bd20c7504aacfa5a1d17d25a51fff9b19ac89a650e48705dc2765887acf642f6272044fb9e410401b7530f143086dd33ac4b34b7bacbab74ccc28a' - '666dbecc5487e01d6e2d5bf65ed4358dec9b7e9e078ea9964180c5bc68dd8787e75a7a8067927e2548f421d3d9e286384867f1cf3ad5470cdafd24a047478643' - 'c303e04caf9bbfa3a6052f83902b387c19054579ded493de34aa8d1aa4846b03af9109a8c504d16e33726689cf8d117d3e20ef24f460b27120bcaddb827202a9' - '2a25b3aba09644fc0ca1fdfd2457cd268132323392d10f741433603bf8435e7a5b2cdd003e891b2657ec01eb024249134e002c640fe6858592211a0ea4cf4b27' + 'be2f4cc356e67861b7c47b15132ad3178bfbb206137223cf77691fc5e4d75cb035a3a74cdbfa3766cc2924dfd503417f4758084732215264c715f050f231bcc8' 'fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c' '4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac' '77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848' + '35e8548611c51ee75f4d04926149e5e54870d7073d9b635d550a6fa0f85891f57f326bdbcff3dd8618cf40f8e08cf903ef87d9c034d5921d8b91e1db842cdd7c' '2cff6626624d03f70f1662af45a8644c28a9f92e2dfe38999bef3ba4a4c1ce825ae598277e9cb7abd5585eebfb17b239effc8d0bbf1c6ac196499f0d288e5e01') prepare() { @@ -160,16 +152,17 @@ build() { -D gallium-rusticl=true -D gallium-xa=disabled -D gles1=disabled - -D glvnd=true + -D glvnd=enabled -D glx=dri -D intel-clc=enabled + -D intel-rt=disabled -D libunwind=disabled -D microsoft-clc=disabled -D osmesa=true -D platforms=x11,wayland -D valgrind=disabled -D video-codecs=all - -D vulkan-drivers=amd,intel,intel_hasvk,swrast,nouveau-experimental + -D vulkan-drivers=amd,intel,intel_hasvk,swrast,nouveau -D vulkan-layers=device-select,intel-nullhw,overlay ) diff --git a/mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch b/mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch new file mode 120000 index 0000000..f2d6b97 --- /dev/null +++ b/mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch @@ -0,0 +1 @@ +../common/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch \ No newline at end of file diff --git a/mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch b/mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch deleted file mode 120000 index a982234..0000000 --- a/mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch \ No newline at end of file diff --git a/mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch b/mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch deleted file mode 120000 index 5057c39..0000000 --- a/mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch \ No newline at end of file diff --git a/mesa/0003-hack-rip-out-commit-timing-v1.patch b/mesa/0003-hack-rip-out-commit-timing-v1.patch deleted file mode 120000 index 3e6a065..0000000 --- a/mesa/0003-hack-rip-out-commit-timing-v1.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0003-hack-rip-out-commit-timing-v1.patch \ No newline at end of file diff --git a/mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch b/mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch deleted file mode 120000 index c6b943b..0000000 --- a/mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch \ No newline at end of file diff --git a/mesa/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch b/mesa/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch deleted file mode 120000 index 98a2611..0000000 --- a/mesa/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch +++ /dev/null @@ -1 +0,0 @@ -../common/0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch \ No newline at end of file diff --git a/mesa/PKGBUILD b/mesa/PKGBUILD index 67b9701..5bc6b21 100644 --- a/mesa/PKGBUILD +++ b/mesa/PKGBUILD @@ -17,7 +17,7 @@ pkgname=( 'mesa-vdpau' 'mesa' ) -_mesaver=24.0.7 +_mesaver=24.1.0-rc4 pkgver=${_mesaver//-/.}.chos1 pkgrel=1 epoch=1 @@ -58,6 +58,7 @@ makedepends=( 'zstd' # shared between mesa and lib32-mesa + 'cbindgen' 'clang' 'cmake' 'elfutils' @@ -81,11 +82,7 @@ options=( source=( https://mesa.freedesktop.org/archive/mesa-${_mesaver}.tar.xz{,.sig} LICENSE - 0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch - 0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch - 0003-hack-rip-out-commit-timing-v1.patch - 0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch - 0005-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch + 0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch ) validpgpkeys=( '8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D' # Emil Velikov @@ -102,35 +99,30 @@ declare -A _crates=( quote 1.0.33 syn 2.0.39 unicode-ident 1.0.12 + paste 1.0.14 ) for _crate in "${!_crates[@]}"; do source+=($_crate-${_crates[$_crate]}.tar.gz::https://crates.io/api/v1/crates/$_crate/${_crates[$_crate]}/download) done -sha256sums=('7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a' +sha256sums=('57b29989fa446f788b716d5175f6e168a28241f79ccc8b14835d4e491c017294' 'SKIP' '7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537' - 'c8eb8202b9b557df61c98ff1bd9c79652fa9d0cdd2fe13c1426f94102408b698' - '8e4e483f002db7f22ab0ff87d7836b88a21e61ed9c224dd3224074998c13a668' - 'f80cf29bd8acba1a67b2c4a8f0c173e9972a3c84847a8159b6de7b7ff62956c4' - '0041667fcf70058edbce93532ef446806b423d1e591f6db9242f1bd4609b0366' - 'fb795805ae90549af2b0cd856c253124c4fce4e1fff006e9ccbfefc703a682b5' + 'f1343e521907006dc482e619dff5b43db616977febd9ba80af8ef7511da5b6b5' '39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b' '3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b' '5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae' + 'de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c' '23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a') -b2sums=('d9438e533b471445b2403e01e1fd593d83c0013b0991585f718122f1cadc6ac6bb1fb913f0fb257354ae21ddd9fe1f970ad9ac46f05d756c223ed56a11b9c9ce' +b2sums=('66c09358acc3fa27ff74ae71a999777b93d28b0cc0f34f43c36710994b73fdc6f922977ab6062a6b46c34a29a5276896ff2e6393fa12af1312ae5cba1b1deaa3' 'SKIP' '1ecf007b82260710a7bf5048f47dd5d600c168824c02c595af654632326536a6527fbe0738670ee7b921dd85a70425108e0f471ba85a8e1ca47d294ad74b4adb' - 'b439afd5317b14f3107c4b1e8725e680f082ac21c8483494611a62661f0f7ce866f6bed9e40a0362cff9c3f1f3d4dc14036017c26a5d0da4700887aa01679678' - '08b1555de5bd20c7504aacfa5a1d17d25a51fff9b19ac89a650e48705dc2765887acf642f6272044fb9e410401b7530f143086dd33ac4b34b7bacbab74ccc28a' - '666dbecc5487e01d6e2d5bf65ed4358dec9b7e9e078ea9964180c5bc68dd8787e75a7a8067927e2548f421d3d9e286384867f1cf3ad5470cdafd24a047478643' - 'c303e04caf9bbfa3a6052f83902b387c19054579ded493de34aa8d1aa4846b03af9109a8c504d16e33726689cf8d117d3e20ef24f460b27120bcaddb827202a9' - '2a25b3aba09644fc0ca1fdfd2457cd268132323392d10f741433603bf8435e7a5b2cdd003e891b2657ec01eb024249134e002c640fe6858592211a0ea4cf4b27' + 'be2f4cc356e67861b7c47b15132ad3178bfbb206137223cf77691fc5e4d75cb035a3a74cdbfa3766cc2924dfd503417f4758084732215264c715f050f231bcc8' 'fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c' '4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac' '77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848' + '35e8548611c51ee75f4d04926149e5e54870d7073d9b635d550a6fa0f85891f57f326bdbcff3dd8618cf40f8e08cf903ef87d9c034d5921d8b91e1db842cdd7c' '2cff6626624d03f70f1662af45a8644c28a9f92e2dfe38999bef3ba4a4c1ce825ae598277e9cb7abd5585eebfb17b239effc8d0bbf1c6ac196499f0d288e5e01') prepare() { @@ -163,7 +155,7 @@ build() { -D gallium-rusticl=true -D gallium-xa=disabled -D gles1=disabled - -D glvnd=true + -D glvnd=enabled -D glx=dri -D intel-clc=enabled -D libunwind=disabled @@ -172,7 +164,7 @@ build() { -D platforms=x11,wayland -D valgrind=enabled -D video-codecs=all - -D vulkan-drivers=amd,intel,intel_hasvk,swrast,nouveau-experimental + -D vulkan-drivers=amd,intel,intel_hasvk,swrast,nouveau -D vulkan-layers=device-select,intel-nullhw,overlay ) diff --git a/mesa/src/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch b/mesa/src/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch deleted file mode 120000 index e61bcf4..0000000 --- a/mesa/src/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch +++ /dev/null @@ -1 +0,0 @@ -/home/bouke/Documents/gitprojects/mesa-chimeraos/mesa/0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch \ No newline at end of file diff --git a/mesa/src/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch b/mesa/src/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch deleted file mode 120000 index 8ee2f6f..0000000 --- a/mesa/src/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch +++ /dev/null @@ -1 +0,0 @@ -/home/bouke/Documents/gitprojects/mesa-chimeraos/mesa/0001-vulkan-wsi-wayland-refactor-wayland-dispatch-code.patch \ No newline at end of file diff --git a/mesa/src/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch b/mesa/src/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch deleted file mode 120000 index c16242e..0000000 --- a/mesa/src/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch +++ /dev/null @@ -1 +0,0 @@ -/home/bouke/Documents/gitprojects/mesa-chimeraos/mesa/0002-vulkan-wsi-wayland-Use-commit_timing-commit_queue-pr.patch \ No newline at end of file diff --git a/mesa/src/0003-hack-rip-out-commit-timing-v1.patch b/mesa/src/0003-hack-rip-out-commit-timing-v1.patch deleted file mode 120000 index 3789af1..0000000 --- a/mesa/src/0003-hack-rip-out-commit-timing-v1.patch +++ /dev/null @@ -1 +0,0 @@ -/home/bouke/Documents/gitprojects/mesa-chimeraos/mesa/0003-hack-rip-out-commit-timing-v1.patch \ No newline at end of file diff --git a/mesa/src/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch b/mesa/src/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch deleted file mode 120000 index 3209f0e..0000000 --- a/mesa/src/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch +++ /dev/null @@ -1 +0,0 @@ -/home/bouke/Documents/gitprojects/mesa-chimeraos/mesa/0004-wsi-Use-vendored-gamescope-commit-queue-v1-protocol.patch \ No newline at end of file From 502ee70c1a2a6afb54f556a7b1757e6fa218b30f Mon Sep 17 00:00:00 2001 From: Bouke Sybren Haarsma Date: Mon, 20 May 2024 21:29:35 +0200 Subject: [PATCH 2/3] use zink for NVK --- ...2-Nouveau-load-zink-as-the-GL-driver.patch | 46 +++++++++++++++++++ ...2-Nouveau-load-zink-as-the-GL-driver.patch | 1 + lib32-mesa/PKGBUILD | 5 +- ...2-Nouveau-load-zink-as-the-GL-driver.patch | 1 + mesa/PKGBUILD | 5 +- 5 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 common/0002-Nouveau-load-zink-as-the-GL-driver.patch create mode 120000 lib32-mesa/0002-Nouveau-load-zink-as-the-GL-driver.patch create mode 120000 mesa/0002-Nouveau-load-zink-as-the-GL-driver.patch diff --git a/common/0002-Nouveau-load-zink-as-the-GL-driver.patch b/common/0002-Nouveau-load-zink-as-the-GL-driver.patch new file mode 100644 index 0000000..1a19ff1 --- /dev/null +++ b/common/0002-Nouveau-load-zink-as-the-GL-driver.patch @@ -0,0 +1,46 @@ +From 4c766a2990306d549464a7e7e4bc89109066ecda Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Thu, 16 May 2024 09:59:57 +1000 +Subject: [PATCH] loader/nouveau: load zink as the GL driver for turing and + above. + +If the kernel supports modifiers and the GPU is a Turing+ then +force using zink instead of nvc0. + +I expect there might be some speed bumps to work out here, +but I think we should be close. +--- + src/loader/loader.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/src/loader/loader.c b/src/loader/loader.c +index f76a18d9e3cc1..732de42354602 100644 +--- a/src/loader/loader.c ++++ b/src/loader/loader.c +@@ -147,12 +147,17 @@ nouveau_zink_predicate(int fd, const char *driver) + + bool prefer_zink = false; + +- /* enable this once zink is up to speed. +- * struct drm_nouveau_getparam r = { .param = NOUVEAU_GETPARAM_CHIPSET_ID }; +- * int ret = drmCommandWriteRead(fd, DRM_NOUVEAU_GETPARAM, &r, sizeof(r)); +- * if (ret == 0 && (r.value & ~0xf) >= 0x160) +- * prefer_zink = true; +- */ ++ /* enable this once zink is up to speed. */ ++ struct drm_nouveau_getparam r = { .param = NOUVEAU_GETPARAM_HAS_VMA_TILEMODE }; ++ int ret = drmCommandWriteRead(fd, DRM_NOUVEAU_GETPARAM, &r, sizeof(r)); ++ if (ret == 0 && r.value == 1) { ++ r.param = NOUVEAU_GETPARAM_CHIPSET_ID; ++ r.value = 0; ++ ret = drmCommandWriteRead(fd, DRM_NOUVEAU_GETPARAM, &r, sizeof(r)); ++ if (ret == 0 && (r.value & ~0xf) >= 0x160) { ++ prefer_zink = true; ++ } ++ } + + prefer_zink = debug_get_bool_option("NOUVEAU_USE_ZINK", prefer_zink); + +-- +GitLab + diff --git a/lib32-mesa/0002-Nouveau-load-zink-as-the-GL-driver.patch b/lib32-mesa/0002-Nouveau-load-zink-as-the-GL-driver.patch new file mode 120000 index 0000000..3249005 --- /dev/null +++ b/lib32-mesa/0002-Nouveau-load-zink-as-the-GL-driver.patch @@ -0,0 +1 @@ +../common/0002-Nouveau-load-zink-as-the-GL-driver.patch \ No newline at end of file diff --git a/lib32-mesa/PKGBUILD b/lib32-mesa/PKGBUILD index 6247a31..cfc4029 100644 --- a/lib32-mesa/PKGBUILD +++ b/lib32-mesa/PKGBUILD @@ -18,7 +18,7 @@ pkgname=( 'lib32-mesa' ) _mesaver=24.1.0-rc4 -pkgver=${_mesaver//-/.}.chos1 +pkgver=${_mesaver//-/.}.chos2 pkgrel=1 epoch=1 pkgdesc="Open-source OpenGL drivers - 32-bit" @@ -79,6 +79,7 @@ source=( https://mesa.freedesktop.org/archive/mesa-${_mesaver}.tar.xz{,.sig} LICENSE 0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch + 0002-Nouveau-load-zink-as-the-GL-driver.patch ) validpgpkeys=( '8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D' # Emil Velikov @@ -106,6 +107,7 @@ sha256sums=('57b29989fa446f788b716d5175f6e168a28241f79ccc8b14835d4e491c017294' 'SKIP' '7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537' 'f1343e521907006dc482e619dff5b43db616977febd9ba80af8ef7511da5b6b5' + '1727a770f7d9c1838718a186545ae84fad05e29be18043f8eec46e475842a790' '39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b' '3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b' '5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae' @@ -115,6 +117,7 @@ b2sums=('66c09358acc3fa27ff74ae71a999777b93d28b0cc0f34f43c36710994b73fdc6f922977 'SKIP' '1ecf007b82260710a7bf5048f47dd5d600c168824c02c595af654632326536a6527fbe0738670ee7b921dd85a70425108e0f471ba85a8e1ca47d294ad74b4adb' 'be2f4cc356e67861b7c47b15132ad3178bfbb206137223cf77691fc5e4d75cb035a3a74cdbfa3766cc2924dfd503417f4758084732215264c715f050f231bcc8' + 'bfb6a0ef05abedecc5fc550a8de9c57f2909e0307cec963c913c387a9f037aa88acc588ac3279e5869033ffac7949c5867c96f30763d521659d62047cd58d6d8' 'fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c' '4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac' '77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848' diff --git a/mesa/0002-Nouveau-load-zink-as-the-GL-driver.patch b/mesa/0002-Nouveau-load-zink-as-the-GL-driver.patch new file mode 120000 index 0000000..3249005 --- /dev/null +++ b/mesa/0002-Nouveau-load-zink-as-the-GL-driver.patch @@ -0,0 +1 @@ +../common/0002-Nouveau-load-zink-as-the-GL-driver.patch \ No newline at end of file diff --git a/mesa/PKGBUILD b/mesa/PKGBUILD index 5bc6b21..9e23ec3 100644 --- a/mesa/PKGBUILD +++ b/mesa/PKGBUILD @@ -18,7 +18,7 @@ pkgname=( 'mesa' ) _mesaver=24.1.0-rc4 -pkgver=${_mesaver//-/.}.chos1 +pkgver=${_mesaver//-/.}.chos2 pkgrel=1 epoch=1 pkgdesc="Open-source OpenGL drivers" @@ -83,6 +83,7 @@ source=( https://mesa.freedesktop.org/archive/mesa-${_mesaver}.tar.xz{,.sig} LICENSE 0001-STEAMOS-Dynamic-swapchain-override-for-gamescope-lim.patch + 0002-Nouveau-load-zink-as-the-GL-driver.patch ) validpgpkeys=( '8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D' # Emil Velikov @@ -110,6 +111,7 @@ sha256sums=('57b29989fa446f788b716d5175f6e168a28241f79ccc8b14835d4e491c017294' 'SKIP' '7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537' 'f1343e521907006dc482e619dff5b43db616977febd9ba80af8ef7511da5b6b5' + '1727a770f7d9c1838718a186545ae84fad05e29be18043f8eec46e475842a790' '39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b' '3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b' '5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae' @@ -119,6 +121,7 @@ b2sums=('66c09358acc3fa27ff74ae71a999777b93d28b0cc0f34f43c36710994b73fdc6f922977 'SKIP' '1ecf007b82260710a7bf5048f47dd5d600c168824c02c595af654632326536a6527fbe0738670ee7b921dd85a70425108e0f471ba85a8e1ca47d294ad74b4adb' 'be2f4cc356e67861b7c47b15132ad3178bfbb206137223cf77691fc5e4d75cb035a3a74cdbfa3766cc2924dfd503417f4758084732215264c715f050f231bcc8' + 'bfb6a0ef05abedecc5fc550a8de9c57f2909e0307cec963c913c387a9f037aa88acc588ac3279e5869033ffac7949c5867c96f30763d521659d62047cd58d6d8' 'fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c' '4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac' '77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848' From e90a654473b17f1d53509f4cdd641946c3b71326 Mon Sep 17 00:00:00 2001 From: Bouke Sybren Haarsma Date: Wed, 22 May 2024 21:06:06 +0200 Subject: [PATCH 3/3] mesa-chimeraos 24.1.0-chos1 --- lib32-mesa/PKGBUILD | 8 ++++---- mesa/PKGBUILD | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib32-mesa/PKGBUILD b/lib32-mesa/PKGBUILD index cfc4029..0ebd380 100644 --- a/lib32-mesa/PKGBUILD +++ b/lib32-mesa/PKGBUILD @@ -17,8 +17,8 @@ pkgname=( 'lib32-mesa-vdpau' 'lib32-mesa' ) -_mesaver=24.1.0-rc4 -pkgver=${_mesaver//-/.}.chos2 +_mesaver=24.1.0 +pkgver=${_mesaver//-/.}.chos1 pkgrel=1 epoch=1 pkgdesc="Open-source OpenGL drivers - 32-bit" @@ -103,7 +103,7 @@ for _crate in "${!_crates[@]}"; do source+=($_crate-${_crates[$_crate]}.tar.gz::https://crates.io/api/v1/crates/$_crate/${_crates[$_crate]}/download) done -sha256sums=('57b29989fa446f788b716d5175f6e168a28241f79ccc8b14835d4e491c017294' +sha256sums=('b7eac8c79244806b1c276eeeacc329e4a5b31a370804c4b0c7cd16837783f78b' 'SKIP' '7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537' 'f1343e521907006dc482e619dff5b43db616977febd9ba80af8ef7511da5b6b5' @@ -113,7 +113,7 @@ sha256sums=('57b29989fa446f788b716d5175f6e168a28241f79ccc8b14835d4e491c017294' '5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae' 'de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c' '23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a') -b2sums=('66c09358acc3fa27ff74ae71a999777b93d28b0cc0f34f43c36710994b73fdc6f922977ab6062a6b46c34a29a5276896ff2e6393fa12af1312ae5cba1b1deaa3' +b2sums=('1558d20d426162bfe8cccf96107ddbf1373c8322f87f48daec73e23b283e00f95d6efd073cad9b92065928af4b9b4a339ff2d204412070eca903f77ca366e619' 'SKIP' '1ecf007b82260710a7bf5048f47dd5d600c168824c02c595af654632326536a6527fbe0738670ee7b921dd85a70425108e0f471ba85a8e1ca47d294ad74b4adb' 'be2f4cc356e67861b7c47b15132ad3178bfbb206137223cf77691fc5e4d75cb035a3a74cdbfa3766cc2924dfd503417f4758084732215264c715f050f231bcc8' diff --git a/mesa/PKGBUILD b/mesa/PKGBUILD index 9e23ec3..e1c1387 100644 --- a/mesa/PKGBUILD +++ b/mesa/PKGBUILD @@ -17,8 +17,8 @@ pkgname=( 'mesa-vdpau' 'mesa' ) -_mesaver=24.1.0-rc4 -pkgver=${_mesaver//-/.}.chos2 +_mesaver=24.1.0 +pkgver=${_mesaver//-/.}.chos1 pkgrel=1 epoch=1 pkgdesc="Open-source OpenGL drivers" @@ -107,7 +107,7 @@ for _crate in "${!_crates[@]}"; do source+=($_crate-${_crates[$_crate]}.tar.gz::https://crates.io/api/v1/crates/$_crate/${_crates[$_crate]}/download) done -sha256sums=('57b29989fa446f788b716d5175f6e168a28241f79ccc8b14835d4e491c017294' +sha256sums=('b7eac8c79244806b1c276eeeacc329e4a5b31a370804c4b0c7cd16837783f78b' 'SKIP' '7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537' 'f1343e521907006dc482e619dff5b43db616977febd9ba80af8ef7511da5b6b5' @@ -117,7 +117,7 @@ sha256sums=('57b29989fa446f788b716d5175f6e168a28241f79ccc8b14835d4e491c017294' '5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae' 'de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c' '23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a') -b2sums=('66c09358acc3fa27ff74ae71a999777b93d28b0cc0f34f43c36710994b73fdc6f922977ab6062a6b46c34a29a5276896ff2e6393fa12af1312ae5cba1b1deaa3' +b2sums=('1558d20d426162bfe8cccf96107ddbf1373c8322f87f48daec73e23b283e00f95d6efd073cad9b92065928af4b9b4a339ff2d204412070eca903f77ca366e619' 'SKIP' '1ecf007b82260710a7bf5048f47dd5d600c168824c02c595af654632326536a6527fbe0738670ee7b921dd85a70425108e0f471ba85a8e1ca47d294ad74b4adb' 'be2f4cc356e67861b7c47b15132ad3178bfbb206137223cf77691fc5e4d75cb035a3a74cdbfa3766cc2924dfd503417f4758084732215264c715f050f231bcc8'