summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-07-12 14:02:59 -0700
committerEric Anholt <eric@anholt.net>2010-07-12 14:05:20 -0700
commit288733f6001a2148d6689587d9a05e6909e88a61 (patch)
tree20ff235e6576d85f0f666e48a581540affad59df /src
parent7b48843ecd6690902e4f3bd709a041133b7fb540 (diff)
glsl2: Store the gl_type of the array's element type in the array.
Fixes glsl-fs-uniform-array-1, glsl-vs-uniform-array-1, and the -2 tests on software.
Diffstat (limited to 'src')
-rw-r--r--src/glsl/glsl_types.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 806b71495d..d6799cf428 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -285,6 +285,11 @@ glsl_type::glsl_type(void *ctx, const glsl_type *array, unsigned length) :
name(NULL), length(length)
{
this->fields.array = array;
+ /* Inherit the gl type of the base. The GL type is used for
+ * uniform/statevar handling in Mesa and the arrayness of the type
+ * is represented by the size rather than the type.
+ */
+ this->gl_type = array->gl_type;
/* Allow a maximum of 10 characters for the array size. This is enough
* for 32-bits of ~0. The extra 3 are for the '[', ']', and terminating