Module: Mesa
Branch: staging/23.0
Commit: f1dc6e752a6d839d323970cc780947088d250451
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f1dc6e752a6d839d323970cc780947088d250451

Author: Samuel Pitoiset <[email protected]>
Date:   Mon Apr 17 18:06:11 2023 +0200

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22540>
(cherry picked from commit 72a522fb3692985a4e805b00f6d7e2f5a0386d47)

---

 .pick_status.json             | 2 +-
 src/amd/vulkan/radv_formats.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 603a151554b..987f774f8c1 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2724,7 +2724,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,
         "notes": null
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index 86bb31e5f58..d72834cfe4c 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -1544,7 +1544,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;
    }
 

Reply via email to