Fragment decompiler change to async mode

This commit is contained in:
raven02 2014-06-01 14:41:57 +08:00
parent da2c5bbda0
commit ceeff8ae81
4 changed files with 26 additions and 20 deletions

View file

@ -466,15 +466,25 @@ GLVertexProgram::~GLVertexProgram()
Delete();
}
void GLVertexProgram::Wait()
{
if(m_decompiler_thread && m_decompiler_thread->IsAlive())
{
m_decompiler_thread->Join();
}
}
void GLVertexProgram::Decompile(RSXVertexProgram& prog)
{
#if 0
GLVertexDecompilerThread(data, shader, parr).Entry();
#else
if(m_decompiler_thread)
GLVertexDecompilerThread(prog.data, shader, parr);
}
void GLVertexProgram::DecompileAsync(RSXVertexProgram& prog)
{
if (m_decompiler_thread)
{
Wait();
if(m_decompiler_thread->IsAlive())
if (m_decompiler_thread->IsAlive())
{
m_decompiler_thread->Stop();
}
@ -485,7 +495,6 @@ void GLVertexProgram::Decompile(RSXVertexProgram& prog)
m_decompiler_thread = new GLVertexDecompilerThread(prog.data, shader, parr);
m_decompiler_thread->Start();
#endif
}
void GLVertexProgram::Compile()