radeonsi: fix image size calculation in fast clear
authorMarek Olšák <marek.olsak@amd.com>
Mon, 15 May 2023 18:26:08 +0000 (14:26 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 19 May 2023 02:58:48 +0000 (02:58 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23037>

src/gallium/drivers/radeonsi/si_clear.c

index 548c0d4..1ed3f96 100644 (file)
@@ -720,7 +720,7 @@ static void si_fast_clear(struct si_context *sctx, unsigned *buffers,
        *
        * This helps on both dGPUs and APUs, even small APUs like Mullins.
        */
-      bool fb_too_small = num_pixels * num_layers <= 512 * 512;
+      bool fb_too_small = (uint64_t)num_pixels * num_layers <= 512 * 512;
       bool too_small = tex->buffer.b.b.nr_samples <= 1 && fb_too_small;
       bool eliminate_needed = false;
       bool fmask_decompress_needed = false;