diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-02 16:04:34 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-02 16:13:34 +0300 |
commit | 500e0e9a3d5a9e7982d4df31a1477b8732c76e71 (patch) | |
tree | 92a4f5f1559143efdfeb2b087549c587477bba25 /intern/cycles/kernel/kernel_shader.h | |
parent | b416168d85a7cf5a27370f5c933fd1ad41ee333d (diff) |
Cycles: Some more inline policy tweaks for CUDA 8
Makes it so toolkit does exactly the same decision about what to inline,
but unfortunately it has really barely visible difference on GTX-980.
Diffstat (limited to 'intern/cycles/kernel/kernel_shader.h')
-rw-r--r-- | intern/cycles/kernel/kernel_shader.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index bb3fe933b2c..98d321c9c16 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -149,7 +149,12 @@ ccl_device_noinline void shader_setup_from_ray(KernelGlobals *kg, /* ShaderData setup from BSSRDF scatter */ #ifdef __SUBSURFACE__ -ccl_device void shader_setup_from_subsurface( +# ifndef __KERNEL_CUDS__ +ccl_device +# else +ccl_device_inline +# endif +void shader_setup_from_subsurface( KernelGlobals *kg, ShaderData *sd, const Intersection *isect, @@ -533,12 +538,18 @@ ccl_device_inline void _shader_bsdf_multi_eval_branched(KernelGlobals *kg, } #endif -ccl_device void shader_bsdf_eval(KernelGlobals *kg, - ShaderData *sd, - const float3 omega_in, - BsdfEval *eval, - float light_pdf, - bool use_mis) + +#ifndef __KERNEL_CUDS__ +ccl_device +#else +ccl_device_inline +#endif +void shader_bsdf_eval(KernelGlobals *kg, + ShaderData *sd, + const float3 omega_in, + BsdfEval *eval, + float light_pdf, + bool use_mis) { bsdf_eval_init(eval, NBUILTIN_CLOSURES, make_float3(0.0f, 0.0f, 0.0f), kernel_data.film.use_light_pass); |