[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43289] trunk/blender/intern/cycles/device : Fix: cycles CPU device not being used when it should be on some multi-GPU

Brecht Van Lommel brechtvanlommel at pandora.be
Wed Jan 11 14:18:19 CET 2012


Revision: 43289
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43289
Author:   blendix
Date:     2012-01-11 13:18:06 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
Fix: cycles CPU device not being used when it should be on some multi-GPU
configurations.

Modified Paths:
--------------
    trunk/blender/intern/cycles/device/device.cpp
    trunk/blender/intern/cycles/device/device_cpu.cpp

Modified: trunk/blender/intern/cycles/device/device.cpp
===================================================================
--- trunk/blender/intern/cycles/device/device.cpp	2012-01-11 12:56:31 UTC (rev 43288)
+++ trunk/blender/intern/cycles/device/device.cpp	2012-01-11 13:18:06 UTC (rev 43289)
@@ -255,8 +255,6 @@
 	static bool devices_init = false;
 
 	if(!devices_init) {
-		device_cpu_info(devices);
-
 #ifdef WITH_CUDA
 		if(cuLibraryInit())
 			device_cuda_info(devices);
@@ -271,6 +269,8 @@
 		device_multi_info(devices);
 #endif
 
+		device_cpu_info(devices);
+
 #ifdef WITH_NETWORK
 		device_network_info(devices);
 #endif

Modified: trunk/blender/intern/cycles/device/device_cpu.cpp
===================================================================
--- trunk/blender/intern/cycles/device/device_cpu.cpp	2012-01-11 12:56:31 UTC (rev 43288)
+++ trunk/blender/intern/cycles/device/device_cpu.cpp	2012-01-11 13:18:06 UTC (rev 43289)
@@ -272,7 +272,7 @@
 	info.id = "CPU";
 	info.num = 0;
 
-	devices.push_back(info);
+	devices.insert(devices.begin(), info);
 }
 
 CCL_NAMESPACE_END



More information about the Bf-blender-cvs mailing list