From 2abcc1717876e9ae6b1775a85ed740bdf3cf73d7 Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Fri, 9 Dec 2022 16:38:06 +0000 Subject: [PATCH] c/main: Add XRT_COMPOSITOR_DISABLE_DEFERRED env var --- src/xrt/compositor/main/comp_compositor.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/xrt/compositor/main/comp_compositor.c b/src/xrt/compositor/main/comp_compositor.c index 4c6ccb613..23eaf536a 100644 --- a/src/xrt/compositor/main/comp_compositor.c +++ b/src/xrt/compositor/main/comp_compositor.c @@ -80,6 +80,8 @@ #define WINDOW_TITLE "Monado" +DEBUG_GET_ONCE_BOOL_OPTION(disable_deferred, "XRT_COMPOSITOR_DISABLE_DEFERRED", false) + /* * @@ -774,6 +776,11 @@ error_msg_with_list(struct comp_compositor *c, const char *msg) static bool compositor_check_deferred(struct comp_compositor *c, struct comp_target_factory *ctf) { + if (debug_get_bool_option_disable_deferred()) { + COMP_DEBUG(c, "Deferred window initialization globally disabled!"); + return false; + } + if (!ctf->is_deferred) { return false; // It is not deferred but that's okay. }