]> git.nega.tv - josh/narcissus/commitdiff
vulkan-sys: Add dedicated allocation structs
authorJoshua Simmons <josh@nega.tv>
Wed, 15 Mar 2023 21:57:30 +0000 (22:57 +0100)
committerJoshua Simmons <josh@nega.tv>
Wed, 15 Mar 2023 22:02:53 +0000 (23:02 +0100)
libs/ffi/vulkan-sys/src/structs.rs

index 10a4f8f21a136ecc1843612c491050187c0fbfef..3b539500eda21b9641c6795548f1b4a2c86d93d2 100644 (file)
@@ -370,6 +370,38 @@ pub struct MemoryHeap {
     pub flags: MemoryHeapFlags, // Flags for the heap
 }
 
+#[repr(C)]
+pub struct MemoryDedicatedRequirements {
+    pub _type: StructureType,
+    pub _next: *mut c_void,
+    pub prefers_dedicated_allocation: Bool32,
+    pub requires_dedicated_allocation: Bool32,
+}
+
+impl Default for MemoryDedicatedRequirements {
+    fn default() -> Self {
+        let mut x = unsafe { MaybeUninit::<Self>::zeroed().assume_init() };
+        x._type = StructureType::MemoryDedicatedRequirements;
+        x
+    }
+}
+
+#[repr(C)]
+pub struct MemoryDedicatedAllocateInfo {
+    pub _type: StructureType,
+    pub _next: *const c_void,
+    pub image: Image,
+    pub buffer: Buffer,
+}
+
+impl Default for MemoryDedicatedAllocateInfo {
+    fn default() -> Self {
+        let mut x = unsafe { MaybeUninit::<Self>::zeroed().assume_init() };
+        x._type = StructureType::MemoryDedicatedAllocateInfo;
+        x
+    }
+}
+
 #[repr(C)]
 pub struct SubmitInfo<'a> {
     pub _type: StructureType,