From c55ebdb76d9720aeab3a0e2673dc65d43f8ab082 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Tue, 30 Nov 2021 01:47:15 +0100 Subject: [PATCH] radv: Use the correct base format for reintepretation. Going to hit it when emulating ETC2 through another plane. Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);