mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
st/oxr: Ignore primaryViewConfigurationType in headless
Spec: "In a headless session, the XrSessionBeginInfo::primaryViewConfigurationType must be ignored and may be 0."
This commit is contained in:
parent
5980804535
commit
ccfac98d36
|
@ -94,7 +94,11 @@ oxr_xrBeginSession(XrSession session, const XrSessionBeginInfo *beginInfo)
|
||||||
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrBeginSession");
|
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrBeginSession");
|
||||||
OXR_VERIFY_SESSION_NOT_LOST(&log, sess);
|
OXR_VERIFY_SESSION_NOT_LOST(&log, sess);
|
||||||
OXR_VERIFY_ARG_TYPE_AND_NOT_NULL(&log, beginInfo, XR_TYPE_SESSION_BEGIN_INFO);
|
OXR_VERIFY_ARG_TYPE_AND_NOT_NULL(&log, beginInfo, XR_TYPE_SESSION_BEGIN_INFO);
|
||||||
|
|
||||||
|
// in a headless session there is no compositor and primaryViewConfigurationType must be ignored
|
||||||
|
if (sess->compositor != NULL) {
|
||||||
OXR_VERIFY_VIEW_CONFIG_TYPE(&log, sess->sys->inst, beginInfo->primaryViewConfigurationType);
|
OXR_VERIFY_VIEW_CONFIG_TYPE(&log, sess->sys->inst, beginInfo->primaryViewConfigurationType);
|
||||||
|
}
|
||||||
|
|
||||||
if (sess->has_begun) {
|
if (sess->has_begun) {
|
||||||
return oxr_error(&log, XR_ERROR_SESSION_RUNNING, "Session is already running");
|
return oxr_error(&log, XR_ERROR_SESSION_RUNNING, "Session is already running");
|
||||||
|
|
|
@ -210,7 +210,8 @@ oxr_session_begin(struct oxr_logger *log, struct oxr_session *sess, const XrSess
|
||||||
if (xc != NULL) {
|
if (xc != NULL) {
|
||||||
XrViewConfigurationType view_type = beginInfo->primaryViewConfigurationType;
|
XrViewConfigurationType view_type = beginInfo->primaryViewConfigurationType;
|
||||||
|
|
||||||
if (view_type != sess->sys->view_config_type) {
|
// in a headless session there is no compositor and primaryViewConfigurationType must be ignored
|
||||||
|
if (sess->compositor != NULL && view_type != sess->sys->view_config_type) {
|
||||||
/*! @todo we only support a single view config type per
|
/*! @todo we only support a single view config type per
|
||||||
* system right now */
|
* system right now */
|
||||||
return oxr_error(log, XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED,
|
return oxr_error(log, XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED,
|
||||||
|
|
Loading…
Reference in a new issue