From 18c067f9f099d54eee1d5713b24ecca52295987c Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Sun, 5 Apr 2020 11:49:07 +1200 Subject: [PATCH] panfrost: Mark PIPE_BUFFER BOs as not renderable Without this, memory usage explodes by 16x due to height alignment. Closes: #2715 Reviewed-by: Alyssa Rosenzweig Part-of: --- 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 8b57abada3e..0506163f291 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -280,7 +280,8 @@ panfrost_setup_slices(struct panfrost_resource *pres, size_t *bo_size) * makes code a lot simpler */ bool renderable = res->bind & - (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL); + (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL) && + res->target != PIPE_BUFFER; bool afbc = pres->layout == MALI_TEXTURE_AFBC; bool tiled = pres->layout == MALI_TEXTURE_TILED; bool should_align = renderable || tiled; -- 2.30.2