Revert "Use one context per OSL thread. Not sure if this actually works, but the...
[blender.git] / intern / cycles / kernel / kernel_shader.h
index e3e45e62451dec8a3d5fc762fde905e7eae02db8..5ab3c2c25450718eab7835bedacca46efbe9d6a3 100644 (file)
@@ -773,5 +773,15 @@ __device void shader_merge_closures(KernelGlobals *kg, ShaderData *sd)
 }
 #endif
 
+/* Free ShaderData */
+
+__device void shader_release(KernelGlobals *kg, ShaderData *sd)
+{
+#ifdef __OSL__
+       if (kernel_osl_use(kg))
+               OSLShader::release(kg, sd);
+#endif
+}
+
 CCL_NAMESPACE_END