From: Alyssa Rosenzweig Date: Tue, 5 Nov 2019 16:18:42 +0000 (-0500) Subject: panfrost: Disable tiling for GLOBAL resources X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9c28700aaf5d3bdf3e94a339d4006469cdab5b7e;p=mesa.git 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 --- 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);