Forums - vkEndCommandBuffer is sometimes extremely slow

3 posts / 0 new
Last post
vkEndCommandBuffer is sometimes extremely slow
nils_daumann
Join Date: 15 Jun 18
Posts: 4
Posted: Tue, 2022-10-25 07:16

Hello,

I have a problem with vkEndCommandBuffer taking a lot of time in some scenes, but only very little in others. It is usually a problem in bigger, more complex scenes with lots of objects (about 1500, with 250 draw calls using instancing, but there is still a lot of constant buffer data), but even then some scenes are fine and others are not. In the bad cases it takes about 60% of the CPU time on the render thread.

Most of that time appears to be spend in gls_memory_alloc_pure and the allocated memory appears to keep growing until the device runs out of memory and the application crashes.

There are no debug layer warnings, nor can I come up with any good reasons for this to happen.

This is on a Meta Quest 2.

 

 

After writing the above I had the idea to run the same case on a Pico Neo 3, which also uses an Adreno 650. It does not appear to have the problem (and uses a much older driver).

Pico Neo 3:

Quote:
2022-10-25 16:04:23.051 7434-7472/com.slindev.grab I/std: 10/25/22 10:04:23.052 RNRendererDescriptor.cpp:164 Using renderer: <RN::VulkanRenderer:0x76ad68a500>, device: <RN::VulkanDevice:0x76ad6bf280> (Adreno (TM) 650 (Vendor: 5143), API: 1.1.128, Driver: 512.579)

2022-10-25 16:04:26.318 7434-7472/com.slindev.grab I/AdrenoGLES-0: QUALCOMM build                   : 70fbc48e4e, I30f6cedc70
    Build Date                       : 06/15/21
    OpenGL ES Shader Compiler Version: EV031.35.14.00
    Local Branch                     : 
    Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.8.12.C3.10.00.00.670.284
    Remote Branch                    : NONE
    Reconstruct Branch               : NOTHING
2022-10-25 16:04:26.318 7434-7472/com.slindev.grab I/AdrenoGLES-0: Build Config                     : S P 8.0.12 AArch64
2022-10-25 16:04:26.318 7434-7472/com.slindev.grab I/AdrenoGLES-0: Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
2022-10-25 16:04:26.318 7434-7472/com.slindev.grab I/AdrenoGLES-0: Driver Version                   : 0579.0

2022-10-25 16:04:26.323 7434-7472/com.slindev.grab I/AdrenoGLES-0: PFP: 0x016dd099, ME: 0x00000000

 

Meta Quest 2:

Quote:
2022-10-25 16:07:09.652 13436-13485/com.slindev.grab I/std: 10/25/22 16:07:09.652 RNRendererDescriptor.cpp:164 Using renderer: <RN::VulkanRenderer:0x719aa02b80>, device: <RN::VulkanDevice:0x7103a9f280> (Adreno (TM) 650 (Vendor: 5143), API: 1.1.128, Driver: 512.655)

2022-10-25 16:07:09.691 13436-13485/com.slindev.grab I/Vulkan_Utils: Device Name          : Adreno (TM) 650
2022-10-25 16:07:10.099 13436-13485/com.slindev.grab I/AdrenoGLES-0: QUALCOMM build                   : f9286358ab, I9676dd3674
    Build Date                       : 07/26/22
    OpenGL ES Shader Compiler Version: E031.40.09.00
    Local Branch                     : 
    Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.8.12.C3.10.00.00.670.284
    Remote Branch                    : NONE
    Reconstruct Branch               : NOTHING
2022-10-25 16:07:10.099 13436-13485/com.slindev.grab I/AdrenoGLES-0: Build Config                     : S P 8.0.12 AArch64
2022-10-25 16:07:10.099 13436-13485/com.slindev.grab I/AdrenoGLES-0: Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
2022-10-25 16:07:10.099 13436-13485/com.slindev.grab I/AdrenoGLES-0: Driver Version                   : 0655.0

<:vulkanrenderer:0x719aa02b80><:vulkandevice:0x7103a9f280>2022-10-25 16:07:10.104 13436-13485/com.slindev.grab I/AdrenoGLES-0: PFP: 0x016dd107, ME: 0x00000000

Thanks!

  • Up0
  • Down0
DuBo
Join Date: 9 Dec 13
Posts: 72
Posted: Tue, 2022-11-29 22:52

Dear Customer

It looks like a driver regression issue,

The old GFX driver QUALCOMM build :70fbc48e4e, I30f6cedc70    Build Date : 06/15/21 is good, no issue, 
but the new GFX driver QUALCOMM build: f9286358ab, I9676dd3674     Build Date: 07/26/22 is bad, has isue.

Are you using a rooted devicce , or no-rooted device? then we can do some test with different GFX driver libs.

 

Thanks
Bob Du

  • Up0
  • Down0
nils_daumann
Join Date: 15 Jun 18
Posts: 4
Posted: Sat, 2022-12-03 05:37

Thanks for the response!

I do not use a rooted device. I also found out that on a Pico 4 with a driver from earlier this year the issue does not happen, while it does on a Quest 1 with a driver from last summer. It's all a bit inconsistent.

But either way, it looks like the latest Quest firmware update with Adreno driver 512.667 fixes the problem :)

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