st/nine: Unmap buffers after full unlock
authorAxel Davy <davyaxel0@gmail.com>
Sun, 20 Dec 2020 18:37:13 +0000 (19:37 +0100)
committerAxel Davy <davyaxel0@gmail.com>
Tue, 2 Mar 2021 19:07:07 +0000 (20:07 +0100)
commit6a3451e170ccd4a8c3e43b4241d1126683a2c6d1
tree3f63974bab406daba97b16ec6cf4a9fb0ec016de
parent3dd6b79215cba88c43301e80601149bf8188662d
st/nine: Unmap buffers after full unlock

Do not unmap anything until all buffer unlocks
were received.

A buffer can be filled in several threads, and thus
in the case of double locks, it's not possible to know
which unlock is received first.
Thus only unmap the buffers when the last unlock is
received.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177>
src/gallium/frontends/nine/buffer9.c
src/gallium/frontends/nine/buffer9.h