From ed0cb79072b2dd334b93bf96e78dbfa84d8f8b20 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 29 Nov 2022 08:34:24 +0100 Subject: [PATCH] radv: do not enable DCC for MSAA images without FMASK MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit I don't know how this is supposed to work, especially for fast clears because CMASK should be cleared to 0xC but FMASK implies CMASK. This fixes a bunch of MSAA test failures on GFX10.3 with RADV_DEBUG=nofmask. Cc: 22.3 mesa-stable Signed-off-by: Samuel Pitoiset Reviewed-by: Timur Kristóf Reviewed-by: Bas Nieuwenhuizen Part-of: (cherry picked from commit 84a7138d3cfca05fbd623707525b9d4479a27e94) --- .pick_status.json | 2 +- src/amd/vulkan/radv_image.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 120d8b1..6259698 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -130,7 +130,7 @@ "description": "radv: do not enable DCC for MSAA images without FMASK", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 2792085..5047cdf 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -281,6 +281,10 @@ 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) + return false; + return radv_are_formats_dcc_compatible(device->physical_device, pCreateInfo->pNext, format, pCreateInfo->flags, sign_reinterpret); } -- 2.7.4