Mesa (main): radv: Use the correct base format for reintepretation.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Dec 14 12:10:38 UTC 2021


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

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Tue Nov 30 01:47:15 2021 +0100

radv: Use the correct base format for reintepretation.

Going to hit it when emulating ETC2 through another plane.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14071>

---

 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);



More information about the mesa-commit mailing list