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@pandora.be>2013-04-22 18:27:12 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-22 18:27:12 +0400
commitdee74c299ff345bfd4d516db5f55d7fb255db5d7 (patch)
treee00bce103d2f86a8c5f1b047265105acf0e47061 /intern/cycles/render/osl.h
parent919ecbe55d44dd13a8a07c354a00b9bfc9ec8596 (diff)
Attempt to fix #35041 and #34725: cycles crash with OSL and both a 3D viewport
and preview running at the same time. It seems there's something in OSL/LLVM that's not thread safe, but I couldn't figure out what exactly. Now all renders share the same OSL ShadingSystem which should avoid the problem.
Diffstat (limited to 'intern/cycles/render/osl.h')
-rw-r--r--intern/cycles/render/osl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h
index c459f6bfa08..e50c50f2f7b 100644
--- a/intern/cycles/render/osl.h
+++ b/intern/cycles/render/osl.h
@@ -86,7 +86,10 @@ public:
protected:
void texture_system_init();
+ void texture_system_free();
+
void shading_system_init();
+ void shading_system_free();
OSL::ShadingSystem *ss;
OSL::TextureSystem *ts;
@@ -97,6 +100,12 @@ protected:
static OSL::TextureSystem *ts_shared;
static thread_mutex ts_shared_mutex;
static int ts_shared_users;
+
+ static OSL::ShadingSystem *ss_shared;
+ static OSLRenderServices *services_shared;
+ static thread_mutex ss_shared_mutex;
+ static thread_mutex ss_mutex;
+ static int ss_shared_users;
};
#endif