Mesa (master): panfrost: Pass the resource dimension to panfrost_compression_tag()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 12 22:58:59 UTC 2021


Module: Mesa
Branch: master
Commit: 2cf41ae494043295f2d4b0334ffaa31be619eca8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2cf41ae494043295f2d4b0334ffaa31be619eca8

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Tue Jan 12 14:46:42 2021 +0100

panfrost: Pass the resource dimension to panfrost_compression_tag()

The reload surface logic creates 2D image views pointing to a specific
3D texture layer, but panfrost_compression_tag() cares about the resource
dimension, not the image view one.

Fixes: 4dd7991422ce ("panfrost: Add a pan_image_layout object")
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8449>

---

 src/panfrost/lib/pan_texture.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c
index ae8183ea75f..73c9698e881 100644
--- a/src/panfrost/lib/pan_texture.c
+++ b/src/panfrost/lib/pan_texture.c
@@ -363,7 +363,10 @@ panfrost_emit_texture_payload(const struct panfrost_device *dev,
                               bool manual_stride,
                               mali_ptr base)
 {
-        base |= panfrost_compression_tag(dev, desc, dim, layout->modifier);
+        /* panfrost_compression_tag() wants the dimension of the resource, not the
+         * one of the image view (those might differ).
+         */
+        base |= panfrost_compression_tag(dev, desc, layout->dim, layout->modifier);
 
         /* Inject the addresses in, interleaving array indices, mip levels,
          * cube faces, and strides in that order */



More information about the mesa-commit mailing list