MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ update_input_attachment()

void MayaFlux::Core::VKDescriptorManager::update_input_attachment ( vk::Device  device,
vk::DescriptorSet  set,
uint32_t  binding,
vk::ImageView  image_view,
vk::ImageLayout  layout = vk::ImageLayout::eShaderReadOnlyOptimal 
)

Update descriptor set with input attachment.

Parameters
deviceLogical device
setDescriptor set to update
bindingBinding index
image_viewImage view to bind
layoutImage layout (must be eShaderReadOnlyOptimal or eGeneral)

For reading from attachments in the same render pass (subpass inputs).

Definition at line 474 of file VKDescriptorManager.cpp.

480{
481 if (!set) {
483 "Cannot update null descriptor set");
484 return;
485 }
486
487 if (!image_view) {
489 "Cannot bind null image view to input attachment");
490 return;
491 }
492
493 vk::DescriptorImageInfo image_info;
494 image_info.imageView = image_view;
495 image_info.sampler = nullptr;
496 image_info.imageLayout = layout;
497
498 vk::WriteDescriptorSet write;
499 write.dstSet = set;
500 write.dstBinding = binding;
501 write.dstArrayElement = 0;
502 write.descriptorCount = 1;
503 write.descriptorType = vk::DescriptorType::eInputAttachment;
504 write.pImageInfo = &image_info;
505
506 device.updateDescriptorSets(1, &write, 0, nullptr);
507
509 "Updated descriptor set binding {} with input attachment", binding);
510}
#define MF_ERROR(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::GraphicsBackend, MF_DEBUG, and MF_ERROR.