1     let max_extension_name_size : u32 = 256
2     let max_description_size : u32 = 256
3     
4     type ApplicationInfo = struct
5         type : StructureType
6         next : Ptr
7         application_name : CString
8         application_version : u32
9         engine_name : CString
10        engine_version : u32
11        api_version : u32
12    
13    type ExtensionProperties = struct
14        extension_name : [CChar; max_extension_name_size]
15        spec_version : u32
16    
17    type LayerProperties = struct
18        layer_name : [CChar; max_extension_name_size]
19        spec_version : u32
20        implementation_version : u32
21        description : [CChar; max_description_size]
22    
23    type Extent3D = struct
24        width : u32
25        height : u32
26        depth : u32
27    
28    type QueueFamilyProperties = struct
29        queue_flags : QueueFlags
30        queue_count : u32
31        timestamp_valid_bits : u32
32        min_image_transfer_granularity : Extent3D
33    
34    type Extent2D = struct
35        width : u32
36        height : u32
37    
38    type SurfaceCapabilitiesKhr = struct
39        min_image_count : u32
40        max_image_count : u32
41        current_extent : Extent2D
42        min_image_extent : Extent2D
43        max_image_extent : Extent2D
44        max_image_array_layers : u32
45        supported_transforms : SurfaceTransformFlagsKhr
46        current_transform : SurfaceTransformFlagsKhr
47        supported_composite_alpha : CompositeAlphaFlagsKhr
48        supported_usage_flags : ImageUsageFlags
49    
50    type SurfaceFormatKhr = struct
51        format : VkFormat
52        color_space : ColorSpaceKhr
53    
54    type ComponentMapping = struct
55        r : ComponentSwizzle
56        g : ComponentSwizzle
57        b : ComponentSwizzle
58        a : ComponentSwizzle
59    
60    type ImageSubresourceRange = struct
61        aspect_mask : ImageAspectFlags
62        base_mip_level : u32
63        level_count : u32
64        base_array_layer : u32
65        layer_count : u32
66    
67    type SpecializationMapEntry = struct
68        constant_id : u32
69        offset : u32
70        size : usize
71    
72    type SpecializationInfo = struct
73        map_entry_count : u32
74        map_entries : ptr SpecializationMapEntry
75        data_size : usize
76        data : Ptr
77    
78    type VertexInputBindingDescription = struct
79        binding : u32
80        stride : u32
81        input_rate : VertexInputRate
82    
83    type VertexInputAttributeDescription = struct
84        location : u32
85        binding : u32
86        format : VkFormat
87        offset : u32
88    
89    type Offset2D = struct
90        x : i32
91        y : i32
92    
93    type Offset3D = struct
94        x : i32
95        y : i32
96        z : i32
97    
98    type Rect2D = struct
99        offset : Offset2D
100       extent : Extent2D
101   
102   type StencilOpState = struct
103       fail_op : StencilOp
104       pass_op : StencilOp
105       depth_fail_op : StencilOp
106       compare_op : CompareOp
107       compare_mask : u32
108       write_mask : u32
109       reference : u32
110   
111   type PipelineColorBlendAttachmentState = struct
112       blend_enable : u32
113       src_color_blend_factor : BlendFactor
114       dst_color_blend_factor : BlendFactor
115       color_blend_op : BlendOp
116       src_alpha_blend_factor : BlendFactor
117       dst_alpha_blend_factor : BlendFactor
118       alpha_blend_op : BlendOp
119       color_write_mask : ColorComponentFlags
120   
121   type PushConstantRange = struct
122       stage_flags : ShaderStageFlags
123       offset : u32
124       size : u32
125   
126   type AttachmentDescription = struct
127       flags : AttachmentDescriptionFlags
128       format : VkFormat
129       samples : SampleCountFlags
130       load_op : AttachmentLoadOp
131       store_op : AttachmentStoreOp
132       stencil_load_op : AttachmentLoadOp
133       stencil_store_op : AttachmentStoreOp
134       initial_layout : ImageLayout
135       final_layout : ImageLayout
136   
137   type AttachmentReference = struct
138       attachment : u32
139       layout : ImageLayout
140   
141   type SubpassDescription = struct
142       flags : SubpassDescriptionFlags
143       pipeline_bind_point : PipelineBindPoint
144       input_attachment_count : u32
145       input_attachments : ptr AttachmentReference
146       color_attachment_count : u32
147       color_attachments : ptr AttachmentReference
148       resolve_attachments : ptr AttachmentReference
149       depth_stencil_attachment : ptr AttachmentReference
150       preserve_attachment_count : u32
151       preserve_attachments : ptr u32
152   
153   type SubpassDependency = struct
154       src_subpass : u32
155       dst_subpass : u32
156       src_stage_mask : PipelineStageFlags
157       dst_stage_mask : PipelineStageFlags
158       src_access_mask : AccessFlags
159       dst_access_mask : AccessFlags
160       dependency_flags : DependencyFlags
161   
162   type CommandBufferAllocateInfo = struct
163       type : StructureType
164       next : Ptr
165       command_pool : VkCommandPool
166       level : CommandBufferLevel
167       command_buffer_count : u32
168   
169   type CommandBufferInheritanceInfo = struct
170       type : StructureType
171       next : Ptr
172       render_pass : VkRenderPass
173       subpass : u32
174       framebuffer : VkFramebuffer
175       occlusion_query_enable : u32
176       query_flags : QueryControlFlags
177       pipeline_statistics : QueryPipelineStatisticFlags
178   
179   type CommandBufferBeginInfo = struct
180       type : StructureType
181       next : Ptr
182       flags : CommandBufferUsageFlags
183       inheritance_info : ptr CommandBufferInheritanceInfo
184   
185   type ClearColorValue = union
186       float32 : [f32; 4]
187       int32 : [i32; 4]
188       uint32 : [u32; 4]
189   
190   type ClearDepthStencilValue = struct
191       depth : f32
192       stencil : u32
193   
194   type ClearValue = union
195       color : ClearColorValue
196       depth_stencil : ClearDepthStencilValue
197   
198   type ClearRect = struct
199       rect : Rect2D
200       base_array_layer : u32
201       layer_count : u32
202   
203   type ClearAttachment = struct
204       aspect_mask : ImageAspectFlags
205       color_attachment : u32
206       clear_value : ClearValue
207   
208   type RenderPassBeginInfo = struct
209       type : StructureType
210       next : Ptr
211       render_pass : VkRenderPass
212       framebuffer : VkFramebuffer
213       render_area : Rect2D
214       clear_value_count : u32
215       clear_values : ptr ClearValue
216   
217   type SubmitInfo = struct
218       type : StructureType
219       next : Ptr
220       wait_semaphore_count : u32
221       wait_semaphores : ptr VkSemaphore
222       wait_dst_stage_mask : ptr PipelineStageFlags
223       command_buffer_count : u32
224       command_buffers : ptr VkCommandBuffer
225       signal_semaphore_count : u32
226       signal_semaphores : ptr VkSemaphore
227   
228   type PresentInfoKhr = struct
229       type : StructureType
230       next : Ptr
231       wait_semaphore_count : u32
232       wait_semaphores : ptr VkSemaphore
233       swapchain_count : u32
234       swapchains : ptr VkSwapchain
235       image_indices : ptr u32
236       results : mut ptr Result
237   
238   type MemoryRequirements = struct
239       size : u64
240       alignment : u64
241       memory_type_bits : u32
242   
243   type MemoryType = struct
244       property_flags : MemoryPropertyFlags
245       heap_index : u32
246   
247   type MemoryHeap = struct
248       size : u64
249       flags : MemoryHeapFlags
250   
251   type MemoryAllocateInfo = struct
252       type : StructureType
253       next : Ptr
254       allocation_size : u64
255       memory_type_index : u32
256   
257   type BufferCopy = struct
258       src_offset : u64
259       dst_offset : u64
260       size : u64
261   
262   type ImageMemoryBarrier = struct
263       type : StructureType
264       next : Ptr
265       src_access_mask : AccessFlags
266       dst_access_mask : AccessFlags
267       old_layout : ImageLayout
268       new_layout : ImageLayout
269       src_queue_family_index : u32
270       dst_queue_family_index : u32
271       image : VkImage
272       subresource_range : ImageSubresourceRange
273   
274   type ImageSubresourceLayers = struct
275       aspect_mask : ImageAspectFlags
276       mip_level : u32
277       base_array_layer : u32
278       layer_count : u32
279   
280   type ImageResolve = struct
281       src_subresource : ImageSubresourceLayers
282       src_offset : Offset3D
283       dst_subresource : ImageSubresourceLayers
284       dst_offset : Offset3D
285       extent : Extent3D
286   
287   type BufferImageCopy = struct
288       buffer_offset : u64
289       buffer_row_length : u32
290       buffer_image_height : u32
291       image_subresource : ImageSubresourceLayers
292       image_offset : Offset3D
293       image_extent : Extent3D
294   
295   type ImageCopy = struct
296       src_subresource : ImageSubresourceLayers
297       src_offset : Offset3D
298       dst_subresource : ImageSubresourceLayers
299       dst_offset : Offset3D
300       extent : Extent3D
301   
302   type FormatProperties = struct
303       linear_tiling_features : FormatFeatureFlags
304       optimal_tiling_features : FormatFeatureFlags
305       buffer_features : FormatFeatureFlags
306   
307   type ImageBlit = struct
308       src_subresource : ImageSubresourceLayers
309       src_offset1 : Offset3D
310       src_offset2 : Offset3D
311       dst_subresource : ImageSubresourceLayers
312       dst_offset1 : Offset3D
313       dst_offset2 : Offset3D
314   
315   type MemoryBarrier = struct
316       type : StructureType
317       next : Ptr
318       src_access_mask : AccessFlags
319       dst_access_mask : AccessFlags
320   
321   type BufferMemoryBarrier = struct
322       type : StructureType
323       next : Ptr
324       src_access_mask : AccessFlags
325       dst_access_mask : AccessFlags
326       src_queue_family_index : u32
327       dst_queue_family_index : u32
328       buffer : VkBuffer
329       offset : u64
330       size : u64
331