diff options
Diffstat (limited to 'intern/cycles/kernel/device/cpu')
-rw-r--r-- | intern/cycles/kernel/device/cpu/bvh.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/device/cpu/globals.h | 19 | ||||
-rw-r--r-- | intern/cycles/kernel/device/cpu/kernel.cpp | 9 |
3 files changed, 24 insertions, 6 deletions
diff --git a/intern/cycles/kernel/device/cpu/bvh.h b/intern/cycles/kernel/device/cpu/bvh.h index d9267e1cd6d..2d7d8c2d704 100644 --- a/intern/cycles/kernel/device/cpu/bvh.h +++ b/intern/cycles/kernel/device/cpu/bvh.h @@ -252,7 +252,7 @@ ccl_device void kernel_embree_filter_occluded_func(const RTCFilterFunctionNArgum /* Always use baked shadow transparency for curves. */ if (current_isect.type & PRIMITIVE_CURVE) { ctx->throughput *= intersection_curve_shadow_transparency( - kg, current_isect.object, current_isect.prim, current_isect.u); + kg, current_isect.object, current_isect.prim, current_isect.type, current_isect.u); if (ctx->throughput < CURVE_SHADOW_TRANSPARENCY_CUTOFF) { ctx->opaque_hit = true; diff --git a/intern/cycles/kernel/device/cpu/globals.h b/intern/cycles/kernel/device/cpu/globals.h index 309afae412e..f7f1a36b2a7 100644 --- a/intern/cycles/kernel/device/cpu/globals.h +++ b/intern/cycles/kernel/device/cpu/globals.h @@ -9,6 +9,8 @@ #include "kernel/types.h" #include "kernel/util/profiling.h" +#include "util/guiding.h" + CCL_NAMESPACE_BEGIN /* On the CPU, we pass along the struct KernelGlobals to nearly everywhere in @@ -43,9 +45,20 @@ typedef struct KernelGlobalsCPU { #ifdef __OSL__ /* On the CPU, we also have the OSL globals here. Most data structures are shared * with SVM, the difference is in the shaders and object/mesh attributes. */ - OSLGlobals *osl; - OSLShadingSystem *osl_ss; - OSLThreadData *osl_tdata; + OSLGlobals *osl = nullptr; + OSLShadingSystem *osl_ss = nullptr; + OSLThreadData *osl_tdata = nullptr; +#endif + +#ifdef __PATH_GUIDING__ + /* Pointers to global data structures. */ + openpgl::cpp::SampleStorage *opgl_sample_data_storage = nullptr; + openpgl::cpp::Field *opgl_guiding_field = nullptr; + + /* Local data structures owned by the thread. */ + openpgl::cpp::PathSegmentStorage *opgl_path_segment_storage = nullptr; + openpgl::cpp::SurfaceSamplingDistribution *opgl_surface_sampling_distribution = nullptr; + openpgl::cpp::VolumeSamplingDistribution *opgl_volume_sampling_distribution = nullptr; #endif /* **** Run-time data **** */ diff --git a/intern/cycles/kernel/device/cpu/kernel.cpp b/intern/cycles/kernel/device/cpu/kernel.cpp index 01087c96dd6..558431961ab 100644 --- a/intern/cycles/kernel/device/cpu/kernel.cpp +++ b/intern/cycles/kernel/device/cpu/kernel.cpp @@ -7,6 +7,7 @@ * one with SSE2 intrinsics. */ #if defined(__x86_64__) || defined(_M_X64) +# define __KERNEL_SSE__ # define __KERNEL_SSE2__ #endif @@ -29,11 +30,15 @@ # define __KERNEL_SSE41__ # endif # ifdef __AVX__ -# define __KERNEL_SSE__ +# ifndef __KERNEL_SSE__ +# define __KERNEL_SSE__ +# endif # define __KERNEL_AVX__ # endif # ifdef __AVX2__ -# define __KERNEL_SSE__ +# ifndef __KERNEL_SSE__ +# define __KERNEL_SSE__ +# endif # define __KERNEL_AVX2__ # endif #endif |