From 095a58204d99d5a2714eeaf7728b377e87432be7 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 12 Sep 2019 20:20:53 -0400 Subject: radeonsi: expand FMASK before MSAA image stores are used Image stores don't use FMASK, so we have to turn it into identity. Acked-by: Pierre-Eric Pelloux-Prayer --- src/gallium/drivers/radeonsi/si_descriptors.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/gallium/drivers/radeonsi/si_descriptors.c') diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 12ab1f51e97..fa72e5780dc 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -725,21 +725,11 @@ static void si_set_shader_image_desc(struct si_context *ctx, bool uses_dcc = vi_dcc_enabled(tex, level); unsigned access = view->access; - /* Clear the write flag when writes can't occur. - * Note that DCC_DECOMPRESS for MSAA doesn't work in some cases, - * so we don't wanna trigger it. - */ - if (tex->is_depth || - (!fmask_desc && tex->surface.fmask_size != 0)) { - assert(!"Z/S and MSAA image stores are not supported"); - access &= ~PIPE_IMAGE_ACCESS_WRITE; - } - assert(!tex->is_depth); - assert(fmask_desc || tex->surface.fmask_size == 0); + assert(fmask_desc || tex->surface.fmask_offset == 0); if (uses_dcc && !skip_decompress && - (view->access & PIPE_IMAGE_ACCESS_WRITE || + (access & PIPE_IMAGE_ACCESS_WRITE || !vi_dcc_formats_compatible(screen, res->b.b.format, view->format))) { /* If DCC can't be disabled, at least decompress it. * The decompression is relatively cheap if the surface -- cgit v1.2.3