summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/OpenCL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Src/OpenCL.cpp')
-rw-r--r--Source/Core/Common/Src/OpenCL.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/Core/Common/Src/OpenCL.cpp b/Source/Core/Common/Src/OpenCL.cpp
index 55a2453512..05cb6112ec 100644
--- a/Source/Core/Common/Src/OpenCL.cpp
+++ b/Source/Core/Common/Src/OpenCL.cpp
@@ -21,6 +21,10 @@
#include "Common.h"
#include "Timer.h"
+#ifdef _WIN32
+#include "clrun.h"
+#endif
+
namespace OpenCL
{
@@ -41,7 +45,13 @@ bool Initialize()
if(g_context)
return false;
int err; // error code returned from api calls
-
+
+#ifdef _WIN32
+ clrInit();
+ if(!clrHasOpenCL())
+ return false;
+#endif
+
// Connect to a compute device
cl_uint numPlatforms;
cl_platform_id platform = NULL;