mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
st/oxr: Improve verification of XrGraphicsBindingEGLMNDX
This commit is contained in:
parent
7ba4bee439
commit
f868f61a17
|
@ -593,9 +593,36 @@ XrResult
|
||||||
oxr_verify_XrGraphicsBindingEGLMNDX(struct oxr_logger *log,
|
oxr_verify_XrGraphicsBindingEGLMNDX(struct oxr_logger *log,
|
||||||
const XrGraphicsBindingEGLMNDX *next)
|
const XrGraphicsBindingEGLMNDX *next)
|
||||||
{
|
{
|
||||||
|
// Here for internal error checking
|
||||||
if (next->type != XR_TYPE_GRAPHICS_BINDING_EGL_MNDX) {
|
if (next->type != XR_TYPE_GRAPHICS_BINDING_EGL_MNDX) {
|
||||||
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
|
return oxr_error(
|
||||||
"Graphics binding has invalid type");
|
log, XR_ERROR_RUNTIME_FAILURE,
|
||||||
|
"XrGraphicsBindingEGLMNDX::type is invalid '%i'",
|
||||||
|
next->type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (next->getProcAddress == NULL) {
|
||||||
|
return oxr_error(
|
||||||
|
log, XR_ERROR_VALIDATION_FAILURE,
|
||||||
|
"XrGraphicsBindingEGLMNDX::getProcAddress cannot be NULL");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (next->display == NULL) {
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (next->context == NULL) {
|
||||||
|
return oxr_error(
|
||||||
|
log, XR_ERROR_VALIDATION_FAILURE,
|
||||||
|
"XrGraphicsBindingEGLMNDX::context cannot be NULL");
|
||||||
}
|
}
|
||||||
|
|
||||||
return XR_SUCCESS;
|
return XR_SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue