Mesa (staging/21.1): radv: fix aligning the image offset by using align64()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 16 06:40:59 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: 575b3a63141d497b7d63421feef1e5f66e13d802
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=575b3a63141d497b7d63421feef1e5f66e13d802

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Jun 10 18:20:19 2021 +0200

radv: fix aligning the image offset by using align64()

This doesn't fix anything known. Found by inspection.

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11302>
(cherry picked from commit 4026a07e741aa886eac1754a3f0ee94d3c944f90)

---

 .pick_status.json           | 2 +-
 src/amd/vulkan/radv_image.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 2ae2d1d95b9..9535232b753 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2299,7 +2299,7 @@
         "description": "radv: fix aligning the image offset by using align64()",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index aa76d1e2674..e40d811b993 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1396,7 +1396,7 @@ radv_image_create_layout(struct radv_device *device, struct radv_image_create_in
          offset = mod_info->pPlaneLayouts[plane].offset;
          stride = mod_info->pPlaneLayouts[plane].rowPitch / image->planes[plane].surface.bpe;
       } else {
-         offset = align(image->size, 1 << image->planes[plane].surface.alignment_log2);
+         offset = align64(image->size, 1 << image->planes[plane].surface.alignment_log2);
          stride = 0; /* 0 means no override */
       }
 



More information about the mesa-commit mailing list