From e714fae2633e7a72d3312f3151613b032b4f79ea Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 6 Feb 2022 10:07:12 -0500 Subject: [PATCH] asahi: Pass correct tile shift to tiling routines Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_pipe.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 84754c22628..f0956891188 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -318,7 +318,8 @@ agx_transfer_map(struct pipe_context *pctx, agx_detile(map, dst, u_minify(resource->width0, level), blocksize * 8, transfer->base.stride / blocksize, - box->x, box->y, box->x + box->width, box->y + box->height, 6); + box->x, box->y, box->x + box->width, box->y + box->height, + agx_select_tile_shift(resource->width0, resource->height0, level, blocksize)); } } @@ -371,7 +372,10 @@ agx_transfer_unmap(struct pipe_context *pctx, transfer->stride / blocksize, transfer->box.x, transfer->box.y, transfer->box.x + transfer->box.width, - transfer->box.y + transfer->box.height, 6); + transfer->box.y + transfer->box.height, + agx_select_tile_shift(transfer->resource->width0, + transfer->resource->height0, + transfer->level, blocksize)); } }