Module: Mesa Branch: master Commit: 5cc27d59a11ed11081b3f5c9acc3280ec412ebed URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5cc27d59a11ed11081b3f5c9acc3280ec412ebed
Author: Jason Ekstrand <[email protected]> Date: Wed Apr 1 17:24:10 2020 -0500 anv/image: Use align_u64 for image offsets The ALIGN functions in util/u_math.h work on uintptr_t whose size changes depending on your platform. Use ones which take an explicit 64-bit type instead to avoid 32-bit platform issues. Cc: [email protected] Reported-by: Mark Janes <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4414> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4414> --- src/intel/vulkan/anv_image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index e0b5ea8db18..5d7845d721a 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -328,8 +328,8 @@ add_aux_state_tracking_buffer(struct anv_image *image, * a 4K alignment. We believe that 256B might be enough, but due to lack of * testing we will leave this as 4K for now. */ - image->planes[plane].size = ALIGN(image->planes[plane].size, 4096); - image->size = ALIGN(image->size, 4096); + image->planes[plane].size = align_u64(image->planes[plane].size, 4096); + image->size = align_u64(image->size, 4096); assert(image->planes[plane].offset % 4096 == 0); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
