mirror of https://github.com/PCSX2/pcsx2.git
gsdx-hw: Remove opencl code and files from gsdx.
This commit is contained in:
parent
fb640cbdb9
commit
c50c6034c0
|
@ -27,7 +27,6 @@
|
|||
#include "Renderers/Null/GSDeviceNull.h"
|
||||
#include "Renderers/OpenGL/GSDeviceOGL.h"
|
||||
#include "Renderers/OpenGL/GSRendererOGL.h"
|
||||
#include "Renderers/OpenCL/GSRendererCL.h"
|
||||
#include "GSLzma.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -124,9 +123,6 @@ EXPORT_C_(int) GSinit()
|
|||
GSUtil::Init();
|
||||
GSBlock::InitVectors();
|
||||
GSClut::InitVectors();
|
||||
#ifdef ENABLE_OPENCL
|
||||
GSRendererCL::InitVectors();
|
||||
#endif
|
||||
GSRendererSW::InitVectors();
|
||||
GSVector4i::InitVectors();
|
||||
GSVector4::InitVectors();
|
||||
|
@ -232,9 +228,6 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
|
|||
{
|
||||
case GSRendererType::OGL_HW:
|
||||
case GSRendererType::OGL_SW:
|
||||
#ifdef ENABLE_OPENCL
|
||||
case GSRendererType::OGL_OpenCL:
|
||||
#endif
|
||||
#if defined(__unix__)
|
||||
// Note: EGL code use GLX otherwise maybe it could be also compatible with Windows
|
||||
// Yes OpenGL code isn't complicated enough !
|
||||
|
@ -321,12 +314,6 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
|
|||
case GSRendererType::Null:
|
||||
renderer_mode = "(Null renderer)";
|
||||
break;
|
||||
#ifdef ENABLE_OPENCL
|
||||
case GSRendererType::DX1011_OpenCL:
|
||||
case GSRendererType::OGL_OpenCL:
|
||||
renderer_mode = "(OpenCL)";
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
renderer_mode = "(Hardware renderer)";
|
||||
break;
|
||||
|
@ -338,9 +325,6 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
|
|||
#ifdef _WIN32
|
||||
case GSRendererType::DX1011_HW:
|
||||
case GSRendererType::DX1011_SW:
|
||||
#ifdef ENABLE_OPENCL
|
||||
case GSRendererType::DX1011_OpenCL:
|
||||
#endif
|
||||
dev = new GSDevice11();
|
||||
s_renderer_name = " D3D11";
|
||||
renderer_fullname = "Direct3D 11";
|
||||
|
@ -353,9 +337,6 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
|
|||
break;
|
||||
case GSRendererType::OGL_HW:
|
||||
case GSRendererType::OGL_SW:
|
||||
#ifdef ENABLE_OPENCL
|
||||
case GSRendererType::OGL_OpenCL:
|
||||
#endif
|
||||
dev = new GSDeviceOGL();
|
||||
s_renderer_name = " OGL";
|
||||
renderer_fullname = "OpenGL";
|
||||
|
@ -393,13 +374,6 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
|
|||
s_gs = new GSRendererNull();
|
||||
s_renderer_type = "";
|
||||
break;
|
||||
#ifdef ENABLE_OPENCL
|
||||
case GSRendererType::DX1011_OpenCL:
|
||||
case GSRendererType::OGL_OpenCL:
|
||||
s_gs = new GSRendererCL();
|
||||
s_renderer_type = " OCL";
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
if (s_gs == NULL)
|
||||
return -1;
|
||||
|
|
|
@ -236,8 +236,6 @@ enum class GSRendererType : int8_t
|
|||
Null = 11,
|
||||
OGL_HW,
|
||||
OGL_SW,
|
||||
DX1011_OpenCL = 15,
|
||||
OGL_OpenCL = 17,
|
||||
|
||||
#ifdef _WIN32
|
||||
Default = Undefined
|
||||
|
|
|
@ -252,93 +252,7 @@ CRCHackLevel GSUtil::GetRecommendedCRCHackLevel(GSRendererType type)
|
|||
return type == GSRendererType::OGL_HW ? CRCHackLevel::Partial : CRCHackLevel::Full;
|
||||
}
|
||||
|
||||
#define OCL_PROGRAM_VERSION 3
|
||||
|
||||
#ifdef ENABLE_OPENCL
|
||||
void GSUtil::GetDeviceDescs(std::list<OCLDeviceDesc>& dl)
|
||||
{
|
||||
dl.clear();
|
||||
|
||||
try
|
||||
{
|
||||
std::vector<cl::Platform> platforms;
|
||||
|
||||
cl::Platform::get(&platforms);
|
||||
|
||||
for(auto& p : platforms)
|
||||
{
|
||||
std::string platform_vendor = p.getInfo<CL_PLATFORM_VENDOR>();
|
||||
|
||||
std::vector<cl::Device> ds;
|
||||
|
||||
p.getDevices(CL_DEVICE_TYPE_ALL, &ds);
|
||||
|
||||
for(auto& device : ds)
|
||||
{
|
||||
std::string type;
|
||||
|
||||
switch(device.getInfo<CL_DEVICE_TYPE>())
|
||||
{
|
||||
case CL_DEVICE_TYPE_GPU: type = "GPU"; break;
|
||||
case CL_DEVICE_TYPE_CPU: type = "CPU"; break;
|
||||
}
|
||||
|
||||
if(type.empty()) continue;
|
||||
|
||||
std::string version = device.getInfo<CL_DEVICE_OPENCL_C_VERSION>();
|
||||
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
|
||||
if(!type.empty() && sscanf(version.c_str(), "OpenCL C %d.%d", &major, &minor) == 2 && major == 1 && minor >= 1 || major > 1)
|
||||
{
|
||||
OCLDeviceDesc desc;
|
||||
|
||||
desc.device = device;
|
||||
desc.name = GetDeviceUniqueName(device);
|
||||
desc.version = major * 100 + minor * 10;
|
||||
|
||||
desc.tmppath = GStempdir() + "/" + desc.name;
|
||||
|
||||
GSmkdir(desc.tmppath.c_str());
|
||||
|
||||
desc.tmppath += "/" + std::to_string(OCL_PROGRAM_VERSION);
|
||||
|
||||
GSmkdir(desc.tmppath.c_str());
|
||||
|
||||
dl.push_back(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(cl::Error err)
|
||||
{
|
||||
printf("%s (%d)\n", err.what(), err.err());
|
||||
}
|
||||
}
|
||||
|
||||
std::string GSUtil::GetDeviceUniqueName(cl::Device& device)
|
||||
{
|
||||
std::string vendor = device.getInfo<CL_DEVICE_VENDOR>();
|
||||
std::string name = device.getInfo<CL_DEVICE_NAME>();
|
||||
std::string version = device.getInfo<CL_DEVICE_OPENCL_C_VERSION>();
|
||||
|
||||
std::string type;
|
||||
|
||||
switch(device.getInfo<CL_DEVICE_TYPE>())
|
||||
{
|
||||
case CL_DEVICE_TYPE_GPU: type = "GPU"; break;
|
||||
case CL_DEVICE_TYPE_CPU: type = "CPU"; break;
|
||||
}
|
||||
|
||||
version.erase(version.find_last_not_of(' ') + 1);
|
||||
|
||||
return vendor + " " + name + " " + version + " " + type;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// DX11 Detection (includes DXGI detection and dynamic library method bindings)
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
|
|
@ -24,16 +24,6 @@
|
|||
#include "GS.h"
|
||||
#include "xbyak/xbyak_util.h"
|
||||
|
||||
struct OCLDeviceDesc
|
||||
{
|
||||
#ifdef ENABLE_OPENCL
|
||||
cl::Device device;
|
||||
#endif
|
||||
std::string name;
|
||||
int version;
|
||||
std::string tmppath;
|
||||
};
|
||||
|
||||
class GSUtil
|
||||
{
|
||||
public:
|
||||
|
@ -54,11 +44,6 @@ public:
|
|||
static bool CheckSSE();
|
||||
static CRCHackLevel GetRecommendedCRCHackLevel(GSRendererType type);
|
||||
|
||||
#ifdef ENABLE_OPENCL
|
||||
static void GetDeviceDescs(std::list<OCLDeviceDesc>& dl);
|
||||
static std::string GetDeviceUniqueName(cl::Device& device);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
static bool CheckDXGI();
|
||||
static bool CheckD3D11();
|
||||
|
|
|
@ -91,9 +91,6 @@ bool GSdxApp::LoadResource(int id, std::vector<char>& buff, const char* type)
|
|||
case IDR_TFX_FS_GLSL:
|
||||
path = "/GSdx/res/glsl/tfx_fs.glsl";
|
||||
break;
|
||||
case IDR_TFX_CL:
|
||||
path = "/GSdx/res/tfx.cl";
|
||||
break;
|
||||
case IDR_FONT_ROBOTO:
|
||||
path = "/GSdx/res/fonts-roboto/Roboto-Regular.ttf";
|
||||
break;
|
||||
|
@ -220,15 +217,6 @@ void GSdxApp::Init()
|
|||
// The null renderer goes third, it has use for benchmarking purposes in a release build
|
||||
m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::Null), "None", "Core Benchmark"));
|
||||
|
||||
#ifdef ENABLE_OPENCL
|
||||
// OpenCL stuff goes last
|
||||
// FIXME openCL isn't attached to a device (could be impacted by the window management stuff however)
|
||||
#ifdef _WIN32
|
||||
m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::DX1011_OpenCL), "Direct3D 11", "OpenCL"));
|
||||
#endif
|
||||
m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::OGL_OpenCL), "OpenGL", "OpenCL"));
|
||||
#endif
|
||||
|
||||
m_gs_interlace.push_back(GSSetting(0, "None", ""));
|
||||
m_gs_interlace.push_back(GSSetting(1, "Weave tff", "saw-tooth"));
|
||||
m_gs_interlace.push_back(GSSetting(2, "Weave bff", "saw-tooth"));
|
||||
|
@ -360,7 +348,6 @@ void GSdxApp::Init()
|
|||
m_default_configuration["ModeHeight"] = "480";
|
||||
m_default_configuration["ModeWidth"] = "640";
|
||||
m_default_configuration["NTSC_Saturation"] = "1";
|
||||
m_default_configuration["ocldev"] = "";
|
||||
#ifdef _WIN32
|
||||
m_default_configuration["osd_fontname"] = "C:\\Windows\\Fonts\\my_favorite_font_e_g_tahoma.ttf";
|
||||
#else
|
||||
|
|
|
@ -54,7 +54,6 @@ BEGIN
|
|||
"#include ""res/merge.fx""\r\n"
|
||||
"#include ""res/fxaa.fx""\r\n"
|
||||
"#include ""res/shadeboost.fx""\r\n"
|
||||
"#include ""res/tfx.cl""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
|
@ -78,8 +77,6 @@ IDR_FXAA_FX RCDATA "res\\fxaa.fx"
|
|||
|
||||
IDR_SHADEBOOST_FX RCDATA "res\\shadeboost.fx"
|
||||
|
||||
IDR_TFX_CL RCDATA "res\\tfx.cl"
|
||||
|
||||
IDR_CONVERT_GLSL RCDATA "res\\glsl\\convert.glsl";
|
||||
|
||||
IDR_INTERLACE_GLSL RCDATA "res\\glsl\\interlace.glsl";
|
||||
|
@ -271,8 +268,6 @@ BEGIN
|
|||
COMBOBOX IDC_INTERLACE,70,85,166,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Texture Filtering:",IDC_FILTER_TEXT,6,102,79,8
|
||||
COMBOBOX IDC_FILTER,70,100,166,63,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "OpenCL Device:",IDC_OPENCL_TEXT,6,117,53,8
|
||||
COMBOBOX IDC_OPENCL_DEVICE,70,115,166,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "OSD Configuration",IDC_OSDBUTTON,10,325,108,14
|
||||
PUSHBUTTON "Shader Configuration",IDC_SHADEBUTTON,124,325,108,14
|
||||
DEFPUSHBUTTON "OK",IDOK,68,351,50,14
|
||||
|
@ -425,7 +420,6 @@ END
|
|||
#include "res/merge.fx"
|
||||
#include "res/fxaa.fx"
|
||||
#include "res/shadeboost.fx"
|
||||
#include "res/tfx.cl"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,272 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2009 Gabest
|
||||
* http://www.gabest.org
|
||||
*
|
||||
* This Program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This Program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Make; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Renderers/Common/GSRenderer.h"
|
||||
|
||||
#ifdef ENABLE_OPENCL
|
||||
|
||||
struct alignas(32) GSVertexCL
|
||||
{
|
||||
GSVector4 p, t;
|
||||
};
|
||||
|
||||
class GSRendererCL : public GSRenderer
|
||||
{
|
||||
static GSVector4 m_pos_scale;
|
||||
|
||||
typedef void (GSRendererCL::*ConvertVertexBufferPtr)(GSVertexCL* RESTRICT dst, const GSVertex* RESTRICT src, size_t count);
|
||||
|
||||
ConvertVertexBufferPtr m_cvb[4][2][2];
|
||||
|
||||
template<uint32 primclass, uint32 tme, uint32 fst>
|
||||
void ConvertVertexBuffer(GSVertexCL* RESTRICT dst, const GSVertex* RESTRICT src, size_t count);
|
||||
|
||||
union PrimSelector
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32 prim:2; // 0
|
||||
};
|
||||
|
||||
uint32 key;
|
||||
|
||||
operator uint32() const { return key; }
|
||||
};
|
||||
|
||||
union TileSelector
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32 prim:2; // 0
|
||||
uint32 mode:2; // 2
|
||||
uint32 clear:1; // 4
|
||||
};
|
||||
|
||||
uint32 key;
|
||||
|
||||
operator uint32() const { return key; }
|
||||
};
|
||||
|
||||
union TFXSelector
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32 fpsm:3; // 0
|
||||
uint32 zpsm:3; // 3
|
||||
uint32 ztst:2; // 6 (0: off, 1: write, 2: test (ge), 3: test (g))
|
||||
uint32 atst:3; // 8
|
||||
uint32 afail:2; // 11
|
||||
uint32 iip:1; // 13
|
||||
uint32 tfx:3; // 14
|
||||
uint32 tcc:1; // 17
|
||||
uint32 fst:1; // 18
|
||||
uint32 ltf:1; // 19
|
||||
uint32 tlu:1; // 20
|
||||
uint32 fge:1; // 21
|
||||
uint32 date:1; // 22
|
||||
uint32 abe:1; // 23
|
||||
uint32 aba:2; // 24
|
||||
uint32 abb:2; // 26
|
||||
uint32 abc:2; // 28
|
||||
uint32 abd:2; // 30
|
||||
|
||||
uint32 pabe:1; // 32
|
||||
uint32 aa1:1; // 33
|
||||
uint32 fwrite:1; // 34
|
||||
uint32 ftest:1; // 35
|
||||
uint32 rfb:1; // 36
|
||||
uint32 zwrite:1; // 37
|
||||
uint32 ztest:1; // 38
|
||||
uint32 rzb:1; // 39
|
||||
uint32 wms:2; // 40
|
||||
uint32 wmt:2; // 42
|
||||
uint32 datm:1; // 44
|
||||
uint32 colclamp:1; // 45
|
||||
uint32 fba:1; // 46
|
||||
uint32 dthe:1; // 47
|
||||
uint32 prim:2; // 48
|
||||
uint32 lcm:1; // 50
|
||||
uint32 mmin:2; // 51
|
||||
uint32 noscissor:1; // 53
|
||||
uint32 tpsm:4; // 54
|
||||
uint32 aem:1; // 58
|
||||
uint32 merged:1; // 59
|
||||
// TODO
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 _pad1:24;
|
||||
uint32 ababcd:8;
|
||||
uint32 _pad2:2;
|
||||
uint32 fb:2;
|
||||
uint32 _pad3:1;
|
||||
uint32 zb:2;
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 lo;
|
||||
uint32 hi;
|
||||
};
|
||||
|
||||
uint64 key;
|
||||
|
||||
operator uint64() const { return key; }
|
||||
|
||||
bool IsSolidRect() const
|
||||
{
|
||||
return prim == GS_SPRITE_CLASS
|
||||
&& iip == 0
|
||||
&& tfx == TFX_NONE
|
||||
&& abe == 0
|
||||
&& ztst <= 1
|
||||
&& atst <= 1
|
||||
&& date == 0
|
||||
&& fge == 0;
|
||||
}
|
||||
};
|
||||
|
||||
struct alignas(32) TFXParameter
|
||||
{
|
||||
GSVector4i scissor;
|
||||
GSVector4i dimx; // 4x4 signed char
|
||||
TFXSelector sel;
|
||||
uint32 fbp, zbp, bw;
|
||||
uint32 fm, zm;
|
||||
uint32 fog; // rgb
|
||||
uint8 aref, afix;
|
||||
uint8 ta0, ta1;
|
||||
uint32 tbp[7], tbw[7];
|
||||
int minu, maxu, minv, maxv; // umsk, ufix, vmsk, vfix
|
||||
int lod; // lcm == 1
|
||||
int mxl;
|
||||
float l; // TEX1.L * -0x10000
|
||||
float k; // TEX1.K * 0x10000
|
||||
uint32 clut[256];
|
||||
};
|
||||
|
||||
class TFXJob
|
||||
{
|
||||
public:
|
||||
struct { int x, y, z, w; } rect;
|
||||
TFXSelector sel;
|
||||
uint32 ib_start;
|
||||
uint32 prim_count;
|
||||
GSVector4i* src_pages; // read by any texture level
|
||||
GSVector4i* dst_pages; // f/z writes to it
|
||||
uint32 fbp, zbp, bw;
|
||||
uint32 fpsm, zpsm, tpsm;
|
||||
#ifdef DEBUG
|
||||
TFXParameter* pb;
|
||||
#endif
|
||||
TFXJob();
|
||||
virtual ~TFXJob();
|
||||
|
||||
GSVector4i* GetSrcPages();
|
||||
GSVector4i* GetDstPages();
|
||||
};
|
||||
|
||||
class CL
|
||||
{
|
||||
std::string kernel_str;
|
||||
std::map<uint32, cl::Kernel> prim_map;
|
||||
std::map<uint32, cl::Kernel> tile_map;
|
||||
std::map<uint64, cl::Kernel> tfx_map;
|
||||
|
||||
cl::Kernel Build(const char* entry, std::ostringstream& opt);
|
||||
void AddDefs(std::ostringstream& opt);
|
||||
|
||||
public:
|
||||
std::vector<OCLDeviceDesc> devs;
|
||||
cl::Context context;
|
||||
cl::CommandQueue queue[3];
|
||||
cl::Buffer vm;
|
||||
cl::Buffer tex;
|
||||
struct { cl::Buffer buff[2]; size_t head, tail, size; unsigned char* ptr; void* mapped_ptr; } vb, ib, pb;
|
||||
cl::Buffer env;
|
||||
cl::CommandQueue* wq;
|
||||
int wqidx;
|
||||
uint32 WIs;
|
||||
int version;
|
||||
|
||||
public:
|
||||
CL();
|
||||
virtual ~CL();
|
||||
|
||||
cl::Kernel& GetPrimKernel(const PrimSelector& sel);
|
||||
cl::Kernel& GetTileKernel(const TileSelector& sel);
|
||||
cl::Kernel& GetTFXKernel(const TFXSelector& sel);
|
||||
|
||||
void Map();
|
||||
void Unmap();
|
||||
};
|
||||
|
||||
CL m_cl;
|
||||
std::list<std::shared_ptr<TFXJob>> m_jobs;
|
||||
uint32 m_vb_start;
|
||||
uint32 m_vb_count;
|
||||
uint32 m_pb_start;
|
||||
uint32 m_pb_count;
|
||||
bool m_synced;
|
||||
|
||||
void Enqueue();
|
||||
void EnqueueTFX(std::list<std::shared_ptr<TFXJob>>& jobs, uint32 bin_count, const cl_uchar4& bin_dim);
|
||||
void JoinTFX(std::list<std::shared_ptr<TFXJob>>& jobs);
|
||||
bool UpdateTextureCache(TFXJob* job);
|
||||
void InvalidateTextureCache(TFXJob* job);
|
||||
void UsePages(uint32* pages);
|
||||
void ReleasePages(uint32* pages);
|
||||
|
||||
static void CL_CALLBACK ReleasePageEvent(cl_event event, cl_int event_command_exec_status, void* user_data);
|
||||
|
||||
protected:
|
||||
GSTexture* m_texture[2];
|
||||
uint8* m_output;
|
||||
|
||||
GSVector4i m_rw_pages[2][4]; // pages that may be read or modified by the rendering queue, f/z rw, tex r
|
||||
GSVector4i m_tc_pages[4]; // invalidated texture cache pages (split this into 8:24?) // TODO: this should be block level, too many overlaps inside pages with render targets
|
||||
GSVector4i m_tmp_pages[4];
|
||||
uint32 m_tmp_pages2[MAX_PAGES + 1];
|
||||
std::array<std::atomic<uint32>, 512> m_rw_pages_rendering; // pages that are currently in-use
|
||||
|
||||
void Reset();
|
||||
void VSync(int field);
|
||||
void ResetDevice();
|
||||
GSTexture* GetOutput(int i, int& y_offset);
|
||||
|
||||
void Draw();
|
||||
void Sync(int reason);
|
||||
void InvalidateVideoMem(const GIFRegBITBLTBUF& BITBLTBUF, const GSVector4i& r);
|
||||
void InvalidateLocalMem(const GIFRegBITBLTBUF& BITBLTBUF, const GSVector4i& r, bool clut = false);
|
||||
|
||||
bool SetupParameter(TFXJob* job, TFXParameter* pb, GSVertexCL* vertex, size_t vertex_count, const uint32* index, size_t index_count);
|
||||
|
||||
public:
|
||||
static void InitVectors();
|
||||
|
||||
GSRendererCL();
|
||||
virtual ~GSRendererCL();
|
||||
};
|
||||
|
||||
#endif
|
|
@ -39,23 +39,10 @@ GSSettingsDlg::GSSettingsDlg()
|
|||
{
|
||||
auto is_d3d11_renderer = [](const auto &renderer) {
|
||||
const GSRendererType type = static_cast<GSRendererType>(renderer.value);
|
||||
return type == GSRendererType::DX1011_HW || type == GSRendererType::DX1011_SW || type == GSRendererType::DX1011_OpenCL;
|
||||
return type == GSRendererType::DX1011_HW || type == GSRendererType::DX1011_SW;
|
||||
};
|
||||
m_renderers.erase(std::remove_if(m_renderers.begin(), m_renderers.end(), is_d3d11_renderer), m_renderers.end());
|
||||
}
|
||||
|
||||
#ifdef ENABLE_OPENCL
|
||||
std::list<OCLDeviceDesc> ocldevs;
|
||||
|
||||
GSUtil::GetDeviceDescs(ocldevs);
|
||||
|
||||
int index = 0;
|
||||
|
||||
for(auto dev : ocldevs)
|
||||
{
|
||||
m_ocl_devs.push_back(GSSetting(index++, dev.name.c_str(), ""));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
std::vector<GSSettingsDlg::Adapter> GSSettingsDlg::EnumerateD3D11Adapters()
|
||||
|
@ -98,27 +85,12 @@ void GSSettingsDlg::OnInit()
|
|||
__super::OnInit();
|
||||
|
||||
GSRendererType renderer = GSRendererType(theApp.GetConfigI("Renderer"));
|
||||
const bool dx11 = renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::DX1011_SW || renderer == GSRendererType::DX1011_OpenCL;
|
||||
const bool dx11 = renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::DX1011_SW;
|
||||
if (renderer == GSRendererType::Undefined || m_d3d11_adapters.empty() && dx11)
|
||||
renderer = GSUtil::GetBestRenderer();
|
||||
ComboBoxInit(IDC_RENDERER, m_renderers, static_cast<int32_t>(renderer));
|
||||
UpdateAdapters();
|
||||
|
||||
std::string ocldev = theApp.GetConfigS("ocldev");
|
||||
|
||||
unsigned int ocl_sel = 0;
|
||||
|
||||
for(unsigned int i = 0; i < m_ocl_devs.size(); i++)
|
||||
{
|
||||
if(ocldev == m_ocl_devs[i].name)
|
||||
{
|
||||
ocl_sel = i;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ComboBoxInit(IDC_OPENCL_DEVICE, m_ocl_devs, ocl_sel);
|
||||
ComboBoxInit(IDC_MIPMAP_HW, theApp.m_gs_hw_mipmapping, theApp.GetConfigI("mipmap_hw"));
|
||||
|
||||
ComboBoxInit(IDC_INTERLACE, theApp.m_gs_interlace, theApp.GetConfigI("interlace"));
|
||||
|
@ -220,13 +192,6 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
|||
theApp.SetConfig("Adapter", (*m_current_adapters)[data].id.c_str());
|
||||
}
|
||||
|
||||
if(ComboBoxGetSelData(IDC_OPENCL_DEVICE, data))
|
||||
{
|
||||
if ((UINT)data < m_ocl_devs.size()) {
|
||||
theApp.SetConfig("ocldev", m_ocl_devs[(int)data].name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if(ComboBoxGetSelData(IDC_RENDERER, data))
|
||||
{
|
||||
theApp.SetConfig("Renderer", (int)data);
|
||||
|
@ -304,7 +269,7 @@ void GSSettingsDlg::UpdateAdapters()
|
|||
return;
|
||||
|
||||
const GSRendererType renderer = static_cast<GSRendererType>(data);
|
||||
const bool dx11 = renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::DX1011_SW || renderer == GSRendererType::DX1011_OpenCL;
|
||||
const bool dx11 = renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::DX1011_SW;
|
||||
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_ADAPTER), dx11);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_ADAPTER_TEXT), dx11);
|
||||
|
@ -345,12 +310,11 @@ void GSSettingsDlg::UpdateControls()
|
|||
{
|
||||
const GSRendererType renderer = static_cast<GSRendererType>(i);
|
||||
|
||||
const bool dx11 = renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::DX1011_SW || renderer == GSRendererType::DX1011_OpenCL;
|
||||
const bool ogl = renderer == GSRendererType::OGL_HW || renderer == GSRendererType::OGL_SW || renderer == GSRendererType::OGL_OpenCL;
|
||||
const bool dx11 = renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::DX1011_SW;
|
||||
const bool ogl = renderer == GSRendererType::OGL_HW || renderer == GSRendererType::OGL_SW;
|
||||
|
||||
const bool hw = renderer == GSRendererType::DX1011_HW || renderer == GSRendererType::OGL_HW;
|
||||
const bool sw = renderer == GSRendererType::DX1011_SW || renderer == GSRendererType::OGL_SW;
|
||||
const bool ocl = renderer == GSRendererType::DX1011_OpenCL || renderer == GSRendererType::OGL_OpenCL;
|
||||
const bool null = renderer == GSRendererType::Null;
|
||||
|
||||
const int sw_threads = SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_GETPOS, 0, 0);
|
||||
|
@ -360,12 +324,6 @@ void GSSettingsDlg::UpdateControls()
|
|||
ShowWindow(GetDlgItem(m_hWnd, IDC_NULL), null ? SW_SHOW : SW_HIDE);
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGOGL), ogl ? SW_SHOW : SW_HIDE);
|
||||
|
||||
#ifndef ENABLE_OPENCL
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_OPENCL_TEXT), SW_HIDE);
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_OPENCL_DEVICE), SW_HIDE);
|
||||
#endif
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OPENCL_TEXT), ocl);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_OPENCL_DEVICE), ocl);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_INTERLACE), !null);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_INTERLACE_TEXT), !null);
|
||||
EnableWindow(GetDlgItem(m_hWnd, IDC_FILTER), !null);
|
||||
|
|
|
@ -91,8 +91,6 @@ class GSSettingsDlg : public GSDialog
|
|||
std::vector<Adapter> *m_current_adapters;
|
||||
std::string m_last_selected_adapter_id;
|
||||
|
||||
std::vector<GSSetting> m_ocl_devs;
|
||||
|
||||
std::vector<Adapter> EnumerateD3D11Adapters();
|
||||
|
||||
void UpdateAdapters();
|
||||
|
|
|
@ -46,7 +46,3 @@
|
|||
#if defined(__unix__) && !(defined(_DEBUG) || defined(_DEVEL))
|
||||
#define DISABLE_PERF_MON // Burn cycle for nothing in release mode
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
//#define ENABLE_OPENCL
|
||||
#endif
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
<gresource prefix="/GSdx/res/">
|
||||
<file>glsl/tfx_fs.glsl</file>
|
||||
</gresource>
|
||||
<gresource prefix="/GSdx/res/">
|
||||
<file>tfx.cl</file>
|
||||
</gresource>
|
||||
<gresource prefix="/GSdx/res/">
|
||||
<file>fonts-roboto/Roboto-Regular.ttf</file>
|
||||
</gresource>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,11 +17,9 @@
|
|||
#define IDC_FILTER 2012
|
||||
#define IDC_INTERLACE_TEXT 2013
|
||||
#define IDC_INTERLACE 2014
|
||||
#define IDC_OPENCL_DEVICE 2015
|
||||
#define IDC_OPENCL_TEXT 2016
|
||||
#define IDC_HACKSBUTTON 2017
|
||||
#define IDC_OSDBUTTON 2018
|
||||
#define IDC_SHADEBUTTON 2019
|
||||
#define IDC_HACKSBUTTON 2015
|
||||
#define IDC_OSDBUTTON 2016
|
||||
#define IDC_SHADEBUTTON 2017
|
||||
// Hardware Renderer Settings:
|
||||
#define IDC_PALTEX 2030
|
||||
#define IDC_LARGE_FB 2031
|
||||
|
|
|
@ -51,14 +51,6 @@
|
|||
|
||||
#include <PluginCompatibility.h>
|
||||
|
||||
#ifdef ENABLE_OPENCL
|
||||
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#define __CL_ENABLE_EXCEPTIONS
|
||||
#include <CL/cl.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define _M_AMD64
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue