diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-27 16:11:46 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-27 16:13:08 +0300 |
commit | 4d74180b9fe1867c6d2deff704796e5318eb8e4a (patch) | |
tree | 964a65e5ac6abcb98d66f08a23f22a3ba10726a4 | |
parent | 09dc470982c9ceb1e4dc72ee34cf4e752ba074dc (diff) |
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..
-rw-r--r-- | intern/cycles/device/device_cuda.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp index 3607de598c0..4a9c27f5429 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()) |