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:
Diffstat (limited to 'intern/cycles/kernel/osl/osl_globals.h')
-rw-r--r--intern/cycles/kernel/osl/osl_globals.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h
index ce283023c5c..1a2a210de88 100644
--- a/intern/cycles/kernel/osl/osl_globals.h
+++ b/intern/cycles/kernel/osl/osl_globals.h
@@ -38,7 +38,14 @@ CCL_NAMESPACE_BEGIN
class OSLRenderServices;
struct OSLGlobals {
- /* use */
+ OSLGlobals()
+ {
+ ss = NULL;
+ ts = NULL;
+ services = NULL;
+ use = false;
+ }
+
bool use;
/* shading system */
@@ -66,19 +73,12 @@ struct OSLGlobals {
vector<AttributeMap> attribute_map;
ObjectNameMap object_name_map;
vector<ustring> object_names;
+};
- /* thread key for thread specific data lookup */
- struct ThreadData {
- OSL::ShaderGlobals globals;
- OSL::PerThreadInfo *thread_info;
- };
-
- static tls_ptr(ThreadData, thread_data);
- static thread_mutex thread_data_mutex;
- static volatile int thread_data_users;
-
- void thread_data_init();
- void thread_data_free();
+/* thread key for thread specific data lookup */
+struct OSLThreadData {
+ OSL::ShaderGlobals globals;
+ OSL::PerThreadInfo *thread_info;
};
CCL_NAMESPACE_END