Forum Discussion
jharan
2 years agoHonored Guest
vkCreateGraphicsPipelines() returns VK_ERROR_UNKNOWN
I've developed an application named "mirror_ball" for Quest/Quest 2 using the Oculus SDK and NDK. When I run it from the Android Studio debugger (click the right pointing green arrow) all I see on the headset is a black screen with 3 white dots. When I look at the Logcat output, I see the following near the end:
01-18 18:03:09.425 4986 5020 E mirror_ball: [18:03:09.425][Error ] VkResult failure [-13]
01-18 18:03:09.425 4986 5020 E mirror_ball: Origin: vkCreateGraphicsPipelines(m_vkDevice, VK_NULL_HANDLE, 1, &pipeInfo, nullptr, &pipe)
01-18 18:03:09.425 4986 5020 E mirror_ball: Source: ../../../../graphicsplugin_vulkan.cpp:959
A VkResult value of -13 according to vulkan_core.h equates to VK_ERROR_UNKNOWN.
According to the Khronos vulkan specification this is not a valid return code from this function. From https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateGraphicsPipelines.html:
Return Codes
On success, this command returns
VK_SUCCESS
VK_PIPELINE_COMPILE_REQUIRED_EXT
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_INVALID_SHADER_NV
It's curious because when I compile and run the same code with the Monado OpenXR SDK using the vulkan driver that comes with my Ubuntu Linux laptop, the application runs perfectly, no such error is reported. My experience is that if the code builds and runs with Monado, it usually works just fine with the Oculus SDK/NDK.
Any suggestions as to what might be causing this error?
Thanks,
Jeffrey Haran
2 Replies
- AdrianTheFrogHonored Guest
Did you ever resolve this? I am having the same problem.
- jharanHonored Guest
Well, sort of. Near as I can tell the problem was caused by the Qualcomm Adreno vulkan driver not liking one of the uniform buffer objects I had defined. When I modified the code to make the uniform buffer object smaller, the problem went away. Note that the original UBO's size did not exceed the 64KB limit, it was closer to 40KB. That's large but otherwise legal. Eventually Qualcomm released a new vulkan driver for the Quest 2 GPUs and then the problem no longer occurred even with my original UBO, so it appears that it was caused by a driver bug that Qualcomm later fixed and eventually made it to my Quest 2 via a Meta software update. Unfortunately, they didn't release an updated driver for the Quest 1 GPUs so I could no longer run my app on Quest 1.
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
- 2 years ago