st/oxr: Handle XRT_ERROR_EGL_CONFIG_MISSING

This commit is contained in:
Jakob Bornecrantz 2021-03-03 17:27:42 +00:00 committed by Jakob Bornecrantz
parent 0571e0337e
commit 6c3ab4151a
3 changed files with 11 additions and 3 deletions

View file

@ -69,6 +69,11 @@ oxr_session_populate_egl(struct oxr_logger *log,
next->getProcAddress, //
&xcgl); //
if (xret == XRT_ERROR_EGL_CONFIG_MISSING) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
"XrGraphicsBindingEGLMNDX::config can not be null when EGL_KHR_no_config_context is "
"not supported by the display.");
}
if (xret != XR_SUCCESS || xcgl == NULL) {
return oxr_error(log, XR_ERROR_INITIALIZATION_FAILED, "Failed to create an egl client compositor");
}

View file

@ -77,6 +77,11 @@ oxr_session_populate_gles_android(struct oxr_logger *log,
get_proc_addr, //
&xcgl); //
if (xret == XRT_ERROR_EGL_CONFIG_MISSING) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
"XrGraphicsBindingEGLMNDX::config can not be null when EGL_KHR_no_config_context is "
"not supported by the display.");
}
if (xret != XR_SUCCESS || xcgl == NULL) {
return oxr_error(log, XR_ERROR_INITIALIZATION_FAILED, "Failed to create an egl client compositor");
}

View file

@ -564,9 +564,7 @@ oxr_verify_XrGraphicsBindingEGLMNDX(struct oxr_logger *log, const XrGraphicsBind
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, "XrGraphicsBindingEGLMNDX::display cannot be NULL");
}
if (next->config == NULL) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, "XrGraphicsBindingEGLMNDX::config cannot be NULL");
}
// The next->config field can be NULL if EGL_KHR_no_config_context is supported by the display.
if (next->context == NULL) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, "XrGraphicsBindingEGLMNDX::context cannot be NULL");