panfrost: Disable tiling for GLOBAL resources
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 5 Nov 2019 16:18:42 +0000 (11:18 -0500)
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>
Tue, 19 Nov 2019 06:22:31 +0000 (06:22 +0000)
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@collabora.com>
src/gallium/drivers/panfrost/pan_resource.c

index 85c9824623ccc06593e89268302698206bb5579f..c3fb12777b73526f50c22f7a8594427f6ece42b6 100644 (file)
@@ -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);