[Bf-blender-cvs] [4d74180] master: Cycles: Fix for wrong device enumeration in CUDA

Sergey Sharybin noreply at git.blender.org
Sat Jun 27 15:18:44 CEST 2015


Commit: 4d74180b9fe1867c6d2deff704796e5318eb8e4a
Author: Sergey Sharybin
Date:   Sat Jun 27 15:11:46 2015 +0200
Branches: master
https://developer.blender.org/rB4d74180b9fe1867c6d2deff704796e5318eb8e4a

Cycles: Fix for wrong device enumeration in CUDA

it is the same issue as described in the previous commit, original changes
in this area were wrong and only worked on a bugger optimus driver which
simply appeared to work by co-incident and in fact used wrong device..

===================================================================

M	intern/cycles/device/device_cuda.cpp

===================================================================

diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 3607de5..4a9c27f 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -1123,7 +1123,6 @@ void device_cuda_info(vector<DeviceInfo>& devices)
 	
 	vector<DeviceInfo> display_devices;
 
-	int num_devices = 0;
 	for(int num = 0; num < count; num++) {
 		char name[256];
 		int attr;
@@ -1142,7 +1141,7 @@ void device_cuda_info(vector<DeviceInfo>& devices)
 		info.type = DEVICE_CUDA;
 		info.description = string(name);
 		info.id = string_printf("CUDA_%d", num);
-		info.num = num_devices;
+		info.num = num;
 
 		info.advanced_shading = (major >= 2);
 		info.extended_images = (major >= 3);
@@ -1155,8 +1154,6 @@ void device_cuda_info(vector<DeviceInfo>& devices)
 		}
 		else
 			devices.push_back(info);
-
-		++num_devices;
 	}
 
 	if(!display_devices.empty())




More information about the Bf-blender-cvs mailing list