mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Add a toggle option for OpenCL in Config (in Advanced Settings). Default is off.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5768 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -45,6 +45,7 @@
|
||||
#include "OpenCL.h"
|
||||
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||
#include "OpenCL/OCLTextureDecoder.h"
|
||||
#include "VideoConfig.h"
|
||||
#endif
|
||||
|
||||
u8* g_pVideoData = 0;
|
||||
@ -385,8 +386,11 @@ void OpcodeDecoder_Init()
|
||||
g_pVideoData = FAKE_GetFifoStartPtr();
|
||||
|
||||
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||
OpenCL::Initialize();
|
||||
TexDecoder_OpenCL_Initialize();
|
||||
if (g_Config.bEnableOpenCL)
|
||||
{
|
||||
OpenCL::Initialize();
|
||||
TexDecoder_OpenCL_Initialize();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -394,8 +398,11 @@ void OpcodeDecoder_Init()
|
||||
void OpcodeDecoder_Shutdown()
|
||||
{
|
||||
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||
TexDecoder_OpenCL_Shutdown();
|
||||
OpenCL::Destroy();
|
||||
if (g_Config.bEnableOpenCL)
|
||||
{
|
||||
TexDecoder_OpenCL_Shutdown();
|
||||
OpenCL::Destroy();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "OpenCL.h"
|
||||
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||
#include "OpenCL/OCLTextureDecoder.h"
|
||||
#include "VideoConfig.h"
|
||||
#endif
|
||||
|
||||
#include "LookUpTables.h"
|
||||
@ -1269,7 +1270,8 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in
|
||||
PC_TexFormat retval = PC_TEX_FMT_NONE;
|
||||
|
||||
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||
retval = TexDecoder_Decode_OpenCL(dst, src, width, height, texformat, tlutaddr, tlutfmt, rgbaOnly);
|
||||
if (g_Config.bEnableOpenCL)
|
||||
retval = TexDecoder_Decode_OpenCL(dst, src, width, height, texformat, tlutaddr, tlutfmt, rgbaOnly);
|
||||
#endif
|
||||
|
||||
if(retval == PC_TEX_FMT_NONE)
|
||||
|
@ -107,6 +107,7 @@ void VideoConfig::Load(const char *ini_file)
|
||||
bool bTmp;
|
||||
iniFile.Get("Interface", "UsePanicHandlers", &bTmp, true);
|
||||
SetEnableAlert(bTmp);
|
||||
iniFile.Get("Core", "EnableOpenCL", &bEnableOpenCL, false);
|
||||
}
|
||||
|
||||
void VideoConfig::GameIniLoad(const char *ini_file)
|
||||
|
@ -77,6 +77,9 @@ struct VideoConfig
|
||||
bool bUseRealXFB;
|
||||
bool bAutoScale; // Removes annoying borders without using XFB. Doesn't always work perfectly.
|
||||
bool bUseNativeMips;
|
||||
|
||||
// OpenCL
|
||||
bool bEnableOpenCL;
|
||||
|
||||
// Enhancements
|
||||
int iMultisampleMode;
|
||||
|
Reference in New Issue
Block a user