mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-03 05:49:41 +03:00
materialsystem: threaded optimizations, fix mat_queue_mode on some android devices
This commit is contained in:
@@ -214,7 +214,11 @@ public:
|
||||
//-----------------------------------------------------
|
||||
virtual int YieldWait( CThreadEvent **pEvents, int nEvents, bool bWaitAll = true, unsigned timeout = TT_INFINITE );
|
||||
virtual int YieldWait( CJob **, int nJobs, bool bWaitAll = true, unsigned timeout = TT_INFINITE );
|
||||
void Yield( unsigned timeout );
|
||||
inline void Yield( unsigned timeout )
|
||||
{
|
||||
Assert( ThreadInMainThread() );
|
||||
ThreadSleep( timeout );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Add a native job to the queue (master thread)
|
||||
@@ -656,20 +660,6 @@ int CThreadPool::YieldWait( CJob **ppJobs, int nJobs, bool bWaitAll, unsigned ti
|
||||
return YieldWait( handles.Base(), handles.Count(), bWaitAll, timeout);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
||||
void CThreadPool::Yield( unsigned timeout )
|
||||
{
|
||||
// @MULTICORE (toml 10/24/2006): not implemented
|
||||
Assert( ThreadInMainThread() );
|
||||
if ( !ThreadInMainThread() )
|
||||
{
|
||||
ThreadSleep( timeout );
|
||||
return;
|
||||
}
|
||||
ThreadSleep( timeout );
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// Add a job to the queue
|
||||
//---------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user