diff options
author | Patrick Mours <pmours@nvidia.com> | 2019-08-22 18:36:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-26 11:26:53 +0300 |
commit | f491c23f1e104998752380b930307e7abc4597b3 (patch) | |
tree | 7dcc876468baf526d4933fe0bfab6eed2f23cf4c /intern/cycles/kernel/kernel_light.h | |
parent | 2b999c6a68f85523c46f39bb6a877baba2343d9b (diff) |
Cycles: inline more functions on the GPU
This makes little difference for CUDA and OpenCL, but will be helpful
for Optix.
Diffstat (limited to 'intern/cycles/kernel/kernel_light.h')
-rw-r--r-- | intern/cycles/kernel/kernel_light.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h index 9128bfa9d95..758e91159b6 100644 --- a/intern/cycles/kernel/kernel_light.h +++ b/intern/cycles/kernel/kernel_light.h @@ -182,17 +182,7 @@ ccl_device float lamp_light_pdf(KernelGlobals *kg, const float3 Ng, const float3 #ifdef __BACKGROUND_MIS__ -/* TODO(sergey): In theory it should be all fine to use noinline for all - * devices, but we're so close to the release so better not screw things - * up for CPU at least. - */ -# ifdef __KERNEL_GPU__ -ccl_device_noinline -# else -ccl_device -# endif - float3 - background_map_sample(KernelGlobals *kg, float randu, float randv, float *pdf) +ccl_device float3 background_map_sample(KernelGlobals *kg, float randu, float randv, float *pdf) { /* for the following, the CDF values are actually a pair of floats, with the * function value as X and the actual CDF as Y. The last entry's function @@ -274,13 +264,7 @@ ccl_device /* TODO(sergey): Same as above, after the release we should consider using * 'noinline' for all devices. */ -# ifdef __KERNEL_GPU__ -ccl_device_noinline -# else -ccl_device -# endif - float - background_map_pdf(KernelGlobals *kg, float3 direction) +ccl_device float background_map_pdf(KernelGlobals *kg, float3 direction) { float2 uv = direction_to_equirectangular(direction); int res_x = kernel_data.integrator.pdf_background_res_x; |