commit | 43faa9ebb1c8a6063321065eb42723075a87902c | [log] [tgz] |
---|---|---|
author | Karol Herbst <kherbst@redhat.com> | Mon Jun 15 18:29:58 2020 +0200 |
committer | Marge Bot <eric+marge@anholt.net> | Thu Jun 18 15:15:17 2020 +0000 |
tree | 81e578498b1fcd04ac9b33e66027b2558b2d46a5 | |
parent | e35e0307cb6c226ef87d307c1ac910f4169536c1 [diff] |
nir/lower_images: fix for array of arrays Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>
diff --git a/src/compiler/glsl/gl_nir_lower_images.c b/src/compiler/glsl/gl_nir_lower_images.c index 5b51c3a..265206a 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