From 9df93b2cad2f64200c3234c98b0fbee58e37f333 Mon Sep 17 00:00:00 2001 From: Sapphire Date: Tue, 30 Dec 2025 04:37:36 -0600 Subject: [PATCH] Update monado --- flake.nix | 2 +- monado-rev | 2 +- ...001-c-multi-early-wake-of-compositor.patch | 2 +- .../monado/0002-Use-extern-socket-fd.patch | 2 +- ...vironment-blend-mode-selection-logic.patch | 2 +- .../0004-st-oxr-forward-0-refresh-rate.patch | 6 +- ...05-Replace-distortion-with-foveation.patch | 55 ++++++++++--------- ..._lh-prevent-crash-on-vive-pro2-WiVRn.patch | 2 +- ...entDataInteractionProfileChanged-whe.patch | 2 +- ...08-d-solarxr-Fix-flatpak-socket-path.patch | 2 +- ...t-fixed-rate-This-improves-tracking-.patch | 2 +- ...-solarxr-Feed-device-poses-to-server.patch | 2 +- 12 files changed, 43 insertions(+), 38 deletions(-) diff --git a/flake.nix b/flake.nix index 7b99fd08..6b30ea67 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-wiXdMgp3bKW17KqLnSn6HHhz7xbQtjp4c3aU7qp+2BE="; + hash = "sha256-ef9lh3gE2Nz6OC+5ybw2BpVKkwbO0vH0ZS1yQiuDEqM="; }; }; diff --git a/monado-rev b/monado-rev index 0705045e..7c0e8a0a 100644 --- a/monado-rev +++ b/monado-rev @@ -1 +1 @@ -20e0dacbdd2de863923790326beec76e848b056a +80020acea0abf972eb2654ada907dd27ffa79ea3 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 d27bfbbc..4146656d 100644 --- a/patches/monado/0001-c-multi-early-wake-of-compositor.patch +++ b/patches/monado/0001-c-multi-early-wake-of-compositor.patch @@ -1,4 +1,4 @@ -From ffccc272cb6c0f566c862169a846d212ef1358c5 Mon Sep 17 00:00:00 2001 +From 83d65008209889750e74f6349b58456c3e071632 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 22 Oct 2024 15:23:19 +0200 Subject: [PATCH 01/10] c/multi: early wake of compositor diff --git a/patches/monado/0002-Use-extern-socket-fd.patch b/patches/monado/0002-Use-extern-socket-fd.patch index fa210e08..2e71ae94 100644 --- a/patches/monado/0002-Use-extern-socket-fd.patch +++ b/patches/monado/0002-Use-extern-socket-fd.patch @@ -1,4 +1,4 @@ -From 094859d490114d28dbe0f8d2665617b942275ccb Mon Sep 17 00:00:00 2001 +From 4105ab21a6959feddff982e7de080d294e6bf81d Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Tue, 8 Oct 2024 22:13:15 +0200 Subject: [PATCH 02/10] Use extern socket fd diff --git a/patches/monado/0003-change-environment-blend-mode-selection-logic.patch b/patches/monado/0003-change-environment-blend-mode-selection-logic.patch index 8bd264f4..34465c1a 100644 --- a/patches/monado/0003-change-environment-blend-mode-selection-logic.patch +++ b/patches/monado/0003-change-environment-blend-mode-selection-logic.patch @@ -1,4 +1,4 @@ -From 107759c42b200fedba37418a1934f4093eec787d Mon Sep 17 00:00:00 2001 +From be37c604e47882d817d0e68454962c9054a13b41 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 03/10] change environment blend mode selection logic diff --git a/patches/monado/0004-st-oxr-forward-0-refresh-rate.patch b/patches/monado/0004-st-oxr-forward-0-refresh-rate.patch index 84b9f1df..f06e23cd 100644 --- a/patches/monado/0004-st-oxr-forward-0-refresh-rate.patch +++ b/patches/monado/0004-st-oxr-forward-0-refresh-rate.patch @@ -1,4 +1,4 @@ -From bdad4291984a1975e475558e9a0eddc140f05858 Mon Sep 17 00:00:00 2001 +From f6c8ee1b54abf672d0229d7f415a00f652154b0b Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 15 Mar 2025 22:19:48 +0100 Subject: [PATCH 04/10] st/oxr: forward 0 refresh rate @@ -22,10 +22,10 @@ index 41dfe48bc..e29795e42 100644 return result; } diff --git a/src/xrt/state_trackers/oxr/oxr_api_session.c b/src/xrt/state_trackers/oxr/oxr_api_session.c -index be9b4dd77..b0da05aa8 100644 +index f58bdac52..556e12100 100644 --- a/src/xrt/state_trackers/oxr/oxr_api_session.c +++ b/src/xrt/state_trackers/oxr/oxr_api_session.c -@@ -716,15 +716,11 @@ oxr_xrRequestDisplayRefreshRateFB(XrSession session, float displayRefreshRate) +@@ -454,15 +454,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/0005-Replace-distortion-with-foveation.patch b/patches/monado/0005-Replace-distortion-with-foveation.patch index 929e6d0c..a9403ee1 100644 --- a/patches/monado/0005-Replace-distortion-with-foveation.patch +++ b/patches/monado/0005-Replace-distortion-with-foveation.patch @@ -1,38 +1,30 @@ -From 92a26a8fcf88ec231a36ea16aaba51a94b4d134d Mon Sep 17 00:00:00 2001 +From 5a073a6ce945f6076d7b7fdcc1460519e6b454f6 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Wed, 11 Sep 2024 22:56:29 +0200 Subject: [PATCH 05/10] Replace distortion with foveation --- - src/xrt/compositor/CMakeLists.txt | 4 +- + src/xrt/compositor/CMakeLists.txt | 2 +- src/xrt/compositor/main/comp_renderer.c | 6 +- src/xrt/compositor/main/comp_target.h | 3 +- src/xrt/compositor/render/render_compute.c | 410 +++++++----------- src/xrt/compositor/render/render_interface.h | 95 ++-- src/xrt/compositor/render/render_resources.c | 106 ++--- + src/xrt/compositor/shaders/CMakeLists.txt | 2 +- src/xrt/compositor/shaders/clear.comp | 4 +- src/xrt/compositor/shaders/distortion.comp | 182 ++++---- .../compositor/util/comp_high_level_render.c | 6 +- .../compositor/util/comp_high_level_render.h | 9 +- src/xrt/compositor/util/comp_render.h | 11 +- src/xrt/compositor/util/comp_render_cs.c | 112 ++--- - 12 files changed, 356 insertions(+), 592 deletions(-) + 13 files changed, 356 insertions(+), 592 deletions(-) diff --git a/src/xrt/compositor/CMakeLists.txt b/src/xrt/compositor/CMakeLists.txt -index 1ba5ec438..7435a9ce3 100644 +index c09a0ec84..7be732f5f 100644 --- a/src/xrt/compositor/CMakeLists.txt +++ b/src/xrt/compositor/CMakeLists.txt @@ -105,7 +105,7 @@ if(XRT_HAVE_VULKAN) - spirv_shaders( - SHADER_HEADERS - SPIRV_VERSION -- 1.0 # Currently targeting Vulkan 1.0 -+ 1.6 # Currently targeting Vulkan 1.3 - SOURCES - ${SHADERS} - ) -@@ -115,7 +115,7 @@ if(XRT_HAVE_VULKAN) - ${SHADER_HEADERS} + comp_render STATIC render/render_buffer.c render/render_compute.c - render/render_distortion.c @@ -655,10 +647,10 @@ index 62d7138b9..44c3f0aee 100644 .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .image = target_image, diff --git a/src/xrt/compositor/render/render_interface.h b/src/xrt/compositor/render/render_interface.h -index 9b9c8efa8..1aeab7693 100644 +index 8ca26704a..b7d1d96a8 100644 --- a/src/xrt/compositor/render/render_interface.h +++ b/src/xrt/compositor/render/render_interface.h -@@ -80,12 +80,8 @@ extern "C" { +@@ -82,12 +82,8 @@ extern "C" { #define RENDER_MAX_LAYER_RUNS_SIZE (XRT_MAX_VIEWS) #define RENDER_MAX_LAYER_RUNS_COUNT(RENDER_RESOURCES) (RENDER_RESOURCES->view_count) @@ -673,7 +665,7 @@ index 9b9c8efa8..1aeab7693 100644 //! The binding that the layer projection and quad shader have their UBO on. #define RENDER_BINDING_LAYER_SHARED_UBO 0 -@@ -118,12 +114,6 @@ extern "C" { +@@ -120,12 +116,6 @@ extern "C" { uint32_t render_max_layers_capable(const struct vk_bundle *vk, bool use_compute, uint32_t desired_max_layers); @@ -686,7 +678,7 @@ index 9b9c8efa8..1aeab7693 100644 /*! * Calculates a timewarp matrix which takes in NDC coords and gives out results * in [-1, 1] space that needs a perspective divide. -@@ -511,7 +501,8 @@ struct render_resources +@@ -465,7 +455,8 @@ struct render_resources uint32_t distortion_binding; //! Writing the image out too. @@ -696,7 +688,7 @@ index 9b9c8efa8..1aeab7693 100644 //! Uniform data binding. uint32_t ubo_binding; -@@ -548,9 +539,6 @@ struct render_resources +@@ -502,9 +493,6 @@ struct render_resources //! Doesn't depend on target so is static. VkPipeline pipeline; @@ -706,7 +698,7 @@ index 9b9c8efa8..1aeab7693 100644 //! Target info. struct render_buffer ubo; } distortion; -@@ -572,17 +560,11 @@ struct render_resources +@@ -526,17 +514,11 @@ struct render_resources //! Transform to go from UV to tangle angles. struct xrt_normalized_rect uv_to_tanangle[XRT_MAX_VIEWS]; @@ -728,7 +720,7 @@ index 9b9c8efa8..1aeab7693 100644 } distortion; }; -@@ -1300,6 +1282,7 @@ struct render_compute_layer_ubo_data +@@ -1254,6 +1236,7 @@ struct render_compute_layer_ubo_data //! Timewarp matrices struct xrt_matrix_4x4 transforms_timewarp[RENDER_MAX_LAYERS]; @@ -736,7 +728,7 @@ index 9b9c8efa8..1aeab7693 100644 /*! * For quad layers */ -@@ -1339,6 +1322,14 @@ struct render_compute_distortion_ubo_data +@@ -1293,6 +1276,14 @@ struct render_compute_distortion_ubo_data struct xrt_matrix_4x4 transform_timewarp_scanout_end[XRT_MAX_VIEWS]; }; @@ -751,7 +743,7 @@ index 9b9c8efa8..1aeab7693 100644 /*! * Init struct and create resources needed for compute rendering. * -@@ -1392,7 +1383,8 @@ render_compute_layers(struct render_compute *render, +@@ -1346,7 +1337,8 @@ render_compute_layers(struct render_compute *render, VkSampler src_samplers[RENDER_MAX_IMAGES_SIZE], VkImageView src_image_views[RENDER_MAX_IMAGES_SIZE], uint32_t num_srcs, @@ -761,7 +753,7 @@ index 9b9c8efa8..1aeab7693 100644 const struct render_viewport_data *view, bool timewarp); -@@ -1400,44 +1392,14 @@ render_compute_layers(struct render_compute *render, +@@ -1354,44 +1346,14 @@ render_compute_layers(struct render_compute *render, * @public @memberof render_compute */ void @@ -814,7 +806,7 @@ index 9b9c8efa8..1aeab7693 100644 /*! * @public @memberof render_compute -@@ -1445,7 +1407,8 @@ render_compute_projection_no_timewarp(struct render_compute *render, +@@ -1399,7 +1361,8 @@ render_compute_projection_no_timewarp(struct render_compute *render, void render_compute_clear(struct render_compute *render, VkImage target_image, @@ -1073,6 +1065,19 @@ index d28caaed8..5232a774d 100644 D(PipelineLayout, r->compute.distortion.pipeline_layout); D(Pipeline, r->compute.clear.pipeline); +diff --git a/src/xrt/compositor/shaders/CMakeLists.txt b/src/xrt/compositor/shaders/CMakeLists.txt +index d8aca97e2..ffc79ca6e 100644 +--- a/src/xrt/compositor/shaders/CMakeLists.txt ++++ b/src/xrt/compositor/shaders/CMakeLists.txt +@@ -25,7 +25,7 @@ set(SHADERS + spirv_shaders( + SHADER_HEADERS + SPIRV_VERSION +- 1.0 # Currently targeting Vulkan 1.0 ++ 1.6 # Currently targeting Vulkan 1.6 + SOURCES + ${SHADERS} + ) diff --git a/src/xrt/compositor/shaders/clear.comp b/src/xrt/compositor/shaders/clear.comp index 1f0e732b8..e02307415 100644 --- a/src/xrt/compositor/shaders/clear.comp diff --git a/patches/monado/0006-d-steamvr_lh-prevent-crash-on-vive-pro2-WiVRn.patch b/patches/monado/0006-d-steamvr_lh-prevent-crash-on-vive-pro2-WiVRn.patch index c61a2a02..331c319a 100644 --- a/patches/monado/0006-d-steamvr_lh-prevent-crash-on-vive-pro2-WiVRn.patch +++ b/patches/monado/0006-d-steamvr_lh-prevent-crash-on-vive-pro2-WiVRn.patch @@ -1,4 +1,4 @@ -From 1ccefbfc699c2b60f5a7b6eaa256930372bf0b6d Mon Sep 17 00:00:00 2001 +From deffe71448c6e2ec16e788b47ac8f10dd3967f08 Mon Sep 17 00:00:00 2001 From: no name Date: Sun, 28 Sep 2025 11:33:10 +0200 Subject: [PATCH 06/10] d/steamvr_lh: prevent crash on vive pro2/WiVRn diff --git a/patches/monado/0007-st-oxr-push-XrEventDataInteractionProfileChanged-whe.patch b/patches/monado/0007-st-oxr-push-XrEventDataInteractionProfileChanged-whe.patch index 7b5404a1..f99fc95b 100644 --- a/patches/monado/0007-st-oxr-push-XrEventDataInteractionProfileChanged-whe.patch +++ b/patches/monado/0007-st-oxr-push-XrEventDataInteractionProfileChanged-whe.patch @@ -1,4 +1,4 @@ -From 7e8179f0d0347518804df1931b066981f3c0a90d Mon Sep 17 00:00:00 2001 +From a051dccd215b12b5ffde902e7f6cc5b180d5935e Mon Sep 17 00:00:00 2001 From: Sapphire Date: Fri, 7 Nov 2025 20:41:16 -0600 Subject: [PATCH 07/10] st/oxr: push XrEventDataInteractionProfileChanged when diff --git a/patches/monado/0008-d-solarxr-Fix-flatpak-socket-path.patch b/patches/monado/0008-d-solarxr-Fix-flatpak-socket-path.patch index 04e880c9..f946f998 100644 --- a/patches/monado/0008-d-solarxr-Fix-flatpak-socket-path.patch +++ b/patches/monado/0008-d-solarxr-Fix-flatpak-socket-path.patch @@ -1,4 +1,4 @@ -From 604495bce0665ba1050574582809c67bf6751c7b Mon Sep 17 00:00:00 2001 +From 020b721170785ec13e4cdbba86e6f95d706182c5 Mon Sep 17 00:00:00 2001 From: rcelyte Date: Mon, 8 Dec 2025 19:29:28 +0000 Subject: [PATCH 08/10] d/solarxr: Fix flatpak socket path diff --git a/patches/monado/0009-d-solarxr-Sync-at-fixed-rate-This-improves-tracking-.patch b/patches/monado/0009-d-solarxr-Sync-at-fixed-rate-This-improves-tracking-.patch index 743036a5..859f3b05 100644 --- a/patches/monado/0009-d-solarxr-Sync-at-fixed-rate-This-improves-tracking-.patch +++ b/patches/monado/0009-d-solarxr-Sync-at-fixed-rate-This-improves-tracking-.patch @@ -1,4 +1,4 @@ -From c6f7cb6a737c849aa2b33c40b5f5380794578db4 Mon Sep 17 00:00:00 2001 +From 25ac2d441625293200ab496bd8a87695fd3ab40c Mon Sep 17 00:00:00 2001 From: rcelyte Date: Fri, 14 Nov 2025 19:48:59 +0000 Subject: [PATCH 09/10] d/solarxr: Sync at fixed rate This improves tracking diff --git a/patches/monado/0010-d-solarxr-Feed-device-poses-to-server.patch b/patches/monado/0010-d-solarxr-Feed-device-poses-to-server.patch index 00d9e218..591bbd1b 100644 --- a/patches/monado/0010-d-solarxr-Feed-device-poses-to-server.patch +++ b/patches/monado/0010-d-solarxr-Feed-device-poses-to-server.patch @@ -1,4 +1,4 @@ -From 9041dad492652ed1173cb381ee4da9b16b1a96f8 Mon Sep 17 00:00:00 2001 +From 3f58b0cc00057ecd69ce7aa19d98f4535e256da5 Mon Sep 17 00:00:00 2001 From: rcelyte Date: Mon, 15 Sep 2025 22:46:15 +0000 Subject: [PATCH 10/10] d/solarxr: Feed device poses to server