summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/atifragshader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/atifragshader.c')
-rw-r--r--src/mesa/main/atifragshader.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c
index 34f45c68008..83a449a1b13 100644
--- a/src/mesa/main/atifragshader.c
+++ b/src/mesa/main/atifragshader.c
@@ -201,11 +201,15 @@ _mesa_GenFragmentShadersATI(GLuint range)
return 0;
}
+ _mesa_HashLockMutex(ctx->Shared->ATIShaders);
+
first = _mesa_HashFindFreeKeyBlock(ctx->Shared->ATIShaders, range);
for (i = 0; i < range; i++) {
- _mesa_HashInsert(ctx->Shared->ATIShaders, first + i, &DummyShader);
+ _mesa_HashInsertLocked(ctx->Shared->ATIShaders, first + i, &DummyShader);
}
+ _mesa_HashUnlockMutex(ctx->Shared->ATIShaders);
+
return first;
}