diff options
Diffstat (limited to 'intern/cycles/device/opencl')
-rw-r--r-- | intern/cycles/device/opencl/opencl_split.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/device/opencl/opencl_util.cpp | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp index 79474fb0814..eea5cf2fb8a 100644 --- a/intern/cycles/device/opencl/opencl_split.cpp +++ b/intern/cycles/device/opencl/opencl_split.cpp @@ -676,7 +676,7 @@ OpenCLDevice::OpenCLDevice(DeviceInfo &info, Stats &stats, Profiler &profiler, b device_initialized = true; split_kernel = new OpenCLSplitKernel(this); - if (!background) { + if (use_preview_kernels) { load_preview_kernels(); } } diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp index dc9b4072841..3eeff31f8c2 100644 --- a/intern/cycles/device/opencl/opencl_util.cpp +++ b/intern/cycles/device/opencl/opencl_util.cpp @@ -619,15 +619,16 @@ void OpenCLDevice::OpenCLProgram::compile() debug_src = &clsrc; } - /* If binary kernel exists already, try use it. */ - if (compile_separate(clbin)) { + if (DebugFlags().running_inside_blender && compile_separate(clbin)) { add_log(string("Built and loaded program from ") + clbin + ".", true); loaded = true; } else { - add_log(string("Separate-process building of ") + clbin + - " failed, will fall back to regular building.", - true); + if (DebugFlags().running_inside_blender) { + add_log(string("Separate-process building of ") + clbin + + " failed, will fall back to regular building.", + true); + } /* If does not exist or loading binary failed, compile kernel. */ if (!compile_kernel(debug_src)) { |