15 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
17 .dstBinding = binding,
19 .descriptorCount = 1u,
20 .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
31 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
33 .dstBinding = binding,
35 .descriptorCount = 1u,
36 .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
47 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
49 .dstBinding = binding,
51 .descriptorCount = 1u,
52 .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
63 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
65 .dstBinding = binding,
67 .descriptorCount = 1u,
68 .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
78 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
80 .dstBinding = binding,
82 .descriptorCount =
static_cast<uint32_t
>(imageInfos->size()),
83 .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
84 .pImageInfo = imageInfos->data(),
85 .pBufferInfo =
nullptr,
95 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
97 .dstBinding = binding,
99 .descriptorCount = 1u,
100 .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
110 .sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
112 .dstBinding = binding,
113 .dstArrayElement = 0,
114 .descriptorCount = 1u,
115 .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
129 .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
130 .descriptorCount = 1u,
131 .stageFlags = stageFlags,
137 VkShaderStageFlags stageFlags) {
140 .descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
141 .descriptorCount = 1u,
142 .stageFlags = stageFlags,
148 VkShaderStageFlags stageFlags) {
151 .descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
152 .descriptorCount = 1u,
153 .stageFlags = stageFlags,
159 VkShaderStageFlags stageFlags) {
162 .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
163 .descriptorCount = 1u,
164 .stageFlags = stageFlags,
170 uint32_t count, VkShaderStageFlags stageFlags) {
173 .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
174 .descriptorCount = count,
175 .stageFlags = stageFlags,
std::vector< VkDescriptorSetLayoutBinding > build()
DescriptorSetLayoutBuilder & addStorageBuffer(uint32_t binding, VkShaderStageFlags stageFlags)
DescriptorSetLayoutBuilder & addCombinedImageSampler(uint32_t binding, VkShaderStageFlags stageFlags)
DescriptorSetLayoutBuilder & addUniformBuffer(uint32_t binding, VkShaderStageFlags stageFlags)
DescriptorSetLayoutBuilder()
DescriptorSetLayoutBuilder & addStorageImageArray(uint32_t binding, uint32_t count, VkShaderStageFlags stageFlags)
DescriptorSetLayoutBuilder & addStorageImage(uint32_t binding, VkShaderStageFlags stageFlags)
std::vector< VkDescriptorSetLayoutBinding > layoutBindings
void update(VkDevice device) const
Updates the bindings on a descriptor sets.
std::deque< VkDescriptorBufferInfo > bufferInfoStorage
DescriptorSetUpdater(VkDescriptorSet dstSet)
std::vector< VkWriteDescriptorSet > writeDescriptorSets
DescriptorSetUpdater & addCombinedImageSampler(uint32_t binding, const VkDescriptorImageInfo *pImageInfo)
Adds a combined image sampler to the chain of updates.
DescriptorSetUpdater & addUniformBuffer(uint32_t binding, const VkDescriptorBufferInfo *pBufferInfo)
Adds a uniform buffer (glsl std140 buffer) to the chain of updates to execute.
std::deque< VkDescriptorImageInfo > imageInfoStorage
DescriptorSetUpdater & addStorageBuffer(uint32_t binding, const VkDescriptorBufferInfo *pBufferInfo)
Adds a storage buffer (glsl std430 buffer) to the chain of updates to execute.
DescriptorSetUpdater & addTextureArrayIf(const bool condition, uint32_t binding, std::vector< VkDescriptorImageInfo > *imageInfos)
Adds updates to texture array.
DescriptorSetUpdater & addStorageImage(uint32_t binding, const VkDescriptorImageInfo *pImageInfo)
Adds a storage image to the chain of updates.
Log category system implementation.