diff --git a/src/xrt/state_trackers/oxr/oxr_extension_support.h b/src/xrt/state_trackers/oxr/oxr_extension_support.h index d7b027b31..1fb62555b 100644 --- a/src/xrt/state_trackers/oxr/oxr_extension_support.h +++ b/src/xrt/state_trackers/oxr/oxr_extension_support.h @@ -384,16 +384,6 @@ #endif -/* - * XR_FB_display_refresh_rate - */ -#if defined(XR_FB_display_refresh_rate) && defined(XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE) -#define OXR_HAVE_FB_display_refresh_rate -#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) _(FB_display_refresh_rate, FB_DISPLAY_REFRESH_RATE) -#else -#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) -#endif - /* * XR_FB_composition_layer_settings */ @@ -405,6 +395,18 @@ #define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_) #endif + +/* + * XR_FB_display_refresh_rate + */ +#if defined(XR_FB_display_refresh_rate) && defined(XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE) +#define OXR_HAVE_FB_display_refresh_rate +#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) _(FB_display_refresh_rate, FB_DISPLAY_REFRESH_RATE) +#else +#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) +#endif + + /* * XR_ML_ml2_controller_interaction */ diff --git a/src/xrt/state_trackers/oxr/oxr_session_frame_end.c b/src/xrt/state_trackers/oxr/oxr_session_frame_end.c index fc1afc633..420e4cb90 100644 --- a/src/xrt/state_trackers/oxr/oxr_session_frame_end.c +++ b/src/xrt/state_trackers/oxr/oxr_session_frame_end.c @@ -131,6 +131,32 @@ convert_eye_visibility(XrSwapchainUsageFlags xr_visibility) return visibility; } +#ifdef OXR_HAVE_FB_composition_layer_settings +static enum xrt_layer_composition_flags +convert_layer_settings_flags(XrCompositionLayerSettingsFlagsFB xr_layer_settings_flags) +{ + enum xrt_layer_composition_flags layer_settings_flags = 0; + + if ((xr_layer_settings_flags & XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SUPER_SAMPLING_BIT_FB) != 0) { + layer_settings_flags |= XRT_COMPOSITION_LAYER_PROCESSING_NORMAL_SUPER_SAMPLING_BIT_FB; + } + + if ((xr_layer_settings_flags & XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SUPER_SAMPLING_BIT_FB) != 0) { + layer_settings_flags |= XRT_COMPOSITION_LAYER_PROCESSING_QUALITY_SUPER_SAMPLING_BIT_FB; + } + + if ((xr_layer_settings_flags & XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SHARPENING_BIT_FB) != 0) { + layer_settings_flags |= XRT_COMPOSITION_LAYER_PROCESSING_NORMAL_SHARPENING_BIT_FB; + } + + if ((xr_layer_settings_flags & XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SHARPENING_BIT_FB) != 0) { + layer_settings_flags |= XRT_COMPOSITION_LAYER_PROCESSING_QUALITY_SHARPENING_BIT_FB; + } + + return layer_settings_flags; +} +#endif // OXR_HAVE_FB_composition_layer_settings + XRT_MAYBE_UNUSED static void fill_in_xr_color(const struct XrColor4f *src, struct xrt_colour_rgba_f32 *dest) { @@ -161,30 +187,6 @@ fill_in_color_scale_bias(struct oxr_session *sess, #endif // OXR_HAVE_KHR_composition_layer_color_scale_bias } -static enum xrt_layer_composition_flags -convert_layer_settings_flags(XrCompositionLayerSettingsFlagsFB xr_layer_settings_flags) -{ - enum xrt_layer_composition_flags layer_settings_flags = 0; - - if ((xr_layer_settings_flags & XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SUPER_SAMPLING_BIT_FB) != 0) { - layer_settings_flags |= XRT_COMPOSITION_LAYER_PROCESSING_NORMAL_SUPER_SAMPLING_BIT_FB; - } - - if ((xr_layer_settings_flags & XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SUPER_SAMPLING_BIT_FB) != 0) { - layer_settings_flags |= XRT_COMPOSITION_LAYER_PROCESSING_QUALITY_SUPER_SAMPLING_BIT_FB; - } - - if ((xr_layer_settings_flags & XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SHARPENING_BIT_FB) != 0) { - layer_settings_flags |= XRT_COMPOSITION_LAYER_PROCESSING_NORMAL_SHARPENING_BIT_FB; - } - - if ((xr_layer_settings_flags & XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SHARPENING_BIT_FB) != 0) { - layer_settings_flags |= XRT_COMPOSITION_LAYER_PROCESSING_QUALITY_SHARPENING_BIT_FB; - } - - return layer_settings_flags; -} - static void fill_in_y_flip(struct oxr_session *sess, const XrCompositionLayerBaseHeader *layer, struct xrt_layer_data *xlayer_data) {