We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents aef0b65 + 1ae1e72 commit e4be09aCopy full SHA for e4be09a
src/core/qgsopenclutils.cpp
@@ -18,6 +18,8 @@
18
#include "qgsmessagelog.h"
19
#include "qgslogger.h"
20
21
+#include <QLibrary>
22
+
23
#include <QTextStream>
24
#include <QFile>
25
#include <QDebug>
@@ -70,6 +72,15 @@ void QgsOpenClUtils::init()
70
72
static std::once_flag initialized;
71
73
std::call_once( initialized, [ = ]( )
74
{
75
+ QLibrary openCLLib{ QStringLiteral( "OpenCL" ) };
76
+ openCLLib.setLoadHints( QLibrary::LoadHint::ResolveAllSymbolsHint );
77
+ if ( ! openCLLib.load() )
78
+ {
79
+ QgsMessageLog::logMessage( QObject::tr( "Error loading OpenCL library: %1" )
80
+ .arg( openCLLib.errorString() ),
81
+ LOGMESSAGE_TAG, Qgis::Critical );
82
+ return;
83
+ }
84
try
85
86
activate( preferredDevice() );
0 commit comments