mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
panfrost: Load from tiled images
Now that we have lima tiling code available, use it to load from a tiled source. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
035a07c0ae
commit
546236e27f
1 changed files with 15 additions and 2 deletions
|
|
@ -506,9 +506,22 @@ panfrost_transfer_map(struct pipe_context *pctx,
|
|||
|
||||
transfer->base.stride = box->width * bytes_per_pixel;
|
||||
transfer->base.layer_stride = transfer->base.stride * box->height;
|
||||
|
||||
/* TODO: Reads */
|
||||
transfer->map = rzalloc_size(transfer, transfer->base.layer_stride * box->depth);
|
||||
assert(box->depth == 1);
|
||||
|
||||
if (usage & PIPE_TRANSFER_READ) {
|
||||
if (bo->layout == PAN_AFBC) {
|
||||
DBG("Unimplemented: reads from AFBC");
|
||||
} else if (bo->layout == PAN_TILED) {
|
||||
panfrost_load_tiled_image(
|
||||
transfer->map,
|
||||
bo->cpu + bo->slices[level].offset,
|
||||
box,
|
||||
transfer->base.stride,
|
||||
bo->slices[level].stride,
|
||||
util_format_get_blocksize(resource->format));
|
||||
}
|
||||
}
|
||||
|
||||
return transfer->map;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue