summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-08-12 16:53:48 +0300
committerTor Lillqvist <tml@collabora.com>2016-08-14 06:54:03 +0000
commit32881f01833dbcefd5600e1135dd8743178bfd96 (patch)
tree7adba5a0526fa23762c48cd21a8728737f67c6fc /include
parenttdf101291 Resize cropmarkers.png to requested dimension (diff)
downloadcore-32881f01833dbcefd5600e1135dd8743178bfd96.tar.gz
core-32881f01833dbcefd5600e1135dd8743178bfd96.zip
tdf#100965: Restart on initialisation-time OpenCL crash
Add a flag to the OpenCLZone indicating whether we are performing the first-start OpenCL functionality verification, so that if we run into a crash that is caught by the VCL VCLExceptionSignal_impl() handler, we terminate the process with the EXITHELPER_NORMAL_RESTART status after first having disabled OpenCL use. The wrapper process will then restart soffice.bin. This is for Windows only so far. This matches what we do if OpenGL fails early during start of LibreOffice. Change-Id: Ibb9bf3a86b7521bf16728de2a118ad4323be674b Reviewed-on: https://gerrit.libreoffice.org/28086 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/opencl/OpenCLZone.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/opencl/OpenCLZone.hxx b/include/opencl/OpenCLZone.hxx
index eca530a7a5ba..0d2059dddc87 100644
--- a/include/opencl/OpenCLZone.hxx
+++ b/include/opencl/OpenCLZone.hxx
@@ -19,6 +19,7 @@ class OPENCL_DLLPUBLIC OpenCLZone
static volatile sal_uInt64 gnEnterCount;
/// how many times have we left a new CL zone
static volatile sal_uInt64 gnLeaveCount;
+ static volatile bool gbInInitialTest;
public:
OpenCLZone()
@@ -29,6 +30,8 @@ public:
~OpenCLZone()
{
gnLeaveCount++;
+ if (!isInZone())
+ gbInInitialTest = false;
}
static bool isInZone()
@@ -36,7 +39,13 @@ public:
return gnEnterCount != gnLeaveCount;
}
+ static bool isInInitialTest()
+ {
+ return gbInInitialTest;
+ }
+
static void hardDisable();
+ static void enterInitialTest();
};
#endif // INCLUDED_OPENCL_INC_OPENCL_ZONE_HXX