src: Consistently append 1 to equirect1 code.

Rename XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY to XRT_FEATURE_OPENXR_LAYER_EQUIRECT1.
Use correct define in verify_equirect1_layer function.
Rename equirect to equirect1.
meson: enable equirect1 by default.
This commit is contained in:
Lubosz Sarnecki 2020-12-02 14:18:00 +01:00 committed by Jakob Bornecrantz
parent f334b8b6c7
commit c8bdfae83e
7 changed files with 27 additions and 27 deletions

View file

@ -147,8 +147,8 @@ endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_EQUIRECT2) if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_EQUIRECT2)
set(XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 ON) set(XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 ON)
endif() endif()
if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY) if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_EQUIRECT1)
set(XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY OFF) set(XRT_FEATURE_OPENXR_LAYER_EQUIRECT1 OFF)
endif() endif()
# Most users won't touch these. # Most users won't touch these.
@ -304,7 +304,7 @@ message(STATUS "# FEATURE_OPENXR_LAYER_DEPTH: ${XRT_FEATURE_OPENXR_
message(STATUS "# FEATURE_OPENXR_LAYER_CUBE: ${XRT_FEATURE_OPENXR_LAYER_CUBE}") message(STATUS "# FEATURE_OPENXR_LAYER_CUBE: ${XRT_FEATURE_OPENXR_LAYER_CUBE}")
message(STATUS "# FEATURE_OPENXR_LAYER_CYLINDER: ${XRT_FEATURE_OPENXR_LAYER_CYLINDER}") message(STATUS "# FEATURE_OPENXR_LAYER_CYLINDER: ${XRT_FEATURE_OPENXR_LAYER_CYLINDER}")
message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT2: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT2}") message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT2: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT2}")
message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY}") message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT1: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT1}")
message(STATUS "# FEATURE_STEAMVR_PLUGIN: ${XRT_FEATURE_STEAMVR_PLUGIN}") message(STATUS "# FEATURE_STEAMVR_PLUGIN: ${XRT_FEATURE_STEAMVR_PLUGIN}")
message(STATUS "#") message(STATUS "#")
message(STATUS "# DRIVER_ANDROID: ${XRT_BUILD_DRIVER_ANDROID}") message(STATUS "# DRIVER_ANDROID: ${XRT_BUILD_DRIVER_ANDROID}")

View file

