From 767b841fea2d19296e571730a40e3154395a39fa Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Mon, 22 Dec 2014 19:02:35 +0100 Subject: [PATCH 1/2] gsdx ocl: disable it on windows Until we found a way to fix a couple of crashes --- plugins/GSdx/GSSettingsDlg.cpp | 2 ++ plugins/GSdx/config.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index ca4fb0a9d..397fccf58 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -31,6 +31,7 @@ GSSettingsDlg::GSSettingsDlg(bool isOpen2) : GSDialog(isOpen2 ? IDD_CONFIG2 : IDD_CONFIG) , m_IsOpen2(isOpen2) { +#ifdef ENABLE_OPENCL list ocldevs; GSUtil::GetDeviceDescs(ocldevs); @@ -41,6 +42,7 @@ GSSettingsDlg::GSSettingsDlg(bool isOpen2) { m_ocl_devs.push_back(GSSetting(index++, dev.name.c_str(), "")); } +#endif } void GSSettingsDlg::OnInit() diff --git a/plugins/GSdx/config.h b/plugins/GSdx/config.h index 323bfaae0..3596ca815 100644 --- a/plugins/GSdx/config.h +++ b/plugins/GSdx/config.h @@ -47,5 +47,5 @@ //#define ENABLE_OGL_STENCIL_DEBUG #ifdef _WINDOWS -#define ENABLE_OPENCL +//#define ENABLE_OPENCL #endif From ee34bd724f072a34689757921c5dffa031b48c45 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Tue, 23 Dec 2014 19:39:02 +0100 Subject: [PATCH 2/2] gsdx ocl: avoid a crash if ocl is selected but not enabled --- plugins/GSdx/GS.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index 92239be07..3ffb5e8a7 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -267,9 +267,13 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1) case 14: case 15: case 16: case 17: #ifdef ENABLE_OPENCL s_gs = new GSRendererCL(); +#else + printf("GSdx error: opencl is disabled\n"); #endif break; } + if (s_gs == NULL) + return -1; s_renderer = renderer; }