Published: 7 September 2022
Vulkan is a low-overhead, cross-platform API, open standard for 3D graphics and computing that can run both on GPUs and CPUs. In this article, Jason Ekstrand describes the theoretical mental model for how Vulkan works, then goes on to highlight problems introduced by the real world and how they've been solved.
- State affects shader compilation
- States can be packed together, which becomes a problem when multiple, mostly unrelated, states are in the same command or MMIO register with no ability to set them separately
- Indirect state poses many of the same problems as combined states mentioned above only its worse because suddenly everything needs to be delayed until draw time
- Pipeline linking poses many of the same state problems
- To help drivers sort all this out, a common Vulkan graphics state tracking framework in Mesa was recently released which contains a set of structs for gathering graphics pipeline state as well as managing dynamic graphics state