Add DescriptorWrite for InputAttachments
This commit is contained in:
parent
fd351960a7
commit
a6004c0824
1 changed files with 21 additions and 0 deletions
|
@ -122,6 +122,27 @@ impl DescriptorWrite {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn input_attachments(binding: u32, images: &[&Arc<Image>]) -> Self {
|
||||
DescriptorWrite {
|
||||
binding,
|
||||
descriptor_type: VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT,
|
||||
inner: InnerWrite::Images(
|
||||
images
|
||||
.iter()
|
||||
.map(|image| VkDescriptorImageInfo {
|
||||
sampler: VkSampler::NULL_HANDLE,
|
||||
imageView: image.vk_handle(),
|
||||
imageLayout: image.image_layout(),
|
||||
})
|
||||
.collect(),
|
||||
),
|
||||
handles: images
|
||||
.iter()
|
||||
.map(|i| (*i).clone() as Arc<dyn Any + Send + Sync>)
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn acceleration_structures(
|
||||
binding: u32,
|
||||
acceleration_structures: &[&Arc<AccelerationStructure>],
|
||||
|
|
Loading…
Reference in a new issue