Cycles OSL minor optimizations: recycle shading context, don't do memory
[blender.git] / intern / cycles / kernel / kernel_displace.h
index a55f7a7fd7510d21df7778cc87a243dc3c2226b0..fc2be342e029d70287824794c382806b0c30fca7 100644 (file)
@@ -35,7 +35,7 @@ __device void kernel_shader_evaluate(KernelGlobals *kg, uint4 *input, float4 *ou
 
                /* evaluate */
                float3 P = sd.P;
-               shader_eval_displacement(kg, &sd);
+               shader_eval_displacement(kg, &sd, SHADER_CONTEXT_MAIN);
                out = sd.P - P;
        }
        else { // SHADER_EVAL_BACKGROUND
@@ -63,7 +63,7 @@ __device void kernel_shader_evaluate(KernelGlobals *kg, uint4 *input, float4 *ou
 
                /* evaluate */
                int flag = 0; /* we can't know which type of BSDF this is for */
-               out = shader_eval_background(kg, &sd, flag);
+               out = shader_eval_background(kg, &sd, flag, SHADER_CONTEXT_MAIN);
        }
        
        shader_release(kg, &sd);