From a2a63c53390107020a2c191b71dc3d0b25c62ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 10 Jun 2023 14:49:42 -0400 Subject: [PATCH] radeonsi: don't convert L8A8 to R8A8 when blitting via compute to fix gfx7 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 Part-of: (cherry picked from commit 9078301ff8f55efcf24025026edc9f82d03385b3) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_compute_blit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index eb635830333..5ae77af4659 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -886,7 +886,7 @@ "description": "radeonsi: don't convert L8A8 to R8A8 when blitting via compute to fix gfx7", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0482ff31588d5c6f00b52edd1dea3bb512d6eee9" }, diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index b2aac784e39..3530ac04492 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -585,7 +585,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 */ }