mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
panfrost: Use panfrost_get_layer_stride() instead of open-coding it
If we don't do that we don't account for CRC buffers. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>
This commit is contained in:
parent
8a9b2ef82d
commit
3c92abe359
1 changed files with 2 additions and 1 deletions
|
|
@ -882,7 +882,8 @@ panfrost_ptr_map(struct pipe_context *pctx,
|
||||||
if (drm_is_afbc(rsrc->layout.modifier)) {
|
if (drm_is_afbc(rsrc->layout.modifier)) {
|
||||||
struct panfrost_resource *staging = pan_alloc_staging(ctx, rsrc, level, box);
|
struct panfrost_resource *staging = pan_alloc_staging(ctx, rsrc, level, box);
|
||||||
transfer->base.stride = staging->layout.slices[0].line_stride;
|
transfer->base.stride = staging->layout.slices[0].line_stride;
|
||||||
transfer->base.layer_stride = transfer->base.stride * box->height;
|
transfer->base.layer_stride =
|
||||||
|
panfrost_get_layer_stride(&staging->layout, level);
|
||||||
|
|
||||||
transfer->staging.rsrc = &staging->base;
|
transfer->staging.rsrc = &staging->base;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue