Update Monado

This commit is contained in:
Patrick Nicolas
2024-12-31 10:56:39 +01:00
parent 2f3a2bdb3b
commit a996fb4f2c
11 changed files with 69 additions and 62 deletions
+1 -1
View File
@@ -253,7 +253,7 @@ file(GLOB MONADO_PATCHES CONFIGURE_DEPENDS patches/monado/*)
FetchContent_Declare(monado
GIT_REPOSITORY https://gitlab.freedesktop.org/monado/monado
# The flatpak manifest is updated automatically
GIT_TAG aa2b0f9f1d638becd6bb9ca3c357ac2561a36b07
GIT_TAG 823047e2db15675e749cff1c2b53e4aab7683e7a
PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patches/apply.sh ${MONADO_PATCHES}
EXCLUDE_FROM_ALL
)
@@ -1,7 +1,7 @@
From 6df06ef6468d56450de452d708e678f77b67349f Mon Sep 17 00:00:00 2001
From e6a974c82fd7787dda3472eebccbf12452c644e8 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Tue, 22 Oct 2024 15:23:19 +0200
Subject: [PATCH 1/8] c/multi: early wake of compositor
Subject: [PATCH 01/10] c/multi: early wake of compositor
---
src/xrt/compositor/multi/comp_multi_compositor.c | 15 +++++++++++++++
@@ -89,5 +89,5 @@ index b06b03a58..cf58fd0da 100644
}
--
2.47.0
2.47.1
@@ -1,17 +1,17 @@
From 289034b4c0721f348da99be047cf0e842e2dd2c9 Mon Sep 17 00:00:00 2001
From f1713b0996c609444d4c316caf70590ca2b8c174 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Tue, 2 Apr 2024 17:14:42 +0200
Subject: [PATCH 2/2] 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 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xrt/ipc/server/ipc_server_mainloop_linux.c b/src/xrt/ipc/server/ipc_server_mainloop_linux.c
index 97f1d2ca7..01552a8fe 100644
index d364fbed3..ad6b473b7 100644
--- a/src/xrt/ipc/server/ipc_server_mainloop_linux.c
+++ b/src/xrt/ipc/server/ipc_server_mainloop_linux.c
@@ -187,7 +187,7 @@ init_epoll(struct ipc_server_mainloop *ml)
@@ -186,7 +186,7 @@ init_epoll(struct ipc_server_mainloop *ml)
struct epoll_event ev = {0};
@@ -21,5 +21,5 @@ index 97f1d2ca7..01552a8fe 100644
// default.
// This polls stdin.
--
2.44.0
2.47.1
@@ -1,7 +1,7 @@
From d587f4215cbdfebef6de7537338a889c082b3f64 Mon Sep 17 00:00:00 2001
From 55b9291bc261a2b7ecd8ac757a81b28fd01e99a2 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Tue, 8 Oct 2024 22:13:15 +0200
Subject: [PATCH] Use extern socket fd
Subject: [PATCH 03/10] Use extern socket fd
---
src/xrt/ipc/server/ipc_server_mainloop_linux.c | 8 ++++++++
@@ -34,5 +34,5 @@ index ad6b473b7..ea6fad65b 100644
// We may have been launched with socket activation
int num_fds = sd_listen_fds(0);
--
2.47.0
2.47.1
@@ -1,7 +1,12 @@
From 1f781690a7d24551c18a6696f8c6a141cc3565c0 Mon Sep 17 00:00:00 2001
From 0cca641c15aecc8b0e19f590df193f229e0a1061 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] 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 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xrt/compositor/render/render_distortion.c b/src/xrt/compositor/render/render_distortion.c
index 031f74ad5..1255f2616 100644
--- a/src/xrt/compositor/render/render_distortion.c
@@ -15,3 +20,6 @@ index 031f74ad5..1255f2616 100644
&device_memory, // out_device_memory
&image); // out_image
VK_CHK_AND_RET(ret, "vk_create_image_simple");
--
2.47.1
@@ -1,17 +1,17 @@
From a2f0862083a73423addc05ed8347c8e039adf346 Mon Sep 17 00:00:00 2001
From cccd4fd508fa7ca23ccf2fce0f8f36f62c5eae3b 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 1/1] 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 b06b03a58..dfbd36ed0 100644
index cf58fd0da..db3b05ede 100644
--- a/src/xrt/compositor/multi/comp_multi_system.c
+++ b/src/xrt/compositor/multi/comp_multi_system.c
@@ -230,23 +230,31 @@ find_active_blend_mode(struct multi_compositor **overlay_sorted_clients, size_t
@@ -233,23 +233,31 @@ find_active_blend_mode(struct multi_compositor **overlay_sorted_clients, size_t
if (overlay_sorted_clients == NULL)
return XRT_BLEND_MODE_OPAQUE;
@@ -53,5 +53,5 @@ index b06b03a58..dfbd36ed0 100644
}
--
2.45.2
2.47.1
@@ -1,7 +1,7 @@
From 025bce6ca5480cf6f67256eacf39ce4d5973c4ba Mon Sep 17 00:00:00 2001
From ea2831655ecc6e91ee896ea3a6809ba9ec0946dc Mon Sep 17 00:00:00 2001
From: galister <3123227-galister@users.noreply.gitlab.com>
Date: Thu, 31 Oct 2024 04:37:27 +0900
Subject: [PATCH] Use mipmaps for distortion shader
Subject: [PATCH 06/10] Use mipmaps for distortion shader
---
src/external/CMakeLists.txt | 23 +
@@ -1673,10 +1673,10 @@ index 000000000..524a74120
+ srgbFromLinear(arg.b), alpha);
+}
diff --git a/src/xrt/auxiliary/vk/vk_helpers.c b/src/xrt/auxiliary/vk/vk_helpers.c
index 91157c91e..84f7b82c5 100644
index 62f505391..80193f1ab 100644
--- a/src/xrt/auxiliary/vk/vk_helpers.c
+++ b/src/xrt/auxiliary/vk/vk_helpers.c
@@ -1328,6 +1328,7 @@ vk_create_sampler(struct vk_bundle *vk, VkSamplerAddressMode clamp_mode, VkSampl
@@ -1382,6 +1382,7 @@ vk_create_sampler(struct vk_bundle *vk, VkSamplerAddressMode clamp_mode, VkSampl
.addressModeW = clamp_mode,
.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK,
.unnormalizedCoordinates = VK_FALSE,
@@ -2768,5 +2768,5 @@ index 44849c20e..f8c891e49 100644
void
comp_scratch_stereo_images_free(struct comp_scratch_stereo_images *cssi, struct vk_bundle *vk);
--
2.45.2
2.47.1
@@ -1,7 +1,7 @@
From d9a0409876d4bfc673d7213ca320f4687ba84bd9 Mon Sep 17 00:00:00 2001
From bdc2fde721f5b16fa28dc56eb9d31bfff5ccb3a2 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Wed, 11 Sep 2024 22:56:29 +0200
Subject: [PATCH 5/6] Convert to YCbCr in Monado
Subject: [PATCH 07/10] Convert to YCbCr in Monado
---
src/xrt/compositor/main/comp_renderer.c | 6 +-
@@ -15,7 +15,7 @@ Subject: [PATCH 5/6] Convert to YCbCr in Monado
8 files changed, 186 insertions(+), 85 deletions(-)
diff --git a/src/xrt/compositor/main/comp_renderer.c b/src/xrt/compositor/main/comp_renderer.c
index e8e1072ac..a86570665 100644
index 6887fdf8d..a60b60b3a 100644
--- a/src/xrt/compositor/main/comp_renderer.c
+++ b/src/xrt/compositor/main/comp_renderer.c
@@ -1009,7 +1009,8 @@ dispatch_compute(struct comp_renderer *r,
@@ -53,7 +53,7 @@ index 8a94607d4..43e556b73 100644
/*!
diff --git a/src/xrt/compositor/render/render_compute.c b/src/xrt/compositor/render/render_compute.c
index 6976ee25c..d72dabb40 100644
index e7831fa89..b4be5da9e 100644
--- a/src/xrt/compositor/render/render_compute.c
+++ b/src/xrt/compositor/render/render_compute.c
@@ -66,8 +66,8 @@ calc_dispatch_dims_views(const struct render_viewport_data views[XRT_MAX_VIEWS],
@@ -319,7 +319,7 @@ index 6976ee25c..d72dabb40 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 9652a3545..9a579bc9f 100644
index 03eb7e033..55cb4e483 100644
--- a/src/xrt/compositor/render/render_interface.h
+++ b/src/xrt/compositor/render/render_interface.h
@@ -488,7 +488,8 @@ struct render_resources
@@ -577,10 +577,10 @@ index 9a09c03db..461aeb4ec 100644
+ imageStore(chroma, ivec2(offset.xy/2 + gl_GlobalInvocationID.xy), vec4(cbcr.x, cbcr.y, 0, 0));
}
diff --git a/src/xrt/compositor/util/comp_render.h b/src/xrt/compositor/util/comp_render.h
index 65f5d843f..a1f2f592e 100644
index 7d8cf6d2a..3f9067288 100644
--- a/src/xrt/compositor/util/comp_render.h
+++ b/src/xrt/compositor/util/comp_render.h
@@ -160,7 +160,8 @@ struct comp_render_dispatch_data
@@ -166,7 +166,8 @@ struct comp_render_dispatch_data
VkImage target_image;
//! Target image view for distortion.
@@ -590,7 +590,7 @@ index 65f5d843f..a1f2f592e 100644
} cs;
};
@@ -343,7 +344,8 @@ comp_render_gfx_dispatch(struct render_gfx *rr,
@@ -399,7 +400,8 @@ comp_render_gfx_dispatch(struct render_gfx *rr,
static inline void
comp_render_cs_initial_init(struct comp_render_dispatch_data *data,
VkImage target_image,
@@ -600,7 +600,7 @@ index 65f5d843f..a1f2f592e 100644
bool fast_path,
bool do_timewarp)
{
@@ -353,7 +355,8 @@ comp_render_cs_initial_init(struct comp_render_dispatch_data *data,
@@ -409,7 +411,8 @@ comp_render_cs_initial_init(struct comp_render_dispatch_data *data,
data->do_timewarp = do_timewarp;
data->cs.target_image = target_image;
@@ -610,7 +610,7 @@ index 65f5d843f..a1f2f592e 100644
}
/*!
@@ -451,7 +454,8 @@ comp_render_cs_layer(struct render_compute *crc,
@@ -501,7 +504,8 @@ comp_render_cs_layer(struct render_compute *crc,
const struct xrt_pose *world_pose,
const struct xrt_pose *eye_pose,
const VkImage target_image,
@@ -621,10 +621,10 @@ index 65f5d843f..a1f2f592e 100644
bool do_timewarp);
diff --git a/src/xrt/compositor/util/comp_render_cs.c b/src/xrt/compositor/util/comp_render_cs.c
index fe5a480de..7e261fd3c 100644
index 499bed5f9..fd33440eb 100644
--- a/src/xrt/compositor/util/comp_render_cs.c
+++ b/src/xrt/compositor/util/comp_render_cs.c
@@ -350,11 +350,12 @@ do_cs_clear(struct render_compute *crc, const struct comp_render_dispatch_data *
@@ -346,11 +346,12 @@ do_cs_clear(struct render_compute *crc, const struct comp_render_dispatch_data *
}
@@ -642,7 +642,7 @@ index fe5a480de..7e261fd3c 100644
}
static void
@@ -478,14 +479,15 @@ do_cs_distortion_from_scratch(struct render_compute *crc, const struct comp_rend
@@ -474,14 +475,15 @@ do_cs_distortion_from_scratch(struct render_compute *crc, const struct comp_rend
src_norm_rects[i] = src_norm_rect;
}
@@ -666,7 +666,7 @@ index fe5a480de..7e261fd3c 100644
}
static void
@@ -555,7 +557,8 @@ do_cs_distortion_for_layer(struct render_compute *crc,
@@ -551,7 +553,8 @@ do_cs_distortion_for_layer(struct render_compute *crc,
src_image_views, //
src_norm_rects, //
d->cs.target_image, //
@@ -676,7 +676,7 @@ index fe5a480de..7e261fd3c 100644
target_viewport_datas); //
} else {
render_compute_projection_timewarp( //
@@ -567,7 +570,8 @@ do_cs_distortion_for_layer(struct render_compute *crc,
@@ -563,7 +566,8 @@ do_cs_distortion_for_layer(struct render_compute *crc,
src_fovs, //
world_poses, //
d->cs.target_image, //
@@ -686,7 +686,7 @@ index fe5a480de..7e261fd3c 100644
target_viewport_datas); //
}
}
@@ -588,7 +592,8 @@ comp_render_cs_layer(struct render_compute *crc,
@@ -584,7 +588,8 @@ comp_render_cs_layer(struct render_compute *crc,
const struct xrt_pose *world_pose,
const struct xrt_pose *eye_pose,
const VkImage target_image,
@@ -696,7 +696,7 @@ index fe5a480de..7e261fd3c 100644
const struct render_viewport_data *target_view,
bool do_timewarp)
{
@@ -749,7 +754,8 @@ comp_render_cs_layer(struct render_compute *crc,
@@ -741,7 +746,8 @@ comp_render_cs_layer(struct render_compute *crc,
src_samplers, //
src_image_views, //
cur_image, //
@@ -706,7 +706,7 @@ index fe5a480de..7e261fd3c 100644
target_view, //
do_timewarp); //
}
@@ -785,6 +791,7 @@ comp_render_cs_layers(struct render_compute *crc,
@@ -777,6 +783,7 @@ comp_render_cs_layers(struct render_compute *crc,
&view->eye_pose, //
view->image, //
view->cs.unorm_view, //
@@ -715,5 +715,5 @@ index fe5a480de..7e261fd3c 100644
d->do_timewarp); //
}
--
2.47.0
2.47.1
@@ -1,7 +1,7 @@
From b277706d65c3acbd92c4ed7e73c31f12cb3e470c Mon Sep 17 00:00:00 2001
From 2378f91b0aa2c610a670812304c152b198ab18f1 Mon Sep 17 00:00:00 2001
From: rcelyte <rcelyte@battletrains.org>
Date: Mon, 17 Jun 2024 04:32:36 +0000
Subject: [PATCH] d/solarxr: Add SolarXR WebSockets driver
Subject: [PATCH 08/10] d/solarxr: Add SolarXR WebSockets driver
---
CMakeLists.txt | 3 +
@@ -26,7 +26,7 @@ Subject: [PATCH] d/solarxr: Add SolarXR WebSockets driver
create mode 100644 src/xrt/drivers/solarxr/websocket.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74d0bd7f9..22b5f7c7a 100644
index d2fb15f62..f6880e6c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -333,6 +333,7 @@ option_with_deps(XRT_BUILD_DRIVER_VIVE "Enable driver for HTC Vive, Vive Pro, Va
@@ -37,7 +37,7 @@ index 74d0bd7f9..22b5f7c7a 100644
option(XRT_BUILD_DRIVER_SIMULATED "Enable simulated driver" ON)
option(XRT_BUILD_SAMPLES "Enable compiling sample code implementations that will not be linked into any final targets" ON)
@@ -429,6 +430,7 @@ list(
@@ -430,6 +431,7 @@ list(
"TWRAP"
"XREAL_AIR"
"STEAMVR_LIGHTHOUSE"
@@ -45,7 +45,7 @@ index 74d0bd7f9..22b5f7c7a 100644
)
# Package name needs to be known by the native code itself.
@@ -653,6 +655,7 @@ message(STATUS "# DRIVER_VIVE: ${XRT_BUILD_DRIVER_VIVE}")
@@ -655,6 +657,7 @@ message(STATUS "# DRIVER_VIVE: ${XRT_BUILD_DRIVER_VIVE}")
message(STATUS "# DRIVER_WMR: ${XRT_BUILD_DRIVER_WMR}")
message(STATUS "# DRIVER_XREAL_AIR: ${XRT_BUILD_DRIVER_XREAL_AIR}")
message(STATUS "# DRIVER_STEAMVR_LIGHTHOUSE: ${XRT_BUILD_DRIVER_STEAMVR_LIGHTHOUSE}")
@@ -2303,7 +2303,7 @@ index 2c66ad303..26d96aa14 100644
}
diff --git a/src/xrt/targets/common/target_builder_steamvr.c b/src/xrt/targets/common/target_builder_steamvr.c
index 814656519..f0b7de8a0 100644
index 86376d773..295feb0bb 100644
--- a/src/xrt/targets/common/target_builder_steamvr.c
+++ b/src/xrt/targets/common/target_builder_steamvr.c
@@ -34,6 +34,10 @@
@@ -2334,5 +2334,5 @@ index 814656519..f0b7de8a0 100644
* Space overseer.
*/
--
2.47.0
2.47.1
@@ -1,8 +1,7 @@
From a7ed0665c0a8f668d429f1e0ace03e25842b658b Mon Sep 17 00:00:00 2001
From 6f4e55637aa6b09dc262cad4771ba8361031bad5 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Thu, 31 Oct 2024 23:16:09 +0100
Subject: [PATCH] Revert "a/bindings: improve reproducibility of bindings
generation"
Date: Tue, 31 Dec 2024 10:53:47 +0100
Subject: [PATCH 09/10] Revert "a/bindings: improve reproducibility of bindings
This reverts commit d2fbd3ce8d962e4a46351df0f34f14de71871e00.
---
@@ -11,7 +10,7 @@ This reverts commit d2fbd3ce8d962e4a46351df0f34f14de71871e00.
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/src/xrt/auxiliary/bindings/bindings.py b/src/xrt/auxiliary/bindings/bindings.py
index 56cbc43e6..d10255962 100755
index f66b269ee..aac18db93 100755
--- a/src/xrt/auxiliary/bindings/bindings.py
+++ b/src/xrt/auxiliary/bindings/bindings.py
@@ -7,7 +7,8 @@ bindings."""
@@ -92,12 +91,12 @@ index 56cbc43e6..d10255962 100755
the values are lists of strings of that length. And a suffix if any."""
f.write(f"{tab_char}\tswitch (length) {{\n")
- for length in sorted(dict_of_lists.keys()):
+ for length in dict_of_lists:
f.write(f"{tab_char}\tcase {str(length)}:\n\t\t")
+ for length in dict_of_lists.keys():
f.write(f"{tab_char}\tcase {str(length)}:\n\t\t{tab_char}")
- for path in sorted(dict_of_lists[length]):
+ for path in dict_of_lists[length]:
f.write(if_strcmp.format(exttab=tab_char, check=path))
f.write(f"{tab_char}{{\n{tab_char}\t\t\tbreak;\n{tab_char}\t\t}}\n")
f.write(f"{{\n{tab_char}\t\t\tbreak;\n{tab_char}\t\t}}\n")
f.write(f"{tab_char}\tdefault: break;\n{tab_char}\t}}\n")
@@ -509,7 +514,7 @@ def write_verify_func_body(f, profile, dict_name):
profile, dict_name), profile, profile.name, profile.extension_name)
@@ -158,5 +157,5 @@ index f54a303f9..abcbfabe6 100644
f.close()
--
2.47.0
2.47.1
@@ -1,7 +1,7 @@
From 3a5642d8993d18f0a886dc6b7748ea718380e771 Mon Sep 17 00:00:00 2001
From 982093142a771a2f5b9b536b55eb07a78d347ab8 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Sun, 3 Nov 2024 13:40:00 +0100
Subject: [PATCH] store alpha channel in layer 1
Subject: [PATCH 10/10] store alpha channel in layer 1
---
src/xrt/compositor/shaders/clear.comp | 4 ++--
@@ -90,5 +90,5 @@ index 461aeb4ec..237221a54 100644
+ imageStore(luma, ivec3(offset.xy/2 + gl_GlobalInvocationID.xy, 1), alpha);
}
--
2.47.0
2.47.1