Use one context per OSL thread. Not sure if this actually works, but the simple rende...
[blender.git] / intern / cycles / kernel / kernel_emission.h
index 53d53b4bedd498b71aed4e21aaa56dec566fca45..9032d7d4a4109aedd15df0f41ed1ad121654079b 100644 (file)
@@ -54,8 +54,6 @@ __device float3 direct_emissive_eval(KernelGlobals *kg, float rando,
                        eval = make_float3(0.0f, 0.0f, 0.0f);
        }
 
-       shader_release(kg, &sd);
-
        return eval;
 }
 
@@ -164,7 +162,6 @@ __device float3 indirect_background(KernelGlobals *kg, Ray *ray, int path_flag,
        ShaderData sd;
        shader_setup_from_background(kg, &sd, ray);
        float3 L = shader_eval_background(kg, &sd, path_flag);
-       shader_release(kg, &sd);
 
 #ifdef __BACKGROUND_MIS__
        /* check if background light exists or if we should skip pdf */