]> git.nega.tv - josh/narcissus/commitdiff
vulkan-sys: Add VkImageFormatListCreateInfo
authorJosh Simmons <josh@nega.tv>
Sun, 12 May 2024 09:57:09 +0000 (11:57 +0200)
committerJosh Simmons <josh@nega.tv>
Sun, 12 May 2024 09:57:09 +0000 (11:57 +0200)
external/vulkan-sys/src/structs.rs

index 7b36af63d7de92a37d152dd7590c790e0546d4d2..08b8ec190e43af5cd563ae4398b5b0bf84b8c761 100644 (file)
@@ -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
+            )));
+        }
     }
 }