Mesa (main): radv: Actually return correct value for read-only DCC compressedness.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 14 11:37:16 UTC 2021


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

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Fri May 14 14:04:11 2021 +0200

radv: Actually return correct value for read-only DCC compressedness.

Most stuff that depends on the value wouldn't be triggered anyway but
...

Fixes: b5ecf0748a5 ("radv: Ensure we never decompress or FCE read-only textures.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10802>

---

 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 e2c22a0782a..1847de34b5c 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1976,7 +1976,7 @@ radv_layout_dcc_compressed(const struct radv_device *device, const struct radv_i
 
    /* If the image is read-only, we can always just keep it compressed */
    if (!(image->usage & RADV_IMAGE_USAGE_WRITE_BITS))
-      return false;
+      return true;
 
    /* Don't compress compute transfer dst when image stores are not supported. */
    if ((layout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL || layout == VK_IMAGE_LAYOUT_GENERAL) &&



More information about the mesa-commit mailing list