mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-27 08:15:33 +01:00
Fix crash when stopping and starting a game with OpenCL enabled
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5047 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
df1be33ba9
commit
c63446827f
@ -180,6 +180,10 @@ void Destroy()
|
|||||||
return;
|
return;
|
||||||
clReleaseCommandQueue(g_cmdq);
|
clReleaseCommandQueue(g_cmdq);
|
||||||
clReleaseContext(g_context);
|
clReleaseContext(g_context);
|
||||||
|
g_context = NULL;
|
||||||
|
g_cmdq = NULL;
|
||||||
|
|
||||||
|
g_bInitialized = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -394,8 +394,8 @@ void OpcodeDecoder_Init()
|
|||||||
void OpcodeDecoder_Shutdown()
|
void OpcodeDecoder_Shutdown()
|
||||||
{
|
{
|
||||||
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
#if defined(HAVE_OPENCL) && HAVE_OPENCL
|
||||||
OpenCL::Destroy();
|
|
||||||
TexDecoder_OpenCL_Shutdown();
|
TexDecoder_OpenCL_Shutdown();
|
||||||
|
OpenCL::Destroy();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,11 +99,14 @@ void TexDecoder_OpenCL_Shutdown() {
|
|||||||
clReleaseKernel(Decoders[i].kernel);
|
clReleaseKernel(Decoders[i].kernel);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_clsrc)
|
if(g_clsrc)
|
||||||
clReleaseMemObject(g_clsrc);
|
clReleaseMemObject(g_clsrc);
|
||||||
|
|
||||||
if(g_cldst)
|
if(g_cldst)
|
||||||
clReleaseMemObject(g_cldst);
|
clReleaseMemObject(g_cldst);
|
||||||
|
|
||||||
|
g_Inited = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user