DmitryKo
Veteran
It depends on the level of optimization in Direct3D 11.X, but fundamentally only one thread is allowed to issue draw calls .Is this guy saying that only 1 core is emitting draw calls on the XB1 right now ( or the GPU accepting only one source ) ?? I would think that the XB1 would have allowed a fair amount of flexibility already on the subject.
On the PC, Direct3D 11 allows free thread-safe multithreading for resource creation, but draw calls are not thread-safe - only one single rendering thread can directly interact with a D3D11 Device (i.e. the kernel mode driver) in the so-called "immediate context". However Direct3D 11 also allows additional rendering threads to run in a "deferred context" - these threads can issue draw calls and state changes and record them into "display lists", but in the end these "deferred" commands have to be executed in the "immediate" rendering context, which is not thread-safe - there is no parallel processing at this final stage and these lists have to be serialized.
There is a good explanatory article here http://code4k.blogspot.ru/2011/11/direct3d11-multithreading-micro.html
This was pretty much the same on XBox 360 - you had a 3-core 6-threaded CPU and a typical game would have a single rendering thread, a thread for game state updates and AI, then audio streaming, file decompression, procedural textures and geometry, etc. - whatever the developers could implement with simple per-frame sync, without using heavy-weight inter-process synchronization techniques which cause more problems than they resolve.
Direct3D 12, on the other hand, allows multiple rendering threads since [post=1836199]all rendering work is performed in the user-mode driver[/post] and only final presentation is handled in the main rendering thread which talks to the OS kernel. This is possible because draw calls and state changes are reorganized to be immutable (i.e. read-only), so they are inherently thread-safe and there is no need to use mutexes or locks. And any resource management is explicitly performed by the application, not by the kernel-mode driver that talks to the actual hardware, so there is no need to sync the device state between multiple rendering threads as well.
Code:
Times, ms Total GFX-only
D3D11 D3D12 D3D11 D3D12
Thread 0 7.88 3.80 5.73 1.17
Thread 1 3.08 2.50 0.35 0.81
Thread 2 2.84 2.46 0.34 0.69
Thread 3 2.63 2.45 0.23 0.65
Total 16.42 11.21 6.65 3.32
Last edited by a moderator: