sc/source/core/data/formulacell.cxx | 2 +- sc/source/core/tool/clkernelthread.cxx | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
New commits: commit 6e24c789572aba5b6ee95e894f6d778777b1df58 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Fri Mar 7 11:13:08 2014 -0500 Initialize OpenCL device on the main thread when pre-compiling kernels. Else it would cause extremely hard-to-debug random crashes when interpreting formulas with OpenCL. And let's re-enable kernel pre-compilation with this fix. Change-Id: Ib104bfdc3f56a02c052c837eb4bf3ecc95d562e0 diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index a977ef7..c8aa429 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -54,7 +54,7 @@ #include <boost/scoped_ptr.hpp> -#define ENABLE_THREADED_OPENCL_KERNEL_COMPILATION 0 +#define ENABLE_THREADED_OPENCL_KERNEL_COMPILATION 1 using namespace formula; diff --git a/sc/source/core/tool/clkernelthread.cxx b/sc/source/core/tool/clkernelthread.cxx index ea3c7d0..6c5afc0 100644 --- a/sc/source/core/tool/clkernelthread.cxx +++ b/sc/source/core/tool/clkernelthread.cxx @@ -69,6 +69,11 @@ void CLBuildKernelThread::push(CLBuildKernelWorkItem item) osl::MutexGuard guard(maQueueMutex); maQueue.push(item); maQueueCondition.set(); + + // This is only to ensure that the OpenCL parameters are initialized on + // the main thread before spawning a worker thread for kernel + // pre-compilation. + sc::FormulaGroupInterpreter::getStatic(); } void CLBuildKernelThread::produce() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits