Forums - vkCreateGraphicsPipelines it returns VK_INCOMPLETE

8 posts / 0 new
Last post
vkCreateGraphicsPipelines it returns VK_INCOMPLETE
florian3
Join Date: 1 Sep 17
Posts: 2
Posted: Fri, 2017-09-01 22:40

When I call vkCreateGraphicsPipelines it returns VK_INCOMPLETE, which is simply not a spec compliant return value for vkCreateGraphicsPipelines afaik. This has happened before with subpass inputs if I remember correctly. Now it happens if I use the line  "outColor = vec4(gl_FragCoord.xy,0,0);" in a fragment shader.

I'm using a Pixel XL (Adreno 530). It would be nice to have a somewhat spec compliant Vulkan driver at some point, it's been a while...

On a related note, can anyone confirm that MSAA subpassInputs actually work? I'm seeing some pretty odd stuff here.

  • Up1
  • Down0
bennherrera
Join Date: 18 Nov 17
Posts: 6
Posted: Sat, 2017-11-18 20:39

I'm having this exact issue. Snapdragon 835/Adreno 540. Android API level 24, NDK r13b, Galaxy S8 Android version 7.0

The validation layers have no complaints, but I'm seeing an error message in the log output:

I Adreno  : Shader compilation failed for shaderType: 0

This occurs immediately after the call to vkCreateGraphicsPipelines is made and before the error code is returned.

The vertex/fragment spirv binaries run on a desktop machine without issue and no validation layer complaints.

Is there a list of known bugs/unsupported shader operations?

 

  • Up1
  • Down0
bennherrera
Join Date: 18 Nov 17
Posts: 6
Posted: Sat, 2017-11-18 20:39

I'm having this exact issue. Snapdragon 835/Adreno 540. Android API level 24, NDK r13b, Galaxy S8 Android version 7.0

The validation layers have no complaints, but I'm seeing an error message in the log output:

I Adreno  : Shader compilation failed for shaderType: 0

This occurs immediately after the call to vkCreateGraphicsPipelines is made and before the error code is returned.

The vertex/fragment spirv binaries run on a desktop machine without issue and no validation layer complaints.

Is there a list of known bugs/unsupported shader operations?

 

  • Up0
  • Down0
florian3
Join Date: 1 Sep 17
Posts: 2
Posted: Sun, 2017-11-19 03:11
Never figured it out, but on Android 8 I got a segfault from the linker instead and now with Androy 8.1 things seem fine except that the output is garbage. I'm still suspecting that something is wrong with subpass inputs, but who knows. It's a shame that Qualcomms driver are so bad. Same goes for the support. Hint: A proper bug tracker on github would help, instead of this ridiculous forum. But actually responding to bug reports would be even more important.
  • Up1
  • Down0
bennherrera
Join Date: 18 Nov 17
Posts: 6
Posted: Sun, 2017-11-19 13:43

Unfortunately I could only up-vote your response once...

  • Up0
  • Down0
bennherrera
Join Date: 18 Nov 17
Posts: 6
Posted: Sun, 2017-11-19 15:13

It looks like the Adreno Vulkan driver is allergic to LunarG's spirv-opt.

When skipping the optimization step the shaders successfully load and run, but the render frame rate is atrocious.

It's possible that it is a particular optimization that is causing the problem - spirv-opt has a separate flag for each type of optimization it does and I have a bunch of them turned on, so I'll try to narrow it down.

The project I'm working on is multi-platform. The Win64 build (on an NVidia card) has no issue with spirv-opt output and produces no warnings of any kind, so this appears to be an issue specific to Adreno.

 

  • Up0
  • Down0
bennherrera
Join Date: 18 Nov 17
Posts: 6
Posted: Sun, 2017-11-19 16:26

Using either of these spirv-opt flags causes the failed byte code->native compilation issue:

--convert-local-access-chains
--eliminate-common-uniform
 

These appear to be safe:

  --strip-debug
  --eliminate-dead-const
  --eliminate-dead-functions
  --eliminate-dead-variables
  --eliminate-dead-branches
  --eliminate-dead-code-aggressive 
  --unify-const
  --inline-entry-points-exhaustive
  --eliminate-local-single-block
  --eliminate-local-single-store
  --eliminate-local-multi-store
  --eliminate-insert-extract
  --merge-blocks
  --strength-reduction
 
It is possible that the shaders in my project are not affected by some of these options (yet), but the spirv produced with these specified is compiling from spirv byte code to native and running at this time.
 
 
 
  • Up0
  • Down0
bennherrera
Join Date: 18 Nov 17
Posts: 6
Posted: Sun, 2017-11-19 16:38

additional note: the slow speed was due to running a debug build.

Debug builds on Snapdragon 801 / Adreno 330 the same code base on OpenGL es 3.0 was rendering at 30fps, so the 17fps on the 835 for a debug build was surprising.

 

  • 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.