c/main: Default to compute compositor on Android to work around issue #381

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2235>
This commit is contained in:
Rylie Pavlik 2024-06-05 14:40:49 -05:00
parent fc830bc5b4
commit 5b8edfbb30
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1 @@
android: Default to compute compositor to work around issue [381](https://gitlab.freedesktop.org/monado/monado/-/issues/381).

View file

@ -10,6 +10,13 @@
#include "util/u_debug.h"
#include "comp_settings.h"
#ifdef XRT_OS_ANDROID
// temporary workaround for https://gitlab.freedesktop.org/monado/monado/-/issues/381
#define USE_COMPUTE_DEFAULT true
#else
#define USE_COMPUTE_DEFAULT false
#endif
// clang-format off
DEBUG_GET_ONCE_LOG_OPTION(log, "XRT_COMPOSITOR_LOG", U_LOGGING_INFO)
DEBUG_GET_ONCE_BOOL_OPTION(print_modes, "XRT_COMPOSITOR_PRINT_MODES", false)
@ -27,7 +34,7 @@ DEBUG_GET_ONCE_NUM_OPTION(scale_percentage, "XRT_COMPOSITOR_SCALE_PERCENTAGE", 1
DEBUG_GET_ONCE_BOOL_OPTION(xcb_fullscreen, "XRT_COMPOSITOR_XCB_FULLSCREEN", false)
DEBUG_GET_ONCE_NUM_OPTION(xcb_display, "XRT_COMPOSITOR_XCB_DISPLAY", -1)
DEBUG_GET_ONCE_NUM_OPTION(default_framerate, "XRT_COMPOSITOR_DEFAULT_FRAMERATE", 60)
DEBUG_GET_ONCE_BOOL_OPTION(compute, "XRT_COMPOSITOR_COMPUTE", false)
DEBUG_GET_ONCE_BOOL_OPTION(compute, "XRT_COMPOSITOR_COMPUTE", USE_COMPUTE_DEFAULT)
// clang-format on
static inline void