Mesa (master): panfrost: Mark PIPE_BUFFER BOs as not renderable

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 9 14:10:57 UTC 2020


Module: Mesa
Branch: master
Commit: 18c067f9f099d54eee1d5713b24ecca52295987c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=18c067f9f099d54eee1d5713b24ecca52295987c

Author: Icecream95 <ixn at keemail.me>
Date:   Sun Apr  5 11:49:07 2020 +1200

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 at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4451>

---

 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;



More information about the mesa-commit mailing list