panfrost: Update the resource layout when doing a tile -> linear conversion
If we don't do that the stride in texture/framebuffer descriptors
is wrong, leading to page faults when those buffers are accessed.
Fixes: 00360cd5c8
("panfrost: Calculate the row stride at resource creation time")
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/7797>
This commit is contained in:
parent
46518327ae
commit
d4f662a252
|
@ -1044,8 +1044,6 @@ panfrost_ptr_unmap(struct pipe_context *pctx,
|
|||
assert(transfer->box.depth == 1);
|
||||
|
||||
if (panfrost_should_linear_convert(prsrc, transfer)) {
|
||||
prsrc->modifier = DRM_FORMAT_MOD_LINEAR;
|
||||
|
||||
util_copy_rect(
|
||||
bo->ptr.cpu + prsrc->slices[0].offset,
|
||||
prsrc->base.format,
|
||||
|
@ -1056,6 +1054,8 @@ panfrost_ptr_unmap(struct pipe_context *pctx,
|
|||
trans->map,
|
||||
transfer->stride,
|
||||
0, 0);
|
||||
|
||||
panfrost_resource_setup(dev, prsrc, NULL, DRM_FORMAT_MOD_LINEAR);
|
||||
} else {
|
||||
panfrost_store_tiled_image(
|
||||
bo->ptr.cpu + prsrc->slices[transfer->level].offset,
|
||||
|
|
Loading…
Reference in New Issue