Fix matrix dimensioning

Newb GL mistake: matrices in GL are column-major.  This means that
vector_elements is the number of rows.  Making these changes causes
matrix-08.glsl to pass.
This commit is contained in:
Ian Romanick
2010-03-25 13:19:13 -07:00
parent c1bd3a1a61
commit 1b4f04124a
4 changed files with 11 additions and 11 deletions

2
ir.cpp
View File

@@ -59,7 +59,7 @@ ir_constant::ir_constant(const struct glsl_type *type, const void *data)
{
const unsigned elements =
((type->vector_elements == 0) ? 1 : type->vector_elements)
* ((type->matrix_rows == 0) ? 1 : type->matrix_rows);
* ((type->matrix_columns == 0) ? 1 : type->matrix_columns);
unsigned size = 0;
this->type = type;