About the size of dynamic uniforms

Hello, yesterday I discovered a weird phenomenon of dynamic uniforms on Android devices.
If I specify the dynamic uniform’s buffer size as [aligned_size * 1024], then nothing is shown.
But [aligned_size * 1023] or [aligned_size * 1025] or even [aligned_size * 30000] are all working well.
It’s not showing anything when the buffer size is a multiple of [aligned_size * 1024].
For testing, I have edited some parts of a Google Vulkan Tutorial and I’d like to share the code.

You can check out “forTestingDynamincUniform” function in VulkanMain.cpp and shader sources.
Am I missing something or doing wrong? Thank you for any help.

  • Android devices in general? (Which version?)
  • Or some Android GPU graphics driver in particular? (Which GPU, driver, and driver version?)

I have pretty old models though, I tested with these:

Google Pixel XL(Android 9, Adreno 530 GPU)
Google Pixel XL(Android 10, Adreno 530 GPU)
Samsung Galaxy S8 Active (Android 8.0.0, Adreno 540 GPU)
LG Nexus 5X (Android 8.1.0, Adreno 418 GPU)
LG V20 (Android 8.0.0, Adreno 530 GPU)

All shows the same phenomenon. I’ll update if I have a chance to test with more devices.

About the version of Vulkan is on Android document:

"Android 9 and higher support the Vulkan API version 1.1. Android 7 to Android 9 support the Vulkan API version 1.0. For more information about the Vulkan 1.1 API, see the [Vulkan 1.1 API spec]

Currently I’m not sure if the problem is on my side or Vulkan or GPU. Anyway by some reasons, obviously it looks the uniform data is not being updated from the host memory to the device memory when the buffer size is a multiple of [aligned_size * 1024].

Interesting. Sounds like the common factors so far are Qualcomm Adreno GPUs/drivers and Android. I wonder if this is reproducible on non-Adreno GPUs.