The open source OpenXR runtime
0
fork

Configure Feed

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

st/oxr: Fix warnings when XR_KHR_composition_layer_depth is disabled

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2406>

+6
+6
src/xrt/state_trackers/oxr/oxr_session_frame_end.c
··· 480 480 return XR_SUCCESS; 481 481 } 482 482 483 + #ifdef OXR_HAVE_KHR_composition_layer_depth 483 484 static XrResult 484 485 verify_depth_layer(struct xrt_compositor *xc, 485 486 struct oxr_logger *log, ··· 572 573 573 574 return XR_SUCCESS; 574 575 } 576 + #endif // OXR_HAVE_KHR_composition_layer_depth 575 577 576 578 static XrResult 577 579 verify_projection_layer(struct oxr_session *sess, ··· 632 634 break; 633 635 } 634 636 637 + #ifdef OXR_HAVE_KHR_composition_layer_depth 635 638 // number of depth layers must be 0 or proj->viewCount 636 639 uint32_t depth_layer_count = 0; 640 + #endif 637 641 638 642 // Check for valid swapchain states. 639 643 for (uint32_t i = 0; i < proj->viewCount; i++) { ··· 1297 1301 struct xrt_pose *pose_ptr = NULL; 1298 1302 struct xrt_pose pose[XRT_MAX_VIEWS] = {0}; 1299 1303 struct xrt_swapchain *swapchains[XRT_MAX_VIEWS] = {0}; 1304 + #ifdef OXR_HAVE_KHR_composition_layer_depth 1300 1305 struct xrt_swapchain *d_swapchains[XRT_MAX_VIEWS] = {0}; 1306 + #endif 1301 1307 1302 1308 enum xrt_layer_composition_flags flags = convert_layer_flags(proj->layerFlags); 1303 1309