From 9c28700aaf5d3bdf3e94a339d4006469cdab5b7e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 5 Nov 2019 11:18:42 -0500 Subject: [PATCH] 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 --- 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); -- 2.30.2