Unlocking Multi-Threading
In this chapter, we will talk about adding multi-threading to the Raptor Engine.
This requires both a big change in the underlying architecture and some Vulkan-specific changes and synchronization work so that the different cores of the CPU and the GPU can cooperate in the most correct and the fastest way.
Multi-threading rendering is a topic covered many times over the years and a feature that most game engines have needed since the era of multi-core architectures exploded. Consoles such as the PlayStation 2 and the Sega Saturn already offered multi-threading support, and later generations continued the trend by providing an increasing number of cores that developers could take advantage of.
The first trace of multi-threading rendering in a game engine is as far back as 2008 when Christer Ericson wrote a blog post (https://realtimecollisiondetection.net/blog/?p=86) and showed that it was possible to parallelize and optimize the generation of commands...