From: Karol Herbst Date: Mon, 15 Jun 2020 16:29:58 +0000 (+0200) Subject: nir/lower_images: fix for array of arrays X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43faa9ebb1c8a6063321065eb42723075a87902c;p=mesa.git nir/lower_images: fix for array of arrays Signed-off-by: Karol Herbst Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/compiler/glsl/gl_nir_lower_images.c b/src/compiler/glsl/gl_nir_lower_images.c index 5b51c3aa03c..265206a012a 100644 --- a/src/compiler/glsl/gl_nir_lower_images.c +++ b/src/compiler/glsl/gl_nir_lower_images.c @@ -39,8 +39,15 @@ static void type_size_align_1(const struct glsl_type *type, unsigned *size, unsigned *align) { - *size = 1; - *align = 1; + unsigned s; + + if (glsl_type_is_array(type)) + s = glsl_get_aoa_size(type); + else + s = 1; + + *size = s; + *align = s; } static bool