ir_to_mesa: Only allocate a vector per column of a matrix.

This commit is contained in:
Eric Anholt
2010-07-07 16:16:09 -07:00
parent 7d8091f7cc
commit 9968f1b23c

View File

@@ -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