diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-14 22:48:12 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-14 22:48:12 +0300 |
commit | 3c10ec96b5ec1c705362ccdaeaac8007050d081f (patch) | |
tree | 1e4020b37dd8532bf3c3d9132eac4ade203d15ea /intern/cycles/kernel | |
parent | 03565218d5a85f06a26a1ac95e70991613faaf2a (diff) |
Cycles: Enable object motion blur on Intel OpenCL platform
This required allocating some memory related on object transform needed
by ShaderData and currently it is done for all the platforms. Since we're
targeting full feature-complete platforms this is rather acceptable at
this point and in the future we'll do selective NO_HAIR/NO_SSS/NO_BLUR
kernels.
This is experimental still and in fact there're some major issues on
NVidia platform and it's not really clear if it's a bug in compiler,
some uninitizlied variable or other kind of issue.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/kernel_data_init.cl | 15 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 16 |
2 files changed, 16 insertions, 15 deletions
diff --git a/intern/cycles/kernel/kernel_data_init.cl b/intern/cycles/kernel/kernel_data_init.cl index 7982573b9e1..4c5f08639dd 100644 --- a/intern/cycles/kernel/kernel_data_init.cl +++ b/intern/cycles/kernel/kernel_data_init.cl @@ -121,6 +121,13 @@ __kernel void kernel_ocl_path_trace_data_initialization( ccl_global float3 *dPdv_sd, ccl_global float3 *dPdv_sd_DL_shadow, + /* Object motion. */ + ccl_global Transform *ob_tfm_sd, + ccl_global Transform *ob_tfm_sd_DL_shadow, + + ccl_global Transform *ob_itfm_sd, + ccl_global Transform *ob_itfm_sd_DL_shadow, + ShaderClosure *closure_sd, ShaderClosure *closure_sd_DL_shadow, @@ -249,6 +256,14 @@ __kernel void kernel_ocl_path_trace_data_initialization( #endif #endif +#ifdef __OBJECT_MOTION__ + sd->ob_tfm = ob_tfm_sd; + sd_DL_shadow->ob_tfm = ob_tfm_sd_DL_shadow; + + sd->ob_itfm = ob_itfm_sd; + sd_DL_shadow->ob_itfm = ob_itfm_sd_DL_shadow; +#endif + sd->closure = closure_sd; sd_DL_shadow->closure = closure_sd_DL_shadow; diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 7108d7b6ed9..8f91937ac33 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -138,21 +138,7 @@ CCL_NAMESPACE_BEGIN #ifdef __KERNEL_OPENCL_INTEL_CPU__ #define __CL_USE_NATIVE__ #define __KERNEL_SHADING__ -/* TODO(sergey): Advanced shading code still requires work - * for split kernel. - */ -# ifndef __SPLIT_KERNEL__ -# define __KERNEL_ADV_SHADING__ -# else -# define __MULTI_CLOSURE__ -# define __TRANSPARENT_SHADOWS__ -# define __PASSES__ -# define __BACKGROUND_MIS__ -# define __LAMP_MIS__ -# define __AO__ -# define __HAIR__ -# define __CAMERA_MOTION__ -# endif +#define __KERNEL_ADV_SHADING__ #endif #endif // __KERNEL_OPENCL__ |