From 0ead3bc28080797948bddcceeef14bb399ce588a Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Mon, 19 Apr 2021 11:53:04 -0700 Subject: [PATCH] gallium/aux: Fix MSVC warning C4334 (32bit shift cast to 64bit) Reviewed-by: Jason Ekstrand Reviewed-By: Bill Kristiansen Cc: mesa-stable@lists.freedesktop.org Part-of: (cherry picked from commit 4a3f0444732fb95883b70bef1b1ffda86af46e4a) --- .pick_status.json | 2 +- src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c | 2 +- src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c | 2 +- src/gallium/auxiliary/pipebuffer/pb_cache.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index f12eb1b8b1f..df921f11772 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -391,7 +391,7 @@ "description": "gallium/aux: Fix MSVC warning C4334 (32bit shift cast to 64bit)", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c index ee87663ba25..4595e1a4021 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c @@ -232,7 +232,7 @@ pb_cache_manager_create_buffer(struct pb_manager *_mgr, } assert(pipe_is_referenced(&buf->buffer->reference)); - assert(pb_check_alignment(desc->alignment, 1 << buf->buffer->alignment_log2)); + assert(pb_check_alignment(desc->alignment, 1ull << buf->buffer->alignment_log2)); assert(buf->buffer->size >= size); pipe_reference_init(&buf->base.reference, 1); diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c index 43007a3b34e..d965182b84f 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c @@ -399,7 +399,7 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr, } assert(pipe_is_referenced(&buf->buffer->reference)); - assert(pb_check_alignment(real_desc.alignment, 1 << buf->buffer->alignment_log2)); + assert(pb_check_alignment(real_desc.alignment, 1ull << buf->buffer->alignment_log2)); assert(pb_check_usage(real_desc.usage, buf->buffer->usage)); assert(buf->buffer->size >= real_size); diff --git a/src/gallium/auxiliary/pipebuffer/pb_cache.c b/src/gallium/auxiliary/pipebuffer/pb_cache.c index 515761997d0..a92cd2d5e25 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_cache.c +++ b/src/gallium/auxiliary/pipebuffer/pb_cache.c @@ -133,7 +133,7 @@ pb_cache_is_buffer_compat(struct pb_cache_entry *entry, if (usage & mgr->bypass_usage) return 0; - if (!pb_check_alignment(alignment, 1 << buf->alignment_log2)) + if (!pb_check_alignment(alignment, 1ull << buf->alignment_log2)) return 0; return mgr->can_reclaim(mgr->winsys, buf) ? 1 : -1;