diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-23 13:08:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-23 13:10:38 +0300 |
commit | 1788293a0125e178cf7cbea60113ae7d81749cbe (patch) | |
tree | 67ad443a304257fa8959b61eaa9efb6811925e6f /intern/cycles/device/device_opencl.cpp | |
parent | cc5d48e8dd9b96c151e0f1dd1e71e6de7231a95f (diff) |
Fix T45381: Crash Blender 2.75 in Win7 x64 AMD card
Previous fix didn't work well enough because on Windows Python has different
environment than Blender ans setting variables in there made no effect from
Blender point of view.
Diffstat (limited to 'intern/cycles/device/device_opencl.cpp')
-rw-r--r-- | intern/cycles/device/device_opencl.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index 2a596a288bf..0cc49e846cc 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -3610,16 +3610,22 @@ bool device_opencl_init(void) initialized = true; - int clew_result = clewInit(); - if(clew_result == CLEW_SUCCESS) { - VLOG(1) << "CLEW initialization succeeded."; - result = true; + if(opencl_device_type() != 0) { + int clew_result = clewInit(); + if(clew_result == CLEW_SUCCESS) { + VLOG(1) << "CLEW initialization succeeded."; + result = true; + } + else { + VLOG(1) << "CLEW initialization failed: " + << ((clew_result == CLEW_ERROR_ATEXIT_FAILED) + ? "Error setting up atexit() handler" + : "Error opening the library"); + } } else { - VLOG(1) << "CLEW initialization failed: " - << ((clew_result == CLEW_ERROR_ATEXIT_FAILED) - ? "Error setting up atexit() handler" - : "Error opening the library"); + VLOG(1) << "Skip initializing CLEW, platform is force disabled."; + result = false; } return result; |