Descriptors in Vulkan: Pools, Sets, Buffers, and suffering
I’m currently learning Vulkan by following the (excellent!) Vulkan Guide. Vulkan has a notoriously steep learning curve, coming not only from the explicit and verbose nature of the API but also from the fact that most existing Vulkan resources assume prior knowledge of 3D graphics programming - of which I have none :)
One aspect of Vulkan that I found especially confusing upon first encounter was the concept of descriptors. There are seemingly several different ways to do things; the Vulkan Guide uses “bindful” descriptor sets, while most people nowadays recommend using something called “bindless”; there’s a new way using “Descriptor Buffers,” and something called “Buffer Device Address” thrown in there that doesn’t appear to replace descriptors but can be used alongside them. You will find different tutorials and resources using different approaches depending on when they were written, the opinions of the author, the phase of the moon, and other parameters. This post is an attempt to consolidate everything that I’ve learned so far not just about which method to use, but the motivation and rationale behind each one and how everything actually works under the hood.