Module: Mesa
Branch: main
Commit: 2533d0a0e29cb85e98aaaf44e665e091bf36d980
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2533d0a0e29cb85e98aaaf44e665e091bf36d980

Author: Chia-I Wu <[email protected]>
Date:   Tue Nov  7 13:19:52 2023 -0800

radv: fix image view extent override for astc

When doing ASTC decoding, the image has format VK_FORMAT_ASTC_*, the
internal plane 1 has format VK_FORMAT_R8G8B8A8_UNORM, and the view has
format VK_FORMAT_R8G8B8A8_UINT.  It does not need the override for
compressed formats.

Fixes: f97b449e9e3 ("radv: integrate meta astc compute decoder to radv")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26106>

---

 src/amd/vulkan/radv_image.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 1663c65ec96..b5da5e62fab 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -2237,7 +2237,8 @@ radv_image_view_init(struct radv_image_view *iview, 
struct radv_device *device,
        * block compatible format and the compressed format, so even if we take
        * the plain converted dimensions the physical layout is correct.
        */
-      if (device->physical_device->rad_info.gfx_level >= GFX9 && 
vk_format_is_block_compressed(image->vk.format) &&
+      if (device->physical_device->rad_info.gfx_level >= GFX9 &&
+          vk_format_is_block_compressed(image->planes[iview->plane_id].format) 
&&
           !vk_format_is_block_compressed(iview->vk.format)) {
          /* If we have multiple levels in the view we should ideally take the 
last level,
           * but the mip calculation has a max(..., 1) so walking back to the 
base mip in an

Reply via email to