diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-08-05 16:59:04 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-08-05 16:59:04 +0300 |
commit | 2ca006f6c179b77ad954d883d0a92d05011640f4 (patch) | |
tree | dbbc45bacfdcb099ea8a168cd5a078b0a09e3c8d /source/blender/gpu/intern/gpu_context.cc | |
parent | 43d41675a4e5f2621285c9eeac6737c83bf44923 (diff) | |
parent | 87062d4d670c01c9c0835057aaf4164aea971e00 (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.cc | 11 |
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(); +} |