[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45491] trunk/blender/intern/cycles: Cycles/OpenCL:

Thomas Dinges blender at dingto.org
Mon Apr 9 19:44:34 CEST 2012


Revision: 45491
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45491
Author:   dingto
Date:     2012-04-09 17:44:33 +0000 (Mon, 09 Apr 2012)
Log Message:
-----------
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 

Modified Paths:
--------------
    trunk/blender/intern/cycles/device/device_opencl.cpp
    trunk/blender/intern/cycles/kernel/kernel_types.h

Modified: trunk/blender/intern/cycles/device/device_opencl.cpp
===================================================================
--- trunk/blender/intern/cycles/device/device_opencl.cpp	2012-04-09 15:31:31 UTC (rev 45490)
+++ trunk/blender/intern/cycles/device/device_opencl.cpp	2012-04-09 17:44:33 UTC (rev 45491)
@@ -298,11 +298,17 @@
 	{
 		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;
 	}

Modified: trunk/blender/intern/cycles/kernel/kernel_types.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_types.h	2012-04-09 15:31:31 UTC (rev 45490)
+++ trunk/blender/intern/cycles/kernel/kernel_types.h	2012-04-09 17:44:33 UTC (rev 45491)
@@ -45,7 +45,7 @@
 #endif
 
 #ifdef __KERNEL_OPENCL__
-#define __KERNEL_SHADING__
+//#define __KERNEL_SHADING__
 //#define __KERNEL_ADV_SHADING__
 #endif
 




More information about the Bf-blender-cvs mailing list