[Mesa-dev] [PATCH 2/6] nir/spirv: fix MSVC warning in vtn_align_u32()
Neil Roberts
nroberts at igalia.com
Fri Mar 30 19:44:00 UTC 2018
Patches 2-6 are:
Reviewed-by: Neil Roberts <nroberts at igalia.com>
Thanks a lot for fixing this.
Regards,
- Neil
Brian Paul <brianp at vmware.com> writes:
> Fixes warning that "negation of an unsigned value results in an
> unsigned value".
> ---
> src/compiler/spirv/vtn_private.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
> index d8a00f9..269de92 100644
> --- a/src/compiler/spirv/vtn_private.h
> +++ b/src/compiler/spirv/vtn_private.h
> @@ -732,7 +732,7 @@ void vtn_handle_decoration(struct vtn_builder *b, SpvOp opcode,
> static inline uint32_t
> vtn_align_u32(uint32_t v, uint32_t a)
> {
> - assert(a != 0 && a == (a & -a));
> + assert(a != 0 && a == (a & -((int32_t) a)));
> return (v + a - 1) & ~(a - 1);
> }
>
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list