From ea84143d1ee59497c638ed502b7834f57a8ed5b6 Mon Sep 17 00:00:00 2001 From: John Brooks Date: Sat, 13 Aug 2022 11:21:41 -0400 Subject: [PATCH] radv: Only apply mipmap view adjustments to block compressed images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This workaround need not apply to subsampled formats. Signed-off-by: John Brooks Reviewed-by: Samuel Pitoiset Acked-by: Acked-by: Marek Olšák Part-of: --- 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 6fa3c3e18b2..58af590c482 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -2164,7 +2164,8 @@ radv_image_view_init(struct radv_image_view *iview, struct radv_device *device, * the plain converted dimensions the physical layout is correct. */ if (device->physical_device->rad_info.gfx_level >= GFX9 && - vk_format_is_compressed(image->vk.format) && !vk_format_is_compressed(iview->vk.format)) { + vk_format_is_block_compressed(image->vk.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 * useful way is hard. */