diff --git a/flake.nix b/flake.nix index 63aa2d46..aaf72fe2 100644 --- a/flake.nix +++ b/flake.nix @@ -40,7 +40,7 @@ # Keep in sync with CMakeLists.txt monado rev rev = builtins.readFile ./monado-rev; # Nix will output the correct hash when it doesn't match - hash = "sha256-zYvfQmGLRpKEHRih0DPduLRgjSrxeaEGVNEER+OoV0Y="; + hash = "sha256-V0sLap5Y6U2Zu4OYN9/0cunKHOPCXNiLN2aj9R6I8gw="; }; }; diff --git a/monado-rev b/monado-rev index 2f642bed..57cda024 100644 --- a/monado-rev +++ b/monado-rev @@ -1 +1 @@ -105abaa0030167bf2f7fc635efa74698083cb2f8 +6e4b8c097c32884951828d2ebbe41a3b2fe3ccbe diff --git a/patches/monado/0001-c-multi-early-wake-of-compositor.patch b/patches/monado/0001-c-multi-early-wake-of-compositor.patch index 25db3a59..ee810261 100644 --- a/patches/monado/0001-c-multi-early-wake-of-compositor.patch +++ b/patches/monado/0001-c-multi-early-wake-of-compositor.patch @@ -1,7 +1,7 @@ -From 0fba9a2d609d8f7add5981e2148b907a96311429 Mon Sep 17 00:00:00 2001 +From 18e184e504d9f55dbba3f02c87f96410b2ce04ab Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 22 Oct 2024 15:23:19 +0200 -Subject: [PATCH 01/11] c/multi: early wake of compositor +Subject: [PATCH 01/10] c/multi: early wake of compositor --- .../compositor/multi/comp_multi_compositor.c | 14 +++++++++ @@ -51,7 +51,7 @@ index 3351defa4..e8f0c8295 100644 { int64_t predicted_display_time_ns; diff --git a/src/xrt/compositor/multi/comp_multi_system.c b/src/xrt/compositor/multi/comp_multi_system.c -index a0bd04e08..9d7610d02 100644 +index be763d1c1..22c801f65 100644 --- a/src/xrt/compositor/multi/comp_multi_system.c +++ b/src/xrt/compositor/multi/comp_multi_system.c @@ -23,6 +23,8 @@ @@ -93,7 +93,7 @@ index a0bd04e08..9d7610d02 100644 } static void -@@ -526,10 +535,13 @@ multi_main_loop(struct multi_system_compositor *msc) +@@ -527,10 +536,13 @@ multi_main_loop(struct multi_system_compositor *msc) broadcast_timings_to_clients(msc, predicted_display_time_ns); // Now we can wait. @@ -109,7 +109,7 @@ index a0bd04e08..9d7610d02 100644 // Now we know the diff, broadcast to pacers. broadcast_timings_to_pacers(msc, predicted_display_time_ns, predicted_display_period_ns, diff_ns); -@@ -706,6 +718,8 @@ system_compositor_destroy(struct xrt_system_compositor *xsc) +@@ -707,6 +719,8 @@ system_compositor_destroy(struct xrt_system_compositor *xsc) xrt_comp_native_destroy(&msc->xcn); os_mutex_destroy(&msc->list_and_timing_lock); @@ -118,7 +118,7 @@ index a0bd04e08..9d7610d02 100644 free(msc); } -@@ -760,6 +774,8 @@ comp_multi_create_system_compositor(struct xrt_compositor_native *xcn, +@@ -761,6 +775,8 @@ comp_multi_create_system_compositor(struct xrt_compositor_native *xcn, msc->sessions.state = do_warm_start ? MULTI_SYSTEM_STATE_INIT_WARM_START : MULTI_SYSTEM_STATE_STOPPED; os_mutex_init(&msc->list_and_timing_lock); diff --git a/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch b/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch index 1fddb135..ef9c355d 100644 --- a/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch +++ b/patches/monado/0002-ipc-server-Always-listen-to-stdin.patch @@ -1,7 +1,7 @@ -From 1657cd2662ef1560a1e8af792237aba1983837e3 Mon Sep 17 00:00:00 2001 +From b31b5aa4e7e890ae079ae2953a1ce3fc2e47b954 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 2 Apr 2024 17:14:42 +0200 -Subject: [PATCH 02/11] ipc/server: Always listen to stdin +Subject: [PATCH 02/10] ipc/server: Always listen to stdin --- src/xrt/ipc/server/ipc_server_mainloop_linux.c | 2 +- diff --git a/patches/monado/0003-Use-extern-socket-fd.patch b/patches/monado/0003-Use-extern-socket-fd.patch index f47b8a9c..ca626a54 100644 --- a/patches/monado/0003-Use-extern-socket-fd.patch +++ b/patches/monado/0003-Use-extern-socket-fd.patch @@ -1,7 +1,7 @@ -From 7af983bfc40a8757517f5f2874a2f20d2c0d770d Mon Sep 17 00:00:00 2001 +From 46cacda03c5552ffb70601dd89e0abe38e97c1d3 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 8 Oct 2024 22:13:15 +0200 -Subject: [PATCH 03/11] Use extern socket fd +Subject: [PATCH 03/10] Use extern socket fd --- src/xrt/ipc/server/ipc_server_mainloop_linux.c | 8 ++++++++ diff --git a/patches/monado/0004-c-render-Add-storage-usage-to-distortion-mesh.patch b/patches/monado/0004-c-render-Add-storage-usage-to-distortion-mesh.patch index b207d088..ab8399ef 100644 --- a/patches/monado/0004-c-render-Add-storage-usage-to-distortion-mesh.patch +++ b/patches/monado/0004-c-render-Add-storage-usage-to-distortion-mesh.patch @@ -1,7 +1,7 @@ -From 2ad7fb8ce1d73aaac05b2a91293ebaf9ea82bb91 Mon Sep 17 00:00:00 2001 +From 90c3842f38985e0f8f06bb51d0e58cccf437526f Mon Sep 17 00:00:00 2001 From: galister <3123227-galister@users.noreply.gitlab.com> Date: Mon, 19 Aug 2024 18:51:45 +0900 -Subject: [PATCH 04/11] c/render: Add storage usage to distortion mesh +Subject: [PATCH 04/10] c/render: Add storage usage to distortion mesh --- src/xrt/compositor/render/render_distortion.c | 2 +- diff --git a/patches/monado/0005-change-environment-blend-mode-selection-logic.patch b/patches/monado/0005-change-environment-blend-mode-selection-logic.patch index e5d1a223..d06ff96f 100644 --- a/patches/monado/0005-change-environment-blend-mode-selection-logic.patch +++ b/patches/monado/0005-change-environment-blend-mode-selection-logic.patch @@ -1,14 +1,14 @@ -From f6eceed56d41d550e772c928dc8b452592ccc904 Mon Sep 17 00:00:00 2001 +From 9e2288bc85a5be9bb0228a42dc5a9419c4357eb8 Mon Sep 17 00:00:00 2001 From: galister <85970-galister@users.noreply.gitlab.freedesktop.org> Date: Sat, 23 Nov 2024 02:42:12 +0900 -Subject: [PATCH 05/11] change environment blend mode selection logic +Subject: [PATCH 05/10] change environment blend mode selection logic --- src/xrt/compositor/multi/comp_multi_system.c | 26 +++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/xrt/compositor/multi/comp_multi_system.c b/src/xrt/compositor/multi/comp_multi_system.c -index 9d7610d02..f3131e810 100644 +index 22c801f65..1155bc67e 100644 --- a/src/xrt/compositor/multi/comp_multi_system.c +++ b/src/xrt/compositor/multi/comp_multi_system.c @@ -232,23 +232,31 @@ find_active_blend_mode(struct multi_compositor **overlay_sorted_clients, size_t diff --git a/patches/monado/0006-Convert-to-YCbCr-in-Monado.patch b/patches/monado/0006-Convert-to-YCbCr-in-Monado.patch index 2a7127a6..6de3da68 100644 --- a/patches/monado/0006-Convert-to-YCbCr-in-Monado.patch +++ b/patches/monado/0006-Convert-to-YCbCr-in-Monado.patch @@ -1,7 +1,7 @@ -From a2cba2e362287fd7c7ad906ee8d5d8afb7449482 Mon Sep 17 00:00:00 2001 +From 437469e6a4de72ab69719cce92b841e4de19156f Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Wed, 11 Sep 2024 22:56:29 +0200 -Subject: [PATCH 06/11] Convert to YCbCr in Monado +Subject: [PATCH 06/10] Convert to YCbCr in Monado --- src/xrt/compositor/main/comp_renderer.c | 6 +- diff --git a/patches/monado/0007-store-alpha-channel-in-layer-1.patch b/patches/monado/0007-store-alpha-channel-in-layer-1.patch index 1aca5c0d..0782d747 100644 --- a/patches/monado/0007-store-alpha-channel-in-layer-1.patch +++ b/patches/monado/0007-store-alpha-channel-in-layer-1.patch @@ -1,7 +1,7 @@ -From 689cc6eca8ee06f53e10f7a9957a576060591526 Mon Sep 17 00:00:00 2001 +From 5a791919ce1e01f2cb0034e4055bf22767a41121 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sun, 3 Nov 2024 13:40:00 +0100 -Subject: [PATCH 07/11] store alpha channel in layer 1 +Subject: [PATCH 07/10] store alpha channel in layer 1 --- src/xrt/compositor/shaders/clear.comp | 4 ++-- diff --git a/patches/monado/0009-c-main-allow-custom-pacing-app-factory.patch b/patches/monado/0008-c-main-allow-custom-pacing-app-factory.patch similarity index 96% rename from patches/monado/0009-c-main-allow-custom-pacing-app-factory.patch rename to patches/monado/0008-c-main-allow-custom-pacing-app-factory.patch index baa6345a..63607d0d 100644 --- a/patches/monado/0009-c-main-allow-custom-pacing-app-factory.patch +++ b/patches/monado/0008-c-main-allow-custom-pacing-app-factory.patch @@ -1,7 +1,7 @@ -From 46c341566c4763dbc391f184227e7f8018ca0abb Mon Sep 17 00:00:00 2001 +From 877709160be24c4bd504b8d8cd04197cc2bf2b69 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Thu, 27 Feb 2025 22:45:36 +0100 -Subject: [PATCH 09/11] c/main: allow custom pacing app factory +Subject: [PATCH 08/10] c/main: allow custom pacing app factory --- src/xrt/compositor/main/comp_compositor.c | 10 ++++++---- diff --git a/patches/monado/0008-st-oxr-bind-to-dynamic-role-s-profile.patch b/patches/monado/0008-st-oxr-bind-to-dynamic-role-s-profile.patch deleted file mode 100644 index 52a18d0d..00000000 --- a/patches/monado/0008-st-oxr-bind-to-dynamic-role-s-profile.patch +++ /dev/null @@ -1,91 +0,0 @@ -From e5c9a00964c6dca082307338c4064e1f7dcbe010 Mon Sep 17 00:00:00 2001 -From: Patrick Nicolas -Date: Wed, 19 Feb 2025 10:13:36 +0100 -Subject: [PATCH 08/11] st/oxr: bind to dynamic role's profile - ---- - src/xrt/state_trackers/oxr/oxr_binding.c | 8 +++++--- - src/xrt/state_trackers/oxr/oxr_input.c | 19 +++++++++++++------ - src/xrt/state_trackers/oxr/oxr_objects.h | 2 +- - 3 files changed, 19 insertions(+), 10 deletions(-) - -diff --git a/src/xrt/state_trackers/oxr/oxr_binding.c b/src/xrt/state_trackers/oxr/oxr_binding.c -index ce4c0cca1..9645a507a 100644 ---- a/src/xrt/state_trackers/oxr/oxr_binding.c -+++ b/src/xrt/state_trackers/oxr/oxr_binding.c -@@ -453,7 +453,7 @@ get_identifier_str_in_profile(struct oxr_logger *log, - return str; - } - --void -+bool - oxr_get_profile_for_device_name(struct oxr_logger *log, - struct oxr_session *sess, - enum xrt_device_name name, -@@ -465,10 +465,12 @@ oxr_get_profile_for_device_name(struct oxr_logger *log, - */ - for (uint32_t i = 0; i < ARRAY_SIZE(profile_templates); i++) { - if (name == profile_templates[i].name) { -- interaction_profile_find_in_session(log, sess, profile_templates[i].path_cache, out_p); -- return; -+ if (interaction_profile_find_in_session(log, sess, profile_templates[i].path_cache, out_p)) { -+ return true; -+ } - } - } -+ return false; - } - - -diff --git a/src/xrt/state_trackers/oxr/oxr_input.c b/src/xrt/state_trackers/oxr/oxr_input.c -index 3d8da24a9..7bd3e7678 100644 ---- a/src/xrt/state_trackers/oxr/oxr_input.c -+++ b/src/xrt/state_trackers/oxr/oxr_input.c -@@ -800,18 +800,25 @@ oxr_find_profiles_from_roles(struct oxr_logger *log, - { - #define FIND_PROFILE(X) \ - { \ -- struct xrt_device *xdev = GET_XDEV_BY_ROLE(sess->sys, X); \ -- if (xdev != NULL) { \ -- oxr_find_profile_for_device(log, sess, xdev, &out_profiles->X); \ -- } else { \ -- oxr_get_profile_for_device_name(log, sess, GET_PROFILE_NAME_BY_ROLE(sess->sys, X), \ -- &out_profiles->X); \ -+ bool profile_found = false; \ -+ const enum xrt_device_name role_profile_name = GET_PROFILE_NAME_BY_ROLE(sess->sys, X); \ -+ if (role_profile_name != XRT_DEVICE_INVALID) { \ -+ profile_found = \ -+ oxr_get_profile_for_device_name(log, sess, role_profile_name, &out_profiles->X); \ -+ } \ -+ \ -+ if (!profile_found) { \ -+ struct xrt_device *xdev = GET_XDEV_BY_ROLE(sess->sys, X); \ -+ if (xdev != NULL) { \ -+ oxr_find_profile_for_device(log, sess, xdev, &out_profiles->X); \ -+ } \ - } \ - } - OXR_FOR_EACH_VALID_SUBACTION_PATH(FIND_PROFILE) - #undef FIND_PROFILE - } - -+ - /*! - * @public @memberof oxr_action_attachment - */ -diff --git a/src/xrt/state_trackers/oxr/oxr_objects.h b/src/xrt/state_trackers/oxr/oxr_objects.h -index c4d2bcbe3..f9f1ac5a8 100644 ---- a/src/xrt/state_trackers/oxr/oxr_objects.h -+++ b/src/xrt/state_trackers/oxr/oxr_objects.h -@@ -651,7 +651,7 @@ oxr_find_profile_for_device(struct oxr_logger *log, - struct xrt_device *xdev, - struct oxr_interaction_profile **out_p); - --void -+bool - oxr_get_profile_for_device_name(struct oxr_logger *log, - struct oxr_session *sess, - enum xrt_device_name name, --- -2.50.1 - diff --git a/patches/monado/0010-st-oxr-forward-0-refresh-rate.patch b/patches/monado/0009-st-oxr-forward-0-refresh-rate.patch similarity index 83% rename from patches/monado/0010-st-oxr-forward-0-refresh-rate.patch rename to patches/monado/0009-st-oxr-forward-0-refresh-rate.patch index 1b7cdc54..d3c7b63a 100644 --- a/patches/monado/0010-st-oxr-forward-0-refresh-rate.patch +++ b/patches/monado/0009-st-oxr-forward-0-refresh-rate.patch @@ -1,17 +1,17 @@ -From 98858578fdf31a9b4cab6e400bc0b9841f856370 Mon Sep 17 00:00:00 2001 +From 53d8509dff69caccecdc38b443864b1a755486dd Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 15 Mar 2025 22:19:48 +0100 -Subject: [PATCH 10/11] st/oxr: forward 0 refresh rate +Subject: [PATCH 09/10] st/oxr: forward 0 refresh rate --- src/xrt/state_trackers/oxr/oxr_api_session.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/xrt/state_trackers/oxr/oxr_api_session.c b/src/xrt/state_trackers/oxr/oxr_api_session.c -index b3dac8c8a..27d80be9a 100644 +index 9c5889f12..c4cdaf8c3 100644 --- a/src/xrt/state_trackers/oxr/oxr_api_session.c +++ b/src/xrt/state_trackers/oxr/oxr_api_session.c -@@ -645,15 +645,11 @@ oxr_xrRequestDisplayRefreshRateFB(XrSession session, float displayRefreshRate) +@@ -717,15 +717,11 @@ oxr_xrRequestDisplayRefreshRateFB(XrSession session, float displayRefreshRate) OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrRequestDisplayRefreshRateFB"); OXR_VERIFY_SESSION_NOT_LOST(&log, sess); diff --git a/patches/monado/0011-Replace-distortion-with-pixel-aligned-foveation.patch b/patches/monado/0010-Replace-distortion-with-pixel-aligned-foveation.patch similarity index 99% rename from patches/monado/0011-Replace-distortion-with-pixel-aligned-foveation.patch rename to patches/monado/0010-Replace-distortion-with-pixel-aligned-foveation.patch index cdfeaa23..4898d7a2 100644 --- a/patches/monado/0011-Replace-distortion-with-pixel-aligned-foveation.patch +++ b/patches/monado/0010-Replace-distortion-with-pixel-aligned-foveation.patch @@ -1,7 +1,7 @@ -From dffbea9f32efb942d591aa3b1e2a1ac2ca02d204 Mon Sep 17 00:00:00 2001 +From 1bc74f74b613cce9d32c0f4bf16de70ddb7fb482 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Mon, 2 Jun 2025 14:51:11 +0200 -Subject: [PATCH 11/11] Replace distortion with pixel-aligned foveation +Subject: [PATCH 10/10] Replace distortion with pixel-aligned foveation --- src/xrt/compositor/CMakeLists.txt | 2 +-