st/oxr: Add checks for Vulkan graphics bindings

This commit is contained in:
Christoph Haag 2021-06-25 01:10:25 +02:00
parent 7461c57043
commit bcc50dbd4f

View file

@ -2028,6 +2028,12 @@ oxr_session_create_impl(struct oxr_logger *log,
XrGraphicsBindingVulkanKHR const *vulkan = XrGraphicsBindingVulkanKHR const *vulkan =
OXR_GET_INPUT_FROM_CHAIN(createInfo, XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR, XrGraphicsBindingVulkanKHR); OXR_GET_INPUT_FROM_CHAIN(createInfo, XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR, XrGraphicsBindingVulkanKHR);
if (vulkan != NULL) { if (vulkan != NULL) {
OXR_VERIFY_ARG_NOT_ZERO(log, vulkan->instance);
OXR_VERIFY_ARG_NOT_ZERO(log, vulkan->physicalDevice);
if (vulkan->device == VK_NULL_HANDLE) {
return oxr_error(log, XR_ERROR_GRAPHICS_DEVICE_INVALID, "VkDevice must not be VK_NULL_HANDLE");
}
if (!sys->gotten_requirements) { if (!sys->gotten_requirements) {
return oxr_error(log, XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING, return oxr_error(log, XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING,
"Has not called " "Has not called "