Update this descriptor set.
Instance a VkWriteDescriptorSet.
Update DescriptorSet.
Instance a VkWriteDescriptorSet.
Update DescriptorSet.
312 {
314
316 {
320 VkWriteDescriptorSet write{};
321 write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
322 write.dstBinding = pair.first;
324 write.descriptorType = pair.second.descriptorType;
325
326 switch(write.descriptorType)
327 {
328 case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
329 case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:
330 case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:
331 write.pImageInfo = imageInfo[pair.first].data();
332 write.descriptorCount = static_cast<uint32_t>(imageInfo[pair.first].size());
333 break;
334 case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
335 case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:
336 write.pBufferInfo = &bufferInfo[pair.first];
337 write.descriptorCount = 1;
338 break;
339 case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR:
340 VkWriteDescriptorSetAccelerationStructureKHR descASInfo {};
341 descASInfo.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR;
342 descASInfo.accelerationStructureCount = 1;
343 descASInfo.pAccelerationStructures = &accel;
344
345 write.pNext = &descASInfo;
346 write.descriptorCount = 1;
347 break;
348 }
349
354 }
355 }
#define SPICES_PROFILE_ZONE
std::unordered_map< uint32_t, VkDescriptorSetLayoutBinding > m_Bindings
The bindings this descriptor set in use.
VkDescriptorSet m_DescriptorSet
The VkDescriptorSet this class handled.
VulkanState & m_VulkanState
The global VulkanState Referenced from VulkanRenderBackend.