diff options
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 1 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_shader.c | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 5 |
3 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 155547f1224..53dfa429abf 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1952,7 +1952,6 @@ void DRW_engines_free(void) void DRW_opengl_context_create(void) { BLI_assert(DST.ogl_context == NULL); /* Ensure it's called once */ - BLI_assert(BLI_thread_is_main()); BLI_mutex_init(&DST.ogl_context_mutex); diff --git a/source/blender/draw/intern/draw_manager_shader.c b/source/blender/draw/intern/draw_manager_shader.c index c898021ebd7..69c13bb61c2 100644 --- a/source/blender/draw/intern/draw_manager_shader.c +++ b/source/blender/draw/intern/draw_manager_shader.c @@ -200,7 +200,6 @@ static void drw_deferred_shader_add( BLI_addtail(&comp->queue, dsh); /* Create one context per task. */ - BLI_assert(BLI_thread_is_main()); comp->ogl_context = WM_opengl_context_create(); WM_opengl_context_activate(DST.ogl_context); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 7fef86c006e..ecd91ff2d1a 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -2075,6 +2075,11 @@ void wm_window_IME_end(wmWindow *win) void *WM_opengl_context_create(void) { + /* On Windows there is a problem creating contexts that share lists + * from one context that is current in another thread. + * So we should call this function only on the main thread. + */ + BLI_assert(BLI_thread_is_main()); return GHOST_CreateOpenGLContext(g_system); } |