radv: enable DCC for MSAA images on GFX11
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 28 Sep 2023 08:23:20 +0000 (10:23 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 3 Oct 2023 09:35:25 +0000 (09:35 +0000)
This seems to be working now! I suspect either the "recent" addrlib
update fixed it or recent comp-to-single fast clear fixes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8326
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25448>

src/amd/vulkan/radv_image.c

index 1fedc8d..484f8cd 100644 (file)
@@ -273,8 +273,9 @@ radv_use_dcc_for_image_early(struct radv_device *device, struct radv_image *imag
          return false;
    }
 
-   /* FIXME: Figure out how to use DCC for MSAA images without FMASK. */
-   if (pCreateInfo->samples > 1 && !device->physical_device->use_fmask)
+   /* DCC MSAA can't work on GFX10.3 and earlier without FMASK. */
+   if (pCreateInfo->samples > 1 && device->physical_device->rad_info.gfx_level < GFX11 &&
+       (device->instance->debug_flags & RADV_DEBUG_NO_FMASK))
       return false;
 
    return radv_are_formats_dcc_compatible(device->physical_device, pCreateInfo->pNext, format, pCreateInfo->flags,