Cleanup: avoid unnecessary primitive type lookup and variable initialization

Ref D5363
This commit is contained in:
Patrick Mours 2019-08-26 15:55:39 +02:00 committed by Brecht Van Lommel
parent 6055db084d
commit 1ff939f3f7
2 changed files with 1 additions and 3 deletions

@ -242,8 +242,6 @@ ccl_device_noinline_cpu bool indirect_lamp_emission(KernelGlobals *kg,
{
bool hit_lamp = false;
*emission = make_float3(0.0f, 0.0f, 0.0f);
for (int lamp = 0; lamp < kernel_data.integrator.num_all_lights; lamp++) {
LightSample ls ccl_optional_struct_init;

@ -1356,7 +1356,7 @@ ccl_device bool shader_transparent_shadow(KernelGlobals *kg, Intersection *isect
int shader = 0;
# ifdef __HAIR__
if (kernel_tex_fetch(__prim_type, isect->prim) & PRIMITIVE_ALL_TRIANGLE) {
if (isect->type & PRIMITIVE_ALL_TRIANGLE) {
# endif
shader = kernel_tex_fetch(__tri_shader, prim);
# ifdef __HAIR__