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

Fixes replay of RenderDoc captures created before a7c0cf500b.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10983>
This commit is contained in:
Rhys Perry 2021-05-25 17:01:23 +01:00 committed by Marge Bot
parent 729ebe4b17
commit 7d23ea20a0

View file

@ -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