radv: disable fast-clears with CMASK for 128-bit formats
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 13 Apr 2023 08:28:52 +0000 (10:28 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 17 Apr 2023 06:19:34 +0000 (06:19 +0000)
This isn't supported according to RadeonSI.

This fixes a piglit test with Zink that uses a R32G32B32A32_SINT format
with MSAA 8x. This is because DCC fast-clears with MSAA require to
clear CMASK too.

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

src/amd/vulkan/radv_image.c
src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt
src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt

index 2dca1de..4b11c6e 100644 (file)
@@ -1638,6 +1638,10 @@ radv_image_can_fast_clear(const struct radv_device *device, const struct radv_im
       /* RB+ doesn't work with CMASK fast clear on Stoney. */
       if (!radv_image_has_dcc(image) && device->physical_device->rad_info.family == CHIP_STONEY)
          return false;
+
+      /* Fast-clears with CMASK aren't supported for 128-bit formats. */
+      if (radv_image_has_cmask(image) && vk_format_get_blocksizebits(image->vk.format) > 64)
+         return false;
    } else {
       if (!radv_image_has_htile(image))
          return false;
index 1603c84..2b17935 100644 (file)
@@ -392,7 +392,6 @@ spec@egl_nok_texture_from_pixmap@basic,Timeout
 spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuv420,Fail
 spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Fail
 spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail
-spec@ext_texture_integer@multisample-fast-clear gl_ext_texture_integer,Fail
 spec@ext_texture_srgb@fbo-generatemipmap-formats,Fail
 spec@ext_texture_srgb@fbo-generatemipmap-formats-s3tc,Fail
 spec@ext_texture_srgb@fbo-generatemipmap-formats-s3tc@GL_COMPRESSED_SLUMINANCE_ALPHA,Fail
index 4421983..9fa41bc 100644 (file)
@@ -389,7 +389,6 @@ spec@egl_nok_texture_from_pixmap@basic,Timeout
 spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuv420,Fail
 spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Fail
 spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail
-spec@ext_texture_integer@multisample-fast-clear gl_ext_texture_integer,Fail
 spec@ext_texture_srgb@fbo-generatemipmap-formats,Fail
 spec@ext_texture_srgb@fbo-generatemipmap-formats-s3tc,Fail
 spec@ext_texture_srgb@fbo-generatemipmap-formats-s3tc@GL_COMPRESSED_SLUMINANCE_ALPHA,Fail