@ -96,10 +96,10 @@ option('layer_cylinder',
description: 'Enable support for Cylinder Layers' description: 'Enable support for Cylinder Layers'
) )
option('layer_equirect', option('layer_equirect1',
type: 'boolean', type: 'boolean',
value: false, value: true,
description: 'Enable support for Equirect Layers' description: 'Enable support for legacy Equirect Layers'
) )
option('layer_equirect2', option('layer_equirect2',

View file

@ -18,7 +18,7 @@ EXTENSIONS = (
['XR_KHR_composition_layer_depth', 'XRT_FEATURE_OPENXR_LAYER_DEPTH'], ['XR_KHR_composition_layer_depth', 'XRT_FEATURE_OPENXR_LAYER_DEPTH'],
['XR_KHR_composition_layer_cube', 'XRT_FEATURE_OPENXR_LAYER_CUBE'], ['XR_KHR_composition_layer_cube', 'XRT_FEATURE_OPENXR_LAYER_CUBE'],
['XR_KHR_composition_layer_cylinder', 'XRT_FEATURE_OPENXR_LAYER_CYLINDER'], ['XR_KHR_composition_layer_cylinder', 'XRT_FEATURE_OPENXR_LAYER_CYLINDER'],
['XR_KHR_composition_layer_equirect', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY'], ['XR_KHR_composition_layer_equirect', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT1'],
['XR_KHR_composition_layer_equirect2', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT2'], ['XR_KHR_composition_layer_equirect2', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT2'],
['XR_EXT_debug_utils'], ['XR_EXT_debug_utils'],
['XR_MND_headless'], ['XR_MND_headless'],

View file

@ -93,8 +93,8 @@ if get_option('layer_cylinder')
have_conf.set('XRT_FEATURE_OPENXR_LAYER_CYLINDER', true) have_conf.set('XRT_FEATURE_OPENXR_LAYER_CYLINDER', true)
endif endif
if get_option('layer_equirect') if get_option('layer_equirect1')
have_conf.set('XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY', true) have_conf.set('XRT_FEATURE_OPENXR_LAYER_EQUIRECT1', true)
endif endif
if get_option('layer_equirect2') if get_option('layer_equirect2')

View file

@ -23,4 +23,4 @@
#cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 #cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT2
#cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY #cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT1

View file

@ -123,7 +123,7 @@
* XR_KHR_composition_layer_equirect * XR_KHR_composition_layer_equirect
*/ */
#if defined(XR_KHR_composition_layer_equirect) && \ #if defined(XR_KHR_composition_layer_equirect) && \
defined(XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY) defined(XRT_FEATURE_OPENXR_LAYER_EQUIRECT1)
#define OXR_HAVE_KHR_composition_layer_equirect #define OXR_HAVE_KHR_composition_layer_equirect
#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \ #define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \
_(KHR_composition_layer_equirect, KHR_COMPOSITION_LAYER_EQUIRECT) _(KHR_composition_layer_equirect, KHR_COMPOSITION_LAYER_EQUIRECT)

View file

@ -1217,14 +1217,14 @@ verify_cylinder_layer(struct xrt_compositor *xc,
} }
static XrResult static XrResult
verify_equirect_layer(struct xrt_compositor *xc, verify_equirect1_layer(struct xrt_compositor *xc,
struct oxr_logger *log, struct oxr_logger *log,
uint32_t layer_index, uint32_t layer_index,
const XrCompositionLayerEquirectKHR *equirect, const XrCompositionLayerEquirectKHR *equirect,
struct xrt_device *head, struct xrt_device *head,
uint64_t timestamp) uint64_t timestamp)
{ {
#ifndef XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 #ifndef XRT_FEATURE_OPENXR_LAYER_EQUIRECT1
return oxr_error(log, XR_ERROR_LAYER_INVALID, return oxr_error(log, XR_ERROR_LAYER_INVALID,
"(frameEndInfo->layers[%u]->type) layer type " "(frameEndInfo->layers[%u]->type) layer type "
"XrCompositionLayerEquirectKHR not supported", "XrCompositionLayerEquirectKHR not supported",
@ -1799,13 +1799,13 @@ submit_cylinder_layer(struct oxr_session *sess,
} }
static void static void
submit_equirect_layer(struct oxr_session *sess, submit_equirect1_layer(struct oxr_session *sess,
struct xrt_compositor *xc, struct xrt_compositor *xc,
struct oxr_logger *log, struct oxr_logger *log,
const XrCompositionLayerEquirectKHR *equirect, const XrCompositionLayerEquirectKHR *equirect,
struct xrt_device *head, struct xrt_device *head,
struct xrt_pose *inv_offset, struct xrt_pose *inv_offset,
uint64_t timestamp) uint64_t timestamp)
{ {
// Not implemented // Not implemented
} }
@ -2016,7 +2016,7 @@ oxr_session_frame_end(struct oxr_logger *log,
xdev, frameEndInfo->displayTime); xdev, frameEndInfo->displayTime);
break; break;
case XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR: case XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR:
res = verify_equirect_layer( res = verify_equirect1_layer(
xc, log, i, (XrCompositionLayerEquirectKHR *)layer, xc, log, i, (XrCompositionLayerEquirectKHR *)layer,
xdev, frameEndInfo->displayTime); xdev, frameEndInfo->displayTime);
break; break;
@ -2081,7 +2081,7 @@ oxr_session_frame_end(struct oxr_logger *log,
&inv_offset, timestamp); &inv_offset, timestamp);
break; break;
case XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR: case XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR:
submit_equirect_layer( submit_equirect1_layer(
sess, xc, log, sess, xc, log,
(XrCompositionLayerEquirectKHR *)layer, xdev, (XrCompositionLayerEquirectKHR *)layer, xdev,
&inv_offset, timestamp); &inv_offset, timestamp);