Descriptor sets gather many resources (descriptors) in one object. They are later bound to a pipeline to establish an interface between our application and the shaders. But for the hardware to know what resources are grouped in a set, how many resources of each type there are, and what their order is, we need to create a descriptor set layout.
Creating a descriptor set layout
How to do it...
- Take the handle of a logical device and assign it to a variable of type VkDevice named logical_device.
- Create a vector variable with elements of type VkDescriptorSetLayoutBinding and call it bindings.
- For each resource you want to create and assign later to a given descriptor set, add an element to the bindings vector. Use the following values for members of each new element...