From: Josh Simmons Date: Sun, 12 May 2024 09:57:09 +0000 (+0200) Subject: vulkan-sys: Add VkImageFormatListCreateInfo X-Git-Url: https://git.nega.tv//gitweb.cgi?a=commitdiff_plain;h=c39c44801f1489f704a1aba14dd8fc76701864cf;p=josh%2Fnarcissus vulkan-sys: Add VkImageFormatListCreateInfo --- 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 + ))); + } } }