From 9968f1b23c475c99139f0209c7a049ed00df01af Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jul 2010 16:16:09 -0700 Subject: ir_to_mesa: Only allocate a vector per column of a matrix. --- src/mesa/shader/ir_to_mesa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/shader/ir_to_mesa.cpp') 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 -- cgit v1.2.3