summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-07-07 16:16:09 -0700
committerEric Anholt <eric@anholt.net>2010-07-07 16:37:48 -0700
commit9968f1b23c475c99139f0209c7a049ed00df01af (patch)
treeba9a36a633080fe3bd5eff8952749129c1faf423 /src
parent7d8091f7cca0314dd66599bdce5bfcf09fe8b578 (diff)
ir_to_mesa: Only allocate a vector per column of a matrix.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/ir_to_mesa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index 9497b17a2a..5cb5564d50 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -393,7 +393,7 @@ type_size(const struct glsl_type *type)
case GLSL_TYPE_FLOAT:
case GLSL_TYPE_BOOL:
if (type->is_matrix()) {
- return 4; /* FINISHME: Not all matrices are 4x4. */
+ return type->matrix_columns;
} else {
/* Regardless of size of vector, it gets a vec4. This is bad
* packing for things like floats, but otherwise arrays become a