mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
st/oxr: Mix tidy [NFC]
This commit is contained in:
parent
9f958f7003
commit
c123c10a05
|
@ -384,16 +384,6 @@
|
||||||
#endif
|
#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
|
* XR_FB_composition_layer_settings
|
||||||
*/
|
*/
|
||||||
|
@ -405,6 +395,18 @@
|
||||||
#define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_)
|
#define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_)
|
||||||
#endif
|
#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
|
* XR_ML_ml2_controller_interaction
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -131,6 +131,32 @@ convert_eye_visibility(XrSwapchainUsageFlags xr_visibility)
|
||||||
return 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
|
XRT_MAYBE_UNUSED static void
|
||||||
fill_in_xr_color(const struct XrColor4f *src, struct xrt_colour_rgba_f32 *dest)
|
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
|
#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
|
static void
|
||||||
fill_in_y_flip(struct oxr_session *sess, const XrCompositionLayerBaseHeader *layer, struct xrt_layer_data *xlayer_data)
|
fill_in_y_flip(struct oxr_session *sess, const XrCompositionLayerBaseHeader *layer, struct xrt_layer_data *xlayer_data)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue