Mesa (master): main: array stride for unsized arrays of arrays are calculated like records

Samuel Iglesias Gonsálvez samuelig at kemper.freedesktop.org
Tue Oct 6 12:30:17 UTC 2015


Module: Mesa
Branch: master
Commit: 50d5a36f3575bae38266e2445989c3b672ddbdbf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=50d5a36f3575bae38266e2445989c3b672ddbdbf

Author: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
Date:   Mon Oct  5 11:06:07 2015 +0200

main: array stride for unsized arrays of arrays are calculated like records

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au>

---

 src/mesa/main/shader_query.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 7189676..6d73e3b 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -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 {




More information about the mesa-commit mailing list