mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
svga: finish readbacks before mapping resources
Flushing the command queue before mapping a resource is not enough
to guaruantee that the mapped content is not stale. We have to finish
to make sure that the gb readback actually updated the guest surface.
This fixes races in direct maps (map reads raced with gb readbacks)
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
(cherry picked from commit c7b0309723)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16564>
This commit is contained in:
parent
6ec3f71e05
commit
991e904e95
1 changed files with 2 additions and 2 deletions
|
|
@ -342,9 +342,9 @@ svga_texture_transfer_map_direct(struct svga_context *svga,
|
|||
|
||||
if (!svga->swc->force_coherent || tex->imported) {
|
||||
/* Readback the whole surface */
|
||||
readback_texture_surface(svga, tex, surf);
|
||||
readback_texture_surface(svga, tex, surf);
|
||||
|
||||
svga_context_flush(svga, NULL);
|
||||
svga_context_finish(svga);
|
||||
}
|
||||
/*
|
||||
* Note: if PIPE_MAP_DISCARD_WHOLE_RESOURCE were specified
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue