v3dv: check input attachment usage as sampled usage
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 5 May 2022 06:44:45 +0000 (08:44 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 5 May 2022 10:41:57 +0000 (10:41 +0000)
Since we implement input attachments as textures we should check
support for input attachment usage the same way we check support
for sampled images.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16344>

src/broadcom/vulkan/v3dv_formats.c

index c8f0e84..4751f50 100644 (file)
@@ -369,7 +369,8 @@ get_image_format_properties(
       }
    }
 
-   if (info->usage & VK_IMAGE_USAGE_SAMPLED_BIT) {
+   if (info->usage & (VK_IMAGE_USAGE_SAMPLED_BIT |
+                      VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT)) {
       if (!(format_feature_flags & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT)) {
          goto unsupported;
       }