Skip to content

Commit 2533d0a

Browse files
olvaffeMarge Bot
authored andcommitted
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: f97b449 ("radv: integrate meta astc compute decoder to radv") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26106>
1 parent 295734b commit 2533d0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/amd/vulkan/radv_image.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2237,7 +2237,8 @@ radv_image_view_init(struct radv_image_view *iview, struct radv_device *device,
22372237
* block compatible format and the compressed format, so even if we take
22382238
* the plain converted dimensions the physical layout is correct.
22392239
*/
2240-
if (device->physical_device->rad_info.gfx_level >= GFX9 && vk_format_is_block_compressed(image->vk.format) &&
2240+
if (device->physical_device->rad_info.gfx_level >= GFX9 &&
2241+
vk_format_is_block_compressed(image->planes[iview->plane_id].format) &&
22412242
!vk_format_is_block_compressed(iview->vk.format)) {
22422243
/* If we have multiple levels in the view we should ideally take the last level,
22432244
* but the mip calculation has a max(..., 1) so walking back to the base mip in an

0 commit comments

Comments
 (0)