RHI: handle uniforms of type arrays properly


We weren't handling the possible array stride for uniform arrays.
For a float[8], the GPU might expect each float to fit in a vec4 slot.
We therefore have to handle that when uploading the values otherwise
we could end having data in what the GPU believe is padding data.

This required modifying the UniformValue object to report the number
of elements it contains as it might not necessarely be the same as the
array dimension reported by the shader introspection.

Note: it seems that the arrayStride might not be reported properly.
To work around that, if we know we are dealing with an array, we
compute the stride ourselves.

Pick-to: 6.0
Change-Id: I12b5379927dd47be888a40db58c2e5aba6e0730b
Reviewed-by: Mike Krus <mike.krus@kdab.com>
commitcf6b181227b02b23050198d21c54bd03eacd3b55
parent6fac2818ac283c1db0af51a5d8c556fa8afc61ae
authorPaul Lemire <paul.lemire@kdab.com>
committerPaul Lemire <paul.lemire@kdab.com>
commit timeSat, 28 Nov 2020 10:13:23 +0100