nvk: Require color or depth/stencil attachment support for input attachments

Fixes: 20d8d1e239 ("nvk: Add a more competent GetPhysicalDeviceImageFormatProperties")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
(cherry picked from commit 08f6066e87)
This commit is contained in:
Faith Ekstrand 2024-08-08 22:05:34 -05:00 committed by Eric Engestrom
parent ff7759cdfe
commit fee952305c
2 changed files with 4 additions and 1 deletions

View file

@ -2054,7 +2054,7 @@
"description": "nvk: Require color or depth/stencil attachment support for input attachments",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "20d8d1e239be95143fc25886fe28aeb5d82a4d8c",
"notes": null

View file

@ -266,6 +266,9 @@ vk_image_usage_to_format_features(VkImageUsageFlagBits usage_flag)
return VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT;
case VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT:
return VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT;
case VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT:
return VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT |
VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT;
default:
return 0;
}