]> git.nega.tv - josh/narcissus/commitdiff
Add missing default implementations
authorJoshua Simmons <josh@nega.tv>
Sat, 29 Oct 2022 14:07:34 +0000 (16:07 +0200)
committerJoshua Simmons <josh@nega.tv>
Sat, 29 Oct 2022 14:07:34 +0000 (16:07 +0200)
ffi/vulkan-sys/src/structs.rs

index 47e927dc8ca64fa378f2cdb79ef8d8d3802ac9b4..285f1f1cfd5040d887a29a3a4b357c6977d77ee9 100644 (file)
@@ -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::<Self>::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::<Self>::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::<Self>::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::<Self>::zeroed().assume_init() }
+    }
+}
+
 #[repr(C)]
 pub struct PipelineShaderStageCreateInfo<'a> {
     pub _type: StructureType,