Mesa (10.3): glsl: Strip arrayness from ir_type_dereference_variable too

Emil Velikov evelikov at kemper.freedesktop.org
Sat Sep 27 18:07:40 UTC 2014


Module: Mesa
Branch: 10.3
Commit: 384816c6dbc3fa52a21d2d77e014ec2549b6ce87
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=384816c6dbc3fa52a21d2d77e014ec2549b6ce87

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Sep 10 15:19:43 2014 -0700

glsl: Strip arrayness from ir_type_dereference_variable too

If the thing being dereferenced is a record or an array of records, it
should be treated as row-major.  The ir_type_derference_record path
already does this, and I think I intended to do the same for this path
in b17a4d5d.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83741
Cc: mesa-stable at lists.freedesktop.org
(cherry picked from commit c3f17bb18f597d7f606805ae94363dae7fd51582)

---

 src/glsl/lower_ubo_reference.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/lower_ubo_reference.cpp b/src/glsl/lower_ubo_reference.cpp
index f3920b3..43dd067 100644
--- a/src/glsl/lower_ubo_reference.cpp
+++ b/src/glsl/lower_ubo_reference.cpp
@@ -111,7 +111,7 @@ is_dereferenced_thing_row_major(const ir_dereference *deref)
          case GLSL_MATRIX_LAYOUT_COLUMN_MAJOR:
             return false;
          case GLSL_MATRIX_LAYOUT_ROW_MAJOR:
-            return matrix || deref->type->is_record();
+            return matrix || deref->type->without_array()->is_record();
          }
 
          unreachable("invalid matrix layout");




More information about the mesa-commit mailing list