I have the following vertex shader that has one uniform buffer array matArry[4] to host per-object model-view-matrix; a push constants data matIndex used to choose the matrix from the uniform buffer array.
This solution works well on all pltforms (AMD, nVidia, Adreno, Mali) except PowerVR GE8300 with Vulkan driver 1.0. On GE8300, Vulkan renders nothing without any run-time errors. Once I change the uniform buffer array back to a single buffer, it renders correctly.
Is that because uniform buffer array is not supported by PowerVR GE8300?
Renderdoc does not work well with my Acer Iconia tablet, apps can be remotely launched but crashed right away, I tried numbers of different apps, including PowerVR samples, none of them can be captured by Renderdoc.
Seeing that I can not use renderdoc, I’d like to know if there is a sample project shows using uniform buffer array (preferrably from powerVR SDK), do you know which one demonstrate this?
Sorry for late reply, I have been busy on other things lately.
I have given up using uniform buffer array at shader side, instead, I’m now using buffer/descriptor array at CPU side. The reason is that I also found few other platforms (like MoltenVK for macOS / iOS) give me headache when using uniform buffer array in the shader.
Hi…as a workaround if you replace the loop iteration with a literal constant rather than a uniform it seems to work correctly; while not ideal it’s a lot better than manual loop unrolling. We’ll try and come up with a better workaround for you.