Mesa (glsl2): ir_to_mesa: Only allocate a vector per column of a matrix.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Jul 7 23:39:17 UTC 2010
Module: Mesa
Branch: glsl2
Commit: 9968f1b23c475c99139f0209c7a049ed00df01af
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9968f1b23c475c99139f0209c7a049ed00df01af
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jul 7 16:16:09 2010 -0700
ir_to_mesa: Only allocate a vector per column of a matrix.
---
src/mesa/shader/ir_to_mesa.cpp | 2 +-
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 9497b17..5cb5564 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
More information about the mesa-commit
mailing list