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:
authorJeroen Bakker <jeroen@blender.org>2020-08-05 16:59:04 +0300
committerJeroen Bakker <jeroen@blender.org>2020-08-05 16:59:04 +0300
commit2ca006f6c179b77ad954d883d0a92d05011640f4 (patch)
treedbbc45bacfdcb099ea8a168cd5a078b0a09e3c8d /source/blender/gpu/intern/gpu_context.cc
parent43d41675a4e5f2621285c9eeac6737c83bf44923 (diff)
parent87062d4d670c01c9c0835057aaf4164aea971e00 (diff)
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source/blender/gpu/intern/gpu_context.cc')
-rw-r--r--source/blender/gpu/intern/gpu_context.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc
index 0b9104e5349..e6356580ea3 100644
--- a/source/blender/gpu/intern/gpu_context.cc
+++ b/source/blender/gpu/intern/gpu_context.cc
@@ -62,6 +62,7 @@ static std::vector<GLuint> orphaned_buffer_ids;
static std::vector<GLuint> orphaned_texture_ids;
static std::mutex orphans_mutex;
+static std::mutex main_context_mutex;
struct GPUContext {
GLuint default_vao;
@@ -345,3 +346,13 @@ struct GPUMatrixState *gpu_context_active_matrix_state_get()
BLI_assert(active_ctx);
return active_ctx->matrix_state;
}
+
+void GPU_context_main_lock(void)
+{
+ main_context_mutex.lock();
+}
+
+void GPU_context_main_unlock(void)
+{
+ main_context_mutex.unlock();
+}