[Mesa-dev] [PATCH] gallium/util: fix align64

Edward O'Callaghan funfunctor at folklore1984.net
Sat Jul 30 08:09:03 UTC 2016


Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 07/30/2016 07:22 AM, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> it cut off the upper 32 bits
> 
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  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 c94967e..1661e63 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);
>  }
>  
>  /**
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160730/f8047e81/attachment-0001.sig>


More information about the mesa-dev mailing list