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
This commit is contained in:
Thomas Dinges 2012-04-09 17:44:33 +00:00
parent 2e08b763c5
commit ed47be3bf2
2 changed files with 11 additions and 5 deletions

@ -298,11 +298,17 @@ public:
{ {
string build_options = " -cl-fast-relaxed-math "; 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") if(platform_name == "NVIDIA CUDA")
build_options += "-D__MULTI_CLOSURE__ -cl-nv-maxrregcount=24 -cl-nv-verbose "; build_options += "-D__KERNEL_SHADING__ -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__ "; /* 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; return build_options;
} }

@ -45,7 +45,7 @@ CCL_NAMESPACE_BEGIN
#endif #endif
#ifdef __KERNEL_OPENCL__ #ifdef __KERNEL_OPENCL__
#define __KERNEL_SHADING__ //#define __KERNEL_SHADING__
//#define __KERNEL_ADV_SHADING__ //#define __KERNEL_ADV_SHADING__
#endif #endif