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 <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4451>
This commit is contained in:
Icecream95 2020-04-05 11:49:07 +12:00 committed by Marge Bot
parent db57624c0c
commit 18c067f9f0
1 changed files with 2 additions and 1 deletions

View File

@ -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;