diff --git a/Changelog.md b/Changelog.md index b065419..2a9fe58 100644 --- a/Changelog.md +++ b/Changelog.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `VK_NV_low_latency2` device extension (#802) - Added `VK_EXT_hdr_metadata` device extension (#804) - Added `VK_NV_cuda_kernel_launch` device extension (#805) +- Added `descriptor_count()` setter on `ash::vk::WriteDescriptorSet` (#809) ### Changed diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index 6646a52..d9f9dc5 100644 --- a/ash/src/vk/definitions.rs +++ b/ash/src/vk/definitions.rs @@ -1835,6 +1835,11 @@ impl<'a> WriteDescriptorSet<'a> { self } #[inline] + pub fn descriptor_count(mut self, descriptor_count: u32) -> Self { + self.descriptor_count = descriptor_count; + self + } + #[inline] pub fn descriptor_type(mut self, descriptor_type: DescriptorType) -> Self { self.descriptor_type = descriptor_type; self diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 3cc8ad8..5eb3bfb 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -1893,6 +1893,9 @@ fn derive_setters( ("VkDescriptorSetLayoutBinding", "descriptorCount"), // No ImageView attachments when VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT is set ("VkFramebufferCreateInfo", "attachmentCount"), + // descriptorCount also describes descriptor length in pNext extension structures + // https://github.com/ash-rs/ash/issues/806 + ("VkWriteDescriptorSet", "descriptorCount"), ]; let skip_members = members .iter()