st/oxr: Return appropriate errors for incomplete OpenGL XLib binding

* xDisplay must be a pointer to a Display value
* glxDrawable must be a valid GLXDrawable value
* glxContext must be a valid GLXContext value

intentionally not checked:
* glxFBConfig must be a valid GLXFBConfig value
We don't care about this one for now.
This commit is contained in:
Christoph Haag 2019-11-08 16:07:10 +01:00
parent 4c7f830ea5
commit e78e5c8045

View file

@ -535,9 +535,25 @@ oxr_verify_XrGraphicsBindingOpenGLXlibKHR(
{
if (next->type != XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
" Graphics binding has invalid type");
"Graphics binding has invalid type");
}
if (next->xDisplay == NULL) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
"xDisplay is NULL");
}
if (next->glxContext == NULL) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
"glxContext is NULL");
}
if (next->glxDrawable == NULL) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
"glxDrawable is NULL");
}
return XR_SUCCESS;
}