Cycles OSL minor optimizations: recycle shading context, don't do memory
[blender.git] / intern / cycles / kernel / osl / osl_globals.h
index 1a2a210de88c65690e6fc830af957ff274b870bd..fb5691176988209aed0c13aae4916ab5a0ec2d11 100644 (file)
@@ -75,10 +75,21 @@ struct OSLGlobals {
        vector<ustring> object_names;
 };
 
+/* trace() call result */
+struct OSLTraceData {
+       Ray ray;
+       Intersection isect;
+       ShaderData sd;
+       bool setup;
+       bool init;
+};
+
 /* thread key for thread specific data lookup */
 struct OSLThreadData {
        OSL::ShaderGlobals globals;
        OSL::PerThreadInfo *thread_info;
+       OSLTraceData tracedata;
+       OSL::ShadingContext *context[SHADER_CONTEXT_NUM];
 };
 
 CCL_NAMESPACE_END