blorp: cast uint32_t -> int64_t to avoid potential overflow

In practice, I don't think it's actually going to overflow, but it could
in theory, which coverity is pointing out.

CID: 1647010
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35114>
This commit is contained in:
Dylan Baker 2025-05-22 09:13:11 -07:00 committed by Marge Bot
parent f1a9c2b55c
commit 2a3cf70db8

View file

@ -535,7 +535,7 @@ blorp_fast_clear(struct blorp_batch *batch,
const int phys_height0 = ALIGN(surf->surf->logical_level0_px.h,
surf->surf->image_alignment_el.h);
unaligned_height = phys_height0 % 32;
size_B = surf->surf->row_pitch_B * (phys_height0 - unaligned_height);
size_B = (int64_t)surf->surf->row_pitch_B * (phys_height0 - unaligned_height);
}
}