diff --git a/src/xrt/compositor/main/comp_renderer.c b/src/xrt/compositor/main/comp_renderer.c index 8bef81b72..ffc0bb458 100644 --- a/src/xrt/compositor/main/comp_renderer.c +++ b/src/xrt/compositor/main/comp_renderer.c @@ -573,6 +573,7 @@ renderer_create(struct comp_renderer *r, struct comp_compositor *c) r->mirror_to_debug_gui.image_extent.width = (uint32_t)(orig_width * mul); r->mirror_to_debug_gui.image_extent.height = (uint32_t)(orig_height * mul); + u_sink_debug_init(&r->mirror_to_debug_gui.debug_sink); vk_image_readback_to_xf_pool_create(vk, r->mirror_to_debug_gui.image_extent, &r->mirror_to_debug_gui.pool, XRT_FORMAT_R8G8B8X8); @@ -769,6 +770,8 @@ renderer_destroy(struct comp_renderer *r) // Left eye readback vk_image_readback_to_xf_pool_destroy(vk, &r->mirror_to_debug_gui.pool); + u_sink_debug_destroy(&r->mirror_to_debug_gui.debug_sink); + // Command buffers renderer_close_renderings_and_fences(r); diff --git a/src/xrt/targets/openxr/oxr_sdl2_hack.c b/src/xrt/targets/openxr/oxr_sdl2_hack.c index 86f53f99f..886b8c4be 100644 --- a/src/xrt/targets/openxr/oxr_sdl2_hack.c +++ b/src/xrt/targets/openxr/oxr_sdl2_hack.c @@ -259,6 +259,8 @@ sdl2_close(struct sdl2_program *p) p->win = NULL; } + os_thread_helper_destroy(&p->oth); + if (p->sdl_initialized) { //! @todo: Properly quit SDL without crashing SDL client apps // SDL_Quit(); @@ -296,6 +298,8 @@ oxr_sdl2_hack_create(void **out_hack) return -1; } + os_thread_helper_init(&p->oth); + *out_hack = p; return 0; diff --git a/src/xrt/tracking/hand/mercury/hg_sync.cpp b/src/xrt/tracking/hand/mercury/hg_sync.cpp index 7e9f93852..c5fd21ab9 100644 --- a/src/xrt/tracking/hand/mercury/hg_sync.cpp +++ b/src/xrt/tracking/hand/mercury/hg_sync.cpp @@ -11,6 +11,7 @@ #include "hg_sync.hpp" #include "hg_model.hpp" +#include "util/u_sink.h" #include namespace xrt::tracking::hand::mercury { @@ -290,10 +291,13 @@ HandTracking::HandTracking() { this->base.process = &HandTracking::cCallbackProcess; this->base.destroy = &HandTracking::cCallbackDestroy; + u_sink_debug_init(&this->debug_sink); } HandTracking::~HandTracking() { + u_sink_debug_destroy(&this->debug_sink); + release_onnx_wrap(&this->views[0].keypoint[0]); release_onnx_wrap(&this->views[0].keypoint[1]); release_onnx_wrap(&this->views[0].detection); diff --git a/src/xrt/tracking/hand/t_hand_tracking_async.c b/src/xrt/tracking/hand/t_hand_tracking_async.c index a6728da59..59b133f3b 100644 --- a/src/xrt/tracking/hand/t_hand_tracking_async.c +++ b/src/xrt/tracking/hand/t_hand_tracking_async.c @@ -159,6 +159,7 @@ ht_async_destroy(struct xrt_frame_node *node) { struct ht_async_impl *hta = ht_async_impl(container_of(node, struct t_hand_tracking_async, node)); os_thread_helper_destroy(&hta->mainloop); + os_mutex_destroy(&hta->present.mutex); t_ht_sync_destroy(&hta->provider); @@ -179,6 +180,7 @@ t_hand_tracking_async_default_create(struct xrt_frame_context *xfctx, struct t_h hta->provider = sync; + os_mutex_init(&hta->present.mutex); os_thread_helper_init(&hta->mainloop); os_thread_helper_start(&hta->mainloop, ht_async_mainloop, hta); xrt_frame_context_add(xfctx, &hta->base.node);