The open source OpenXR runtime
0
fork

Configure Feed

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

st/oxr: Add layer type conditionals around depth-image manipulation

+12
+12
src/xrt/state_trackers/oxr/oxr_session.c
··· 8 8 */ 9 9 10 10 #include "xrt/xrt_device.h" 11 + #include "xrt/xrt_config_build.h" 12 + #include "xrt/xrt_config_have.h" 11 13 12 14 #ifdef XR_USE_PLATFORM_XLIB 13 15 #include "xrt/xrt_gfx_xlib.h" ··· 928 930 sc->height); 929 931 } 930 932 933 + #ifdef XRT_FEATURE_OPENXR_LAYER_DEPTH 931 934 const XrCompositionLayerDepthInfoKHR *depth_info = 932 935 OXR_GET_INPUT_FROM_CHAIN( 933 936 view, XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR, ··· 941 944 } 942 945 num_depth_layers++; 943 946 } 947 + #endif // XRT_FEATURE_OPENXR_LAYER_DEPTH 944 948 } 945 949 950 + #ifdef XRT_FEATURE_OPENXR_LAYER_DEPTH 946 951 if (num_depth_layers > 0 && num_depth_layers != proj->viewCount) { 947 952 return oxr_error( 948 953 log, XR_ERROR_VALIDATION_FAILURE, ··· 950 955 "depth layers or none, but has: %u)", 951 956 layer_index, proj->viewCount, num_depth_layers); 952 957 } 958 + #endif // XRT_FEATURE_OPENXR_LAYER_DEPTH 953 959 954 960 return XR_SUCCESS; 955 961 } ··· 1469 1475 1470 1476 1471 1477 1478 + #ifdef XRT_FEATURE_OPENXR_LAYER_DEPTH 1472 1479 const XrCompositionLayerDepthInfoKHR *d_l = OXR_GET_INPUT_FROM_CHAIN( 1473 1480 &proj->views[0], XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR, 1474 1481 XrCompositionLayerDepthInfoKHR); ··· 1515 1522 // Need to pass this in. 1516 1523 d_scs[1] = sc; 1517 1524 } 1525 + #endif // XRT_FEATURE_OPENXR_LAYER_DEPTH 1518 1526 1519 1527 if (d_scs[0] != NULL && d_scs[1] != NULL) { 1528 + #ifdef XRT_FEATURE_OPENXR_LAYER_DEPTH 1520 1529 data.type = XRT_LAYER_STEREO_PROJECTION_DEPTH; 1521 1530 CALL_CHK(xrt_comp_layer_stereo_projection_depth( 1522 1531 xc, head, ··· 1525 1534 d_scs[0]->swapchain, // Left 1526 1535 d_scs[1]->swapchain, // Right 1527 1536 &data)); 1537 + #else 1538 + assert(false && "Should not get here"); 1539 + #endif // XRT_FEATURE_OPENXR_LAYER_DEPTH 1528 1540 } else { 1529 1541 CALL_CHK( 1530 1542 xrt_comp_layer_stereo_projection(xc, head,