diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-20 22:25:59 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-20 22:25:59 +0400 |
commit | 5d97c93c08c6c781809af70de81c5b889970b616 (patch) | |
tree | 09161bfa564c77761e93bedd181c52592c5a7fab /intern/cycles/kernel/osl/osl_shader.cpp | |
parent | f48efbf4642e1352b9f606e2a9d88bb6352f16f5 (diff) |
Fix compiler warning due to undefined BVH_FUNCTION_FEATURES with patch by Campbell,
and a coverity warning about use of uninitialized variables with OSL.
Diffstat (limited to 'intern/cycles/kernel/osl/osl_shader.cpp')
-rw-r--r-- | intern/cycles/kernel/osl/osl_shader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp index 6599ee31d80..c55f36bcc9d 100644 --- a/intern/cycles/kernel/osl/osl_shader.cpp +++ b/intern/cycles/kernel/osl/osl_shader.cpp @@ -189,6 +189,8 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag, sc.sample_weight = sample_weight; sc.type = CLOSURE_EMISSION_ID; + sc.data0 = 0.0f; + sc.data1 = 0.0f; sc.prim = NULL; /* flag */ @@ -204,6 +206,8 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag, sc.sample_weight = sample_weight; sc.type = CLOSURE_AMBIENT_OCCLUSION_ID; + sc.data0 = 0.0f; + sc.data1 = 0.0f; sc.prim = NULL; if(sd->num_closure < MAX_CLOSURE) { @@ -215,6 +219,8 @@ static void flatten_surface_closure_tree(ShaderData *sd, int path_flag, case OSL::ClosurePrimitive::Holdout: { sc.sample_weight = 0.0f; sc.type = CLOSURE_HOLDOUT_ID; + sc.data0 = 0.0f; + sc.data1 = 0.0f; sc.prim = NULL; if(sd->num_closure < MAX_CLOSURE) { |