mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 20:00:20 +01:00
st/nine: Fix second Multithreading issue with MANAGED buffers
Here is another threading issue with MANAGED buffers: Thread 1: buffer creation Thread 1: buffer lock Thread 2: Draw call Thread 1: writes data Thread 1: Unlock Without this patch, the buffer is initially dirty and in the list of things to upload after its creation. The draw call will then upload the data and unset the dirty flag, and the Unlock won't trigger a second upload. Fixes regression introduced bycc0114f30b: "st/nine: Implement Managed vertex/index buffers" Cc: "11.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Axel Davy <axel.davy@ens.fr> (cherry picked from commit83bc2acfe9)
This commit is contained in:
parent
d29f41e1ba
commit
d956cfebd5
1 changed files with 3 additions and 0 deletions
|
|
@ -182,6 +182,9 @@ NineBuffer9_Lock( struct NineBuffer9 *This,
|
|||
This->managed.dirty_box = box;
|
||||
} else {
|
||||
u_box_union_2d(&This->managed.dirty_box, &This->managed.dirty_box, &box);
|
||||
/* Do not upload while we are locking, we'll add it back later */
|
||||
if (!LIST_IS_EMPTY(&This->managed.list))
|
||||
list_delinit(&This->managed.list);
|
||||
}
|
||||
}
|
||||
*ppbData = (char *)This->managed.data + OffsetToLock;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue