Fix #33243: cycles CUDA going missing sometimes, disabled the new code now that
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 20 Nov 2012 17:39:56 +0000 (17:39 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 20 Nov 2012 17:39:56 +0000 (17:39 +0000)
can detect if a device becomes available while Blender runs, appears to be
unreliable for some reason.

intern/cycles/device/device.cpp

index c6a2c678bacc48a806f0ab5e256f2c1e9534fc02..1248b42b7387e331430cd8227ed44bf93a08fa09 100644 (file)
@@ -189,18 +189,6 @@ vector<DeviceInfo>& Device::available_devices()
 {
        static vector<DeviceInfo> devices;
        static bool devices_init = false;
-       static double device_update_time = 0.0;
-
-       /* only update device list if we're not actively rendering already, things
-        * could go very wrong if a device suddenly becomes (un)available. also do
-        * it only every 5 seconds. it not super cpu intensive but don't want to do
-        * it on every redraw. */
-       if(devices_init) {
-               if(!TaskScheduler::active() && (time_dt() > device_update_time + 5.0)) {
-                       devices.clear();
-                       devices_init = false;
-               }
-       }
 
        if(!devices_init) {
 #ifdef WITH_CUDA
@@ -224,7 +212,6 @@ vector<DeviceInfo>& Device::available_devices()
 #endif
 
                devices_init = true;
-               device_update_time = time_dt();
        }
 
        return devices;