st/nine: Fix second Multithreading issue with MANAGED buffers
authorAxel Davy <axel.davy@ens.fr>
Sat, 27 Feb 2016 10:02:21 +0000 (11:02 +0100)
committerAxel Davy <axel.davy@ens.fr>
Mon, 29 Feb 2016 17:55:58 +0000 (18:55 +0100)
commit83bc2acfe90fd2e503bab4b5a586c1e2822863f5
treee56cc33a5be6fc24a4d38d208364ca7c37760cbe
parent44246fe99d4c880b70a58043624bf023237009f5
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 by cc0114f30b587a10766ec212afb3ad356099ef23:
"st/nine: Implement Managed vertex/index buffers"

Cc: "11.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/buffer9.c