radv: fix usage flag for 3D compressed 128 bpp images on GFX9

VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT is equal to
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT but we want COLOR_ATTACHMENT_BIT.

Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22540>
(cherry picked from commit 72a522fb36)
This commit is contained in:
Samuel Pitoiset 2023-04-17 18:06:11 +02:00 committed by Eric Engestrom
parent 6ae14d1808
commit 316c217cd9
2 changed files with 2 additions and 2 deletions

View file

@ -148,7 +148,7 @@
"description": "radv: fix usage flag for 3D compressed 128 bpp images on GFX9",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -1551,7 +1551,7 @@ radv_get_image_format_properties(struct radv_physical_device *physical_device,
vk_format_get_blocksizebits(format) == 128 && vk_format_is_compressed(format) &&
(info->flags & VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT) &&
((info->flags & VK_IMAGE_CREATE_EXTENDED_USAGE_BIT) ||
(info->usage & VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT))) {
(info->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT))) {
goto unsupported;
}