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:
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, I30f6cedc70Build Date : 06/15/21OpenGL ES Shader Compiler Version: EV031.35.14.00Local Branch :Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.8.12.C3.10.00.00.670.284Remote Branch : NONEReconstruct Branch : NOTHING2022-10-25 16:04:26.318 7434-7472/com.slindev.grab I/AdrenoGLES-0: Build Config : S P 8.0.12 AArch642022-10-25 16:04:26.318 7434-7472/com.slindev.grab I/AdrenoGLES-0: Driver Path : /vendor/lib64/egl/libGLESv2_adreno.so2022-10-25 16:04:26.318 7434-7472/com.slindev.grab I/AdrenoGLES-0: Driver Version : 0579.02022-10-25 16:04:26.323 7434-7472/com.slindev.grab I/AdrenoGLES-0: PFP: 0x016dd099, ME: 0x00000000
Meta Quest 2:
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) 6502022-10-25 16:07:10.099 13436-13485/com.slindev.grab I/AdrenoGLES-0: QUALCOMM build : f9286358ab, I9676dd3674Build Date : 07/26/22OpenGL ES Shader Compiler Version: E031.40.09.00Local Branch :Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.8.12.C3.10.00.00.670.284Remote Branch : NONEReconstruct Branch : NOTHING2022-10-25 16:07:10.099 13436-13485/com.slindev.grab I/AdrenoGLES-0: Build Config : S P 8.0.12 AArch642022-10-25 16:07:10.099 13436-13485/com.slindev.grab I/AdrenoGLES-0: Driver Path : /vendor/lib64/egl/libGLESv2_adreno.so2022-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!
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
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 :)