Mesa (master): glsl: check for arrays of arrays when assigning explicit locations

Timothy Arceri tarceri at kemper.freedesktop.org
Wed Oct 21 04:49:42 UTC 2015


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

Author: Timothy Arceri <timothy.arceri at collabora.com>
Date:   Wed Oct 21 13:44:10 2015 +1100

glsl: check for arrays of arrays when assigning explicit locations

This fixes assigning explicit locations in the CTS test:

ES31-CTS.explicit_uniform_location.uniform-loc-arrays-of-arrays

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

---

 src/glsl/link_uniforms.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 6efde5c..8183e65 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -763,7 +763,8 @@ private:
       /* Assign explicit locations. */
       if (current_var->data.explicit_location) {
          /* Set sequential locations for struct fields. */
-         if (current_var->type->without_array()->is_record()) {
+         if (current_var->type->without_array()->is_record() ||
+             current_var->type->is_array_of_arrays()) {
             const unsigned entries = MAX2(1, this->uniforms[id].array_elements);
             this->uniforms[id].remap_location =
                this->explicit_location + field_counter;




More information about the mesa-commit mailing list