Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualHodgman

Posted 13 December 2012 - 11:44 PM

Multi-threading can be used to speed up almost anything that's bottlenecked by computation, assuming you've got the extra CPU cores to run those extra threads.

Take note though, D3D9 is a single-threaded API; you should always make all of your D3D9 calls from a single thread only.

This doesn't mean that you can't write a threaded D3D9 renderer though -- it just means that the part of your renderer that is responsible for "submission" (calling D3D draw functions, setting states, etc) has to belong to a particular thread.
You can use threads to accelerate all the other responsibilities of a renderer -- e.g. traversing a scene to collect renderable objects, culling objects that aren't visible, sorting objects into an optimal order, determining which states will need to be set for each object, generating queues of commands for the "submission" thread to process, etc...

#1Hodgman

Posted 13 December 2012 - 11:38 PM

Multi-threading can be used to speed up almost anything that's bottlenecked by computation, assuming you've got the extra CPU cores to run those extra threads.

Take note though, D3D9 is a single-threaded API; you should always make all of your D3D9 calls from a single thread only.

This doesn't mean that you can't write a threaded D3D9 renderer though -- it just means that the part of your renderer that is responsible for "submission" (calling D3D draw functions, setting states, etc) has to belong to a particular thread.
You can use other threads to accelerate all the other responsibilities of a renderer -- e.g. traversing a scene to collect renderable objects, culling objects that aren't visible, sorting objects into an optimal order, determining which states will need to be set for each object, etc...

PARTNERS