Mesa (main): panfrost: Allow tiling all texture targets

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Apr 16 14:13:59 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Thu Apr  7 14:48:48 2022 -0400

panfrost: Allow tiling all texture targets

Now that tiled access to 3D textures works, we can enable tiling on all texture
targets. In particular, this adds tiling support for cube maps, arrays, and 3D
textures. Previously, these would usually fall back to linear, which is hard on
the caches.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15803>

---

 src/gallium/drivers/panfrost/pan_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index ee4952aeea2..085be31b51d 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -427,7 +427,7 @@ panfrost_should_tile(struct panfrost_device *dev,
         if (MIN2(pres->base.width0, pres->base.height0) < 2)
                 return false;
 
-        bool can_tile = panfrost_is_2d(pres)
+        bool can_tile = (pres->base.target != PIPE_BUFFER)
                 && ((pres->base.bind & ~valid_binding) == 0);
 
         return can_tile && (pres->base.usage != PIPE_USAGE_STREAM);



More information about the mesa-commit mailing list