radeonsi: use correct clear value size for EQAA in expand_fmask
authorMarek Olšák <marek.olsak@amd.com>
Wed, 6 May 2020 16:27:56 +0000 (12:27 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 15 May 2020 22:12:35 +0000 (22:12 +0000)
based on the fmask_expand_values array.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4935>

src/gallium/drivers/radeonsi/si_compute_blit.c

index 53bc34df508ccc271b2d7446da7357966ff30887..c167a8bc7ee578c0af53c5003986879a58a03807 100644 (file)
@@ -687,7 +687,8 @@ void si_compute_expand_fmask(struct pipe_context *ctx, struct pipe_resource *tex
    /* Clear FMASK to identity. */
    struct si_texture *stex = (struct si_texture *)tex;
    si_clear_buffer(sctx, tex, stex->surface.fmask_offset, stex->surface.fmask_size,
-                   (uint32_t *)&fmask_expand_values[log_fragments][log_samples - 1], 4,
+                   (uint32_t *)&fmask_expand_values[log_fragments][log_samples - 1],
+                   log_fragments >= 2 && log_samples == 4 ? 8 : 4,
                    SI_COHERENCY_SHADER, false);
 }