mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 10:36:15 +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_NOT_LOST(&log, sess);
|
||||
OXR_VERIFY_ARG_TYPE_AND_NOT_NULL(&log, beginInfo, XR_TYPE_SESSION_BEGIN_INFO);
|
||||
OXR_VERIFY_VIEW_CONFIG_TYPE(&log, sess->sys->inst, beginInfo->primaryViewConfigurationType);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
if (sess->has_begun) {
|
||||
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) {
|
||||
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
|
||||
* system right now */
|
||||
return oxr_error(log, XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED,
|
||||
|
|
Loading…
Reference in a new issue