panfrost: Workaround buffer overrun with mip level
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 15 Mar 2019 02:07:55 +0000 (02:07 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 19 Mar 2019 03:50:59 +0000 (03:50 +0000)
Mipmaps are still broken, but at least this way we don't crash on some
apps using mipmaps.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/pan_resource.c

index ffb65fc52a94d088e9f60fa468b0087d31475739..9e83c9bcb513bd1a372c3ad1ea79f11e4fb679f2 100644 (file)
@@ -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