mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 21:40:29 +01:00
panfrost: Use row_stride even for linear resources
In that case, they match up. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16201>
This commit is contained in:
parent
c11df56cff
commit
c4241a831f
1 changed files with 4 additions and 4 deletions
|
|
@ -942,7 +942,7 @@ panfrost_ptr_map(struct pipe_context *pctx,
|
|||
/* Staging resources have one LOD: level 0. Query the strides
|
||||
* on this LOD.
|
||||
*/
|
||||
transfer->base.stride = staging->image.layout.slices[0].line_stride;
|
||||
transfer->base.stride = staging->image.layout.slices[0].row_stride;
|
||||
transfer->base.layer_stride =
|
||||
panfrost_get_layer_stride(&staging->image.layout, 0);
|
||||
|
||||
|
|
@ -1088,7 +1088,7 @@ panfrost_ptr_map(struct pipe_context *pctx,
|
|||
if ((usage & dpw) == dpw && rsrc->index_cache)
|
||||
return NULL;
|
||||
|
||||
transfer->base.stride = rsrc->image.layout.slices[level].line_stride;
|
||||
transfer->base.stride = rsrc->image.layout.slices[level].row_stride;
|
||||
transfer->base.layer_stride =
|
||||
panfrost_get_layer_stride(&rsrc->image.layout, level);
|
||||
|
||||
|
|
@ -1103,7 +1103,7 @@ panfrost_ptr_map(struct pipe_context *pctx,
|
|||
return bo->ptr.cpu
|
||||
+ rsrc->image.layout.slices[level].offset
|
||||
+ box->z * transfer->base.layer_stride
|
||||
+ box_blocks.y * rsrc->image.layout.slices[level].line_stride
|
||||
+ box_blocks.y * rsrc->image.layout.slices[level].row_stride
|
||||
+ box_blocks.x * bytes_per_block;
|
||||
}
|
||||
}
|
||||
|
|
@ -1284,7 +1284,7 @@ panfrost_ptr_unmap(struct pipe_context *pctx,
|
|||
util_copy_rect(
|
||||
bo->ptr.cpu + prsrc->image.layout.slices[0].offset,
|
||||
prsrc->base.format,
|
||||
prsrc->image.layout.slices[0].line_stride,
|
||||
prsrc->image.layout.slices[0].row_stride,
|
||||
0, 0,
|
||||
transfer->box.width,
|
||||
transfer->box.height,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue