radeonsi: don't convert L8A8 to R8A8 when blitting via compute to fix gfx7
authorMarek Olšák <marek.olsak@amd.com>
Sat, 10 Jun 2023 18:49:42 +0000 (14:49 -0400)
committerMarge Bot <emma+marge@anholt.net>
Sat, 17 Jun 2023 23:42:20 +0000 (23:42 +0000)
Fixes: 0482ff31588d5c - radeonsi: don't do image stores with RGBX, L, LA, I, and SRGB formats
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8707
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9176

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

src/gallium/drivers/radeonsi/si_compute_blit.c

index abb14e7..f9b3bd0 100644 (file)
@@ -566,7 +566,7 @@ static void si_launch_grid_internal_images(struct si_context *sctx,
       /* Simplify the format according to what image stores support. */
       if (images[i].access & PIPE_IMAGE_ACCESS_WRITE) {
          images[i].format = util_format_linear(images[i].format); /* SRGB not supported */
-         images[i].format = util_format_luminance_to_red(images[i].format);
+         /* Keep L8A8 formats as-is because GFX7 is unable to store into R8A8 for some reason. */
          images[i].format = util_format_intensity_to_red(images[i].format);
          images[i].format = util_format_rgbx_to_rgba(images[i].format); /* prevent partial writes */
       }