radeonsi: fix a few non-critical 64-bit integer overflows

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
This commit is contained in:
Marek Olšák 2025-11-21 19:46:43 -05:00 committed by Marge Bot
parent 07d2ab29b6
commit 566c666d57
2 changed files with 2 additions and 2 deletions

View file

@ -901,7 +901,7 @@ static void si_fast_clear(struct si_context *sctx, unsigned *buffers,
unsigned level = fb->zsbuf.level;
bool update_db_depth_clear = false;
bool update_db_stencil_clear = false;
bool fb_too_small = num_pixels * zs_num_layers <= 512 * 512;
bool fb_too_small = (uint64_t)num_pixels * zs_num_layers <= 512 * 512;
/* Transition from TC-incompatible to TC-compatible HTILE if requested.
* (the transition applies to the whole buffer, so make sure we're clearing

View file

@ -54,7 +54,7 @@ si_is_compute_copy_faster(struct pipe_screen *pscreen,
{
if (cpu)
/* very basic for now */
return width * height * depth > 64 * 64;
return (uint64_t)width * height * depth > 64 * 64;
return false;
}