diff options
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/kernel_emission.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_path.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_shader.h | 8 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_volume.h | 5 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_attribute.h | 12 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_bevel.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_brick.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_checker.h | 2 |
8 files changed, 19 insertions, 18 deletions
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h index 34300543f91..be0a2bd2d6b 100644 --- a/intern/cycles/kernel/kernel_emission.h +++ b/intern/cycles/kernel/kernel_emission.h @@ -27,7 +27,7 @@ ccl_device_noinline float3 direct_emissive_eval(KernelGlobals *kg, float time) { /* setup shading at emitter */ - float3 eval; + float3 eval = make_float3(0.0f, 0.0f, 0.0f); if (shader_constant_emission_eval(kg, ls->shader, &eval)) { if ((ls->prim != PRIM_NONE) && dot(ls->Ng, I) < 0.0f) { @@ -314,7 +314,7 @@ ccl_device_noinline float3 indirect_background(KernelGlobals *kg, } /* Evaluate background shader. */ - float3 L; + float3 L = make_float3(0.0f, 0.0f, 0.0f); if (!shader_constant_emission_eval(kg, shader, &L)) { # ifdef __SPLIT_KERNEL__ Ray priv_ray = *ray; diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index dff194822c9..c7e49930701 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -103,7 +103,7 @@ ccl_device_forceinline void kernel_path_lamp_emission(KernelGlobals *kg, light_ray.dP = ray->dP; /* intersect with lamp */ - float3 emission; + float3 emission = make_float3(0.0f, 0.0f, 0.0f); if (indirect_lamp_emission(kg, emission_sd, state, &light_ray, &emission)) path_radiance_accum_emission(L, state, throughput, emission); diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index ed1a60a664f..4688857b718 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -778,7 +778,7 @@ ccl_device_inline int shader_bsdf_sample(KernelGlobals *kg, kernel_assert(CLOSURE_IS_BSDF(sc->type)); int label; - float3 eval; + float3 eval = make_float3(0.0f, 0.0f, 0.0f); *pdf = 0.0f; label = bsdf_sample(kg, sd, sc, randu, randv, &eval, omega_in, domega_in, pdf); @@ -808,7 +808,7 @@ ccl_device int shader_bsdf_sample_closure(KernelGlobals *kg, PROFILING_INIT(kg, PROFILING_CLOSURE_SAMPLE); int label; - float3 eval; + float3 eval = make_float3(0.0f, 0.0f, 0.0f); *pdf = 0.0f; label = bsdf_sample(kg, sd, sc, randu, randv, &eval, omega_in, domega_in, pdf); @@ -1221,7 +1221,7 @@ ccl_device int shader_volume_phase_sample(KernelGlobals *kg, * depending on color channels, even if this is perhaps not a common case */ const ShaderClosure *sc = &sd->closure[sampled]; int label; - float3 eval; + float3 eval = make_float3(0.0f, 0.0f, 0.0f); *pdf = 0.0f; label = volume_phase_sample(sd, sc, randu, randv, &eval, omega_in, domega_in, pdf); @@ -1246,7 +1246,7 @@ ccl_device int shader_phase_sample_closure(KernelGlobals *kg, PROFILING_INIT(kg, PROFILING_CLOSURE_VOLUME_SAMPLE); int label; - float3 eval; + float3 eval = make_float3(0.0f, 0.0f, 0.0f); *pdf = 0.0f; label = volume_phase_sample(sd, sc, randu, randv, &eval, omega_in, domega_in, pdf); diff --git a/intern/cycles/kernel/kernel_volume.h b/intern/cycles/kernel/kernel_volume.h index 20914b0ee4d..b0b67efc7b2 100644 --- a/intern/cycles/kernel/kernel_volume.h +++ b/intern/cycles/kernel/kernel_volume.h @@ -187,7 +187,7 @@ ccl_device void kernel_volume_shadow_homogeneous(KernelGlobals *kg, ShaderData *sd, float3 *throughput) { - float3 sigma_t; + float3 sigma_t = make_float3(0.0f, 0.0f, 0.0f); if (volume_shader_extinction_sample(kg, sd, state, ray->P, &sigma_t)) *throughput *= volume_color_transmittance(sigma_t, ray->t); @@ -225,7 +225,7 @@ ccl_device void kernel_volume_shadow_heterogeneous(KernelGlobals *kg, } float3 new_P = ray->P + ray->D * (t + step_offset); - float3 sigma_t; + float3 sigma_t = make_float3(0.0f, 0.0f, 0.0f); /* compute attenuation over segment */ if (volume_shader_extinction_sample(kg, sd, state, new_P, &sigma_t)) { @@ -621,6 +621,7 @@ kernel_volume_integrate_heterogeneous_distance(KernelGlobals *kg, new_tp = tp * transmittance; } else { + transmittance = make_float3(0.0f, 0.0f, 0.0f); new_tp = tp; } diff --git a/intern/cycles/kernel/svm/svm_attribute.h b/intern/cycles/kernel/svm/svm_attribute.h index a67cfe91a30..341eaad28ee 100644 --- a/intern/cycles/kernel/svm/svm_attribute.h +++ b/intern/cycles/kernel/svm/svm_attribute.h @@ -46,8 +46,8 @@ ccl_device AttributeDescriptor svm_node_attr_init( ccl_device void svm_node_attr(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) { - NodeAttributeType type; - uint out_offset; + NodeAttributeType type = NODE_ATTR_FLOAT; + uint out_offset = 0; AttributeDescriptor desc = svm_node_attr_init(kg, sd, node, &type, &out_offset); /* fetch and store attribute */ @@ -88,8 +88,8 @@ ccl_device_noinline void svm_node_attr_bump_dx(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) { - NodeAttributeType type; - uint out_offset; + NodeAttributeType type = NODE_ATTR_FLOAT; + uint out_offset = 0; AttributeDescriptor desc = svm_node_attr_init(kg, sd, node, &type, &out_offset); /* fetch and store attribute */ @@ -133,8 +133,8 @@ ccl_device_noinline void svm_node_attr_bump_dy(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) { - NodeAttributeType type; - uint out_offset; + NodeAttributeType type = NODE_ATTR_FLOAT; + uint out_offset = 0; AttributeDescriptor desc = svm_node_attr_init(kg, sd, node, &type, &out_offset); /* fetch and store attribute */ diff --git a/intern/cycles/kernel/svm/svm_bevel.h b/intern/cycles/kernel/svm/svm_bevel.h index 58b5d2a8131..c1a10784f89 100644 --- a/intern/cycles/kernel/svm/svm_bevel.h +++ b/intern/cycles/kernel/svm/svm_bevel.h @@ -53,7 +53,7 @@ ccl_device_noinline float3 svm_bevel(KernelGlobals *kg, float3 sum_N = make_float3(0.0f, 0.0f, 0.0f); for (int sample = 0; sample < num_samples; sample++) { - float disk_u, disk_v; + float disk_u = 0.0f, disk_v = 0.0f; path_branched_rng_2D( kg, state->rng_hash, state, sample, num_samples, PRNG_BEVEL_U, &disk_u, &disk_v); diff --git a/intern/cycles/kernel/svm/svm_brick.h b/intern/cycles/kernel/svm/svm_brick.h index b5cbfcc72df..77f697a78cb 100644 --- a/intern/cycles/kernel/svm/svm_brick.h +++ b/intern/cycles/kernel/svm/svm_brick.h @@ -18,7 +18,7 @@ CCL_NAMESPACE_BEGIN /* Brick */ -ccl_device_noinline float brick_noise(uint n) /* fast integer noise */ +ccl_device_inline float brick_noise(uint n) /* fast integer noise */ { uint nn; n = (n + 1013) & 0x7fffffff; diff --git a/intern/cycles/kernel/svm/svm_checker.h b/intern/cycles/kernel/svm/svm_checker.h index 63b4d1e149b..04a7b690e50 100644 --- a/intern/cycles/kernel/svm/svm_checker.h +++ b/intern/cycles/kernel/svm/svm_checker.h @@ -18,7 +18,7 @@ CCL_NAMESPACE_BEGIN /* Checker */ -ccl_device_noinline float svm_checker(float3 p) +ccl_device float svm_checker(float3 p) { /* avoid precision issues on unit coordinates */ p.x = (p.x + 0.000001f) * 0.999999f; |