main: array stride for unsized arrays of arrays are calculated like records
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Mon, 5 Oct 2015 09:06:07 +0000 (11:06 +0200)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Tue, 6 Oct 2015 12:28:26 +0000 (14:28 +0200)
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
src/mesa/main/shader_query.cpp

index 718967605b586ed5b0d6f5b56cfb60d4bc0228b8..6d73e3bdcf260c538ad8155ef1ca088c6254ab19 100644 (file)
@@ -996,7 +996,7 @@ program_resource_top_level_array_stride(struct gl_shader_program *shProg,
                const glsl_type *array_type = field->type->fields.array;
 
                if (interface->interface_packing != GLSL_INTERFACE_PACKING_STD430) {
-                  if (array_type->is_record()) {
+                  if (array_type->is_record() || array_type->is_array()) {
                      array_stride = array_type->std140_size(row_major);
                      array_stride = glsl_align(array_stride, 16);
                   } else {