nir_to_tgsi: Handle blocks defined as arrays of arrays
Make sure to take all the array sizes into account when generating the TGSI. Makes the `piglit.spec@arb_arrays_of_arrays@execution@ubo@fs-const-explicit-binding` test pass Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15713>
This commit is contained in:
parent
b5fd1fddd9
commit
23f5e2edbd
|
@ -961,7 +961,8 @@ ntt_setup_uniforms(struct ntt_compile *c)
|
|||
|
||||
int array_size = 1;
|
||||
if (glsl_type_is_interface(glsl_without_array(var->type)))
|
||||
array_size = MAX2(1, glsl_array_size(var->type));
|
||||
array_size = MAX2(1, glsl_get_aoa_size(var->type));
|
||||
|
||||
for (int i = 0; i < array_size; i++) {
|
||||
/* Even if multiple NIR variables are in the same uniform block, their
|
||||
* explicit size is the size of the block.
|
||||
|
|
Loading…
Reference in New Issue