[Mesa-dev] [PATCH] mesa/main: handle double uniform matrices properly
Kenneth Graunke
kenneth at whitecape.org
Tue May 3 18:44:21 UTC 2016
On Monday, April 25, 2016 9:08:38 AM PDT Samuel Iglesias Gonsálvez wrote:
> From: "Juan A. Suarez Romero" <jasuarez at igalia.com>
>
> 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 at igalia.com>
> ---
> src/mesa/main/uniform_query.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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.
>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160503/2f7c4fb6/attachment.sig>
More information about the mesa-dev
mailing list