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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-09-16 20:23:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-09-16 20:25:13 +0300
commit89de6e9eac319232366d0909cb1c39a968088672 (patch)
tree9d42fc86aa4a4ebb8540bab2e47a6afa680187dc /intern
parentf0023b0dbeab8388092b399c491ce6436cac5bfb (diff)
OpenSubdiv: Fix crash caused by accessing OpenGL vendor from non-main thread
Diffstat (limited to 'intern')
-rw-r--r--intern/opensubdiv/opensubdiv_capi.h1
-rw-r--r--intern/opensubdiv/opensubdiv_utils_capi.cc6
2 files changed, 7 insertions, 0 deletions
diff --git a/intern/opensubdiv/opensubdiv_capi.h b/intern/opensubdiv/opensubdiv_capi.h
index ef6db92b1e8..8010c39647d 100644
--- a/intern/opensubdiv/opensubdiv_capi.h
+++ b/intern/opensubdiv/opensubdiv_capi.h
@@ -141,6 +141,7 @@ void openSubdiv_osdGLMeshDisplay(OpenSubdiv_GLMesh *gl_mesh,
/* ** Utility functions ** */
int openSubdiv_supportGPUDisplay(void);
int openSubdiv_getAvailableEvaluators(void);
+void openSubdiv_init(void);
void openSubdiv_cleanup(void);
#ifdef __cplusplus
diff --git a/intern/opensubdiv/opensubdiv_utils_capi.cc b/intern/opensubdiv/opensubdiv_utils_capi.cc
index 6bbe747634a..a945484ba61 100644
--- a/intern/opensubdiv/opensubdiv_utils_capi.cc
+++ b/intern/opensubdiv/opensubdiv_utils_capi.cc
@@ -98,6 +98,12 @@ int openSubdiv_getAvailableEvaluators(void)
return flags;
}
+void openSubdiv_init(void)
+{
+ /* Ensure all OpenGL strings are cached. */
+ (void)openSubdiv_getAvailableEvaluators();
+}
+
void openSubdiv_cleanup(void)
{
openSubdiv_osdGLDisplayDeinit();