You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some problems in trying to use Vulkano with the OpenXR API (Rust bindings available via openxrs crate). The OpenXR API wants to create the Vulkan structs VkPhysicalDevice (instead of taking one that is already created).
The existing Vulkano APIs do not support taking in an externally created VkPhysicalDevice.
I was trying to do this, and ran into trouble when trying to create a session. I was unable to figure out how to provide any of these parameters, not just physical device.
Summary
There are some problems in trying to use Vulkano with the OpenXR API (Rust bindings available via openxrs crate). The OpenXR API wants to create the Vulkan structs
VkPhysicalDevice
(instead of taking one that is already created).The existing Vulkano APIs do not support taking in an externally created
VkPhysicalDevice
.Details
Support for Vulkan in OpenXR comes via
XR_KHR_vulkan_enable
OpenXR extension.The workflow to initialize OpenXR with Vulkan support (skipping some non-Vulkan details):
XrInstance
from OpenXR by callingxrCreateInstance()
.XrSystemId
from OpenXR xrGetSystem()XrGraphicsRequirementsVulkanKHR()
xrGetVulkanInstanceExtensionsKHR()
VkInstance
from Vulkan by callingvkCreateInstance()
.VkPhysicalDevice
from OpenXR by callingxrGetVulkanGraphicsDeviceKHR()
.VkInstance
VkDevice
from Vulkan by callingvkCreateDevice()
XrSession
from OpenXR by callingxrCreateSession()
XrSessionCreateInfo
XrGraphicsBindingVulkanKHR
(in next chain ofXrSessionCreateInfo
)VkInstance
instanceVkPhysicalDevice
physicalDeviceVkDevice
device;uint32_t
queueFamilyIndexuint32_t
queueIndexAccording to
XR_KHR_vulkan_enable
spec:Vulkano cannot just create the the
VkPhysicalDevice
with Vulkan APIs.Possible Solutions
VkPhysicalDevice
.FromVulkanObject
trait (opposite of the existingVulkanObject
trait)xrGetVulkanGraphicsDeviceKHR()
) to create avulkano::instance::PhysicalDevice
.Thoughts? I'm not that familiar with Vulkan (or Vulkano).
The text was updated successfully, but these errors were encountered: