forked from bartvdbraak/blender
Fix compiler warning due to undefined BVH_FUNCTION_FEATURES with patch by Campbell,
and a coverity warning about use of uninitialized variables with OSL.
This commit is contained in:
parent
f48efbf464
commit
5d97c93c08
@ -782,6 +782,7 @@ __device_inline void bvh_triangle_intersect_subsurface(KernelGlobals *kg, Inters
|
||||
|
||||
#if defined(__SUBSURFACE__)
|
||||
#define BVH_FUNCTION_NAME bvh_intersect_subsurface
|
||||
#define BVH_FUNCTION_FEATURES 0
|
||||
#include "kernel_bvh_subsurface.h"
|
||||
#endif
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user