From 7d23ea20a024ebfee96fd77ecd41a63e90c244b6 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 25 May 2021 17:01:23 +0100 Subject: [PATCH] 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 Part-of: --- 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