diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 554249dc54e..bf0a64968ca 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -2008,8 +2008,8 @@ radv_image_view_init(struct radv_image_view *iview, struct radv_device *device, if (iview->vk_format != image->planes[iview->plane_id].format) { unsigned view_bw = vk_format_get_blockwidth(iview->vk_format); unsigned view_bh = vk_format_get_blockheight(iview->vk_format); - unsigned img_bw = vk_format_get_blockwidth(image->vk_format); - unsigned img_bh = vk_format_get_blockheight(image->vk_format); + unsigned img_bw = vk_format_get_blockwidth(image->planes[iview->plane_id].format); + unsigned img_bh = vk_format_get_blockheight(image->planes[iview->plane_id].format); iview->extent.width = round_up_u32(iview->extent.width * view_bw, img_bw); iview->extent.height = round_up_u32(iview->extent.height * view_bh, img_bh);