The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/oxr: Improve verification of XrGraphicsBindingEGLMNDX

+29 -2
+29 -2
src/xrt/state_trackers/oxr/oxr_verify.c
··· 593 593 oxr_verify_XrGraphicsBindingEGLMNDX(struct oxr_logger *log, 594 594 const XrGraphicsBindingEGLMNDX *next) 595 595 { 596 + // Here for internal error checking 596 597 if (next->type != XR_TYPE_GRAPHICS_BINDING_EGL_MNDX) { 597 - return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, 598 - "Graphics binding has invalid type"); 598 + return oxr_error( 599 + log, XR_ERROR_RUNTIME_FAILURE, 600 + "XrGraphicsBindingEGLMNDX::type is invalid '%i'", 601 + next->type); 602 + } 603 + 604 + if (next->getProcAddress == NULL) { 605 + return oxr_error( 606 + log, XR_ERROR_VALIDATION_FAILURE, 607 + "XrGraphicsBindingEGLMNDX::getProcAddress cannot be NULL"); 608 + } 609 + 610 + if (next->display == NULL) { 611 + return oxr_error( 612 + log, XR_ERROR_VALIDATION_FAILURE, 613 + "XrGraphicsBindingEGLMNDX::display cannot be NULL"); 614 + } 615 + 616 + if (next->config == NULL) { 617 + return oxr_error( 618 + log, XR_ERROR_VALIDATION_FAILURE, 619 + "XrGraphicsBindingEGLMNDX::config cannot be NULL"); 620 + } 621 + 622 + if (next->context == NULL) { 623 + return oxr_error( 624 + log, XR_ERROR_VALIDATION_FAILURE, 625 + "XrGraphicsBindingEGLMNDX::context cannot be NULL"); 599 626 } 600 627 601 628 return XR_SUCCESS;