aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/graw-null/graw_util.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2017-01-05 23:04:09 +0100
committerAxel Davy <[email protected]>2017-01-12 20:33:11 +0100
commit970556292b37fb9f7a64460a964e7a88503dcab6 (patch)
treee5d998d46f2ac87b49dc76638f578ef5fa173099 /src/gallium/targets/graw-null/graw_util.c
parent5f4359ea0ed54b06d443e0ba040eb73406fc3e34 (diff)
st/nine: Protect dtors with mutex
When the flag D3DCREATE_MULTITHREAD is set, a global mutex is used to protect nine calls. However for performance reasons, AddRef and Release didn't hold the mutex, and instead used atomics. Unfortunately at item release, the item can be destroyed, and that destruction path should be protected by a mutex (at least for some objects). Without this patch, it is possible an app thread is in a dtor while another thread is making gallium nine calls. It is possible that two threads are using the same gallium pipe, which is forbiden. The problem has been made worse with csmt, because it can cause hang, since nine_csmt_process is not threadsafe. Fixes Hitman hang, and possibly others. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/targets/graw-null/graw_util.c')
0 files changed, 0 insertions, 0 deletions