Hi,
I’m learning Vulkan and have a question about layout modifier "set = ".
In my vertex shader, I do need to have 3 uniform buffers, like:
layout(std140, set = 0, binding = 0) uniform uniformBufferA
{
fields go here ...
};
layout(std140, set = 1, binding = 0) uniform uniformBufferB
{
fields go here ...
};
layout(std140, set = 3, binding = 0) uniform uniformBufferC
{
fields go here ...
};
I have three uniform buffers (I do have my reason not to use a single buffer with different bindings, this is not my question). I use “set = 0”, “set = 1” and “set = 2” to assign descriptor No to them.
My question is that how can I reflect this sequence in my source code to properly assign buffer data to them by “vkUpdateDescriptorSets()”? What are function arguments exactly reflect the descriptor set’s No. when I create descriptor set layout, descriptor set, or pipeline?
Most of Vulkan samples tend to use a single descriptor set to contain multiple descriptors at different bindings (like model-view-proj mat at binding 0, image sampler at binding 1, …). I can not find answer easily.
Appreciated for any suggestions.