summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniform_query.cpp
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <jasuarez@igalia.com>2016-02-09 12:51:03 +0100
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>2016-05-04 08:08:12 +0200
commit97989059b9472b4055ff72dac02b0e6c6f4afeb7 (patch)
treed49a215fe1631a1f7f9772132a831fa3f3622457 /src/mesa/main/uniform_query.cpp
parent2ab2d2e5881d289a8239467a97516e4e410cebfb (diff)
downloadexternal_mesa3d-97989059b9472b4055ff72dac02b0e6c6f4afeb7.zip
external_mesa3d-97989059b9472b4055ff72dac02b0e6c6f4afeb7.tar.gz
external_mesa3d-97989059b9472b4055ff72dac02b0e6c6f4afeb7.tar.bz2
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>
Diffstat (limited to 'src/mesa/main/uniform_query.cpp')
-rw-r--r--src/mesa/main/uniform_query.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index ab5c3cd..997b0cb 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -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.