From c39c44801f1489f704a1aba14dd8fc76701864cf Mon Sep 17 00:00:00 2001 From: Josh Simmons Date: Sun, 12 May 2024 11:57:09 +0200 Subject: [PATCH] vulkan-sys: Add VkImageFormatListCreateInfo --- external/vulkan-sys/src/structs.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/external/vulkan-sys/src/structs.rs b/external/vulkan-sys/src/structs.rs index 7b36af6..08b8ec1 100644 --- a/external/vulkan-sys/src/structs.rs +++ b/external/vulkan-sys/src/structs.rs @@ -514,6 +514,23 @@ pub struct ImageFormatProperties { pub max_resource_size: DeviceSize, // max size (in bytes) of this resource type } +#[repr(C)] +pub struct ImageFormatListCreateInfo<'a> { + pub _type: StructureType, + pub _next: *const c_void, + pub view_formats: VulkanSlice1<'a, u32, Format, 4>, +} + +impl<'a> Default for ImageFormatListCreateInfo<'a> { + fn default() -> Self { + ImageFormatListCreateInfo { + _type: StructureType::ImageFormatListCreateInfo, + _next: core::ptr::null(), + view_formats: Default::default(), + } + } +} + #[repr(C)] #[derive(Copy, Clone)] pub struct SurfaceCapabilitiesKHR { @@ -3156,5 +3173,12 @@ mod test { release_swapchain_images_info.image_indices.ptr ))); } + + { + let image_format_list_create_info = ImageFormatListCreateInfo::default(); + assert!(is_aligned(addr_of!( + image_format_list_create_info.view_formats.ptr + ))); + } } } -- 2.49.0