Uniform Buffer Array is not supported by PowerVR GE8300?

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.

layout (std140, set = 0, binding = 1) uniform modelViewMatrixBuf
{	
	mat4 modelViewMat;
} matArry[4];

layout(push_constant) uniform pushConstansBuf
{
	...
	uint matIndex;		//Matrix array index (4-bytes)
};

void main()
{
	...
	gl_Position  = pos3D * matArray[matIndex].modelViewMat * projMat;
	...
}

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?

Hi,

I think uniform buffers work fine for us. Have you tried double checking your results with Renderdoc?

bests,
Marton

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?

Hi hongkun, could you share your simple test project with this problem ? did you test some examples from Sascha Willems ?

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.

Thanks for your suggestions!