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:
2
ir.cpp
2
ir.cpp
@@ -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;
|
||||
|
Reference in New Issue
Block a user