summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2015-10-21 13:44:10 +1100
committerTimothy Arceri <timothy.arceri@collabora.com>2015-10-21 15:49:32 +1100
commit38ceeeadaa2f5f0a21dba9f5339fbc4cba66dece (patch)
treeba597cbcfad5b10a2e39026aed287af2832adc3d /src/glsl
parent9a04057ef130e1539aa94babd2e35ce53e6f1e1e (diff)
downloadexternal_mesa3d-38ceeeadaa2f5f0a21dba9f5339fbc4cba66dece.zip
external_mesa3d-38ceeeadaa2f5f0a21dba9f5339fbc4cba66dece.tar.gz
external_mesa3d-38ceeeadaa2f5f0a21dba9f5339fbc4cba66dece.tar.bz2
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@intel.com>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/link_uniforms.cpp3
1 files changed, 2 insertions, 1 deletions
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;