mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01: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> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16061>
This commit is contained in:
parent
71a749bc7b
commit
c7b0309723
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