Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2012-04-09 21:44:33 +0400
committerThomas Dinges <blender@dingto.org>2012-04-09 21:44:33 +0400
commited47be3bf2984c83a642bbabbd32710bcd72c829 (patch)
tree9c3c53e4ee96b8348e2c2b7058e01850132598a0 /intern
parent2e08b763c5e4b9514ce033fa6810cc0b5d332ae0 (diff)
Cycles/OpenCL:
* Reverted the general activation of __KERNEL_SHADING__. Better to handle this in the device file. This way each platform gets specifically what it is capable of atm. * Nvidia has Shading + Multi Closure * AMD (Apple) has only Clay Render * AMD (non Apple) has Basic Shading
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/device_opencl.cpp14
-rw-r--r--intern/cycles/kernel/kernel_types.h2
2 files changed, 11 insertions, 5 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index ee8070393c2..322b7ad3eb9 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -298,11 +298,17 @@ public:
{
string build_options = " -cl-fast-relaxed-math ";
- /* full shading only on NVIDIA cards at the moment */
+ /* Multi Closure for nVidia cards */
if(platform_name == "NVIDIA CUDA")
- build_options += "-D__MULTI_CLOSURE__ -cl-nv-maxrregcount=24 -cl-nv-verbose ";
- if(platform_name == "Apple" || platform_name == "AMD Accelerated Parallel Processing")
- build_options += " -D__CL_NO_FLOAT3__ ";
+ build_options += "-D__KERNEL_SHADING__ -D__MULTI_CLOSURE__ -cl-nv-maxrregcount=24 -cl-nv-verbose ";
+
+ /* No Float3 for Apple */
+ else if(platform_name == "Apple")
+ build_options += "-D__CL_NO_FLOAT3__ ";
+
+ /* Basic shading for AMD cards (non Apple) */
+ else if(platform_name == "AMD Accelerated Parallel Processing")
+ build_options += "-D__KERNEL_SHADING__ -D__CL_NO_FLOAT3__ ";
return build_options;
}
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 32da7c30616..391dcd12dad 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -45,7 +45,7 @@ CCL_NAMESPACE_BEGIN
#endif
#ifdef __KERNEL_OPENCL__
-#define __KERNEL_SHADING__
+//#define __KERNEL_SHADING__
//#define __KERNEL_ADV_SHADING__
#endif