Module: Mesa
Branch: master
Commit: 321dadf229238b7eadcdfadb21e368728f20a52d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=321dadf229238b7eadcdfadb21e368728f20a52d

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Mar 11 17:14:42 2021 +0100

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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9526>

---

 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,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to