diff --git a/flake.nix b/flake.nix index 9b1b8f5c..1c9219c3 100644 --- a/flake.nix +++ b/flake.nix @@ -58,7 +58,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-CFrCzZaJNjiJ+gaHtmvlTStYFAKq1zdUowH5t7yaX04="; + hash = "sha256-HLPj4H7y0lphLHq5pZ608QvSRr5YDPvH2KVvhTTGC0Q="; }; }; diff --git a/monado-rev b/monado-rev index 84ba5bdc..8b849bc0 100644 --- a/monado-rev +++ b/monado-rev @@ -1 +1 @@ -4d8d91a4b05dff9c5c150404f1a393fd7c77fe48 +c7a5451db264fed72d9a781067cffaf9e8e77e35 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 d13bc098..e4c76e28 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 84758f77a11a31e144d2120a465a954287eb0f67 Mon Sep 17 00:00:00 2001 +From d91cd28e85d3b0e774c467de686eb0cfeeedb41c Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 22 Oct 2024 15:23:19 +0200 -Subject: [PATCH 1/7] c/multi: early wake of compositor +Subject: [PATCH 1/8] 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 be763d1c1..22c801f65 100644 +index cf8e2e525..94413b090 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 be763d1c1..22c801f65 100644 } static void -@@ -527,10 +536,13 @@ multi_main_loop(struct multi_system_compositor *msc) +@@ -528,10 +537,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 be763d1c1..22c801f65 100644 // Now we know the diff, broadcast to pacers. broadcast_timings_to_pacers(msc, predicted_display_time_ns, predicted_display_period_ns, diff_ns); -@@ -707,6 +719,8 @@ system_compositor_destroy(struct xrt_system_compositor *xsc) +@@ -708,6 +720,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 be763d1c1..22c801f65 100644 free(msc); } -@@ -761,6 +775,8 @@ comp_multi_create_system_compositor(struct xrt_compositor_native *xcn, +@@ -762,6 +776,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 e8d6e001..66282224 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 b73d7a32daa626ae401543e1c3ed8fd8d8290f8d Mon Sep 17 00:00:00 2001 +From ff256f4d1758a442fe388dc20248d85f89dd7601 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 2 Apr 2024 17:14:42 +0200 -Subject: [PATCH 2/7] ipc/server: Always listen to stdin +Subject: [PATCH 2/8] 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 ff7baad0..cd1d02d1 100644 --- a/patches/monado/0003-Use-extern-socket-fd.patch +++ b/patches/monado/0003-Use-extern-socket-fd.patch @@ -1,7 +1,7 @@ -From a85beae795aba8f82abab849e9e5c2ce74511357 Mon Sep 17 00:00:00 2001 +From 7b053e42fa6e7ae65d6fc8109b068ccbe1ec7de3 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 8 Oct 2024 22:13:15 +0200 -Subject: [PATCH 3/7] Use extern socket fd +Subject: [PATCH 3/8] Use extern socket fd --- src/xrt/ipc/server/ipc_server_mainloop_linux.c | 8 ++++++++ diff --git a/patches/monado/0004-change-environment-blend-mode-selection-logic.patch b/patches/monado/0004-change-environment-blend-mode-selection-logic.patch index 959f1639..d996f10e 100644 --- a/patches/monado/0004-change-environment-blend-mode-selection-logic.patch +++ b/patches/monado/0004-change-environment-blend-mode-selection-logic.patch @@ -1,14 +1,14 @@ -From f472a02f86bd98e0cb88847fd8c9104bbd5c74f5 Mon Sep 17 00:00:00 2001 +From 5a9d5a831c7f8fb2b195221357c081e8fbbe4f9a 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 4/7] change environment blend mode selection logic +Subject: [PATCH 4/8] 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 22c801f65..1155bc67e 100644 +index 94413b090..0d958c3af 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/0005-st-oxr-forward-0-refresh-rate.patch b/patches/monado/0005-st-oxr-forward-0-refresh-rate.patch index 11da7918..49bfe39f 100644 --- a/patches/monado/0005-st-oxr-forward-0-refresh-rate.patch +++ b/patches/monado/0005-st-oxr-forward-0-refresh-rate.patch @@ -1,7 +1,7 @@ -From 7c01c47b2a1c4da040e0d25f4b9cb760ae88aa25 Mon Sep 17 00:00:00 2001 +From 7793b48c6aa745309d9f0de02966a9f560787fdc Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 15 Mar 2025 22:19:48 +0100 -Subject: [PATCH 5/7] st/oxr: forward 0 refresh rate +Subject: [PATCH 5/8] st/oxr: forward 0 refresh rate --- src/xrt/state_trackers/oxr/oxr_api_session.c | 6 +----- diff --git a/patches/monado/0006-Replace-distortion-with-foveation.patch b/patches/monado/0006-Replace-distortion-with-foveation.patch index 9039fe7f..454cfb65 100644 --- a/patches/monado/0006-Replace-distortion-with-foveation.patch +++ b/patches/monado/0006-Replace-distortion-with-foveation.patch @@ -1,11 +1,11 @@ -From 240edeee8136b72b0c108b39f9eb032138683a46 Mon Sep 17 00:00:00 2001 +From 95028abb771e09f7325b27a217e3bb66cf8f88e5 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Wed, 11 Sep 2024 22:56:29 +0200 -Subject: [PATCH 6/7] Replace distortion with foveation +Subject: [PATCH 6/8] Replace distortion with foveation --- src/xrt/compositor/CMakeLists.txt | 4 +- - src/xrt/compositor/main/comp_renderer.c | 6 +- + src/xrt/compositor/main/comp_renderer.c | 17 +- src/xrt/compositor/main/comp_target.h | 3 +- src/xrt/compositor/render/render_compute.c | 267 +++++------------- src/xrt/compositor/render/render_interface.h | 48 ++-- @@ -16,7 +16,7 @@ Subject: [PATCH 6/7] Replace distortion with foveation .../compositor/util/comp_high_level_render.h | 9 +- src/xrt/compositor/util/comp_render.h | 11 +- src/xrt/compositor/util/comp_render_cs.c | 44 ++- - 12 files changed, 245 insertions(+), 432 deletions(-) + 12 files changed, 247 insertions(+), 441 deletions(-) diff --git a/src/xrt/compositor/CMakeLists.txt b/src/xrt/compositor/CMakeLists.txt index 1ba5ec438..eb068f5fc 100644 @@ -41,10 +41,25 @@ index 1ba5ec438..eb068f5fc 100644 render/render_interface.h render/render_resources.c diff --git a/src/xrt/compositor/main/comp_renderer.c b/src/xrt/compositor/main/comp_renderer.c -index e45d33e22..d2518585c 100644 +index e05e2d263..755e39d8c 100644 --- a/src/xrt/compositor/main/comp_renderer.c +++ b/src/xrt/compositor/main/comp_renderer.c -@@ -936,7 +936,8 @@ dispatch_compute(struct comp_renderer *r, +@@ -275,14 +275,6 @@ calc_pose_data(struct comp_renderer *r, + return false; + } + +- // Check if pose is valid (has valid position and orientation) +- bool pose_valid = (head_relation.relation_flags & XRT_SPACE_RELATION_POSITION_VALID_BIT) && +- (head_relation.relation_flags & XRT_SPACE_RELATION_ORIENTATION_VALID_BIT); +- +- if (!pose_valid) { +- return false; +- } +- + struct xrt_fov dist_fov[XRT_MAX_VIEWS] = XRT_STRUCT_INIT; + for (uint32_t i = 0; i < view_count; i++) { + dist_fov[i] = r->c->xdev->hmd->distortion.fov[i]; +@@ -952,7 +944,8 @@ dispatch_compute(struct comp_renderer *r, // Target Vulkan resources.. VkImage target_image = r->c->target->images[r->acquired_buffer].handle; @@ -54,16 +69,26 @@ index e45d33e22..d2518585c 100644 // Target view information. struct render_viewport_data target_viewport_datas[XRT_MAX_VIEWS]; -@@ -952,7 +953,8 @@ dispatch_compute(struct comp_renderer *r, - eye_poses, // - fovs, // - target_image, // -- target_storage_view, // -+ target_storage_view_y, // -+ target_storage_view_cbcr, // - target_viewport_datas); // +@@ -960,7 +953,8 @@ dispatch_compute(struct comp_renderer *r, + + // Show clear shader when pose is invalid, otherwise normal rendering + if (!pose_valid) { +- render_compute_clear(render, target_image, target_storage_view, target_viewport_datas); ++ render_compute_clear(render, target_image, target_storage_view_y, target_storage_view_cbcr, ++ target_viewport_datas); + } else { + chl_frame_state_cs_default_pipeline( // + frame_state, // +@@ -971,7 +965,8 @@ dispatch_compute(struct comp_renderer *r, + eye_poses, // + fovs, // + target_image, // +- target_storage_view, // ++ target_storage_view_y, // ++ target_storage_view_cbcr, // + target_viewport_datas); // + } - // Everything is ready, submit to the queue. diff --git a/src/xrt/compositor/main/comp_target.h b/src/xrt/compositor/main/comp_target.h index 2122f46e7..53dcd631b 100644 --- a/src/xrt/compositor/main/comp_target.h @@ -623,7 +648,7 @@ index d5d2bc4cb..d74ec78dd 100644 diff --git a/src/xrt/compositor/render/render_resources.c b/src/xrt/compositor/render/render_resources.c -index ccc6f10cf..7d4d9cddb 100644 +index 6e8cece0d..95cd86b37 100644 --- a/src/xrt/compositor/render/render_resources.c +++ b/src/xrt/compositor/render/render_resources.c @@ -184,14 +184,15 @@ init_mesh_ubo_buffers(struct vk_bundle *vk, struct render_buffer ubo[XRT_MAX_VIE diff --git a/patches/monado/0007-Limit-foveation-samples-per-pixel.patch b/patches/monado/0007-Limit-foveation-samples-per-pixel.patch index 38741648..dadb8255 100644 --- a/patches/monado/0007-Limit-foveation-samples-per-pixel.patch +++ b/patches/monado/0007-Limit-foveation-samples-per-pixel.patch @@ -1,7 +1,7 @@ -From db19f48adcc6e9395bf93a920623b48b86a9f378 Mon Sep 17 00:00:00 2001 +From a480e5963d05a159902efb5309af468d90e50bc5 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sun, 31 Aug 2025 17:05:49 +0200 -Subject: [PATCH 7/7] Limit foveation samples per pixel +Subject: [PATCH 7/8] Limit foveation samples per pixel --- src/xrt/compositor/shaders/distortion.comp | 12 +++++++++--- diff --git a/patches/monado/2467.patch b/patches/monado/0008-ipc-Add-callbacks-and-unify-main-functions.patch similarity index 94% rename from patches/monado/2467.patch rename to patches/monado/0008-ipc-Add-callbacks-and-unify-main-functions.patch index 56ab7492..c6e5e161 100644 --- a/patches/monado/2467.patch +++ b/patches/monado/0008-ipc-Add-callbacks-and-unify-main-functions.patch @@ -1,7 +1,7 @@ -From 36c63e58e4d54c31872b95fdc7fb431c8cfc57ab Mon Sep 17 00:00:00 2001 +From bfda435bdd7e1916bbeda31594b1e6fdca0caf5a Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 15 Nov 2024 22:51:32 +0000 -Subject: [PATCH] ipc: Add callbacks and unify main functions +Subject: [PATCH 8/8] ipc: Add callbacks and unify main functions --- src/xrt/ipc/server/ipc_server_interface.h | 58 +++++++++---- @@ -10,7 +10,7 @@ Subject: [PATCH] ipc: Add callbacks and unify main functions 3 files changed, 118 insertions(+), 62 deletions(-) diff --git a/src/xrt/ipc/server/ipc_server_interface.h b/src/xrt/ipc/server/ipc_server_interface.h -index b870a52c8c..1b44af8a82 100644 +index b870a52c8..1b44af8a8 100644 --- a/src/xrt/ipc/server/ipc_server_interface.h +++ b/src/xrt/ipc/server/ipc_server_interface.h @@ -10,12 +10,10 @@ @@ -108,10 +108,10 @@ index b870a52c8c..1b44af8a82 100644 #endif diff --git a/src/xrt/ipc/server/ipc_server_process.c b/src/xrt/ipc/server/ipc_server_process.c -index f972d6835a..32bad0ec56 100644 +index 791a655d6..554de713b 100644 --- a/src/xrt/ipc/server/ipc_server_process.c +++ b/src/xrt/ipc/server/ipc_server_process.c -@@ -972,9 +972,10 @@ ipc_server_get_system_properties(struct ipc_server *vs, struct xrt_system_proper +@@ -978,9 +978,10 @@ ipc_server_get_system_properties(struct ipc_server *vs, struct xrt_system_proper return XRT_SUCCESS; } @@ -124,7 +124,7 @@ index f972d6835a..32bad0ec56 100644 { xrt_result_t xret = XRT_SUCCESS; int ret = -1; -@@ -1002,11 +1003,8 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi) +@@ -1008,11 +1009,8 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi) xret = init_all(s, log_level); U_LOG_CHK_ONLY_PRINT(log_level, xret, "init_all"); if (xret != XRT_SUCCESS) { @@ -138,7 +138,7 @@ index f972d6835a..32bad0ec56 100644 u_debug_gui_stop(&s->debug_gui); free(s); return -1; -@@ -1015,13 +1013,15 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi) +@@ -1021,13 +1019,15 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi) // Start the debug UI now (if enabled). u_debug_gui_start(s->debug_gui, s->xinst, s->xsysd); @@ -158,7 +158,7 @@ index f972d6835a..32bad0ec56 100644 // Stop the UI before tearing everything down. u_debug_gui_stop(&s->debug_gui); -@@ -1038,39 +1038,43 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi) +@@ -1044,39 +1044,43 @@ ipc_server_main(int argc, char **argv, const struct ipc_server_main_info *ismi) return ret; } @@ -232,7 +232,7 @@ index f972d6835a..32bad0ec56 100644 + +#endif // !XRT_OS_ANDROID diff --git a/src/xrt/targets/service-lib/service_target.cpp b/src/xrt/targets/service-lib/service_target.cpp -index 45877803d3..71c581da6b 100644 +index 45877803d..71c581da6 100644 --- a/src/xrt/targets/service-lib/service_target.cpp +++ b/src/xrt/targets/service-lib/service_target.cpp @@ -1,4 +1,5 @@ @@ -308,5 +308,5 @@ index 45877803d3..71c581da6b 100644 struct ipc_server *server = NULL; -- -GitLab +2.51.0