gsdx opencl: warning+compilation fixes

This commit is contained in:
Gregory Hainaut 2017-02-03 23:31:01 +01:00
parent c232f90d6e
commit ba91c8f0c2
2 changed files with 5 additions and 3 deletions

View File

@ -575,7 +575,7 @@ void GSRendererCL::Sync(int reason)
} }
#ifndef NDEBUG #ifndef NDEBUG
for(auto page_ref : m_rw_pages_rendering) for(const auto& page_ref : m_rw_pages_rendering)
ASSERT(page_ref == 0); ASSERT(page_ref == 0);
#endif #endif
@ -1776,7 +1776,7 @@ bool GSRendererCL::SetupParameter(TFXJob* job, TFXParameter* pb, GSVertexCL* ver
if(zwrite || ztest) if(zwrite || ztest)
{ {
sel.zpsm = RemapPSM(context->ZBUF.PSM); sel.zpsm = RemapPSM(context->ZBUF.PSM);
sel.ztst = ztest ? context->TEST.ZTST : ZTST_ALWAYS; sel.ztst = ztest ? context->TEST.ZTST : (int)ZTST_ALWAYS;
if(ztest) if(ztest)
{ {
@ -2058,7 +2058,7 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt)
for(auto b : binaries) for(auto b : binaries)
{ {
delete [] b.first; delete [] (char*)b.first;
} }
} }

View File

@ -164,8 +164,10 @@ void GSdxApp::Init()
#ifdef ENABLE_OPENCL #ifdef ENABLE_OPENCL
// OpenCL stuff goes last // OpenCL stuff goes last
// FIXME openCL isn't attached to a device (could be impacted by the window management stuff however) // 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::DX9_OpenCL), "Direct3D9", "OpenCL")); m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::DX9_OpenCL), "Direct3D9", "OpenCL"));
m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::DX1011_OpenCL), "Direct3D11", "OpenCL")); m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::DX1011_OpenCL), "Direct3D11", "OpenCL"));
#endif
m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::OGL_OpenCL), "OpenGL", "OpenCL")); m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::OGL_OpenCL), "OpenGL", "OpenCL"));
#endif #endif