Mesa (master): panfrost: Disable tiling for GLOBAL resources

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 19 06:46:07 UTC 2019


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Tue Nov  5 11:18:42 2019 -0500

panfrost: Disable tiling for GLOBAL resources

It doesn't make sense to have nonlinear layouts for a buffer that can be
accessed as direct memory for a compute kernel. Turn that off so things
work as expected.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

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

diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index 85c9824623c..c3fb12777b7 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -393,8 +393,9 @@ panfrost_resource_create_bo(struct panfrost_screen *screen, struct panfrost_reso
         bool is_texture = (res->bind & PIPE_BIND_SAMPLER_VIEW);
         bool is_2d = res->depth0 == 1 && res->array_size == 1;
         bool is_streaming = (res->usage != PIPE_USAGE_STREAM);
+        bool is_global = res->bind & PIPE_BIND_GLOBAL;
 
-        bool should_tile = is_streaming && is_texture && is_2d;
+        bool should_tile = is_streaming && is_texture && is_2d && !is_global;
 
         /* Depth/stencil can't be tiled, only linear or AFBC */
         should_tile &= !(res->bind & PIPE_BIND_DEPTH_STENCIL);




More information about the mesa-commit mailing list