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>2012-12-01 23:15:05 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-01 23:15:05 +0400
commit7c0a0bae79bb8f842a575fe83975c6d34d73c64a (patch)
tree844857e85903601f60a083d767d6317f3006d31f /intern/cycles/kernel/osl/osl_globals.h
parent807fd448a557fbacb70fcd9b5cae76529fdb9b80 (diff)
Fix #33375: OSL geom:trianglevertices gave wrong coordinates for static BVH.
Also some simple OSL optimization, passing thread data pointer directly instead of via thread local storage, and creating ustrings for attribute lookup.
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