From 6db93cd167d3ae04688c192806aad54a05a9d161 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 29 Jul 2016 15:00:12 +0200 Subject: [PATCH] gallium/util: fix align64 it cut off the upper 32 bits Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Ilia Mirkin Reviewed-by: Edward O'Callaghan --- src/gallium/auxiliary/util/u_math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index c94967e8a42..1661e63dbdd 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -682,7 +682,7 @@ align(int value, int alignment) static inline uint64_t align64(uint64_t value, unsigned alignment) { - return (value + alignment - 1) & ~(alignment - 1); + return (value + alignment - 1) & ~((uint64_t)alignment - 1); } /** -- 2.30.2