3 ms·
"To make the GPU concurrent so it can receive instructions on separate threads at the same time" has been one of the major reasons to use Vulkan instead of Open
by HelloNurse 6y ago
"To make the GPU concurrent so it can receive instructions on separate threads at the same time" has been one of the major reasons to use Vulkan instead of OpenGL since the beginning, it isn't only a wish.
Reducing dependencies and organizing scheduling of simulation and rendering tasks in order to perform useful work in parallel, both on the CPU and the GPU, remains challenging, but an important bottleneck has been lifted.
What horrible practices can introduce 10 frames of latency, besides generic slowness and gratuitous buffering?
- bullen 6y agoI don't think you can send instructions on multiple cores at the same time with Vulkan, if so why is it so hard to find examples of it?
- HelloNurse 6y agoYou can both build command buffers simultaneously (example by Sascha Willems: https://github.com/SaschaWillems/Vulkan/blob/master/examples/multithreading/multithreading.cpp https://github.com/SaschaWillems/Vulkan/blob/master/examples...) and submit unrelated command buffers to different queues simultaneously. Using multiple queues is not difficult, just somewhat rare: there should never be so many command submissions that parallelization matters for quantitative performance reasons, it's a niche for unusually independent and/or asynchronous tasks.
- bullen 6y agoBut I have to use commandbuffers right? I prefer direct/forward rendering... I wish you could do that directly to the GPU with multiple cores... I heard you "can" do that with OpenGL... but I don't think it accepts more than one context simoultaneously.
- TheFlash 6y agoThere is no such thing as direct rendering, commands are always buffered by the driver before being sent to the gpu. (and Forward rendering as in the rendering technique ?) With Vulkan/Dx12 you can record multiple command buffers in parallel. That is not possible in OpenGl/Dx11 (There are 'deferred contexts' that let you do things in parallel but it's really not great). By 'multiple cores on the GPU', I think you mean the hardware queues ? Usually there are 3 (on PCIe discrete GPUs, that is) a graphics queue to record any commands, a compute queue for compute tasks, and a copy queue for DMA copies across the PCIe bus. I don't know if you can access them independently on older APIs, but on Vulkan/dx12 you certainly can.