From cf84efeeb0824e28e91f456c043a37a9537b4eea Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Wed, 15 Mar 2023 22:57:30 +0100 Subject: [PATCH] vulkan-sys: Add dedicated allocation structs --- libs/ffi/vulkan-sys/src/structs.rs | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/libs/ffi/vulkan-sys/src/structs.rs b/libs/ffi/vulkan-sys/src/structs.rs index 10a4f8f..3b53950 100644 --- a/libs/ffi/vulkan-sys/src/structs.rs +++ b/libs/ffi/vulkan-sys/src/structs.rs @@ -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::::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::::zeroed().assume_init() }; + x._type = StructureType::MemoryDedicatedAllocateInfo; + x + } +} + #[repr(C)] pub struct SubmitInfo<'a> { pub _type: StructureType, -- 2.49.0