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. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Juan A. Suarez Romero 2016-02-09 12:51:03 +01:00 committed by Samuel Iglesias Gonsálvez
parent 2ab2d2e588
commit 97989059b9

View file

@ -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.