Forums - Very slow vkEndCommandBuffer

7 posts / 0 new
Last post
Very slow vkEndCommandBuffer
slavnejshev
Join Date: 14 Feb 20
Posts: 4
Posted: Tue, 2020-02-18 05:13

My app does 300-400 draw calls each frame. It works fine on Mali devices. But I have problems with Vulkan implementation on Adreno devices. It does a lot of work in vkEndCommandBuffer and I don't know how to optimize it. I posted question on stackoverflow: https://stackoverflow.com/questions/60075208/very-slow-vkendcommandbuffer-on-android

Now things are even worse: vkEndCommandBuffer - 38% of render thread time, memcpy inside of it - 27% of render thread time. What's going on inside of this function? How can I reduce this time?

  • Up0
  • Down0
AndreyVK_D3D
Profile picture
Join Date: 10 Jun 13
Location: Moscow
Posts: 36
Posted: Thu, 2020-02-27 22:53

Hi slavnejshev, could you share a minimal  test project, when problem could be reproduced? Do you have any error messages from Vulkan Validation Layers?

  • Up0
  • Down0
slavnejshev
Join Date: 14 Feb 20
Posts: 4
Posted: Fri, 2020-02-28 05:55

No errors in validation layers. It would be hard to write minimal test (Vulkan examples are very long). I'm doing quite simple things, nothing special. Isn't it a common problem? How muh time should vkEndCommandBuffer work? Is it okay if it works 40% of render thread time (yes, we optimized rendering even more)?

  • Up0
  • Down0
slavnejshev
Join Date: 14 Feb 20
Posts: 4
Posted: Fri, 2020-02-28 06:01

The main problem is that we write new command buffer each frame, no caching. So it's performance critical for us.

  • Up0
  • Down0
slavnejshev
Join Date: 14 Feb 20
Posts: 4
Posted: Wed, 2020-03-11 09:26

Any update? I did more optimizations. Now vkEndCommandBuffer works 44% of render thread time, memcpy inside of it works 31% of render thread time (the worst case, device - YNDX-000SB). I need your help with this issue.

  • Up0
  • Down0
AndreyVK_D3D
Profile picture
Join Date: 10 Jun 13
Location: Moscow
Posts: 36
Posted: Thu, 2021-04-29 08:56

did you fix problem ?

  • Up0
  • Down0
AndreyVK_D3D
Profile picture
Join Date: 10 Jun 13
Location: Moscow
Posts: 36
Posted: Thu, 2021-04-29 08:56

did you fix 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.