diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-14 12:53:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-14 12:53:05 +0300 |
commit | 1f273cec00feddb1065847e3c8163cdcf8a6d89a (patch) | |
tree | 5d24030df25f02e3122340eabcc591767ef05576 /intern/cycles/kernel/kernel_light.h | |
parent | 5af103fe008aac0cb20631871bbee16f319835ed (diff) |
Cycles: Tweak inline policy for some functions
The goal is to make Experimental kernel closer in performance to the
official kernel, avoiding spills and such.
There should not be big impact on official kernel, own tests showed
few percent performance drop on laptop's GPU. CPU was always the
same speed on AVX, AVX2 and SSE4.1 CPUs i've been testing here.
This seems to be the last essential step before we can get rid of
Experimental kernel and enable SSS officially on GPU without causing
some major performance issues.
Surely some more tweaks are possibly required, but that we can do
for until cows go home anyway.
Diffstat (limited to 'intern/cycles/kernel/kernel_light.h')
-rw-r--r-- | intern/cycles/kernel/kernel_light.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h index 7590ec2d706..ef098aeb050 100644 --- a/intern/cycles/kernel/kernel_light.h +++ b/intern/cycles/kernel/kernel_light.h @@ -845,7 +845,14 @@ ccl_device bool light_select_reached_max_bounces(KernelGlobals *kg, int index, i return (bounce > __float_as_int(data4.x)); } -ccl_device void light_sample(KernelGlobals *kg, float randt, float randu, float randv, float time, float3 P, int bounce, LightSample *ls) +ccl_device_noinline void light_sample(KernelGlobals *kg, + float randt, + float randu, + float randv, + float time, + float3 P, + int bounce, + LightSample *ls) { /* sample index */ int index = light_distribution_sample(kg, randt); |