mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
asahi: Handle linear display targets as well as tiled
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086>
This commit is contained in:
parent
e90d167d3d
commit
62ac4adecb
1 changed files with 7 additions and 3 deletions
|
|
@ -593,9 +593,13 @@ agx_flush_frontbuffer(struct pipe_screen *_screen,
|
|||
void *map = winsys->displaytarget_map(winsys, rsrc->dt, PIPE_USAGE_DEFAULT);
|
||||
assert(map != NULL);
|
||||
|
||||
agx_detile(rsrc->bo->ptr.cpu, map,
|
||||
rsrc->base.width0, 32, rsrc->dt_stride / 4,
|
||||
0, 0, rsrc->base.width0, rsrc->base.height0);
|
||||
if (rsrc->modifier == DRM_FORMAT_MOD_APPLE_64X64_MORTON_ORDER) {
|
||||
agx_detile(rsrc->bo->ptr.cpu, map,
|
||||
rsrc->base.width0, 32, rsrc->dt_stride / 4,
|
||||
0, 0, rsrc->base.width0, rsrc->base.height0);
|
||||
} else {
|
||||
memcpy(map, rsrc->bo->ptr.cpu, rsrc->dt_stride * rsrc->base.height0);
|
||||
}
|
||||
|
||||
winsys->displaytarget_display(winsys, rsrc->dt, context_private, box);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue