The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/oxr: Always create the system compositor

Some apps will enable headless and vulkan, then use Vulkan.

+7 -4
+7 -4
src/xrt/state_trackers/oxr/oxr_instance.c
··· 269 269 270 270 struct oxr_system *sys = &inst->system; 271 271 272 - // Create the compositor if we are not headless. 273 - if (!inst->extensions.MND_headless) { 272 + // Create the compositor if we are not headless, currently always create it. 273 + bool should_create_compositor = true /* !inst->extensions.MND_headless */; 274 + 275 + // Create the system. 276 + if (should_create_compositor) { 274 277 xret = xrt_instance_create_system(inst->xinst, &sys->xsysd, &sys->xso, &sys->xsysc); 275 278 } else { 276 279 xret = xrt_instance_create_system(inst->xinst, &sys->xsysd, &sys->xso, NULL); ··· 285 288 ret = XR_SUCCESS; 286 289 if (sys->xsysd == NULL) { 287 290 ret = oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Huh?! Field sys->xsysd was NULL?"); 288 - } else if (!inst->extensions.MND_headless && sys->xsysc == NULL) { 291 + } else if (should_create_compositor && sys->xsysc == NULL) { 289 292 ret = oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Huh?! Field sys->xsysc was NULL?"); 290 - } else if (inst->extensions.MND_headless && sys->xsysc != NULL) { 293 + } else if (!should_create_compositor && sys->xsysc != NULL) { 291 294 ret = oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Huh?! Field sys->xsysc was not NULL?"); 292 295 } 293 296