Mesa (main): radv: do not allocate the FCE predicate for images that use comp-to-single

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 19 13:33:25 UTC 2021


Module: Mesa
Branch: main
Commit: ab35a63deaf05a1e36f62b2601d4cbfd285a6dcf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab35a63deaf05a1e36f62b2601d4cbfd285a6dcf

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri Aug 13 10:39:38 2021 +0200

radv: do not allocate the FCE predicate for images that use comp-to-single

Images that support comp-to-single don't have to be fast-cleared at
all, so the predicate is unnecessary.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12323>

---

 src/amd/vulkan/radv_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 9a885afeb11..9d00efe0841 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1278,7 +1278,7 @@ radv_image_alloc_values(const struct radv_device *device, struct radv_image *ima
    if (image->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT)
       return;
 
-   if (radv_image_has_cmask(image) || radv_image_has_dcc(image)) {
+   if (radv_image_has_cmask(image) || (radv_image_has_dcc(image) && !image->support_comp_to_single)) {
       image->fce_pred_offset = image->size;
       image->size += 8 * image->info.levels;
    }



More information about the mesa-commit mailing list