diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c index 3ec3c5c8d02..909eead75d7 100644 --- a/src/gallium/drivers/radeonsi/si_clear.c +++ b/src/gallium/drivers/radeonsi/si_clear.c @@ -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 diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 4ecd09fc2e2..980335ff81e 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -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; }