Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-07 16:33:15 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-07 16:33:15 +0400
commit1f5029b18487b411bfe59f6e4359358642dc23a3 (patch)
tree45d612ec41e716f97453502f0bd9511e29c92f82 /source/blender/gpu
parentb53f310be8c1faf53e51b875eb3ca790c5efeee2 (diff)
Fix T38503: crash in non-threadsafe VBO free code during render.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 6a6979ed89f..45172d76d8c 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -187,12 +187,16 @@ static void gpu_buffer_pool_free_unused(GPUBufferPool *pool)
{
if (!pool)
return;
+
+ BLI_mutex_lock(&buffer_mutex);
while (pool->totbuf)
gpu_buffer_pool_delete_last(pool);
glDeleteBuffersARB(pool->totpbvhbufids, pool->pbvhbufids);
pool->totpbvhbufids = 0;
+
+ BLI_mutex_unlock(&buffer_mutex);
}
static GPUBufferPool *gpu_buffer_pool = NULL;