Mesa (main): radv: don't allocate DCC predicate if the image doesn't use DCC

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 26 12:23:31 UTC 2021


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Tue May 25 17:01:23 2021 +0100

radv: don't allocate DCC predicate if the image doesn't use DCC

Fixes replay of RenderDoc captures created before a7c0cf500b3.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10983>

---

 src/amd/vulkan/radv_image.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index efd7d454072..189d4288c36 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -282,13 +282,11 @@ radv_image_use_dcc_image_stores(const struct radv_device *device, const struct r
 /*
  * Whether to use a predicate to determine whether DCC is in a compressed
  * state. This can be used to avoid decompressing an image multiple times.
- *
- * This function assumes the image uses DCC compression.
  */
 bool
 radv_image_use_dcc_predication(const struct radv_device *device, const struct radv_image *image)
 {
-   return !radv_image_use_dcc_image_stores(device, image);
+   return radv_image_has_dcc(image) && !radv_image_use_dcc_image_stores(device, image);
 }
 
 static inline bool



More information about the mesa-commit mailing list