From 321dadf229238b7eadcdfadb21e368728f20a52d Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 11 Mar 2021 17:14:42 +0100 Subject: [PATCH] radv: rework radv_use_dcc_for_image() a bit To make it clear that only GFX8-9 have missing DCC features. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_image.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index ffae3007ae0..affef2e9f50 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -212,20 +212,21 @@ radv_use_dcc_for_image(struct radv_device *device, if (!radv_image_use_fast_clear_for_image(device, image)) return false; - /* FIXME: Fix DCC layers and mipmaps on GFX9. */ - if ((pCreateInfo->arrayLayers > 1 || pCreateInfo->mipLevels > 1) && - device->physical_device->rad_info.chip_class == GFX9) - return false; - /* Do not enable DCC for mipmapped arrays because performance is worse. */ if (pCreateInfo->arrayLayers > 1 && pCreateInfo->mipLevels > 1) return false; - /* TODO: Fix and enable DCC MSAA on older chips. */ - if (pCreateInfo->samples > 1 && - !device->physical_device->dcc_msaa_allowed && - device->physical_device->rad_info.chip_class < GFX10) - return false; + if (device->physical_device->rad_info.chip_class < GFX10) { + /* TODO: Add support for DCC MSAA on GFX8-9. */ + if (pCreateInfo->samples > 1 && + !device->physical_device->dcc_msaa_allowed) + return false; + + /* TODO: Add support for DCC layers/mipmaps on GFX9. */ + if ((pCreateInfo->arrayLayers > 1 || pCreateInfo->mipLevels > 1) && + device->physical_device->rad_info.chip_class == GFX9) + return false; + } return radv_are_formats_dcc_compatible(device->physical_device, pCreateInfo->pNext, format,