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

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

Fixes: b5ecf0748a ("radv: Ensure we never decompress or FCE read-only textures.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10802>
This commit is contained in:
Bas Nieuwenhuizen 2021-05-14 14:04:11 +02:00 committed by Marge Bot
parent f7c622307d
commit f44a6c6a54

View file

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