mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 18:28:35 +12:00
ThreadBase rewritten (wip)
This commit is contained in:
parent
b7a320fbbd
commit
3aefa2b4e1
85 changed files with 1960 additions and 2183 deletions
|
@ -119,35 +119,33 @@ void GLFragmentDecompilerThread::Task()
|
|||
}
|
||||
|
||||
GLFragmentProgram::GLFragmentProgram()
|
||||
: m_decompiler_thread(nullptr)
|
||||
, id(0)
|
||||
{
|
||||
}
|
||||
|
||||
GLFragmentProgram::~GLFragmentProgram()
|
||||
{
|
||||
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 GLFragmentProgram::Wait()
|
||||
{
|
||||
if (m_decompiler_thread && m_decompiler_thread->IsAlive())
|
||||
{
|
||||
m_decompiler_thread->Join();
|
||||
}
|
||||
}
|
||||
//void GLFragmentProgram::Wait()
|
||||
//{
|
||||
// if (m_decompiler_thread && m_decompiler_thread->IsAlive())
|
||||
// {
|
||||
// m_decompiler_thread->Join();
|
||||
// }
|
||||
//}
|
||||
|
||||
void GLFragmentProgram::Decompile(RSXFragmentProgram& prog)
|
||||
{
|
||||
|
@ -163,23 +161,23 @@ void GLFragmentProgram::Decompile(RSXFragmentProgram& prog)
|
|||
}
|
||||
}
|
||||
|
||||
void GLFragmentProgram::DecompileAsync(RSXFragmentProgram& 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 GLFragmentDecompilerThread(shader, parr, prog.addr, prog.size, prog.ctrl);
|
||||
m_decompiler_thread->Start();
|
||||
}
|
||||
//void GLFragmentProgram::DecompileAsync(RSXFragmentProgram& 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 GLFragmentDecompilerThread(shader, parr, prog.addr, prog.size, prog.ctrl);
|
||||
// m_decompiler_thread->Start();
|
||||
//}
|
||||
|
||||
void GLFragmentProgram::Compile()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue