mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
st/oxr: Add OXR_PARALLEL_VIEWS debug var
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2312>
This commit is contained in:
parent
338d85543b
commit
f672227153
|
@ -49,6 +49,7 @@ DEBUG_GET_ONCE_BOOL_OPTION(debug_views, "OXR_DEBUG_VIEWS", false)
|
|||
DEBUG_GET_ONCE_BOOL_OPTION(debug_spaces, "OXR_DEBUG_SPACES", false)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(debug_bindings, "OXR_DEBUG_BINDINGS", false)
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(lifecycle_verbose, "OXR_LIFECYCLE_VERBOSE", false)
|
||||
DEBUG_GET_ONCE_TRISTATE_OPTION(parallel_views, "OXR_PARALLEL_VIEWS")
|
||||
|
||||
|
||||
#ifdef XRT_OS_ANDROID
|
||||
|
@ -202,6 +203,15 @@ apply_quirks(struct oxr_logger *log, struct oxr_instance *inst)
|
|||
|
||||
// Currently always true.
|
||||
inst->quirks.no_validation_error_in_create_ref_space = true;
|
||||
|
||||
enum debug_tristate_option parallel_view = debug_get_tristate_option_parallel_views();
|
||||
|
||||
// Only override hardcoded quirks when explicitly enabling or disabling, not on auto.
|
||||
if (parallel_view == DEBUG_TRISTATE_OFF) {
|
||||
inst->quirks.parallel_views = false;
|
||||
} else if (parallel_view == DEBUG_TRISTATE_ON) {
|
||||
inst->quirks.parallel_views = true;
|
||||
}
|
||||
}
|
||||
|
||||
XrResult
|
||||
|
|
|
@ -1711,6 +1711,9 @@ struct oxr_instance
|
|||
* XR_ERROR_VALIDATION_FAILURE in xrCreateReferenceSpace.
|
||||
*/
|
||||
bool no_validation_error_in_create_ref_space;
|
||||
|
||||
//! For applications that rely on views being parallel, notably some OpenVR games with OpenComposite.
|
||||
bool parallel_views;
|
||||
} quirks;
|
||||
|
||||
//! Debug messengers
|
||||
|
|
|
@ -614,7 +614,11 @@ oxr_session_locate_views(struct oxr_logger *log,
|
|||
* Pose
|
||||
*/
|
||||
|
||||
const struct xrt_pose view_pose = poses[i];
|
||||
struct xrt_pose view_pose = poses[i];
|
||||
|
||||
if (sess->sys->inst->quirks.parallel_views) {
|
||||
view_pose.orientation = (struct xrt_quat)XRT_QUAT_IDENTITY;
|
||||
}
|
||||
|
||||
// Do the magical space relation dance here.
|
||||
struct xrt_space_relation result = {0};
|
||||
|
|
Loading…
Reference in a new issue