xrCreateSession takes in an XrInstance and an XrSessionCreateInfo.

The XrInstanceCreateInfo used to create the instance isn't particularly interesting: the only parameters of note are enabledExtensionCount (= 1), and enabledExtensionNames (= XR_KHR_VULKAN_ENABLE_EXTENSION_NAME). The rest is arbitrary title/version info.

The XRSessionCreateInfo used to create the session has systemId set to the result of xrGetSystem, and next set to a pointer of type XrGraphicsBindingVulkanKHR.

The values of that simply point to a vulkan instance, physicalDevice, device, queueFamilyIndex, and queueIndex I am reasonably confident I have gathered correctly (I have vulkan working fine without openXR).

But the second xrCreateSession is called, I get about 20 validation errors of the following form:

Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x24341691190, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: Header block 512[%512] is contained in the loop construct headed by 505[%505], but its merge block 513[%513] is not
  %512 = OpLabel

(with different numbers for header block, headed by, merge block, etc...).

I haven't at this point yet supplied any SPIR-V to either vulkan nor openXR, so I'm unsure what is within my control.

Why am I getting these errors? What can be done to prevent them?

0

There are 0 best solutions below