Code cleanup: deduplicate some branched and split kernel code.

Benchmarks peformance on GTX 1080 and RX 480 on Linux is the same for
bmw27, classroom, pabellon, and about 2% faster on fishy_cat and koro.
This commit is contained in:
Brecht Van Lommel
2017-09-13 02:10:24 +02:00
parent c4c450045d
commit f77cdd1d59
11 changed files with 410 additions and 741 deletions

View File

@@ -40,9 +40,7 @@ ccl_device_inline void kernel_path_volume_connect_light(
bool is_lamp;
/* connect to light from given point where shader has been evaluated */
# ifdef __OBJECT_MOTION__
light_ray.time = sd->time;
# endif
if(light_sample(kg, light_u, light_v, sd->time, sd->P, state->bounce, &ls))
{
@@ -134,9 +132,7 @@ ccl_device void kernel_branched_path_volume_connect_light(
BsdfEval L_light;
bool is_lamp;
# ifdef __OBJECT_MOTION__
light_ray.time = sd->time;
# endif
if(sample_all_lights) {
/* lamp sampling */