diff options
-rw-r--r-- | intern/cycles/device/device_opencl.cpp | 6 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index 367c5f31984..8df83116195 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -115,12 +115,14 @@ bool opencl_kernel_use_advanced_shading(const string& platform) if(platform == "NVIDIA CUDA") return true; else if(platform == "Apple") - return false; + return true; else if(platform == "AMD Accelerated Parallel Processing") return true; else if(platform == "Intel(R) OpenCL") return true; - + /* Make sure officially unsupported OpenCL platforms + * does not set up to use advanced shading. + */ return false; } diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 3f57d009c50..46e5d6b2a31 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -105,7 +105,14 @@ CCL_NAMESPACE_BEGIN #ifdef __KERNEL_OPENCL_APPLE__ # define __KERNEL_SHADING__ -//#define __KERNEL_ADV_SHADING__ +# define __KERNEL_ADV_SHADING__ +/* TODO(sergey): Currently experimental section is ignored here, + * this is because megakernel in device_opencl does not support + * custom cflags depending on the scene features. + */ +# ifdef __KERNEL_EXPERIMENTAL__ +# define __CMJ__ +# endif #endif #ifdef __KERNEL_OPENCL_AMD__ |