From d133934ea461995fe959f130115652ff803d4269 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 26 Aug 2019 14:41:15 +0200 Subject: Cycles: code to optionally zero initialize some structs in the kernel This will be used by Optix to help the compiler figure out scoping. It is not used by other devices currently, but worth testing if it helps there too. Ref D5363 --- intern/cycles/kernel/kernel_emission.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/kernel/kernel_emission.h') diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h index 16d52b0c733..9761dbfcc6d 100644 --- a/intern/cycles/kernel/kernel_emission.h +++ b/intern/cycles/kernel/kernel_emission.h @@ -245,7 +245,7 @@ ccl_device_noinline_cpu bool indirect_lamp_emission(KernelGlobals *kg, *emission = make_float3(0.0f, 0.0f, 0.0f); for (int lamp = 0; lamp < kernel_data.integrator.num_all_lights; lamp++) { - LightSample ls; + LightSample ls ccl_optional_struct_init; if (!lamp_light_eval(kg, lamp, ray->P, ray->D, ray->t, &ls)) continue; -- cgit v1.2.3