diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-07-11 15:12:38 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-07-12 01:40:56 +0100 |
commit | c5caed66544c11596ba190722873ed0591d7d251 (patch) | |
tree | ab68c403990225994219609e7782c5b181b24c0a /opencl/source/OpenCLZone.cxx | |
parent | a125527a0d1a81a3f1089cebbb91dbc5e7890b68 (diff) |
desktop: validate OpenCL drivers before use.private/kendy/testcl
OpenCL validation needs to happen before drivers are used in
anger. This should isolate any crashes, and/or mis-behavior to
We use app version, CL driver version and file time-stamp to
trigger re-testing the device. If anything fails: hard disable
OpenCL.
We use an opencl validation sheet (cl-test.ods) and install it.
It is a minimal CL set - it requires a very short formula group
length, and combines several CL functions into few formulae to
test more.
The sheet structure, in particular the manual squaring / SQRT - is
necessary to stick within the default CL subset, and ensure that
formulae are CL enabled from the root of the dependency tree up.
Change-Id: I18682dbdf9a8ba9c16d52bad4447e9acce97f0a3
Diffstat (limited to 'opencl/source/OpenCLZone.cxx')
-rw-r--r-- | opencl/source/OpenCLZone.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/opencl/source/OpenCLZone.cxx b/opencl/source/OpenCLZone.cxx index dc3a9522380b..03521a29c66f 100644 --- a/opencl/source/OpenCLZone.cxx +++ b/opencl/source/OpenCLZone.cxx @@ -7,7 +7,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <opencl/openclwrapper.hxx> #include <opencl/OpenCLZone.hxx> +#include "opencl_device.hxx" #include <memory> @@ -40,6 +42,8 @@ void OpenCLZone::hardDisable() auto xConfProvider = css::configuration::theDefaultProvider::get(comphelper::getProcessComponentContext()); css::uno::Reference<css::util::XFlushable> xFlushable(xConfProvider, css::uno::UNO_QUERY_THROW); xFlushable->flush(); + + releaseOpenCLEnv(&opencl::gpuEnv); } } |