Mesa (staging/21.2): intel/isl: Explicitly set offset_B = 0 in get_uncomp_surf for arrays

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 18 16:12:33 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: 9c01036e774ce71b53d5d61e23642a5290d16bbb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c01036e774ce71b53d5d61e23642a5290d16bbb

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Jul  7 10:52:09 2021 -0500

intel/isl: Explicitly set offset_B = 0 in get_uncomp_surf for arrays

The only user of this case is iris which initializes offset_B to 0 so
there's no real bug here.  However, it is unexpected from an API PoV.

Fixes: 9946120d2b4e "intel/isl: Add more cases to isl_surf_get_uncompressed_surf"
Acked-by: Ivan Briano <ivan.briano at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11765>
(cherry picked from commit 370240615421055be24c2c30e345d0454043d5e1)

---

 .pick_status.json   | 2 +-
 src/intel/isl/isl.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index e08b9c6b7d4..cd13ada9458 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -58,7 +58,7 @@
         "description": "intel/isl: Explicitly set offset_B = 0 in get_uncomp_surf for arrays",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "9946120d2b4e898b58f5d255558a27affc78e928"
     },
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 2e2e79c5659..53adb4dbbde 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -2892,6 +2892,9 @@ isl_surf_get_uncompressed_surf(const struct isl_device *dev,
       *ucompr_surf = *surf;
       ucompr_surf->levels = 1;
 
+      /* The surface mostly stays as-is; there is no offset */
+      *offset_B = 0;
+
       /* The view remains the same */
       *ucompr_view = *view;
    } else {



More information about the mesa-commit mailing list