Quote:Original post by bvanevery
Quote:Original post by Pyrogame
The other point is: FPS is an old value. It is ok for single threaded games. But for multi-threading, this only shows you how many frames the graphics device can render a scene.
There is no readout for "CPU load" in the MultiThreadedRendering11 demo. This is unfortunate as it would be useful diagnostic information. That's part of why I asked if anyone had code that demonstrates an actual benefit.
My current engine runs a test scene on a single HT (Hardware Thread) with ~80 FPS with 16% global CPU-load. If I enable all the 8 threads, then this boosts the engine to ~3k FPS with near to 50% global CPU-load. Because the CPU uses Hyprethreading, the 50% is a very good value. With only 2 HT's enabled on different cores, I get 2.5k FPS with 24% load.
Ofcourse my engine does not render only things, but it calculates some other stuff (zero-gravity w/o collision detection physics, no AI). It renders a GUI, which renders the world on a window. The entire engine is based on a job manager, which creates at least 4 job workers (for example on a single HT). If the system has more then 4 HT's, more job workers will be created. Then all the work is done by jobs. If the engine want to calculate something, a job is created an in realtime attached to a job worker. Every camera (which is the world camera, gui camera, shadow camera, etc.) has its own rendering job. Each job can have a state machine, which can pause the calculation, if the job has dependency to another job. Because of this, I do not have any job or thread, that is called "the main renderer". All the rendering jobs can use the immediate context to calculate their prepared deffered contexts. But you have to synchronize your device to do this, because the device itself has not a real multithreding API (the device driver itself blocks the calls, so you get an exception, but not a self destructing graphics card ^^).
DX11 delivers the support for multithreading meaning the deffered contexts, that is in my opinion a very nice feature.