引用:
作者cpp1231
DX11沒有這個問題因為根本不支援, DX11就是single-threaded的舊API
相比DX10對multi-thread最佳化其作法是讓每個thread錄製繪圖api的命令與參數
並轉成gpu可執行的byte code, 然後將錄製的command list送到主執行緒中去run
所以並非每個thread可以直接丟命令給gpu...
|
DX11有支援multithread喔
https://msdn.microsoft.com/en-us/library/windows/desktop/ff476892(v=vs.85).aspx
Deferred Rendering
Deferred rendering records graphics commands in a command buffer so that they can be played back at some other time. Use a deferred context to record commands (rendering as well as state setting) to a command list. Deferred rendering is a new concept in Direct3D 11; deferred rendering is designed to support rendering on one thread while recording commands for rendering on additional threads. This parallel, multithread strategy allows you to break up complex scenes into concurrent tasks. For more information about rendering complex scenes, see Multiple-Pass Rendering.
引用:
作者cpp1231
dx12 就是 AMD Mantle演化出來的, 當然Vulkan也是...
|
目前奇點也宣佈將支援Vulkan了。我等看支援Vulkan的奇點與Doom4的效能評比。dx12, dx11, Vulkan,nV及AMD
引用:
作者cpp1231
個人認為AMD的異步運算對開發者來說是友善的, 可以直接減少程式的複雜度, 不過實際上如何還是等產品出來再說
|
dx12及Vulkan應該都大幅度的加深了開發的複雜度,因為他們是low-level的api。
異步在近年來發現將工作重疊可以很有效的運用到多核心的CPU,只是暨有的API(dx11, OpenGL)都是包裝好的API,所以推出了low-level的api。
像OpenGL就有說並不會因為Vulkan的推出而終結,而仍然會持續開發下去。因為這兩個API的用法不同。
https://github.com/SaschaWillems/Vu...ure/texture.cpp
這是使用Vulkan上傳texture的程式碼...
相對比OpenGL只需要createTexture(...); glTexImage2D(...); 複雜太多...
也就是做所有事都要自己來