summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-08-18 17:20:20 -0700
committerKenneth Graunke <[email protected]>2014-08-20 17:31:19 -0700
commit08710281884c02d2d99a5ad447affa246de126f8 (patch)
tree2adeb44c6259dfa4bbd8955188e69acf04a7edf2 /src/mesa
parentf90b7e0f2bee56af22edeebfea292ab960ce0628 (diff)
mesa: Use a recursive mutex for the texture lock.
This avoids problems with things like meta operations calling functions that want to take the lock while the lock is already held. Basically, the point is to guard against API reentrancy across threads...not to guard against ourselves. Dave Airlie opposed this change, but it makes master usable again and no one proposed a better solution. We can revert this if/when someone does. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Tested-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/shared.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 0189dd2960a..7ef932ff052 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -113,7 +113,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx)
assert(shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount == 1);
/* Mutex and timestamp for texobj state validation */
- mtx_init(&shared->TexMutex, mtx_plain);
+ mtx_init(&shared->TexMutex, mtx_recursive);
shared->TextureStateStamp = 0;
shared->FrameBuffers = _mesa_NewHashTable();