mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Dynamically load OpenCL on Windows with CLRun. There shouldn't be the need to make a separate build now or download a big SDK to link Dolphin.
If compilation fails, rebuild the whole solution as Visual Studio struggles with the not so complex project dependencies. ATI users still need to install the Stream SDK as it's the only way to have an OpenCL driver. NVidia users just have to install a recent driver (version 197 is tested and working). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5808 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user