mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-03 21:56:06 +00:00
misc: Fix some uninitialized mutexes
This commit is contained in:
parent
490e90b493
commit
7a0a142dba
|
@ -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.width = (uint32_t)(orig_width * mul);
|
||||||
r->mirror_to_debug_gui.image_extent.height = (uint32_t)(orig_height * 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,
|
vk_image_readback_to_xf_pool_create(vk, r->mirror_to_debug_gui.image_extent, &r->mirror_to_debug_gui.pool,
|
||||||
XRT_FORMAT_R8G8B8X8);
|
XRT_FORMAT_R8G8B8X8);
|
||||||
|
@ -769,6 +770,8 @@ renderer_destroy(struct comp_renderer *r)
|
||||||
// Left eye readback
|
// Left eye readback
|
||||||
vk_image_readback_to_xf_pool_destroy(vk, &r->mirror_to_debug_gui.pool);
|
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
|
// Command buffers
|
||||||
renderer_close_renderings_and_fences(r);
|
renderer_close_renderings_and_fences(r);
|
||||||
|
|
||||||
|
|
|
@ -259,6 +259,8 @@ sdl2_close(struct sdl2_program *p)
|
||||||
p->win = NULL;
|
p->win = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os_thread_helper_destroy(&p->oth);
|
||||||
|
|
||||||
if (p->sdl_initialized) {
|
if (p->sdl_initialized) {
|
||||||
//! @todo: Properly quit SDL without crashing SDL client apps
|
//! @todo: Properly quit SDL without crashing SDL client apps
|
||||||
// SDL_Quit();
|
// SDL_Quit();
|
||||||
|
@ -296,6 +298,8 @@ oxr_sdl2_hack_create(void **out_hack)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os_thread_helper_init(&p->oth);
|
||||||
|
|
||||||
*out_hack = p;
|
*out_hack = p;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "hg_sync.hpp"
|
#include "hg_sync.hpp"
|
||||||
#include "hg_model.hpp"
|
#include "hg_model.hpp"
|
||||||
|
#include "util/u_sink.h"
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
namespace xrt::tracking::hand::mercury {
|
namespace xrt::tracking::hand::mercury {
|
||||||
|
@ -290,10 +291,13 @@ HandTracking::HandTracking()
|
||||||
{
|
{
|
||||||
this->base.process = &HandTracking::cCallbackProcess;
|
this->base.process = &HandTracking::cCallbackProcess;
|
||||||
this->base.destroy = &HandTracking::cCallbackDestroy;
|
this->base.destroy = &HandTracking::cCallbackDestroy;
|
||||||
|
u_sink_debug_init(&this->debug_sink);
|
||||||
}
|
}
|
||||||
|
|
||||||
HandTracking::~HandTracking()
|
HandTracking::~HandTracking()
|
||||||
{
|
{
|
||||||
|
u_sink_debug_destroy(&this->debug_sink);
|
||||||
|
|
||||||
release_onnx_wrap(&this->views[0].keypoint[0]);
|
release_onnx_wrap(&this->views[0].keypoint[0]);
|
||||||
release_onnx_wrap(&this->views[0].keypoint[1]);
|
release_onnx_wrap(&this->views[0].keypoint[1]);
|
||||||
release_onnx_wrap(&this->views[0].detection);
|
release_onnx_wrap(&this->views[0].detection);
|
||||||
|
|
|
@ -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));
|
struct ht_async_impl *hta = ht_async_impl(container_of(node, struct t_hand_tracking_async, node));
|
||||||
os_thread_helper_destroy(&hta->mainloop);
|
os_thread_helper_destroy(&hta->mainloop);
|
||||||
|
os_mutex_destroy(&hta->present.mutex);
|
||||||
|
|
||||||
t_ht_sync_destroy(&hta->provider);
|
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;
|
hta->provider = sync;
|
||||||
|
|
||||||
|
os_mutex_init(&hta->present.mutex);
|
||||||
os_thread_helper_init(&hta->mainloop);
|
os_thread_helper_init(&hta->mainloop);
|
||||||
os_thread_helper_start(&hta->mainloop, ht_async_mainloop, hta);
|
os_thread_helper_start(&hta->mainloop, ht_async_mainloop, hta);
|
||||||
xrt_frame_context_add(xfctx, &hta->base.node);
|
xrt_frame_context_add(xfctx, &hta->base.node);
|
||||||
|
|
Loading…
Reference in a new issue