You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The engine is lacking a good way of utilizing several threads. After the software rendering is optimized for single-threaded execution in part 3, it will switch to this job system so pixel shading, etc. can run 5-20x faster.
Off the top of my head, the job system needs a private thread pool and some kind of addJob(), isRunning(), and wait() functions. Maybe it could have a queue of std::function<void()> and worker threads would check if the queue is not empty. Later, wait() could take a category tag so it only waits for certain jobs to finish. Basically the job system exists so we don't have to use condition variables directly.
I am a bit shy of threading due to how easily bugs can show up, but the gains in the renderer and elsewhere would be massive.
The text was updated successfully, but these errors were encountered:
The engine is lacking a good way of utilizing several threads. After the software rendering is optimized for single-threaded execution in part 3, it will switch to this job system so pixel shading, etc. can run 5-20x faster.
Off the top of my head, the job system needs a private thread pool and some kind of
addJob()
,isRunning()
, andwait()
functions. Maybe it could have a queue ofstd::function<void()>
and worker threads would check if the queue is not empty. Later,wait()
could take a category tag so it only waits for certain jobs to finish. Basically the job system exists so we don't have to use condition variables directly.I am a bit shy of threading due to how easily bugs can show up, but the gains in the renderer and elsewhere would be massive.
The text was updated successfully, but these errors were encountered: