Mesa (main): radv: do not allocate a clear value for images that support comp-to-single

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 30 07:36:46 UTC 2021


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Aug 26 17:56:53 2021 +0200

radv: do not allocate a clear value for images that support comp-to-single

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/12565>

---

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

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 9a0c5ea4ec2..dce0458eaff 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1301,7 +1301,8 @@ radv_image_alloc_values(const struct radv_device *device, struct radv_image *ima
       image->size += 8 * image->info.levels;
    }
 
-   if (radv_image_has_dcc(image) || radv_image_has_cmask(image) || radv_image_has_htile(image)) {
+   if ((radv_image_has_dcc(image) && !image->support_comp_to_single) ||
+       radv_image_has_cmask(image) || radv_image_has_htile(image)) {
       image->clear_value_offset = image->size;
       image->size += 8 * image->info.levels;
    }



More information about the mesa-commit mailing list