From 9f44247acf62b91669f77974a4bbad687d58859e Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 Mar 2007 11:34:18 -0700 Subject: fix _mesa_uniform_matrix() transpose bug --- src/mesa/shader/shader_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 924c9d5e945..271464e9f18 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1005,7 +1005,7 @@ _mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, for (col = 0; col < cols; col++) { GLfloat *v = shProg->Uniforms->ParameterValues[location + col]; for (row = 0; row < rows; row++) { - v[row] = values[col * rows + row]; + v[row] = values[row * cols + col]; } } } @@ -1014,7 +1014,7 @@ _mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows, for (col = 0; col < cols; col++) { GLfloat *v = shProg->Uniforms->ParameterValues[location + col]; for (row = 0; row < rows; row++) { - v[row] = values[row * cols + col]; + v[row] = values[col * rows + row]; } } } -- cgit v1.2.3