Mesa (master): panfrost: Workaround buffer overrun with mip level

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 19 04:05:04 UTC 2019


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

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Fri Mar 15 02:07:55 2019 +0000

panfrost: Workaround buffer overrun with mip level

Mipmaps are still broken, but at least this way we don't crash on some
apps using mipmaps.

Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>

---

 src/gallium/drivers/panfrost/pan_resource.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index ffb65fc52a9..9e83c9bcb51 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -235,7 +235,6 @@ panfrost_create_bo(struct panfrost_screen *screen, const struct pipe_resource *t
                 for (int l = 0; l < (template->last_level + 1); ++l) {
                         bo->cpu[l] = malloc(sz);
                         bo->size[l] = sz;
-                        sz >>= 2;
                 }
         } else {
                 /* For a linear resource, allocate a block of memory from




More information about the mesa-commit mailing list