Commit 97989059 authored by Juan A. Suárez's avatar Juan A. Suárez Committed by Samuel Iglesias Gonsálvez
Browse files

mesa/main: handle double uniform matrices properly

When computing the offset in the uniform storage table, take into account
the size multiplier so double precision matrices are handled correctly.
Signed-off-by: Juan A. Suárez's avatarJuan A. Suarez Romero <>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <>
parent 2ab2d2e5
......@@ -993,7 +993,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
elements = components * vectors;
if (!transpose) {
memcpy(&uni->storage[elements * offset], values,
memcpy(&uni->storage[size_mul * elements * offset], values,
sizeof(uni->storage[0]) * elements * count * size_mul);
} else if (basicType == GLSL_TYPE_FLOAT) {
/* Copy and transpose the matrix.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment