Update monado

This commit is contained in:
Patrick Nicolas
2024-10-08 23:16:50 +02:00
parent 5f59dfb589
commit b54108bb4c
6 changed files with 36 additions and 40 deletions
+1 -1
View File
@@ -202,7 +202,7 @@ FetchContent_Declare(imgui EXCLUDE_FROM_ALL SYSTEM URL https://github.co
FetchContent_Declare(monado
GIT_REPOSITORY https://gitlab.freedesktop.org/monado/monado
# The flatpak manifest is updated automatically
GIT_TAG 01806a3ffa62a2440da83d94e7a9297645d9d95a
GIT_TAG d7089f182b0514e13554e99512d63e69c30523c5
PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patches/apply.sh ${CMAKE_CURRENT_LIST_DIR}/patches/monado/
EXCLUDE_FROM_ALL
)
@@ -1,7 +1,7 @@
From db34211565a0e67e3da2fc0be174bd570869efaa Mon Sep 17 00:00:00 2001
From d9a0409876d4bfc673d7213ca320f4687ba84bd9 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Wed, 11 Sep 2024 22:56:29 +0200
Subject: [PATCH] Convert to YCbCr in Monado
Subject: [PATCH 5/6] Convert to YCbCr in Monado
---
src/xrt/compositor/main/comp_renderer.c | 6 +-
@@ -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 9fe5207b5..9b1ce09c6 100644
index 9652a3545..9a579bc9f 100644
--- a/src/xrt/compositor/render/render_interface.h
+++ b/src/xrt/compositor/render/render_interface.h
@@ -488,7 +488,8 @@ struct render_resources
@@ -332,7 +332,7 @@ index 9fe5207b5..9b1ce09c6 100644
//! Uniform data binding.
uint32_t ubo_binding;
@@ -1306,7 +1307,8 @@ render_compute_layers(struct render_compute *crc, //
@@ -1312,7 +1313,8 @@ render_compute_layers(struct render_compute *crc, //
VkSampler src_samplers[RENDER_MAX_IMAGES_SIZE], //
VkImageView src_image_views[RENDER_MAX_IMAGES_SIZE], //
uint32_t num_srcs, //
@@ -342,7 +342,7 @@ index 9fe5207b5..9b1ce09c6 100644
const struct render_viewport_data *view, //
bool timewarp); //
@@ -1322,7 +1324,8 @@ render_compute_projection_timewarp(struct render_compute *crc,
@@ -1328,7 +1330,8 @@ render_compute_projection_timewarp(struct render_compute *crc,
const struct xrt_fov src_fovs[XRT_MAX_VIEWS],
const struct xrt_pose new_poses[XRT_MAX_VIEWS],
VkImage target_image,
@@ -352,7 +352,7 @@ index 9fe5207b5..9b1ce09c6 100644
const struct render_viewport_data views[XRT_MAX_VIEWS]);
/*!
@@ -1334,7 +1337,8 @@ render_compute_projection(struct render_compute *crc,
@@ -1340,7 +1343,8 @@ render_compute_projection(struct render_compute *crc,
VkImageView src_image_views[XRT_MAX_VIEWS], //
const struct xrt_normalized_rect src_rects[XRT_MAX_VIEWS], //
VkImage target_image, //
@@ -362,7 +362,7 @@ index 9fe5207b5..9b1ce09c6 100644
const struct render_viewport_data views[XRT_MAX_VIEWS]); //
/*!
@@ -1343,7 +1347,8 @@ render_compute_projection(struct render_compute *crc,
@@ -1349,7 +1353,8 @@ render_compute_projection(struct render_compute *crc,
void
render_compute_clear(struct render_compute *crc, //
VkImage target_image, //
@@ -577,20 +577,20 @@ 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 da717aa91..69234bac4 100644
index 65f5d843f..a1f2f592e 100644
--- a/src/xrt/compositor/util/comp_render.h
+++ b/src/xrt/compositor/util/comp_render.h
@@ -130,7 +130,8 @@ struct comp_render_dispatch_data
@@ -160,7 +160,8 @@ struct comp_render_dispatch_data
VkImage target_image;
// Target image view for distortion.
//! Target image view for distortion.
- VkImageView target_unorm_view;
+ VkImageView target_unorm_view_y;
+ VkImageView target_unorm_view_cbcr;
} cs;
};
@@ -231,7 +232,8 @@ comp_render_gfx_dispatch(struct render_gfx *rr,
@@ -343,7 +344,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 da717aa91..69234bac4 100644
bool fast_path,
bool do_timewarp)
{
@@ -241,7 +243,8 @@ comp_render_cs_initial_init(struct comp_render_dispatch_data *data,
@@ -353,7 +355,8 @@ comp_render_cs_initial_init(struct comp_render_dispatch_data *data,
data->do_timewarp = do_timewarp;
data->cs.target_image = target_image;
@@ -609,8 +609,8 @@ index da717aa91..69234bac4 100644
+ data->cs.target_unorm_view_cbcr = target_unorm_view_cbcr;
}
static inline void
@@ -301,7 +304,8 @@ comp_render_cs_layer(struct render_compute *crc,
/*!
@@ -451,7 +454,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,
@@ -715,5 +715,5 @@ index fe5a480de..7e261fd3c 100644
d->do_timewarp); //
}
--
2.46.0
2.47.0
+5 -6
View File
@@ -145,7 +145,11 @@ static void wivrn_controller_get_hand_tracking(xrt_device * xdev,
static void wivrn_controller_set_output(struct xrt_device * xdev, enum xrt_output_name name, const union xrt_output_value * value);
static void wivrn_controller_update_inputs(xrt_device * xdev);
static xrt_result_t wivrn_controller_update_inputs(xrt_device * xdev)
{
static_cast<wivrn_controller *>(xdev)->update_inputs();
return XRT_SUCCESS;
}
wivrn_controller::wivrn_controller(int hand_id,
xrt_device * hmd,
@@ -400,11 +404,6 @@ static void wivrn_controller_destroy(xrt_device * xdev)
static_cast<wivrn_controller *>(xdev)->unregister();
}
static void wivrn_controller_update_inputs(xrt_device * xdev)
{
static_cast<wivrn_controller *>(xdev)->update_inputs();
}
static void wivrn_controller_get_tracked_pose(xrt_device * xdev,
xrt_input_name name,
int64_t at_timestamp_ns,
+5 -6
View File
@@ -36,7 +36,11 @@ namespace wivrn
static void wivrn_eye_tracker_destroy(xrt_device * xdev);
static void wivrn_eye_tracker_update_inputs(xrt_device * xdev);
static xrt_result_t wivrn_eye_tracker_update_inputs(xrt_device * xdev)
{
static_cast<wivrn_eye_tracker *>(xdev)->update_inputs();
return XRT_SUCCESS;
}
static void wivrn_eye_tracker_get_tracked_pose(xrt_device * xdev,
xrt_input_name name,
@@ -100,11 +104,6 @@ static void wivrn_eye_tracker_destroy(xrt_device * xdev)
{
}
static void wivrn_eye_tracker_update_inputs(xrt_device * xdev)
{
static_cast<wivrn_eye_tracker *>(xdev)->update_inputs();
}
static void wivrn_eye_tracker_get_tracked_pose(xrt_device * xdev,
xrt_input_name name,
int64_t at_timestamp_ns,
+5 -6
View File
@@ -38,7 +38,11 @@ namespace wivrn
static void wivrn_fb_face2_tracker_destroy(xrt_device * xdev);
static void wivrn_fb_face2_tracker_update_inputs(xrt_device * xdev);
static xrt_result_t wivrn_fb_face2_tracker_update_inputs(xrt_device * xdev)
{
static_cast<wivrn_fb_face2_tracker *>(xdev)->update_inputs();
return XRT_SUCCESS;
}
static xrt_result_t wivrn_fb_face2_tracker_get_face_tracking(struct xrt_device * xdev,
enum xrt_input_name facial_expression_type,
@@ -126,11 +130,6 @@ static void wivrn_fb_face2_tracker_destroy(xrt_device * xdev)
{
}
static void wivrn_fb_face2_tracker_update_inputs(xrt_device * xdev)
{
static_cast<wivrn_fb_face2_tracker *>(xdev)->update_inputs();
}
static xrt_result_t wivrn_fb_face2_tracker_get_face_tracking(struct xrt_device * xdev,
enum xrt_input_name facial_expression_type,
int64_t at_timestamp_ns,
+5 -6
View File
@@ -40,7 +40,11 @@ namespace wivrn
static void wivrn_hmd_destroy(xrt_device * xdev);
static void wivrn_hmd_update_inputs(xrt_device * xdev);
static xrt_result_t wivrn_hmd_update_inputs(xrt_device * xdev)
{
static_cast<wivrn_hmd *>(xdev)->update_inputs();
return XRT_SUCCESS;
}
static void wivrn_hmd_get_tracked_pose(xrt_device * xdev,
xrt_input_name name,
@@ -410,11 +414,6 @@ static void wivrn_hmd_destroy(xrt_device * xdev)
static_cast<wivrn_hmd *>(xdev)->unregister();
}
static void wivrn_hmd_update_inputs(xrt_device * xdev)
{
static_cast<wivrn_hmd *>(xdev)->update_inputs();
}
static void wivrn_hmd_get_tracked_pose(xrt_device * xdev,
xrt_input_name name,
int64_t at_timestamp_ns,