Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9415>
if (image->usage & VK_IMAGE_USAGE_STORAGE_BIT)
return false;
+ /* Do not enable TC-compatible if the image isn't readable by a shader
+ * because no texture fetches will happen.
+ */
+ if (!(image->usage & (VK_IMAGE_USAGE_SAMPLED_BIT |
+ VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT |
+ VK_IMAGE_USAGE_TRANSFER_SRC_BIT)))
+ return false;
+
if (radv_image_has_dcc(image))
return false;