Forum Discussion
cheery
9 years agoExplorer
ovr_CreateTextureSwapChainVk returns with ovrError_Unsupported (-1009)
Hi,
I'm attempting to setup a Vulkan swapchain for Oculus. I've followed through the guide, with the following steps:
* Calling ovr_Initialize, then the ovr_Create, ovr_GetHmdDesc
* Initializing vulkan instance, with VK_KHR_get_physical_device_properties2 (if I skip this, it will fail sooner with ovrError_InitializeVulkan)
* Enumerating the physicalDevice structures, picking one that matches one in the ovr -API.
* Initializing vulkan device with VK_KHR_swapchain, VK_KHX_external_memory, VK_KHX_external_memory_win32
* Retrieving the parameters for each eye & per-eye resolution, (ovr_GetRenderDesc, ovr_GetFovTextureSize)
* At this point I attempt to call the ovr_CreateTextureSwapChainVk.
I'm running in 32-bit mode because my environment (PyPy derivative) does not yet provide 64-bit runtime. GPU is GTX 780 Ti.
I also tried the OculusRoomTiny (Vk) -demo. It refuses to compile at first (with the latest lunarg vulkan sdk 1.0.54.0), and after adjusting the code to see how far I can get it (replacing missing KHX extensions with KHR & NV ones), I see it fail on the same point with the same code in the debugger. Though that happens on both Win32/x64 builds.
Is there something I need to know? Or should I go and upgrade my GPU?
I'm attempting to setup a Vulkan swapchain for Oculus. I've followed through the guide, with the following steps:
* Calling ovr_Initialize, then the ovr_Create, ovr_GetHmdDesc
* Initializing vulkan instance, with VK_KHR_get_physical_device_properties2 (if I skip this, it will fail sooner with ovrError_InitializeVulkan)
* Enumerating the physicalDevice structures, picking one that matches one in the ovr -API.
* Initializing vulkan device with VK_KHR_swapchain, VK_KHX_external_memory, VK_KHX_external_memory_win32
* Retrieving the parameters for each eye & per-eye resolution, (ovr_GetRenderDesc, ovr_GetFovTextureSize)
* At this point I attempt to call the ovr_CreateTextureSwapChainVk.
I'm running in 32-bit mode because my environment (PyPy derivative) does not yet provide 64-bit runtime. GPU is GTX 780 Ti.
I also tried the OculusRoomTiny (Vk) -demo. It refuses to compile at first (with the latest lunarg vulkan sdk 1.0.54.0), and after adjusting the code to see how far I can get it (replacing missing KHX extensions with KHR & NV ones), I see it fail on the same point with the same code in the debugger. Though that happens on both Win32/x64 builds.
Is there something I need to know? Or should I go and upgrade my GPU?
6 Replies
- cheeryExplorerThank you. I will be listening.
Meanwhile I can continue on the rest of the functionality of my app. - cheeryExplorer@imperativity
I am doing something slightly silly, but it should not interfere with Oculus API. I am enumerating through the list of VkPhysicalDevices. I am using the ovr_GetSessionPhysicalDeviceVk() to retrieve the PhysicalDevice and use it to select the one from the list by comparing the pointers.
I could adjust the code to use it directly, but why would it matter when the address to PhysicalDevice would end up being the exactly same as now?
It sounds like this is a potentially hairy problem. I guess it does not occur on your system.
I would suggest you to go and see where and why the ovrError_Unsupported may be returned by the ovr_CreateTextureSwapChainVk. I have one hunch why it might happen.
I have VK_NV_external_memory_capabilities, whereas the proposition seems to be that you need the VK_KHX_external_memory_capabilities. Could these two have different numbering in flags that cause it to fail on checking for support for what it needs?
The VK_KHR_external_memory_capabilities is currently in the NVIDIA Vulkan beta drivers. Therefore the API is stabilizing.
Edit: That is probably the reason. That extension introduces some structures that are incompatible with each other. It might result in the vkGetPhysicalDeviceImageFormatProperties2KHR giving you empty or random structures for the VK_KHX -signatured ones.
I'm really not sure why I have VK_NV_external_memory_capabilities instead of VK_KHX one. - cheeryExplorer@imperativity
I will try to help you any way I can. I have become very good at deducing out possibilities, but unfortunately everything doesn't come to my mind at once, and not always in time.
There's one additional thing: There are at least 4 NVIDIA driver versions released during the time when CV1 has had Vulkan support. Could it be that some of the driver updates contain the VK_KHX and other contains the VK_NV version of this extension?
Why there's a vendor-specific version of external memory capabilities in the first place? Could it be related to the age of my card? I think NVIDIA knows, but they haven't written it down into the Vulkan spec's rationale.
Oh well. In any case I have checked what the beta vulkan drivers bring. They provide the VK_KHR_external_memory_capabilities instance extension for my card too. - cheeryExplorerchar* extensionNames might have to be char** extensionNames for it to work.
These functions are going to help. They will make this kind of problems more visible for the user, if it will ever occur again.
I did install and try out the NVIDIA driver versions from June and July. None of them provided the VK_KHX_external_memory_capabilities to my graphics card. Therefore the different extension may be card-specific entirely.
On my Linux machine nvidia drivers are going at 381.09 and they have the mentioned instance extension with GTX 960. I'll try the 381.89 next.
Update: The 381.89 has the VK_NV_external_memory_capabilities. I think it's got to do something with the 780 ti being a Kepler and 980 GTX being a Maxwell.
Update #2: yet... https://devtalk.nvidia.com/default/topic/994252/?comment=5086174 he's got the thing in the list. Maybe I just have to go with even older driver?
Update #3: no. I just tried the oldest driver I can get from the archive, which should be from May. Still I don't see the KHX version of that instance extension.
Finally decided to ask it there as well.. Maybe they know what's going on: https://devtalk.nvidia.com/default/topic/1021776/vulkan/vk_khx_external_memory_capabilities-missing-on-gtx-780-ti/ - cheeryExplorerHello!
I did some adjustments. I still manage to get this same error from swapchain creation (-1009). In both my own application as well as in the 1.19 SDK tiny room Vk sample.
On 385.41, oculus rift functions well, but the attempt to load that vulkan app crashes like before.
If I run prior 385.41 drivers, the rift works well but an instance extension is missing for Vulkan and the application fails earlier.
If I run after 385.41 drivers, the rift screen stays black and I get the error -1009 in the swapchain creation step.
I still got the GTX 780ti.
So. It looks a lot like that the card is just missing something and that causes the problems. Now, do you tell me that my card is too old and I need to upgrade, or do we still try to make it to work? - cheeryExplorer@imperativity
I resolved this issue by hardware upgrade. I bought GTX 1060 6GB as a replacement. This "fixed" the issue and I can proceed.
Depending on how fast my stuff catches up, you may hear about this issue again. I could not wait anymore though. I'm going to write those Vulkan+Oculus+Lever language demos before the year ends.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago