mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-01 17:58:26 +02:00
Revert "v3d: never replace a mapped bo"
This reverts commit0b85476d86. When mapping a BO in v3d, the map keeps forever until freeing the BO. If later the map is required again, we reuse the map instead of doing the map from scratch. This saves calling map/unmap continuously, as well as a mechanism to keep control of the map usage, like a reference count. Thus, when reallocating a BO, if it is mapped it just means the map was used in the past, but not necessarily it is in use right now. The reverted commit was causing performance regressions in multiple applications, reducing from 60fps to 5fps. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11783 Backport-to: 24.2 Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31049> (cherry picked from commitc84be162a1)
This commit is contained in:
parent
9b83bf0bfe
commit
1d257834ff
3 changed files with 2 additions and 5 deletions
|
|
@ -1544,7 +1544,7 @@
|
|||
"description": "Revert \"v3d: never replace a mapped bo\"",
|
||||
"nominated": true,
|
||||
"nomination_type": 4,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -233,6 +233,7 @@ traces:
|
|||
label: [skip, timeout]
|
||||
checksum: 512c305e645e2ec62d94976d86f42f1b
|
||||
broadcom-rpi5:
|
||||
label: [crash]
|
||||
checksum: 512c305e645e2ec62d94976d86f42f1b
|
||||
|
||||
valve/portal-2-v2.trace:
|
||||
|
|
|
|||
|
|
@ -101,10 +101,6 @@ v3d_resource_bo_alloc(struct v3d_resource *rsc)
|
|||
struct pipe_screen *pscreen = prsc->screen;
|
||||
struct v3d_bo *bo;
|
||||
|
||||
/* never replace a mapped bo */
|
||||
if (rsc->bo && rsc->bo->map)
|
||||
return false;
|
||||
|
||||
/* Buffers may be read using ldunifa, which prefetches the next
|
||||
* 4 bytes after a read. If the buffer's size is exactly a multiple
|
||||
* of a page size and the shader reads the last 4 bytes with ldunifa
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue