The open source OpenXR runtime
0
fork

Configure Feed

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

st/oxr: Use correct define to test for extension support

+18 -18
+18 -18
src/xrt/state_trackers/oxr/oxr_session_frame_end.c
··· 145 145 const XrCompositionLayerBaseHeader *layer, 146 146 struct xrt_layer_data *xlayer_data) 147 147 { 148 - #ifdef XRT_FEATURE_OPENXR_LAYER_COLOR_SCALE_BIAS 148 + #ifdef OXR_HAVE_KHR_composition_layer_color_scale_bias 149 149 // Is the extension enabled? 150 150 if (!sess->sys->inst->extensions.KHR_composition_layer_color_scale_bias) { 151 151 return; ··· 158 158 fill_in_xr_color(&color_scale_bias->colorScale, &xlayer_data->color_scale); 159 159 fill_in_xr_color(&color_scale_bias->colorBias, &xlayer_data->color_bias); 160 160 } 161 - #endif // XRT_FEATURE_OPENXR_LAYER_COLOR_SCALE_BIAS 161 + #endif // OXR_HAVE_KHR_composition_layer_color_scale_bias 162 162 } 163 163 164 164 static void ··· 468 468 view->subImage.imageRect.extent.height, sc->width, sc->height); 469 469 } 470 470 471 - #ifdef XRT_FEATURE_OPENXR_LAYER_DEPTH 471 + #ifdef OXR_HAVE_KHR_composition_layer_depth 472 472 const XrCompositionLayerDepthInfoKHR *depth_info = OXR_GET_INPUT_FROM_CHAIN( 473 473 view, XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR, XrCompositionLayerDepthInfoKHR); 474 474 ··· 479 479 } 480 480 depth_layer_count++; 481 481 } 482 - #endif // XRT_FEATURE_OPENXR_LAYER_DEPTH 482 + #endif // OXR_HAVE_KHR_composition_layer_depth 483 483 } 484 484 485 - #ifdef XRT_FEATURE_OPENXR_LAYER_DEPTH 485 + #ifdef OXR_HAVE_KHR_composition_layer_depth 486 486 if (depth_layer_count > 0 && depth_layer_count != proj->viewCount) { 487 487 return oxr_error( 488 488 log, XR_ERROR_VALIDATION_FAILURE, 489 489 "(frameEndInfo->layers[%u] projection layer must have %u depth layers or none, but has: %u)", 490 490 layer_index, proj->viewCount, depth_layer_count); 491 491 } 492 - #endif // XRT_FEATURE_OPENXR_LAYER_DEPTH 492 + #endif // OXR_HAVE_KHR_composition_layer_depth 493 493 494 494 return XR_SUCCESS; 495 495 } ··· 502 502 struct xrt_device *head, 503 503 uint64_t timestamp) 504 504 { 505 - #ifndef XRT_FEATURE_OPENXR_LAYER_CUBE 505 + #ifndef OXR_HAVE_KHR_composition_layer_cube 506 506 return oxr_error(log, XR_ERROR_LAYER_INVALID, 507 507 "(frameEndInfo->layers[%u]->type) layer type " 508 508 "XrCompositionLayerCubeKHR not supported", ··· 553 553 } 554 554 555 555 return XR_SUCCESS; 556 - #endif 556 + #endif // OXR_HAVE_KHR_composition_layer_cube 557 557 } 558 558 559 559 static XrResult ··· 564 564 struct xrt_device *head, 565 565 uint64_t timestamp) 566 566 { 567 - #ifndef XRT_FEATURE_OPENXR_LAYER_CYLINDER 567 + #ifndef OXR_HAVE_KHR_composition_layer_cylinder 568 568 return oxr_error(log, XR_ERROR_LAYER_INVALID, 569 569 "(frameEndInfo->layers[%u]->type) layer type " 570 570 "XrCompositionLayerCylinderKHR not supported", ··· 657 657 } 658 658 659 659 return XR_SUCCESS; 660 - #endif 660 + #endif // OXR_HAVE_KHR_composition_layer_cylinder 661 661 } 662 662 663 663 static XrResult ··· 668 668 struct xrt_device *head, 669 669 uint64_t timestamp) 670 670 { 671 - #ifndef XRT_FEATURE_OPENXR_LAYER_EQUIRECT1 671 + #ifndef OXR_HAVE_KHR_composition_layer_equirect 672 672 return oxr_error(log, XR_ERROR_LAYER_INVALID, 673 673 "(frameEndInfo->layers[%u]->type) layer type " 674 674 "XrCompositionLayerEquirectKHR not supported", ··· 749 749 } 750 750 751 751 return XR_SUCCESS; 752 - #endif 752 + #endif // OXR_HAVE_KHR_composition_layer_equirect 753 753 } 754 754 755 755 static XrResult ··· 760 760 struct xrt_device *head, 761 761 uint64_t timestamp) 762 762 { 763 - #ifndef XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 763 + #ifndef OXR_HAVE_KHR_composition_layer_equirect2 764 764 return oxr_error(log, XR_ERROR_LAYER_INVALID, 765 765 "(frameEndInfo->layers[%u]->type) layer type XrCompositionLayerEquirect2KHR not supported", 766 766 layer_index); ··· 847 847 */ 848 848 849 849 return XR_SUCCESS; 850 - #endif 850 + #endif // OXR_HAVE_KHR_composition_layer_equirect2 851 851 } 852 852 853 853 ··· 1018 1018 fill_in_sub_image(scs[1], &proj->views[1].subImage, &data.stereo.r.sub); 1019 1019 fill_in_color_scale_bias(sess, (XrCompositionLayerBaseHeader *)proj, &data); 1020 1020 1021 - #ifdef XRT_FEATURE_OPENXR_LAYER_DEPTH 1021 + #ifdef OXR_HAVE_KHR_composition_layer_depth 1022 1022 const XrCompositionLayerDepthInfoKHR *d_l = OXR_GET_INPUT_FROM_CHAIN( 1023 1023 &proj->views[0], XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR, XrCompositionLayerDepthInfoKHR); 1024 1024 if (d_l) { ··· 1051 1051 // Need to pass this in. 1052 1052 d_scs[1] = sc; 1053 1053 } 1054 - #endif // XRT_FEATURE_OPENXR_LAYER_DEPTH 1054 + #endif // OXR_HAVE_KHR_composition_layer_depth 1055 1055 1056 1056 if (d_scs[0] != NULL && d_scs[1] != NULL) { 1057 - #ifdef XRT_FEATURE_OPENXR_LAYER_DEPTH 1057 + #ifdef OXR_HAVE_KHR_composition_layer_depth 1058 1058 data.type = XRT_LAYER_STEREO_PROJECTION_DEPTH; 1059 1059 xrt_result_t xret = xrt_comp_layer_stereo_projection_depth( // 1060 1060 xc, // compositor ··· 1067 1067 OXR_CHECK_XRET(log, sess, xret, xrt_comp_layer_stereo_projection_depth); 1068 1068 #else 1069 1069 assert(false && "Should not get here"); 1070 - #endif // XRT_FEATURE_OPENXR_LAYER_DEPTH 1070 + #endif // OXR_HAVE_KHR_composition_layer_depth 1071 1071 } else { 1072 1072 xrt_result_t xret = xrt_comp_layer_stereo_projection( // 1073 1073 xc, // compositor