From 5f10ffd6e24b6980cf95feb5d79c5ac0347bdb9e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 6 Feb 2022 10:06:48 -0500 Subject: [PATCH] asahi: Handle page alignment of miptrees Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_pipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 2b8ee981883..84754c22628 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -188,9 +188,9 @@ agx_resource_create(struct pipe_screen *screen, offset += ALIGN_POT(nresource->slices[l].line_stride * height, 0x80); } - /* Arrays and cubemaps have the entire miptree duplicated */ - nresource->array_stride = ALIGN_POT(offset, 64); - unsigned size = ALIGN_POT(nresource->array_stride * templ->array_size, 4096); + /* Arrays and cubemaps have the entire miptree duplicated and page aligned (16K) */ + nresource->array_stride = ALIGN_POT(offset, 0x4000); + unsigned size = nresource->array_stride * templ->array_size; pipe_reference_init(&nresource->base.reference, 1);