Forums - “Failed to find layer sdp” after attempting to profile Vulkan App

4 posts / 0 new
Last post
“Failed to find layer sdp” after attempting to profile Vulkan App
andyw
Join Date: 22 Sep 15
Posts: 3
Posted: Mon, 2016-10-31 05:45

I’m trying unsuccessfully to use the Snapdragon Profiler to capture a frame snapshot on a Google Pixel device on a Vulkan enabled application.

I find that I’m able to connect the Snapdragon Profiler (1.5.4.10212016) to my device through the connect dialog. If my app is running in Vulkan mode before I connect then sometimes I can attempt to take a snapshot, but it will always fail (the GUI will say it’s unable to take a snapshot), however, usually the profiler crashes before that point. If I attempt to start my app while the Snapdragon profiler is already running, then vkCreateInstance will always fail with VK_ERROR_LAYER_NOT_PRESENT which causes my application to fallback into OpenGLES mode. The line “Failed to find layer sdp” is output to the log during the vkCreateInstance call. sdp is certainly not a layer that my app has explicitly requested, perhaps sdp stands for SnapDragon Profiler?

Once the “Failed to find layer sdp” error occurs once, it will happen every single time my app runs regardless of whether it's attached to the profiler, this continues until I power cycle the device.

The FAQ contains a few lines on Vulkan troubleshooting – two of which are unclear to me.

  1. “Make sure you have ADB root access” – What exactly does this mean, I can run the command “adb root” without any error, but I don’t know if this really does anything. Am I supposed to root my device by installing some non-standard image? If so, are there any official steps to follow or images to use?
  2. “Confirm all of the Vulkan libraries are in the right location and write permissions are enabled” – Is this referring to libvulkan.so? Where should it be? How can I make it writable?

The reason I’m trying to use the Snapdragon Profiler is because I have a couple of Vulkan enabled apps on the Google Play store which are exhibiting rendering bugs on the Google Pixel. The apps work fine with other manufacturer’s GPUs and also work fine on the Qualcomm based Nexus 6P and 5X. The validation layers throw up no errors. The bugs look like they might be some sort of synchronisation error, but adding a vkDeviceWaitIdle after every vkQueueSubmit as a test doesn’t seem to fix it. I’m beginning to suspect a driver bug. There aren’t many major titles with Vulkan support out there at the moment yet, so if your driver team are interested in taking a look, I’d be glad to help them in any way I can.

  • Up0
  • Down0
eshaw Moderator
Join Date: 12 May 16
Location: San Diego
Posts: 133
Posted: Tue, 2016-11-01 15:34

Hi Andy,

You are correct that 'sdp' is Snapdragon Profiler's driver interface layer. Unfortunately loading the Vulkan layer requires setting Android's SELinux module to permissive mode, which requires root permissions on your device. We hope to provide a path for Vulkan profiling without root permissions in in the future, but for now you will need a rooted device.

If you do have root permissions, you can change SELinux to permissive mode with this command:

adb shell setenforce 0

Also, Snapdragon Profiler does not currently support snapshot captures for Vulkan. This capability is under development, but currently the only Vulkan captures supported are rendering stage and API call traces.

Finally, you mentioned that once the layer error occurs it continues to occur until you reboot your device. Snapdragon Profiler should reset things when it disconnects, but if it does not you can execute these commands to disable loading of the sdp layer:

adb shell setprop debug.vulkan.layer.1 ''
adb shell setprop debug.vulkan.profiler 0

Eric

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Tue, 2016-11-01 17:12

Yes, the vkDeviceWaitIdle is a command you'd probably want to avoid.  Have you looked at the samples in the Adreno SDK for Vulkan for any clues on setting up the swap chain properly, synchronizing the rendering with fences and semaphores?

If you can share the app we can compare results with our latest Vulkan driver..

  • Up0
  • Down0
andyw
Join Date: 22 Sep 15
Posts: 3
Posted: Wed, 2016-11-02 02:21

Thank you both for the replies. I have sent a private message to mhfeldma with details of the apps.

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