mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
ThreadBase rewritten (wip)
This commit is contained in:
parent
b7a320fbbd
commit
3aefa2b4e1
85 changed files with 1960 additions and 2183 deletions
|
@ -131,35 +131,33 @@ void GLVertexDecompilerThread::Task()
|
|||
}
|
||||
|
||||
GLVertexProgram::GLVertexProgram()
|
||||
: m_decompiler_thread(nullptr)
|
||||
, id(0)
|
||||
{
|
||||
}
|
||||
|
||||
GLVertexProgram::~GLVertexProgram()
|
||||
{
|
||||
if (m_decompiler_thread)
|
||||
{
|
||||
Wait();
|
||||
if (m_decompiler_thread->IsAlive())
|
||||
{
|
||||
m_decompiler_thread->Stop();
|
||||
}
|
||||
//if (m_decompiler_thread)
|
||||
//{
|
||||
// Wait();
|
||||
// if (m_decompiler_thread->IsAlive())
|
||||
// {
|
||||
// m_decompiler_thread->Stop();
|
||||
// }
|
||||
|
||||
delete m_decompiler_thread;
|
||||
m_decompiler_thread = nullptr;
|
||||
}
|
||||
// delete m_decompiler_thread;
|
||||
// m_decompiler_thread = nullptr;
|
||||
//}
|
||||
|
||||
Delete();
|
||||
}
|
||||
|
||||
void GLVertexProgram::Wait()
|
||||
{
|
||||
if (m_decompiler_thread && m_decompiler_thread->IsAlive())
|
||||
{
|
||||
m_decompiler_thread->Join();
|
||||
}
|
||||
}
|
||||
//void GLVertexProgram::Wait()
|
||||
//{
|
||||
// if (m_decompiler_thread && m_decompiler_thread->IsAlive())
|
||||
// {
|
||||
// m_decompiler_thread->Join();
|
||||
// }
|
||||
//}
|
||||
|
||||
void GLVertexProgram::Decompile(RSXVertexProgram& prog)
|
||||
{
|
||||
|
@ -167,23 +165,23 @@ void GLVertexProgram::Decompile(RSXVertexProgram& prog)
|
|||
decompiler.Task();
|
||||
}
|
||||
|
||||
void GLVertexProgram::DecompileAsync(RSXVertexProgram& prog)
|
||||
{
|
||||
if (m_decompiler_thread)
|
||||
{
|
||||
Wait();
|
||||
if (m_decompiler_thread->IsAlive())
|
||||
{
|
||||
m_decompiler_thread->Stop();
|
||||
}
|
||||
|
||||
delete m_decompiler_thread;
|
||||
m_decompiler_thread = nullptr;
|
||||
}
|
||||
|
||||
m_decompiler_thread = new GLVertexDecompilerThread(prog.data, shader, parr);
|
||||
m_decompiler_thread->Start();
|
||||
}
|
||||
//void GLVertexProgram::DecompileAsync(RSXVertexProgram& prog)
|
||||
//{
|
||||
// if (m_decompiler_thread)
|
||||
// {
|
||||
// Wait();
|
||||
// if (m_decompiler_thread->IsAlive())
|
||||
// {
|
||||
// m_decompiler_thread->Stop();
|
||||
// }
|
||||
//
|
||||
// delete m_decompiler_thread;
|
||||
// m_decompiler_thread = nullptr;
|
||||
// }
|
||||
//
|
||||
// m_decompiler_thread = new GLVertexDecompilerThread(prog.data, shader, parr);
|
||||
// m_decompiler_thread->Start();
|
||||
//}
|
||||
|
||||
void GLVertexProgram::Compile()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue