Forums - Shaders fail to link on Oculus Quest 2

3 posts / 0 new
Last post
Shaders fail to link on Oculus Quest 2
jharan
Join Date: 26 Feb 23
Posts: 1
Posted: Sun, 2023-02-26 15:22

If this is the wrong place to post questions like this, perhaps some one knows of an alternative.

Its possible the problem described below is due to my shaders exceeding some hardware limitation of the Adreno 650.

The glslangValidator document mentions:

"We encourage hardware vendors to provide .conf files that encode the hardware limits of their GPUs, so that glslang can be used to predict whether a given shader will compile on a given GPU."

Is such an .conf file available for the Adreno 650 and if so where?

------------------------------------------------------------------------------------------------------------------------------------------------------------

I've developed and published an OpenXR application named Mirrorball VR that uses the Vulkan graphics API.

I have it running in two different target platforms:

1) Oculus Quest/Quest 2, Android NDK
2) Monado OpenXR implementation on an Ubuntu Linux laptop

Recently I've been adding some enhancements to it to address some performance problems that entail substantial changes to the vertex and fragment shaders. I initially wrote and tested these enhancements on the Monado/Linux platform and on that platform they currently work correctly. However, when I run it on the Oculus Quest 2 platform it generates an error during graphics pipeline creation.

When my application calls vkCreateGraphicsPipelines() on a Quest 2, the function returns a -13 (VK_ERROR_UNKNOWN).

This is an excerpt from the Android logcat output that the Adreno driver generates at the time of the call:

02-22 17:37:34.659  4923  4957 I AdrenoVK-0: Failed to link shaders.
02-22 17:37:34.659  4923  4957 I AdrenoVK-0: Pipeline create failed

Earlier in the logcat output are these logs that identify the driver:

02-22 17:37:29.676  4923  4957 I AdrenoVK-0: ===== BEGIN DUMP OF OVERRIDDEN SETTINGS =====
02-22 17:37:29.676  4923  4957 I AdrenoVK-0: ===== END DUMP OF OVERRIDDEN SETTINGS =====
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: QUALCOMM build          : 59a14ebd51, I5463b91de8
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Build Date              : 08/29/22
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Shader Compiler Version : E031.40.18.00
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Local Branch            :
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Remote Branch           : refs/tags/AU_LINUX_ANDROID_LA.UM.8.12.C3.10.00.00.670.284
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Remote Branch           : NONE
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Reconstruct Branch      : NOTHING
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Build Config            : S P 8.0.12 AArch64
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Driver Path             : /vendor/lib64/hw/vulkan.kona.so
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Driver Version          : 0667.0
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: PFP                     : 0x016dd107
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: ME                      : 0x00000000
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Application Name    : mirror_ball
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Application Version : 0x00000001
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Engine Name         : mirror_ball
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Engine Version      : 0x00000001
02-22 17:37:29.679  4923  4957 I AdrenoVK-0: Api Version         : 0x00400000
02-22 17:37:29.679  4923  4957 I Vulkan_Utils: Device Name          : Adreno (TM) 650

With the Vulkan driver on my Ubuntu Intel laptop, vkCreateGraphicsPipelines() succeeds with the same vertex and fragment shaders.

Both the vertex and fragment shaders compile with glslangValidator without error. Both are prefixed with:

"#version 320 es"

which to my knowledge is the proper version of Oculus Quest targets. My application's C++ CPU code includes the glslangValidator output .spv files.
If I modify the vertex and fragment shader code to much simpler forms and make no other changes to the CPU code, the call to vkCreateGraphicsPipelines() on Quest 2 succeeds and the program runs, albeit not correctly because the application depends on what the problematic shaders are supposed to be doing.

So it would seem that there is something in my vertex or fragment shaders that the Adreno driver does not like.

My problem is all I have to go on to debug it are these two logs:

02-22 17:37:34.659  4923  4957 I AdrenoVK-0: Failed to link shaders.
02-22 17:37:34.659  4923  4957 I AdrenoVK-0: Pipeline create failed

Advice as to how I might proceed to debug this would be much appreciated.

I can provide the shader GLSL sources if you'd like to see them.

Thanks
 

  • Up0
  • Down0
jleger
Join Date: 23 Aug 16
Posts: 15
Posted: Thu, 2023-04-13 12:40

This issue has been resolved wih the OP.

  • Up0
  • Down0
jleger
Join Date: 23 Aug 16
Posts: 15
Posted: Thu, 2023-04-13 12:41

This issue has been resolved wih the OP.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.