Cycles/OpenCL:
authorThomas Dinges <blender@dingto.org>
Mon, 9 Apr 2012 17:44:33 +0000 (17:44 +0000)
committerThomas Dinges <blender@dingto.org>
Mon, 9 Apr 2012 17:44:33 +0000 (17:44 +0000)
* 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

intern/cycles/device/device_opencl.cpp
intern/cycles/kernel/kernel_types.h

index ee8070393c22daa5ee39bd97505252d9ff372234..322b7ad3eb95a52cac404df742ae94b7f01df92d 100644 (file)
@@ -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;
        }
index 32da7c3061626da80c6d4b1a21370e90ea97de8c..391dcd12dade928ce22465c96161fe8475743549 100644 (file)
@@ -45,7 +45,7 @@ CCL_NAMESPACE_BEGIN
 #endif
 
 #ifdef __KERNEL_OPENCL__
-#define __KERNEL_SHADING__
+//#define __KERNEL_SHADING__
 //#define __KERNEL_ADV_SHADING__
 #endif