mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-20 09:01:39 -08:00
Update monado
move view_config from sys_info to callback
This commit is contained in:
1 parent
6aa7c9759a
commit
cf602beefb
13 files changed
+71
-52
No files matched your search
@@ -58,7 +58,7 @@
|
||||
# Keep in sync with CMakeLists.txt monado rev
|
||||
rev = lib.strings.trim (builtins.readFile ./monado-rev);
|
||||
# Nix will output the correct hash when it doesn't match
|
||||
hash = "sha256-PZGOzjmpGv2OO+PXggWQxT15Obz7xUZXz0L9cGNu9eU=";
|
||||
hash = "sha256-OCQmmnHw5TsEq1LAqG8WwJvRFh1K7gcFIM7MUL+I4Zw=";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
27d363459487bb63443eb215157ac3ce0b42fce6
|
||||
4b00cbbba8f5675ceb31edad2a04bc2aca48b8e8
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0fe5a8e72f2ba178e155d2ab87e79f34294248dd Mon Sep 17 00:00:00 2001
|
||||
From 56bc78165b70a84e40bfc22ca5c2b95b0612d0cd Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <[email protected]>
|
||||
Date: Tue, 22 Oct 2024 15:23:19 +0200
|
||||
Subject: [PATCH 1/8] c/multi: early wake of compositor
|
||||
@@ -36,10 +36,10 @@ index 1fc135ce4..25b64aca8 100644
|
||||
|
||||
static void *
|
||||
diff --git a/src/xrt/compositor/multi/comp_multi_private.h b/src/xrt/compositor/multi/comp_multi_private.h
|
||||
index 3351defa4..e8f0c8295 100644
|
||||
index 0e777f442..d39b8d76d 100644
|
||||
--- a/src/xrt/compositor/multi/comp_multi_private.h
|
||||
+++ b/src/xrt/compositor/multi/comp_multi_private.h
|
||||
@@ -359,6 +359,10 @@ struct multi_system_compositor
|
||||
@@ -364,6 +364,10 @@ struct multi_system_compositor
|
||||
*/
|
||||
struct os_mutex list_and_timing_lock;
|
||||
|
||||
@@ -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 4db923457..80cbbbc26 100644
|
||||
index e673afcb0..cf07a2d1c 100644
|
||||
--- a/src/xrt/compositor/multi/comp_multi_system.c
|
||||
+++ b/src/xrt/compositor/multi/comp_multi_system.c
|
||||
@@ -24,6 +24,8 @@
|
||||
@@ -109,7 +109,7 @@ index 4db923457..80cbbbc26 100644
|
||||
|
||||
// Now we know the diff, broadcast to pacers.
|
||||
broadcast_timings_to_pacers(msc, predicted_display_time_ns, predicted_display_period_ns, diff_ns);
|
||||
@@ -721,6 +733,8 @@ system_compositor_destroy(struct xrt_system_compositor *xsc)
|
||||
@@ -731,6 +743,8 @@ system_compositor_destroy(struct xrt_system_compositor *xsc)
|
||||
xrt_comp_native_destroy(&msc->xcn);
|
||||
|
||||
os_mutex_destroy(&msc->list_and_timing_lock);
|
||||
@@ -118,8 +118,8 @@ index 4db923457..80cbbbc26 100644
|
||||
|
||||
free(msc);
|
||||
}
|
||||
@@ -775,6 +789,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;
|
||||
@@ -788,6 +802,8 @@ comp_multi_create_system_compositor(struct xrt_compositor_native *xcn,
|
||||
msc->get_view_config_callback = get_view_config_callback;
|
||||
|
||||
os_mutex_init(&msc->list_and_timing_lock);
|
||||
+ os_mutex_init(&msc->wake_mutex);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c0019c2e8822db5efa7d6baf51b9773cc7bdc537 Mon Sep 17 00:00:00 2001
|
||||
From 8d323aae4c6436644e62a8e50f536672e09e7df1 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <[email protected]>
|
||||
Date: Tue, 8 Oct 2024 22:13:15 +0200
|
||||
Subject: [PATCH 2/8] Use extern socket fd
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH 2/8] Use extern socket fd
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/xrt/ipc/server/ipc_server_mainloop_linux.c b/src/xrt/ipc/server/ipc_server_mainloop_linux.c
|
||||
index 777a31e96..9235375e6 100644
|
||||
index a0bef3dde..453dd38ca 100644
|
||||
--- a/src/xrt/ipc/server/ipc_server_mainloop_linux.c
|
||||
+++ b/src/xrt/ipc/server/ipc_server_mainloop_linux.c
|
||||
@@ -49,6 +49,8 @@
|
||||
@@ -50,6 +50,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ index 777a31e96..9235375e6 100644
|
||||
/*
|
||||
*
|
||||
* Static functions.
|
||||
@@ -57,6 +59,12 @@
|
||||
@@ -58,6 +60,12 @@
|
||||
static int
|
||||
get_systemd_socket(struct ipc_server_mainloop *ml, int *out_fd)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 004623b9038b3043365061e77a0e3cc430fb2dd9 Mon Sep 17 00:00:00 2001
|
||||
From 021c00d87dc8a956984a255c651658f4b6f76cc6 Mon Sep 17 00:00:00 2001
|
||||
From: galister <[email protected]>
|
||||
Date: Sat, 23 Nov 2024 02:42:12 +0900
|
||||
Subject: [PATCH 3/8] change environment blend mode selection logic
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH 3/8] change environment blend mode selection logic
|
||||
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 80cbbbc26..4a397d7ec 100644
|
||||
index cf07a2d1c..417964770 100644
|
||||
--- a/src/xrt/compositor/multi/comp_multi_system.c
|
||||
+++ b/src/xrt/compositor/multi/comp_multi_system.c
|
||||
@@ -233,23 +233,31 @@ find_active_blend_mode(struct multi_compositor **overlay_sorted_clients, size_t
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c0d86e77f011f0d75f17e5c30fb20bbf166dfc08 Mon Sep 17 00:00:00 2001
|
||||
From acd0e5bd5845f43fe443f70d54ae2df27bbec823 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Nicolas <[email protected]>
|
||||
Date: Sat, 15 Mar 2025 22:19:48 +0100
|
||||
Subject: [PATCH 4/8] st/oxr: forward 0 refresh rate
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH 4/8] st/oxr: forward 0 refresh rate
|
||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/xrt/compositor/main/comp_compositor.c b/src/xrt/compositor/main/comp_compositor.c
|
||||
index 3364aaead..deec90a73 100644
|
||||
index 0d35fcb42..b54a8f048 100644
|
||||
--- a/src/xrt/compositor/main/comp_compositor.c
|
||||
+++ b/src/xrt/compositor/main/comp_compositor.c
|
||||
@@ -377,7 +377,7 @@ compositor_request_display_refresh_rate(struct xrt_compositor *xc, float display
|
||||
@@ -380,7 +380,7 @@ compositor_request_display_refresh_rate(struct xrt_compositor *xc, float display
|
||||
if (c->target && c->target->request_refresh_rate) {
|
||||
xrt_result_t result = comp_target_request_refresh_rate(c->target, display_refresh_rate_hz);
|
||||
// Assume refresh rate change is immediate
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 80007ab047cb486e78eb0527dc97de56574bc8e2 Mon Sep 17 00:00:00 2001
|
||||
From f592eb8af17a15b8cd6a20c308ee0f254c88463f Mon Sep 17 00:00:00 2001
|
||||
From: no name <git-am@invalid>
|
||||
Date: Sun, 28 Sep 2025 11:33:10 +0200
|
||||
Subject: [PATCH 5/8] d/steamvr_lh: prevent crash on vive pro2/WiVRn
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH 5/8] d/steamvr_lh: prevent crash on vive pro2/WiVRn
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/xrt/drivers/steamvr_lh/steamvr_lh.cpp b/src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
|
||||
index 0fbe4f563..dc9e3d3a5 100644
|
||||
index 5c36e4e89..b77288bd0 100644
|
||||
--- a/src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
|
||||
+++ b/src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
|
||||
@@ -954,7 +954,7 @@ steamvr_lh_create_devices(struct xrt_prober *xp, struct xrt_system_devices **out
|
||||
@@ -956,7 +956,7 @@ steamvr_lh_create_devices(struct xrt_prober *xp, struct xrt_system_devices **out
|
||||
|
||||
// Include the HMD
|
||||
if (svrs->ctx->hmd) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 659f5782066f77bb027accfcfe9ac4a810d27903 Mon Sep 17 00:00:00 2001
|
||||
From e013455ead67f79e18afc5a6bbb453caae76dac9 Mon Sep 17 00:00:00 2001
|
||||
From: Sapphire <[email protected]>
|
||||
Date: Fri, 7 Nov 2025 20:41:16 -0600
|
||||
Subject: [PATCH 6/8] st/oxr: push XrEventDataInteractionProfileChanged when
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH 6/8] st/oxr: push XrEventDataInteractionProfileChanged when
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/src/xrt/state_trackers/oxr/actions/oxr_input.c b/src/xrt/state_trackers/oxr/actions/oxr_input.c
|
||||
index 51ae13b05..192833639 100644
|
||||
index 2bd3ea009..93659ba35 100644
|
||||
--- a/src/xrt/state_trackers/oxr/actions/oxr_input.c
|
||||
+++ b/src/xrt/state_trackers/oxr/actions/oxr_input.c
|
||||
@@ -1932,9 +1932,6 @@ session_update_action_bindings(struct oxr_logger *log,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5dbb5983ab7f5ec1204ff8fe932519c0df7feeed Mon Sep 17 00:00:00 2001
|
||||
From 6834120e579093e2f2bfa0d4269a051e7047b9ee Mon Sep 17 00:00:00 2001
|
||||
From: no name <git-am@invalid>
|
||||
Date: Sun, 25 Jan 2026 10:09:10 +0100
|
||||
Subject: [PATCH 7/8] don't verify GL stuff
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 11fdc5a904db55867ed567bbc89ee5207e5741f0 Mon Sep 17 00:00:00 2001
|
||||
From c28b6f2c536e1a0db93389f050cf61a506b286e4 Mon Sep 17 00:00:00 2001
|
||||
From: no name <git-am@invalid>
|
||||
Date: Fri, 20 Mar 2026 16:51:18 +0100
|
||||
Subject: [PATCH 8/8] configure u_git_tag in WiVRn
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH 8/8] configure u_git_tag in WiVRn
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/xrt/auxiliary/util/CMakeLists.txt b/src/xrt/auxiliary/util/CMakeLists.txt
|
||||
index d45cd60c9..ec0d45434 100644
|
||||
index a30c3c5a6..983d44f04 100644
|
||||
--- a/src/xrt/auxiliary/util/CMakeLists.txt
|
||||
+++ b/src/xrt/auxiliary/util/CMakeLists.txt
|
||||
@@ -10,11 +10,6 @@
|
||||
@@ -23,7 +23,7 @@ index d45cd60c9..ec0d45434 100644
|
||||
add_library(
|
||||
aux_util STATIC
|
||||
u_autoexpgain.c
|
||||
@@ -118,7 +113,7 @@ add_library(
|
||||
@@ -116,7 +111,7 @@ add_library(
|
||||
u_worker.cpp
|
||||
u_worker.h
|
||||
u_worker.hpp
|
||||
|
||||
@@ -556,6 +556,42 @@ xrt_result_t compositor::request_display_refresh_rate(float hz)
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
xrt_result_t compositor::get_view_config(
|
||||
xrt_compositor_native * self,
|
||||
xrt_view_type view_type,
|
||||
xrt_view_config * out_view_config)
|
||||
{
|
||||
const auto & session = reinterpret_cast<compositor *>(self)->session;
|
||||
const auto extent = render_extent(session.get_info());
|
||||
switch (view_type)
|
||||
{
|
||||
case XRT_VIEW_TYPE_MONO:
|
||||
return XRT_ERROR_UNSUPPORTED_VIEW_TYPE;
|
||||
case XRT_VIEW_TYPE_STEREO:
|
||||
*out_view_config = {
|
||||
.view_type = XRT_VIEW_TYPE_STEREO,
|
||||
.view_count = 2,
|
||||
.views = {}};
|
||||
for (auto & view: std::span(out_view_config->views, out_view_config->view_count))
|
||||
{
|
||||
view = {
|
||||
.recommended = {
|
||||
.width_pixels = extent.width,
|
||||
.height_pixels = extent.height,
|
||||
.sample_count = 1,
|
||||
},
|
||||
.max = {
|
||||
.width_pixels = extent.width * 2u,
|
||||
.height_pixels = extent.height * 2u,
|
||||
.sample_count = 1,
|
||||
},
|
||||
};
|
||||
}
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
return XRT_ERROR_UNSUPPORTED_VIEW_TYPE;
|
||||
}
|
||||
|
||||
int compositor::acquire_image()
|
||||
{
|
||||
for (auto [i, image]: std::ranges::enumerate_view(images))
|
||||
@@ -717,13 +753,9 @@ xrt_system_compositor_info compositor::sys_info() const
|
||||
const auto & info = session.get_info();
|
||||
auto [prop, dev_id] = vk.physical_device.getProperties2<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceIDProperties>();
|
||||
xrt_system_compositor_info res{
|
||||
.view_config_count = 1,
|
||||
.view_configs = {
|
||||
{
|
||||
.view_type = XRT_VIEW_TYPE_STEREO,
|
||||
.view_count = 2,
|
||||
.views = {},
|
||||
},
|
||||
.view_type_count = 1,
|
||||
.view_types = {
|
||||
XRT_VIEW_TYPE_STEREO,
|
||||
},
|
||||
.max_layers = squasher.max_layers(prop.properties),
|
||||
.supported_blend_modes = {
|
||||
@@ -738,23 +770,6 @@ xrt_system_compositor_info compositor::sys_info() const
|
||||
std::ranges::copy(dev_id.deviceUUID, res.compositor_vk_deviceUUID.data);
|
||||
std::ranges::copy(dev_id.deviceUUID, res.client_vk_deviceUUID.data);
|
||||
std::ranges::copy(std::span(info.available_refresh_rates).subspan(0, res.refresh_rate_count), res.refresh_rates_hz);
|
||||
|
||||
const auto extent = render_extent(info);
|
||||
for (auto & view: std::span(res.view_configs[0].views, res.view_configs[0].view_count))
|
||||
{
|
||||
view = {
|
||||
.recommended = {
|
||||
.width_pixels = extent.width,
|
||||
.height_pixels = extent.height,
|
||||
.sample_count = 1,
|
||||
},
|
||||
.max = {
|
||||
.width_pixels = extent.width * 2u,
|
||||
.height_pixels = extent.height * 2u,
|
||||
.sample_count = 1,
|
||||
},
|
||||
};
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +149,10 @@ private:
|
||||
public:
|
||||
xrt_result_t request_display_refresh_rate(float display_refresh_rate_hz);
|
||||
|
||||
static xrt_result_t get_view_config(xrt_compositor_native *,
|
||||
xrt_view_type view_type,
|
||||
xrt_view_config * out_view_config);
|
||||
|
||||
private:
|
||||
void destroy()
|
||||
{
|
||||
|
||||
@@ -285,7 +285,7 @@ xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptr<wivrn_connecti
|
||||
send_to_main(info);
|
||||
|
||||
auto sys_info{self->compositor.sys_info()};
|
||||
auto xret = comp_multi_create_system_compositor(&self->compositor.base, &self->app_pacers, &sys_info, false, out_xsysc);
|
||||
auto xret = comp_multi_create_system_compositor(&self->compositor.base, &self->app_pacers, &compositor::get_view_config, &sys_info, false, out_xsysc);
|
||||
if (xret != XRT_SUCCESS)
|
||||
{
|
||||
U_LOG_E("Failed to create system compositor: %s", u_str_xrt_result(xret));
|
||||
|
||||
Reference in new issue
Block a user