From 5597016058ea7797836c3457e1f2492f7d8cc17d Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Sat, 29 Oct 2022 16:07:34 +0200 Subject: [PATCH] Add missing default implementations --- ffi/vulkan-sys/src/structs.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/ffi/vulkan-sys/src/structs.rs b/ffi/vulkan-sys/src/structs.rs index 47e927d..285f1f1 100644 --- a/ffi/vulkan-sys/src/structs.rs +++ b/ffi/vulkan-sys/src/structs.rs @@ -1051,6 +1051,14 @@ pub struct DescriptorSetLayoutCreateInfo<'a> { pub bindings: VulkanSlice1<'a, u32, DescriptorSetLayoutBinding, 4>, } +impl<'a> Default for DescriptorSetLayoutCreateInfo<'a> { + fn default() -> Self { + let mut x = unsafe { MaybeUninit::::zeroed().assume_init() }; + x._type = StructureType::DescriptorSetLayoutCreateInfo; + x + } +} + #[repr(C)] #[derive(Copy, Clone)] pub struct DescriptorPoolSize { @@ -1067,6 +1075,14 @@ pub struct DescriptorPoolCreateInfo<'a> { pub pool_sizes: VulkanSlice1<'a, u32, DescriptorPoolSize, 0>, } +impl<'a> Default for DescriptorPoolCreateInfo<'a> { + fn default() -> Self { + let mut x = unsafe { MaybeUninit::::zeroed().assume_init() }; + x._type = StructureType::DescriptorPoolCreateInfo; + x + } +} + #[repr(C)] pub struct DescriptorSetAllocateInfo<'a> { pub _type: StructureType, @@ -1075,6 +1091,14 @@ pub struct DescriptorSetAllocateInfo<'a> { pub set_layouts: VulkanSlice1<'a, u32, DescriptorSetLayout, 4>, } +impl<'a> Default for DescriptorSetAllocateInfo<'a> { + fn default() -> Self { + let mut x = unsafe { MaybeUninit::::zeroed().assume_init() }; + x._type = StructureType::DescriptorSetAllocateInfo; + x + } +} + #[repr(C)] #[derive(Copy, Clone)] pub struct SpecializationMapEntry { @@ -1095,6 +1119,12 @@ pub struct SpecializationInfo<'a> { pub data: *const c_void, } +impl<'a> Default for SpecializationInfo<'a> { + fn default() -> Self { + unsafe { MaybeUninit::::zeroed().assume_init() } + } +} + #[repr(C)] pub struct PipelineShaderStageCreateInfo<'a> { pub _type: StructureType, -- 2.49.0