1#![allow(non_camel_case_types)]
2#![allow(non_snake_case)]
3#![allow(dead_code)]
4
5#[macro_use]
6extern crate bitflags;
7extern crate libc;
8extern crate shared_library;
9
10#[cfg(windows)]
11static VULKAN_LIBRARY: &'static str = "vulkan-1.dll";
12
13#[cfg(unix)]
14static VULKAN_LIBRARY: &'static str = "libvulkan-1.so";
15
16macro_rules! load_command {
18 ($commands:expr,$instance:expr,$name:expr) => (
19 {
20 let fn_ptr = ($commands.vkGetInstanceProcAddr.as_ref().unwrap())($instance, CString::new($name).unwrap().as_ptr());
21 try!(
22 if fn_ptr != ::std::ptr::null() {
23 Ok(fn_ptr)
24 } else {
25 Err(format!("Failed to load {}",$name))
26 })
27 }
28 );
29}
30
31macro_rules! invoke_command {
33 ($commands:expr,$command:ident,$($x:ident),*) => {
34 {
35 if let Some($command) = $commands.$command.as_ref() {
36 $command($($x,)*)
37 } else {
38 panic!(concat!("Command not loaded: ", stringify!($command)));
39 }
40 }
41 }
42}
43
44macro_rules! reserved_bitflags {
46 ($(#[$attr:meta])* pub flags $BitFlags:ident: $T:ty;) => {
47 #[derive(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
48 $(#[$attr])*
49 pub struct $BitFlags {
50 bits: $T,
51 }
52
53 impl $BitFlags {
54 #[inline]
56 pub fn empty() -> $BitFlags {
57 $BitFlags { bits: 0 }
58 }
59 }
60 }
61}
62
63#[macro_use]
64pub mod core {
65 use ::libc::{c_void, c_char, uint32_t, size_t, uint64_t, c_float, int32_t, uint8_t};
66 use ::shared_library::dynamic_library::DynamicLibrary;
67 use ::std::path::{Path};
68 use ::std::ffi::CString;
69 use ::std::mem::transmute;
70 use ::VULKAN_LIBRARY;
71
72 #[macro_export]
73 macro_rules! VK_MAKE_VERSION {
74 ($major:expr, $minor:expr, $patch:expr) => ((($major) << 22) | (($minor) << 12) | ($patch));
75 }
76
77 pub const VK_API_VERSION_1_0: uint32_t = VK_MAKE_VERSION!(1,0,0);
78
79 #[macro_export]
80 macro_rules! VK_VERSION_MAJOR {
81 ($version:expr) => ($version >> 22);
82 }
83
84 #[macro_export]
85 macro_rules! VK_VERSION_MINOR {
86 ($version:expr) => (($version >> 12) & 0x3ff);
87 }
88
89 #[macro_export]
90 macro_rules! VK_VERSION_PATCH {
91 ($version:expr) => ($version & 0xfff);
92 }
93
94 #[macro_export]
95 macro_rules! VK_DEFINE_NON_DISPATCHABLE_HANDLE {
96 ($name:ident) => (
97 #[derive(Clone)]
98 #[derive(Copy)]
99 #[repr(C)]
100 pub struct $name(uint64_t);
101 impl $name {
102 pub fn null() -> $name {
103 $name(0)
104 }
105 pub fn is_null(&self) -> bool {
106 self.0 == 0
107 }
108 }
109 );
110 }
111
112 #[macro_export]
113 macro_rules! VK_DEFINE_HANDLE {
114 ($name:ident) => (
115 #[derive(Clone)]
116 #[derive(Copy)]
117 #[repr(C)]
118 pub struct $name(*const c_void);
119 impl $name {
120 pub fn null() -> $name {
121 $name(::std::ptr::null())
122 }
123 pub fn is_null(&self) -> bool {
124 self.0 == ::std::ptr::null()
125 }
126 }
127 );
128 }
129
130 pub type VkFlags = uint32_t;
131 pub type VkBool32 = uint32_t;
132 pub type VkDeviceSize = uint64_t;
133 pub type VkSampleMask = uint32_t;
134
135 VK_DEFINE_HANDLE!(VkInstance);
136 VK_DEFINE_HANDLE!(VkPhysicalDevice);
137 VK_DEFINE_HANDLE!(VkDevice);
138 VK_DEFINE_HANDLE!(VkQueue);
139 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkSemaphore);
140 VK_DEFINE_HANDLE!(VkCommandBuffer);
141 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkFence);
142 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkDeviceMemory);
143 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkBuffer);
144 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkImage);
145 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkEvent);
146 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkQueryPool);
147 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkBufferView);
148 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkImageView);
149 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkShaderModule);
150 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkPipelineCache);
151 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkPipelineLayout);
152 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkRenderPass);
153 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkPipeline);
154 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkDescriptorSetLayout);
155 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkSampler);
156 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkDescriptorPool);
157 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkDescriptorSet);
158 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkFramebuffer);
159 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkCommandPool);
160
161 pub const VK_LOD_CLAMP_NONE:c_float = 1000.0f32;
162 pub const VK_REMAINING_MIP_LEVELS:uint32_t = !0x0u32;
163 pub const VK_REMAINING_ARRAY_LAYERS:uint32_t = !0x0u32;
164 pub const VK_WHOLE_SIZE:uint64_t = !0x0u64;
165 pub const VK_ATTACHMENT_UNUSED:uint32_t = !0x0u32;
166 pub const VK_TRUE:uint32_t = 1u32;
167 pub const VK_FALSE:uint32_t = 0u32;
168 pub const VK_QUEUE_FAMILY_IGNORED:uint32_t = !0x0u32;
169 pub const VK_SUBPASS_EXTERNAL:uint32_t = !0x0u32;
170 pub const VK_MAX_PHYSICAL_DEVICE_NAME_SIZE:size_t = 256usize;
171 pub const VK_UUID_SIZE:size_t = 16usize;
172 pub const VK_MAX_MEMORY_TYPES:size_t = 32usize;
173 pub const VK_MAX_MEMORY_HEAPS:size_t = 16usize;
174 pub const VK_MAX_EXTENSION_NAME_SIZE:size_t = 256usize;
175 pub const VK_MAX_DESCRIPTION_SIZE:size_t = 256usize;
176
177 #[repr(u32)]
178 #[derive(Eq)]
179 #[derive(PartialEq)]
180 #[derive(Debug)]
181 #[derive(Copy)]
182 #[derive(Clone)]
183 pub enum VkPipelineCacheHeaderVersion {
184 VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1
185 }
186
187 #[repr(i32)]
188 #[derive(Eq)]
189 #[derive(PartialEq)]
190 #[derive(Debug)]
191 #[derive(Copy)]
192 #[derive(Clone)]
193 pub enum VkResult {
194 VK_SUCCESS = 0,
195 VK_NOT_READY = 1,
196 VK_TIMEOUT = 2,
197 VK_EVENT_SET = 3,
198 VK_EVENT_RESET = 4,
199 VK_INCOMPLETE = 5,
200 VK_ERROR_OUT_OF_HOST_MEMORY = -1,
201 VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
202 VK_ERROR_INITIALIZATION_FAILED = -3,
203 VK_ERROR_DEVICE_LOST = -4,
204 VK_ERROR_MEMORY_MAP_FAILED = -5,
205 VK_ERROR_LAYER_NOT_PRESENT = -6,
206 VK_ERROR_EXTENSION_NOT_PRESENT = -7,
207 VK_ERROR_FEATURE_NOT_PRESENT = -8,
208 VK_ERROR_INCOMPATIBLE_DRIVER = -9,
209 VK_ERROR_TOO_MANY_OBJECTS = -10,
210 VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
211 VK_ERROR_SURFACE_LOST_KHR = -1000000000,
212 VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
213 VK_SUBOPTIMAL_KHR = 1000001003,
214 VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
215 VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
216 VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
217 VK_ERROR_INVALID_SHADER_NV = -1000012000
218 }
219
220 #[repr(u32)]
221 #[derive(Eq)]
222 #[derive(PartialEq)]
223 #[derive(Debug)]
224 #[derive(Copy)]
225 #[derive(Clone)]
226 pub enum VkStructureType {
227 VK_STRUCTURE_TYPE_APPLICATION_INFO = 0,
228 VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1,
229 VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2,
230 VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3,
231 VK_STRUCTURE_TYPE_SUBMIT_INFO = 4,
232 VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5,
233 VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6,
234 VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7,
235 VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8,
236 VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9,
237 VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10,
238 VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11,
239 VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12,
240 VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13,
241 VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14,
242 VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15,
243 VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16,
244 VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17,
245 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18,
246 VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19,
247 VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20,
248 VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21,
249 VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22,
250 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23,
251 VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24,
252 VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25,
253 VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26,
254 VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27,
255 VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28,
256 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29,
257 VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30,
258 VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31,
259 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32,
260 VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33,
261 VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34,
262 VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35,
263 VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36,
264 VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37,
265 VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38,
266 VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39,
267 VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40,
268 VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41,
269 VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42,
270 VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43,
271 VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44,
272 VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45,
273 VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
274 VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
275 VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
276 VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
277 VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001,
278 VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000,
279 VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001,
280 VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000,
281 VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
282 VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
283 VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
284 VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
285 VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
286 VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
287 VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
288 VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
289 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
290 VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
291 VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002
292 }
293
294 #[repr(u32)]
295 #[derive(Eq)]
296 #[derive(PartialEq)]
297 #[derive(Debug)]
298 #[derive(Copy)]
299 #[derive(Clone)]
300 pub enum VkSystemAllocationScope {
301 VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0,
302 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1,
303 VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2,
304 VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3,
305 VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4
306 }
307
308 #[repr(u32)]
309 #[derive(Eq)]
310 #[derive(PartialEq)]
311 #[derive(Debug)]
312 #[derive(Copy)]
313 #[derive(Clone)]
314 pub enum VkInternalAllocationType {
315 VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0
316 }
317
318 #[repr(u32)]
319 #[derive(Eq)]
320 #[derive(PartialEq)]
321 #[derive(Debug)]
322 #[derive(Copy)]
323 #[derive(Clone)]
324 pub enum VkFormat {
325 VK_FORMAT_UNDEFINED = 0,
326 VK_FORMAT_R4G4_UNORM_PACK8 = 1,
327 VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2,
328 VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3,
329 VK_FORMAT_R5G6B5_UNORM_PACK16 = 4,
330 VK_FORMAT_B5G6R5_UNORM_PACK16 = 5,
331 VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6,
332 VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7,
333 VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8,
334 VK_FORMAT_R8_UNORM = 9,
335 VK_FORMAT_R8_SNORM = 10,
336 VK_FORMAT_R8_USCALED = 11,
337 VK_FORMAT_R8_SSCALED = 12,
338 VK_FORMAT_R8_UINT = 13,
339 VK_FORMAT_R8_SINT = 14,
340 VK_FORMAT_R8_SRGB = 15,
341 VK_FORMAT_R8G8_UNORM = 16,
342 VK_FORMAT_R8G8_SNORM = 17,
343 VK_FORMAT_R8G8_USCALED = 18,
344 VK_FORMAT_R8G8_SSCALED = 19,
345 VK_FORMAT_R8G8_UINT = 20,
346 VK_FORMAT_R8G8_SINT = 21,
347 VK_FORMAT_R8G8_SRGB = 22,
348 VK_FORMAT_R8G8B8_UNORM = 23,
349 VK_FORMAT_R8G8B8_SNORM = 24,
350 VK_FORMAT_R8G8B8_USCALED = 25,
351 VK_FORMAT_R8G8B8_SSCALED = 26,
352 VK_FORMAT_R8G8B8_UINT = 27,
353 VK_FORMAT_R8G8B8_SINT = 28,
354 VK_FORMAT_R8G8B8_SRGB = 29,
355 VK_FORMAT_B8G8R8_UNORM = 30,
356 VK_FORMAT_B8G8R8_SNORM = 31,
357 VK_FORMAT_B8G8R8_USCALED = 32,
358 VK_FORMAT_B8G8R8_SSCALED = 33,
359 VK_FORMAT_B8G8R8_UINT = 34,
360 VK_FORMAT_B8G8R8_SINT = 35,
361 VK_FORMAT_B8G8R8_SRGB = 36,
362 VK_FORMAT_R8G8B8A8_UNORM = 37,
363 VK_FORMAT_R8G8B8A8_SNORM = 38,
364 VK_FORMAT_R8G8B8A8_USCALED = 39,
365 VK_FORMAT_R8G8B8A8_SSCALED = 40,
366 VK_FORMAT_R8G8B8A8_UINT = 41,
367 VK_FORMAT_R8G8B8A8_SINT = 42,
368 VK_FORMAT_R8G8B8A8_SRGB = 43,
369 VK_FORMAT_B8G8R8A8_UNORM = 44,
370 VK_FORMAT_B8G8R8A8_SNORM = 45,
371 VK_FORMAT_B8G8R8A8_USCALED = 46,
372 VK_FORMAT_B8G8R8A8_SSCALED = 47,
373 VK_FORMAT_B8G8R8A8_UINT = 48,
374 VK_FORMAT_B8G8R8A8_SINT = 49,
375 VK_FORMAT_B8G8R8A8_SRGB = 50,
376 VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51,
377 VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52,
378 VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53,
379 VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54,
380 VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55,
381 VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56,
382 VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57,
383 VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58,
384 VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59,
385 VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60,
386 VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61,
387 VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62,
388 VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63,
389 VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64,
390 VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65,
391 VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66,
392 VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67,
393 VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68,
394 VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69,
395 VK_FORMAT_R16_UNORM = 70,
396 VK_FORMAT_R16_SNORM = 71,
397 VK_FORMAT_R16_USCALED = 72,
398 VK_FORMAT_R16_SSCALED = 73,
399 VK_FORMAT_R16_UINT = 74,
400 VK_FORMAT_R16_SINT = 75,
401 VK_FORMAT_R16_SFLOAT = 76,
402 VK_FORMAT_R16G16_UNORM = 77,
403 VK_FORMAT_R16G16_SNORM = 78,
404 VK_FORMAT_R16G16_USCALED = 79,
405 VK_FORMAT_R16G16_SSCALED = 80,
406 VK_FORMAT_R16G16_UINT = 81,
407 VK_FORMAT_R16G16_SINT = 82,
408 VK_FORMAT_R16G16_SFLOAT = 83,
409 VK_FORMAT_R16G16B16_UNORM = 84,
410 VK_FORMAT_R16G16B16_SNORM = 85,
411 VK_FORMAT_R16G16B16_USCALED = 86,
412 VK_FORMAT_R16G16B16_SSCALED = 87,
413 VK_FORMAT_R16G16B16_UINT = 88,
414 VK_FORMAT_R16G16B16_SINT = 89,
415 VK_FORMAT_R16G16B16_SFLOAT = 90,
416 VK_FORMAT_R16G16B16A16_UNORM = 91,
417 VK_FORMAT_R16G16B16A16_SNORM = 92,
418 VK_FORMAT_R16G16B16A16_USCALED = 93,
419 VK_FORMAT_R16G16B16A16_SSCALED = 94,
420 VK_FORMAT_R16G16B16A16_UINT = 95,
421 VK_FORMAT_R16G16B16A16_SINT = 96,
422 VK_FORMAT_R16G16B16A16_SFLOAT = 97,
423 VK_FORMAT_R32_UINT = 98,
424 VK_FORMAT_R32_SINT = 99,
425 VK_FORMAT_R32_SFLOAT = 100,
426 VK_FORMAT_R32G32_UINT = 101,
427 VK_FORMAT_R32G32_SINT = 102,
428 VK_FORMAT_R32G32_SFLOAT = 103,
429 VK_FORMAT_R32G32B32_UINT = 104,
430 VK_FORMAT_R32G32B32_SINT = 105,
431 VK_FORMAT_R32G32B32_SFLOAT = 106,
432 VK_FORMAT_R32G32B32A32_UINT = 107,
433 VK_FORMAT_R32G32B32A32_SINT = 108,
434 VK_FORMAT_R32G32B32A32_SFLOAT = 109,
435 VK_FORMAT_R64_UINT = 110,
436 VK_FORMAT_R64_SINT = 111,
437 VK_FORMAT_R64_SFLOAT = 112,
438 VK_FORMAT_R64G64_UINT = 113,
439 VK_FORMAT_R64G64_SINT = 114,
440 VK_FORMAT_R64G64_SFLOAT = 115,
441 VK_FORMAT_R64G64B64_UINT = 116,
442 VK_FORMAT_R64G64B64_SINT = 117,
443 VK_FORMAT_R64G64B64_SFLOAT = 118,
444 VK_FORMAT_R64G64B64A64_UINT = 119,
445 VK_FORMAT_R64G64B64A64_SINT = 120,
446 VK_FORMAT_R64G64B64A64_SFLOAT = 121,
447 VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122,
448 VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123,
449 VK_FORMAT_D16_UNORM = 124,
450 VK_FORMAT_X8_D24_UNORM_PACK32 = 125,
451 VK_FORMAT_D32_SFLOAT = 126,
452 VK_FORMAT_S8_UINT = 127,
453 VK_FORMAT_D16_UNORM_S8_UINT = 128,
454 VK_FORMAT_D24_UNORM_S8_UINT = 129,
455 VK_FORMAT_D32_SFLOAT_S8_UINT = 130,
456 VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131,
457 VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132,
458 VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133,
459 VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134,
460 VK_FORMAT_BC2_UNORM_BLOCK = 135,
461 VK_FORMAT_BC2_SRGB_BLOCK = 136,
462 VK_FORMAT_BC3_UNORM_BLOCK = 137,
463 VK_FORMAT_BC3_SRGB_BLOCK = 138,
464 VK_FORMAT_BC4_UNORM_BLOCK = 139,
465 VK_FORMAT_BC4_SNORM_BLOCK = 140,
466 VK_FORMAT_BC5_UNORM_BLOCK = 141,
467 VK_FORMAT_BC5_SNORM_BLOCK = 142,
468 VK_FORMAT_BC6H_UFLOAT_BLOCK = 143,
469 VK_FORMAT_BC6H_SFLOAT_BLOCK = 144,
470 VK_FORMAT_BC7_UNORM_BLOCK = 145,
471 VK_FORMAT_BC7_SRGB_BLOCK = 146,
472 VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147,
473 VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148,
474 VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149,
475 VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150,
476 VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151,
477 VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152,
478 VK_FORMAT_EAC_R11_UNORM_BLOCK = 153,
479 VK_FORMAT_EAC_R11_SNORM_BLOCK = 154,
480 VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155,
481 VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156,
482 VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157,
483 VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158,
484 VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159,
485 VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160,
486 VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161,
487 VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162,
488 VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163,
489 VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164,
490 VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165,
491 VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166,
492 VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167,
493 VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168,
494 VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169,
495 VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170,
496 VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171,
497 VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172,
498 VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173,
499 VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174,
500 VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175,
501 VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176,
502 VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177,
503 VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178,
504 VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179,
505 VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180,
506 VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181,
507 VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182,
508 VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183,
509 VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184
510 }
511
512 #[repr(u32)]
513 #[derive(Eq)]
514 #[derive(PartialEq)]
515 #[derive(Debug)]
516 #[derive(Copy)]
517 #[derive(Clone)]
518 pub enum VkImageType {
519 VK_IMAGE_TYPE_1D = 0,
520 VK_IMAGE_TYPE_2D = 1,
521 VK_IMAGE_TYPE_3D = 2
522 }
523
524 #[repr(u32)]
525 #[derive(Eq)]
526 #[derive(PartialEq)]
527 #[derive(Debug)]
528 #[derive(Copy)]
529 #[derive(Clone)]
530 pub enum VkImageTiling {
531 VK_IMAGE_TILING_OPTIMAL = 0,
532 VK_IMAGE_TILING_LINEAR = 1
533 }
534
535 #[repr(u32)]
536 #[derive(Eq)]
537 #[derive(PartialEq)]
538 #[derive(Debug)]
539 #[derive(Copy)]
540 #[derive(Clone)]
541 pub enum VkPhysicalDeviceType {
542 VK_PHYSICAL_DEVICE_TYPE_OTHER = 0,
543 VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1,
544 VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2,
545 VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3,
546 VK_PHYSICAL_DEVICE_TYPE_CPU = 4
547 }
548
549 #[repr(u32)]
550 #[derive(Eq)]
551 #[derive(PartialEq)]
552 #[derive(Debug)]
553 #[derive(Copy)]
554 #[derive(Clone)]
555 pub enum VkQueryType {
556 VK_QUERY_TYPE_OCCLUSION = 0,
557 VK_QUERY_TYPE_PIPELINE_STATISTICS = 1,
558 VK_QUERY_TYPE_TIMESTAMP = 2
559 }
560
561 #[repr(u32)]
562 #[derive(Eq)]
563 #[derive(PartialEq)]
564 #[derive(Debug)]
565 #[derive(Copy)]
566 #[derive(Clone)]
567 pub enum VkSharingMode {
568 VK_SHARING_MODE_EXCLUSIVE = 0,
569 VK_SHARING_MODE_CONCURRENT = 1
570 }
571
572 #[repr(u32)]
573 #[derive(Eq)]
574 #[derive(PartialEq)]
575 #[derive(Debug)]
576 #[derive(Copy)]
577 #[derive(Clone)]
578 pub enum VkImageLayout {
579 VK_IMAGE_LAYOUT_UNDEFINED = 0,
580 VK_IMAGE_LAYOUT_GENERAL = 1,
581 VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2,
582 VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3,
583 VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4,
584 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5,
585 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6,
586 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7,
587 VK_IMAGE_LAYOUT_PREINITIALIZED = 8,
588 VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002
589 }
590
591 #[repr(u32)]
592 #[derive(Eq)]
593 #[derive(PartialEq)]
594 #[derive(Debug)]
595 #[derive(Copy)]
596 #[derive(Clone)]
597 pub enum VkImageViewType {
598 VK_IMAGE_VIEW_TYPE_1D = 0,
599 VK_IMAGE_VIEW_TYPE_2D = 1,
600 VK_IMAGE_VIEW_TYPE_3D = 2,
601 VK_IMAGE_VIEW_TYPE_CUBE = 3,
602 VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4,
603 VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5,
604 VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6
605 }
606
607 #[repr(u32)]
608 #[derive(Eq)]
609 #[derive(PartialEq)]
610 #[derive(Debug)]
611 #[derive(Copy)]
612 #[derive(Clone)]
613 pub enum VkComponentSwizzle {
614 VK_COMPONENT_SWIZZLE_IDENTITY = 0,
615 VK_COMPONENT_SWIZZLE_ZERO = 1,
616 VK_COMPONENT_SWIZZLE_ONE = 2,
617 VK_COMPONENT_SWIZZLE_R = 3,
618 VK_COMPONENT_SWIZZLE_G = 4,
619 VK_COMPONENT_SWIZZLE_B = 5,
620 VK_COMPONENT_SWIZZLE_A = 6
621 }
622
623 #[repr(u32)]
624 #[derive(Eq)]
625 #[derive(PartialEq)]
626 #[derive(Debug)]
627 #[derive(Copy)]
628 #[derive(Clone)]
629 pub enum VkVertexInputRate {
630 VK_VERTEX_INPUT_RATE_VERTEX = 0,
631 VK_VERTEX_INPUT_RATE_INSTANCE = 1
632 }
633
634 #[repr(u32)]
635 #[derive(Eq)]
636 #[derive(PartialEq)]
637 #[derive(Debug)]
638 #[derive(Copy)]
639 #[derive(Clone)]
640 pub enum VkPrimitiveTopology {
641 VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0,
642 VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1,
643 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2,
644 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3,
645 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4,
646 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5,
647 VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6,
648 VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7,
649 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8,
650 VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9,
651 VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10
652 }
653
654 #[repr(u32)]
655 #[derive(Eq)]
656 #[derive(PartialEq)]
657 #[derive(Debug)]
658 #[derive(Copy)]
659 #[derive(Clone)]
660 pub enum VkPolygonMode {
661 VK_POLYGON_MODE_FILL = 0,
662 VK_POLYGON_MODE_LINE = 1,
663 VK_POLYGON_MODE_POINT = 2
664 }
665
666 #[repr(u32)]
667 #[derive(Eq)]
668 #[derive(PartialEq)]
669 #[derive(Debug)]
670 #[derive(Copy)]
671 #[derive(Clone)]
672 pub enum VkFrontFace {
673 VK_FRONT_FACE_COUNTER_CLOCKWISE = 0,
674 VK_FRONT_FACE_CLOCKWISE = 1
675 }
676
677 #[repr(u32)]
678 #[derive(Eq)]
679 #[derive(PartialEq)]
680 #[derive(Debug)]
681 #[derive(Copy)]
682 #[derive(Clone)]
683 pub enum VkCompareOp {
684 VK_COMPARE_OP_NEVER = 0,
685 VK_COMPARE_OP_LESS = 1,
686 VK_COMPARE_OP_EQUAL = 2,
687 VK_COMPARE_OP_LESS_OR_EQUAL = 3,
688 VK_COMPARE_OP_GREATER = 4,
689 VK_COMPARE_OP_NOT_EQUAL = 5,
690 VK_COMPARE_OP_GREATER_OR_EQUAL = 6,
691 VK_COMPARE_OP_ALWAYS = 7
692 }
693
694 #[repr(u32)]
695 #[derive(Eq)]
696 #[derive(PartialEq)]
697 #[derive(Debug)]
698 #[derive(Copy)]
699 #[derive(Clone)]
700 pub enum VkStencilOp {
701 VK_STENCIL_OP_KEEP = 0,
702 VK_STENCIL_OP_ZERO = 1,
703 VK_STENCIL_OP_REPLACE = 2,
704 VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3,
705 VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4,
706 VK_STENCIL_OP_INVERT = 5,
707 VK_STENCIL_OP_INCREMENT_AND_WRAP = 6,
708 VK_STENCIL_OP_DECREMENT_AND_WRAP = 7
709 }
710
711 #[repr(u32)]
712 #[derive(Eq)]
713 #[derive(PartialEq)]
714 #[derive(Debug)]
715 #[derive(Copy)]
716 #[derive(Clone)]
717 pub enum VkLogicOp {
718 VK_LOGIC_OP_CLEAR = 0,
719 VK_LOGIC_OP_AND = 1,
720 VK_LOGIC_OP_AND_REVERSE = 2,
721 VK_LOGIC_OP_COPY = 3,
722 VK_LOGIC_OP_AND_INVERTED = 4,
723 VK_LOGIC_OP_NO_OP = 5,
724 VK_LOGIC_OP_XOR = 6,
725 VK_LOGIC_OP_OR = 7,
726 VK_LOGIC_OP_NOR = 8,
727 VK_LOGIC_OP_EQUIVALENT = 9,
728 VK_LOGIC_OP_INVERT = 10,
729 VK_LOGIC_OP_OR_REVERSE = 11,
730 VK_LOGIC_OP_COPY_INVERTED = 12,
731 VK_LOGIC_OP_OR_INVERTED = 13,
732 VK_LOGIC_OP_NAND = 14,
733 VK_LOGIC_OP_SET = 15
734 }
735
736 #[repr(u32)]
737 #[derive(Eq)]
738 #[derive(PartialEq)]
739 #[derive(Debug)]
740 #[derive(Copy)]
741 #[derive(Clone)]
742 pub enum VkBlendFactor {
743 VK_BLEND_FACTOR_ZERO = 0,
744 VK_BLEND_FACTOR_ONE = 1,
745 VK_BLEND_FACTOR_SRC_COLOR = 2,
746 VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3,
747 VK_BLEND_FACTOR_DST_COLOR = 4,
748 VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5,
749 VK_BLEND_FACTOR_SRC_ALPHA = 6,
750 VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7,
751 VK_BLEND_FACTOR_DST_ALPHA = 8,
752 VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9,
753 VK_BLEND_FACTOR_CONSTANT_COLOR = 10,
754 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11,
755 VK_BLEND_FACTOR_CONSTANT_ALPHA = 12,
756 VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13,
757 VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14,
758 VK_BLEND_FACTOR_SRC1_COLOR = 15,
759 VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16,
760 VK_BLEND_FACTOR_SRC1_ALPHA = 17,
761 VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18
762 }
763
764 #[repr(u32)]
765 #[derive(Eq)]
766 #[derive(PartialEq)]
767 #[derive(Debug)]
768 #[derive(Copy)]
769 #[derive(Clone)]
770 pub enum VkBlendOp {
771 VK_BLEND_OP_ADD = 0,
772 VK_BLEND_OP_SUBTRACT = 1,
773 VK_BLEND_OP_REVERSE_SUBTRACT = 2,
774 VK_BLEND_OP_MIN = 3,
775 VK_BLEND_OP_MAX = 4
776 }
777
778 #[repr(u32)]
779 #[derive(Eq)]
780 #[derive(PartialEq)]
781 #[derive(Debug)]
782 #[derive(Copy)]
783 #[derive(Clone)]
784 pub enum VkDynamicState {
785 VK_DYNAMIC_STATE_VIEWPORT = 0,
786 VK_DYNAMIC_STATE_SCISSOR = 1,
787 VK_DYNAMIC_STATE_LINE_WIDTH = 2,
788 VK_DYNAMIC_STATE_DEPTH_BIAS = 3,
789 VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4,
790 VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5,
791 VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6,
792 VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7,
793 VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8
794 }
795
796 #[repr(u32)]
797 #[derive(Eq)]
798 #[derive(PartialEq)]
799 #[derive(Debug)]
800 #[derive(Copy)]
801 #[derive(Clone)]
802 pub enum VkFilter {
803 VK_FILTER_NEAREST = 0,
804 VK_FILTER_LINEAR = 1,
805 VK_FILTER_CUBIC_IMG = 1000015000
806 }
807
808 #[repr(u32)]
809 #[derive(Eq)]
810 #[derive(PartialEq)]
811 #[derive(Debug)]
812 #[derive(Copy)]
813 #[derive(Clone)]
814 pub enum VkSamplerMipmapMode {
815 VK_SAMPLER_MIPMAP_MODE_NEAREST = 0,
816 VK_SAMPLER_MIPMAP_MODE_LINEAR = 1
817 }
818
819 #[repr(u32)]
820 #[derive(Eq)]
821 #[derive(PartialEq)]
822 #[derive(Debug)]
823 #[derive(Copy)]
824 #[derive(Clone)]
825 pub enum VkSamplerAddressMode {
826 VK_SAMPLER_ADDRESS_MODE_REPEAT = 0,
827 VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1,
828 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2,
829 VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3,
830 VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4
831 }
832
833 #[repr(u32)]
834 #[derive(Eq)]
835 #[derive(PartialEq)]
836 #[derive(Debug)]
837 #[derive(Copy)]
838 #[derive(Clone)]
839 pub enum VkBorderColor {
840 VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
841 VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1,
842 VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2,
843 VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3,
844 VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4,
845 VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5
846 }
847
848 #[repr(u32)]
849 #[derive(Eq)]
850 #[derive(PartialEq)]
851 #[derive(Debug)]
852 #[derive(Copy)]
853 #[derive(Clone)]
854 pub enum VkDescriptorType {
855 VK_DESCRIPTOR_TYPE_SAMPLER = 0,
856 VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1,
857 VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2,
858 VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3,
859 VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4,
860 VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5,
861 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6,
862 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7,
863 VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8,
864 VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9,
865 VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10
866 }
867
868 #[repr(u32)]
869 #[derive(Eq)]
870 #[derive(PartialEq)]
871 #[derive(Debug)]
872 #[derive(Copy)]
873 #[derive(Clone)]
874 pub enum VkAttachmentLoadOp {
875 VK_ATTACHMENT_LOAD_OP_LOAD = 0,
876 VK_ATTACHMENT_LOAD_OP_CLEAR = 1,
877 VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2
878 }
879
880 #[repr(u32)]
881 #[derive(Eq)]
882 #[derive(PartialEq)]
883 #[derive(Debug)]
884 #[derive(Copy)]
885 #[derive(Clone)]
886 pub enum VkAttachmentStoreOp {
887 VK_ATTACHMENT_STORE_OP_STORE = 0,
888 VK_ATTACHMENT_STORE_OP_DONT_CARE = 1
889 }
890
891 #[repr(u32)]
892 #[derive(Eq)]
893 #[derive(PartialEq)]
894 #[derive(Debug)]
895 #[derive(Copy)]
896 #[derive(Clone)]
897 pub enum VkPipelineBindPoint {
898 VK_PIPELINE_BIND_POINT_GRAPHICS = 0,
899 VK_PIPELINE_BIND_POINT_COMPUTE = 1
900 }
901
902 #[repr(u32)]
903 #[derive(Eq)]
904 #[derive(PartialEq)]
905 #[derive(Debug)]
906 #[derive(Copy)]
907 #[derive(Clone)]
908 pub enum VkCommandBufferLevel {
909 VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0,
910 VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1
911 }
912
913 #[repr(u32)]
914 #[derive(Eq)]
915 #[derive(PartialEq)]
916 #[derive(Debug)]
917 #[derive(Copy)]
918 #[derive(Clone)]
919 pub enum VkIndexType {
920 VK_INDEX_TYPE_UINT16 = 0,
921 VK_INDEX_TYPE_UINT32 = 1
922 }
923
924 #[repr(u32)]
925 #[derive(Eq)]
926 #[derive(PartialEq)]
927 #[derive(Debug)]
928 #[derive(Copy)]
929 #[derive(Clone)]
930 pub enum VkSubpassContents {
931 VK_SUBPASS_CONTENTS_INLINE = 0,
932 VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1
933 }
934
935 reserved_bitflags! {
936 pub flags VkInstanceCreateFlags: VkFlags;
937 }
938
939 bitflags! {
940 pub flags VkFormatFeatureFlags: VkFlags {
941 const VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001,
942 const VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002,
943 const VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004,
944 const VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008,
945 const VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010,
946 const VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020,
947 const VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040,
948 const VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080,
949 const VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100,
950 const VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200,
951 const VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400,
952 const VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800,
953 const VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000,
954 const VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000
955 }
956 }
957
958 bitflags! {
959 pub flags VkImageUsageFlags: VkFlags {
960 const VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001,
961 const VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002,
962 const VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004,
963 const VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008,
964 const VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010,
965 const VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020,
966 const VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040,
967 const VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080
968 }
969 }
970
971 bitflags! {
972 pub flags VkImageCreateFlags: VkFlags {
973 const VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001,
974 const VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
975 const VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004,
976 const VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008,
977 const VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010
978 }
979 }
980
981 bitflags! {
982 pub flags VkSampleCountFlags: VkFlags {
983 const VK_SAMPLE_COUNT_1_BIT = 0x00000001,
984 const VK_SAMPLE_COUNT_2_BIT = 0x00000002,
985 const VK_SAMPLE_COUNT_4_BIT = 0x00000004,
986 const VK_SAMPLE_COUNT_8_BIT = 0x00000008,
987 const VK_SAMPLE_COUNT_16_BIT = 0x00000010,
988 const VK_SAMPLE_COUNT_32_BIT = 0x00000020,
989 const VK_SAMPLE_COUNT_64_BIT = 0x00000040
990 }
991 }
992
993 bitflags! {
994 pub flags VkQueueFlags: VkFlags {
995 const VK_QUEUE_GRAPHICS_BIT = 0x00000001,
996 const VK_QUEUE_COMPUTE_BIT = 0x00000002,
997 const VK_QUEUE_TRANSFER_BIT = 0x00000004,
998 const VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008
999 }
1000 }
1001
1002 bitflags! {
1003 pub flags VkMemoryPropertyFlags: VkFlags {
1004 const VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001,
1005 const VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002,
1006 const VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004,
1007 const VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008,
1008 const VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010
1009 }
1010 }
1011
1012 bitflags! {
1013 pub flags VkMemoryHeapFlags: VkFlags {
1014 const VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001
1015 }
1016 }
1017
1018 reserved_bitflags! {
1019 pub flags VkDeviceCreateFlags: VkFlags;
1020 }
1021
1022 reserved_bitflags! {
1023 pub flags VkDeviceQueueCreateFlags: VkFlags;
1024 }
1025
1026 bitflags! {
1027 pub flags VkPipelineStageFlags: VkFlags {
1028 const VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001,
1029 const VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002,
1030 const VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004,
1031 const VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008,
1032 const VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010,
1033 const VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020,
1034 const VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040,
1035 const VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080,
1036 const VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100,
1037 const VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200,
1038 const VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400,
1039 const VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800,
1040 const VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000,
1041 const VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000,
1042 const VK_PIPELINE_STAGE_HOST_BIT = 0x00004000,
1043 const VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000,
1044 const VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000
1045 }
1046 }
1047
1048 reserved_bitflags! {
1049 pub flags VkMemoryMapFlags: VkFlags;
1050 }
1051
1052 bitflags! {
1053 pub flags VkImageAspectFlags: VkFlags {
1054 const VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001,
1055 const VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002,
1056 const VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004,
1057 const VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008
1058 }
1059 }
1060
1061 bitflags! {
1062 pub flags VkSparseImageFormatFlags: VkFlags {
1063 const VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001,
1064 const VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002,
1065 const VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004
1066 }
1067 }
1068
1069 bitflags! {
1070 pub flags VkSparseMemoryBindFlags: VkFlags {
1071 const VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001
1072 }
1073 }
1074
1075 bitflags! {
1076 pub flags VkFenceCreateFlags: VkFlags {
1077 const VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001
1078 }
1079 }
1080
1081 reserved_bitflags! {
1082 pub flags VkSemaphoreCreateFlags: VkFlags;
1083 }
1084 reserved_bitflags! {
1085 pub flags VkEventCreateFlags: VkFlags;
1086 }
1087 reserved_bitflags! {
1088 pub flags VkQueryPoolCreateFlags: VkFlags;
1089 }
1090
1091 bitflags! {
1092 pub flags VkQueryPipelineStatisticFlags: VkFlags {
1093 const VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001,
1094 const VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002,
1095 const VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004,
1096 const VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008,
1097 const VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010,
1098 const VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020,
1099 const VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040,
1100 const VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080,
1101 const VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100,
1102 const VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200,
1103 const VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400
1104 }
1105 }
1106
1107 bitflags! {
1108 pub flags VkQueryResultFlags: VkFlags {
1109 const VK_QUERY_RESULT_64_BIT = 0x00000001,
1110 const VK_QUERY_RESULT_WAIT_BIT = 0x00000002,
1111 const VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004,
1112 const VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008
1113 }
1114 }
1115
1116 bitflags! {
1117 pub flags VkBufferCreateFlags: VkFlags {
1118 const VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001,
1119 const VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002,
1120 const VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004
1121 }
1122 }
1123
1124 bitflags! {
1125 pub flags VkBufferUsageFlags: VkFlags {
1126 const VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001,
1127 const VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002,
1128 const VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
1129 const VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008,
1130 const VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010,
1131 const VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020,
1132 const VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040,
1133 const VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080,
1134 const VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100
1135 }
1136 }
1137
1138 reserved_bitflags! {
1139 pub flags VkBufferViewCreateFlags: VkFlags;
1140 }
1141 reserved_bitflags! {
1142 pub flags VkImageViewCreateFlags: VkFlags;
1143 }
1144 reserved_bitflags! {
1145 pub flags VkShaderModuleCreateFlags: VkFlags;
1146 }
1147 reserved_bitflags! {
1148 pub flags VkPipelineCacheCreateFlags: VkFlags;
1149 }
1150
1151 bitflags! {
1152 pub flags VkPipelineCreateFlags: VkFlags {
1153 const VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001,
1154 const VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002,
1155 const VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004
1156 }
1157 }
1158
1159 reserved_bitflags! {
1160 pub flags VkPipelineShaderStageCreateFlags: VkFlags;
1161 }
1162
1163 bitflags! {
1164 pub flags VkShaderStageFlags: VkFlags {
1165 const VK_SHADER_STAGE_VERTEX_BIT = 0x00000001,
1166 const VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002,
1167 const VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004,
1168 const VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008,
1169 const VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010,
1170 const VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020,
1171 const VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F,
1172 const VK_SHADER_STAGE_ALL = 0x7FFFFFFF
1173 }
1174 }
1175
1176 reserved_bitflags! {
1177 pub flags VkPipelineVertexInputStateCreateFlags: VkFlags;
1178 }
1179 reserved_bitflags! {
1180 pub flags VkPipelineInputAssemblyStateCreateFlags: VkFlags;
1181 }
1182 reserved_bitflags! {
1183 pub flags VkPipelineTessellationStateCreateFlags: VkFlags;
1184 }
1185 reserved_bitflags! {
1186 pub flags VkPipelineViewportStateCreateFlags: VkFlags;
1187 }
1188 reserved_bitflags! {
1189 pub flags VkPipelineRasterizationStateCreateFlags: VkFlags;
1190 }
1191
1192 bitflags! {
1193 pub flags VkCullModeFlags: VkFlags {
1194 const VK_CULL_MODE_NONE = 0,
1195 const VK_CULL_MODE_FRONT_BIT = 0x00000001,
1196 const VK_CULL_MODE_BACK_BIT = 0x00000002,
1197 const VK_CULL_MODE_FRONT_AND_BACK = 0x00000003
1198 }
1199 }
1200
1201 reserved_bitflags! {
1202 pub flags VkPipelineMultisampleStateCreateFlags: VkFlags;
1203 }
1204 reserved_bitflags! {
1205 pub flags VkPipelineDepthStencilStateCreateFlags: VkFlags;
1206 }
1207 reserved_bitflags! {
1208 pub flags VkPipelineColorBlendStateCreateFlags: VkFlags;
1209 }
1210
1211 bitflags! {
1212 pub flags VkColorComponentFlags: VkFlags {
1213 const VK_COLOR_COMPONENT_R_BIT = 0x00000001,
1214 const VK_COLOR_COMPONENT_G_BIT = 0x00000002,
1215 const VK_COLOR_COMPONENT_B_BIT = 0x00000004,
1216 const VK_COLOR_COMPONENT_A_BIT = 0x00000008
1217 }
1218 }
1219
1220 reserved_bitflags! {
1221 pub flags VkPipelineDynamicStateCreateFlags: VkFlags;
1222 }
1223 reserved_bitflags! {
1224 pub flags VkPipelineLayoutCreateFlags: VkFlags;
1225 }
1226 reserved_bitflags! {
1227 pub flags VkSamplerCreateFlags: VkFlags;
1228 }
1229 reserved_bitflags! {
1230 pub flags VkDescriptorSetLayoutCreateFlags: VkFlags;
1231 }
1232
1233 bitflags! {
1234 pub flags VkDescriptorPoolCreateFlags: VkFlags {
1235 const VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001
1236 }
1237 }
1238
1239 reserved_bitflags! {
1240 pub flags VkDescriptorPoolResetFlags: VkFlags;
1241 }
1242 reserved_bitflags! {
1243 pub flags VkFramebufferCreateFlags: VkFlags;
1244 }
1245 reserved_bitflags! {
1246 pub flags VkRenderPassCreateFlags: VkFlags;
1247 }
1248
1249 bitflags! {
1250 pub flags VkAttachmentDescriptionFlags: VkFlags {
1251 const VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001
1252 }
1253 }
1254
1255 reserved_bitflags! {
1256 pub flags VkSubpassDescriptionFlags: VkFlags;
1257 }
1258
1259 bitflags! {
1260 pub flags VkAccessFlags: VkFlags {
1261 const VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001,
1262 const VK_ACCESS_INDEX_READ_BIT = 0x00000002,
1263 const VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004,
1264 const VK_ACCESS_UNIFORM_READ_BIT = 0x00000008,
1265 const VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010,
1266 const VK_ACCESS_SHADER_READ_BIT = 0x00000020,
1267 const VK_ACCESS_SHADER_WRITE_BIT = 0x00000040,
1268 const VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080,
1269 const VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100,
1270 const VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200,
1271 const VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400,
1272 const VK_ACCESS_TRANSFER_READ_BIT = 0x00000800,
1273 const VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000,
1274 const VK_ACCESS_HOST_READ_BIT = 0x00002000,
1275 const VK_ACCESS_HOST_WRITE_BIT = 0x00004000,
1276 const VK_ACCESS_MEMORY_READ_BIT = 0x00008000,
1277 const VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000
1278 }
1279 }
1280
1281 bitflags! {
1282 pub flags VkDependencyFlags: VkFlags {
1283 const VK_DEPENDENCY_BY_REGION_BIT = 0x00000001
1284 }
1285 }
1286
1287 bitflags! {
1288 pub flags VkCommandPoolCreateFlags: VkFlags {
1289 const VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001,
1290 const VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002
1291 }
1292 }
1293
1294 bitflags! {
1295 pub flags VkCommandPoolResetFlags: VkFlags {
1296 const VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001
1297 }
1298 }
1299
1300 bitflags! {
1301 pub flags VkCommandBufferUsageFlags: VkFlags {
1302 const VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001,
1303 const VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002,
1304 const VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004
1305 }
1306 }
1307
1308 bitflags! {
1309 pub flags VkQueryControlFlags: VkFlags {
1310 const VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001
1311 }
1312 }
1313
1314 bitflags! {
1315 pub flags VkCommandBufferResetFlags: VkFlags {
1316 const VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001
1317 }
1318 }
1319
1320 bitflags! {
1321 pub flags VkStencilFaceFlags: VkFlags {
1322 const VK_STENCIL_FACE_FRONT_BIT = 0x00000001,
1323 const VK_STENCIL_FACE_BACK_BIT = 0x00000002,
1324 const VK_STENCIL_FRONT_AND_BACK = 0x00000003
1325 }
1326 }
1327
1328 pub type vkAllocationFunctionFn = unsafe extern "stdcall" fn(pUserData: *mut c_void,
1329 size: size_t,
1330 alignment: size_t,
1331 allocationScope: VkSystemAllocationScope);
1332
1333 pub type vkReallocationFunctionFn = unsafe extern "stdcall" fn(pUserData: *mut c_void,
1334 pOriginal: *mut c_void,
1335 size: size_t,
1336 alignment: size_t,
1337 allocationScope: VkSystemAllocationScope);
1338
1339 pub type vkFreeFunctionFn = unsafe extern "stdcall" fn(pUserData: *mut c_void,
1340 pMemory: *mut c_void);
1341
1342 pub type vkInternalAllocationNotificationFn = unsafe extern "stdcall" fn(pUserData: *mut c_void,
1343 size: size_t,
1344 allocationType: VkInternalAllocationType,
1345 allocationScope: VkSystemAllocationScope);
1346
1347 pub type vkInternalFreeNotificationFn = unsafe extern "stdcall" fn(pUserData: *mut c_void,
1348 size: size_t,
1349 allocationType: VkInternalAllocationType,
1350 allocationScope: VkSystemAllocationScope);
1351
1352 pub type vkVoidFunctionFn = *const u8;
1353
1354 #[repr(C)]
1355 #[derive(Copy)]
1356 #[derive(Clone)]
1357 pub struct VkApplicationInfo {
1358 pub sType: VkStructureType,
1359 pub pNext: *const c_void,
1360 pub pApplicationName: *const c_char,
1361 pub applicationVersion: u32,
1362 pub pEngineName: *const c_char,
1363 pub engineVersion: u32,
1364 pub apiVersion: u32
1365 }
1366
1367 #[repr(C)]
1368 #[derive(Copy)]
1369 #[derive(Clone)]
1370 pub struct VkInstanceCreateInfo {
1371 pub sType: VkStructureType,
1372 pub pNext: *const c_void,
1373 pub flags: VkInstanceCreateFlags,
1374 pub pApplicationInfo: *const VkApplicationInfo,
1375 pub enabledLayerCount: u32,
1376 pub ppEnabledLayerNames: *const *const c_char,
1377 pub enabledExtensionCount: u32,
1378 pub ppEnabledExtensionNames: *const *const c_char
1379 }
1380
1381 #[repr(C)]
1382 #[derive(Copy)]
1383 pub struct VkAllocationCallbacks {
1384 pub pUserData: *const c_void,
1385 pub pfnAllocation: Option<vkAllocationFunctionFn>,
1386 pub pfnReallocation: Option<vkReallocationFunctionFn>,
1387 pub pfnFree: Option<vkFreeFunctionFn>,
1388 pub pfnInternalAllocation: Option<vkInternalAllocationNotificationFn>,
1389 pub pfnInternalFree: Option<vkInternalFreeNotificationFn>
1390 }
1391
1392 impl Clone for VkAllocationCallbacks {
1394 fn clone(&self) -> Self {
1395 unsafe {
1396 ::std::mem::transmute_copy(self)
1397 }
1398 }
1399 }
1400
1401 #[repr(C)]
1402 #[derive(Copy)]
1403 #[derive(Clone)]
1404 pub struct VkPhysicalDeviceFeatures {
1405 pub robustBufferAccess: VkBool32,
1406 pub fullDrawIndexUint32: VkBool32,
1407 pub imageCubeArray: VkBool32,
1408 pub independentBlend: VkBool32,
1409 pub geometryShader: VkBool32,
1410 pub tessellationShader: VkBool32,
1411 pub sampleRateShading: VkBool32,
1412 pub dualSrcBlend: VkBool32,
1413 pub logicOp: VkBool32,
1414 pub multiDrawIndirect: VkBool32,
1415 pub drawIndirectFirstInstance: VkBool32,
1416 pub depthClamp: VkBool32,
1417 pub depthBiasClamp: VkBool32,
1418 pub fillModeNonSolid: VkBool32,
1419 pub depthBounds: VkBool32,
1420 pub wideLines: VkBool32,
1421 pub largePoints: VkBool32,
1422 pub alphaToOne: VkBool32,
1423 pub multiViewport: VkBool32,
1424 pub samplerAnisotropy: VkBool32,
1425 pub textureCompressionETC2: VkBool32,
1426 pub textureCompressionASTC_LDR: VkBool32,
1427 pub textureCompressionBC: VkBool32,
1428 pub occlusionQueryPrecise: VkBool32,
1429 pub pipelineStatisticsQuery: VkBool32,
1430 pub vertexPipelineStoresAndAtomics: VkBool32,
1431 pub fragmentStoresAndAtomics: VkBool32,
1432 pub shaderTessellationAndGeometryPointSize: VkBool32,
1433 pub shaderImageGatherExtended: VkBool32,
1434 pub shaderStorageImageExtendedFormats: VkBool32,
1435 pub shaderStorageImageMultisample: VkBool32,
1436 pub shaderStorageImageReadWithoutFormat: VkBool32,
1437 pub shaderStorageImageWriteWithoutFormat: VkBool32,
1438 pub shaderUniformBufferArrayDynamicIndexing: VkBool32,
1439 pub shaderSampledImageArrayDynamicIndexing: VkBool32,
1440 pub shaderStorageBufferArrayDynamicIndexing: VkBool32,
1441 pub shaderStorageImageArrayDynamicIndexing: VkBool32,
1442 pub shaderClipDistance: VkBool32,
1443 pub shaderCullDistance: VkBool32,
1444 pub shaderFloat64: VkBool32,
1445 pub shaderInt64: VkBool32,
1446 pub shaderInt16: VkBool32,
1447 pub shaderResourceResidency: VkBool32,
1448 pub shaderResourceMinLod: VkBool32,
1449 pub sparseBinding: VkBool32,
1450 pub sparseResidencyBuffer: VkBool32,
1451 pub sparseResidencyImage2D: VkBool32,
1452 pub sparseResidencyImage3D: VkBool32,
1453 pub sparseResidency2Samples: VkBool32,
1454 pub sparseResidency4Samples: VkBool32,
1455 pub sparseResidency8Samples: VkBool32,
1456 pub sparseResidency16Samples: VkBool32,
1457 pub sparseResidencyAliased: VkBool32,
1458 pub variableMultisampleRate: VkBool32,
1459 pub inheritedQueries: VkBool32
1460 }
1461
1462 #[repr(C)]
1463 #[derive(Copy)]
1464 #[derive(Clone)]
1465 pub struct VkFormatProperties {
1466 pub linearTilingFeatures: VkFormatFeatureFlags,
1467 pub optimalTilingFeatures: VkFormatFeatureFlags,
1468 pub bufferFeatures: VkFormatFeatureFlags
1469 }
1470
1471 #[repr(C)]
1472 #[derive(Copy)]
1473 #[derive(Clone)]
1474 pub struct VkExtent3D {
1475 pub width: uint32_t,
1476 pub height: uint32_t,
1477 pub depth: uint32_t
1478 }
1479
1480 #[repr(C)]
1481 #[derive(Copy)]
1482 #[derive(Clone)]
1483 pub struct VkImageFormatProperties {
1484 pub maxExtent: VkExtent3D,
1485 pub maxMipLevels: uint32_t,
1486 pub maxArrayLayers: uint32_t,
1487 pub sampleCounts: VkSampleCountFlags,
1488 pub maxResourceSize: VkDeviceSize
1489 }
1490
1491 #[repr(C)]
1492 #[derive(Copy)]
1493 #[derive(Clone)]
1494 pub struct VkPhysicalDeviceLimits {
1495 pub maxImageDimension2D: uint32_t,
1496 pub maxImageDimension1D: uint32_t,
1497 pub maxImageDimension3D: uint32_t,
1498 pub maxImageDimensionCube: uint32_t,
1499 pub maxImageArrayLayers: uint32_t,
1500 pub maxTexelBufferElements: uint32_t,
1501 pub maxUniformBufferRange: uint32_t,
1502 pub maxStorageBufferRange: uint32_t,
1503 pub maxPushConstantsSize: uint32_t,
1504 pub maxMemoryAllocationCount: uint32_t,
1505 pub maxSamplerAllocationCount: uint32_t,
1506 pub bufferImageGranularity: VkDeviceSize,
1507 pub sparseAddressSpaceSize: VkDeviceSize,
1508 pub maxBoundDescriptorSets: uint32_t,
1509 pub maxPerStageDescriptorSamplers: uint32_t,
1510 pub maxPerStageDescriptorUniformBuffers: uint32_t,
1511 pub maxPerStageDescriptorStorageBuffers: uint32_t,
1512 pub maxPerStageDescriptorSampledImages: uint32_t,
1513 pub maxPerStageDescriptorStorageImages: uint32_t,
1514 pub maxPerStageDescriptorInputAttachments: uint32_t,
1515 pub maxPerStageResources: uint32_t,
1516 pub maxDescriptorSetSamplers: uint32_t,
1517 pub maxDescriptorSetUniformBuffers: uint32_t,
1518 pub maxDescriptorSetUniformBuffersDynamic: uint32_t,
1519 pub maxDescriptorSetStorageBuffers: uint32_t,
1520 pub maxDescriptorSetStorageBuffersDynamic: uint32_t,
1521 pub maxDescriptorSetSampledImages: uint32_t,
1522 pub maxDescriptorSetStorageImages: uint32_t,
1523 pub maxDescriptorSetInputAttachments: uint32_t,
1524 pub maxVertexInputAttributes: uint32_t,
1525 pub maxVertexInputBindings: uint32_t,
1526 pub maxVertexInputAttributeOffset: uint32_t,
1527 pub maxVertexInputBindingStride: uint32_t,
1528 pub maxVertexOutputComponents: uint32_t,
1529 pub maxTessellationGenerationLevel: uint32_t,
1530 pub maxTessellationPatchSize: uint32_t,
1531 pub maxTessellationControlPerVertexInputComponents: uint32_t,
1532 pub maxTessellationControlPerVertexOutputComponents: uint32_t,
1533 pub maxTessellationControlPerPatchOutputComponents: uint32_t,
1534 pub maxTessellationControlTotalOutputComponents: uint32_t,
1535 pub maxTessellationEvaluationInputComponents: uint32_t,
1536 pub maxTessellationEvaluationOutputComponents: uint32_t,
1537 pub maxGeometryShaderInvocations: uint32_t,
1538 pub maxGeometryInputComponents: uint32_t,
1539 pub maxGeometryOutputComponents: uint32_t,
1540 pub maxGeometryOutputVertices: uint32_t,
1541 pub maxGeometryTotalOutputComponents: uint32_t,
1542 pub maxFragmentInputComponents: uint32_t,
1543 pub maxFragmentOutputAttachments: uint32_t,
1544 pub maxFragmentDualSrcAttachments: uint32_t,
1545 pub maxFragmentCombinedOutputResources: uint32_t,
1546 pub maxComputeSharedMemorySize: uint32_t,
1547 pub maxComputeWorkGroupCount: [uint32_t;3],
1548 pub maxComputeWorkGroupInvocations: uint32_t,
1549 pub maxComputeWorkGroupSize: [uint32_t;3],
1550 pub subPixelPrecisionBits: uint32_t,
1551 pub subTexelPrecisionBits: uint32_t,
1552 pub mipmapPrecisionBits: uint32_t,
1553 pub maxDrawIndexedIndexValue: uint32_t,
1554 pub maxDrawIndirectCount: uint32_t,
1555 pub maxSamplerLodBias: c_float,
1556 pub maxSamplerAnisotropy: c_float,
1557 pub maxViewports: uint32_t,
1558 pub maxViewportDimensions: [uint32_t;2],
1559 pub viewportBoundsRange: [c_float;2],
1560 pub viewportSubPixelBits: uint32_t,
1561 pub minMemoryMapAlignment: size_t,
1562 pub minTexelBufferOffsetAlignment: VkDeviceSize,
1563 pub minUniformBufferOffsetAlignment: VkDeviceSize,
1564 pub minStorageBufferOffsetAlignment: VkDeviceSize,
1565 pub minTexelOffset: int32_t,
1566 pub maxTexelOffset: uint32_t,
1567 pub minTexelGatherOffset: int32_t,
1568 pub maxTexelGatherOffset: uint32_t,
1569 pub minInterpolationOffset: c_float,
1570 pub maxInterpolationOffset: c_float,
1571 pub subPixelInterpolationOffsetBits: uint32_t,
1572 pub maxFramebufferWidth: uint32_t,
1573 pub maxFramebufferHeight: uint32_t,
1574 pub maxFramebufferLayers: uint32_t,
1575 pub framebufferColorSampleCounts: VkSampleCountFlags,
1576 pub framebufferDepthSampleCounts: VkSampleCountFlags,
1577 pub framebufferStencilSampleCounts: VkSampleCountFlags,
1578 pub framebufferNoAttachmentsSampleCounts: VkSampleCountFlags,
1579 pub maxColorAttachments: uint32_t,
1580 pub sampledImageColorSampleCounts: VkSampleCountFlags,
1581 pub sampledImageIntegerSampleCounts: VkSampleCountFlags,
1582 pub sampledImageDepthSampleCounts: VkSampleCountFlags,
1583 pub sampledImageStencilSampleCounts: VkSampleCountFlags,
1584 pub storageImageSampleCounts: VkSampleCountFlags,
1585 pub maxSampleMaskWords: uint32_t,
1586 pub timestampComputeAndGraphics: VkBool32,
1587 pub timestampPeriod: c_float,
1588 pub maxClipDistances: uint32_t,
1589 pub maxCullDistances: uint32_t,
1590 pub maxCombinedClipAndCullDistances: uint32_t,
1591 pub discreteQueuePriorities: uint32_t,
1592 pub pointSizeRange: [c_float;2],
1593 pub lineWidthRange: [c_float;2],
1594 pub pointSizeGranularity: c_float,
1595 pub lineWidthGranularity: c_float,
1596 pub strictLines: VkBool32,
1597 pub standardSampleLocations: VkBool32,
1598 pub optimalBufferCopyOffsetAlignment: VkDeviceSize,
1599 pub optimalBufferCopyRowPitchAlignment: VkDeviceSize,
1600 pub nonCoherentAtomSize: VkDeviceSize
1601 }
1602
1603 #[repr(C)]
1604 #[derive(Copy)]
1605 #[derive(Clone)]
1606 pub struct VkPhysicalDeviceSparseProperties {
1607 pub residencyStandard2DBlockShape: VkBool32,
1608 pub residencyStandard2DMultisampleBlockShape: VkBool32,
1609 pub residencyStandard3DBlockShape: VkBool32,
1610 pub residencyAlignedMipSize: VkBool32,
1611 pub residencyNonResidentStrict: VkBool32
1612 }
1613
1614 #[repr(C)]
1615 #[derive(Copy)]
1616 pub struct VkPhysicalDeviceProperties {
1617 pub apiVersion: uint32_t,
1618 pub driverVersion: uint32_t,
1619 pub vendorID: uint32_t,
1620 pub deviceID: uint32_t,
1621 pub deviceType: VkPhysicalDeviceType,
1622 pub deviceName: [c_char;VK_MAX_PHYSICAL_DEVICE_NAME_SIZE],
1623 pub pipelineCacheUUID: [uint8_t;VK_UUID_SIZE],
1624 pub limits: VkPhysicalDeviceLimits,
1625 pub sparseProperties: VkPhysicalDeviceSparseProperties,
1626 }
1627
1628 impl Clone for VkPhysicalDeviceProperties {
1630 fn clone(&self) -> Self {
1631 unsafe {
1632 ::std::mem::transmute_copy(self)
1633 }
1634 }
1635 }
1636
1637 #[repr(C)]
1638 #[derive(Copy)]
1639 #[derive(Clone)]
1640 pub struct VkQueueFamilyProperties {
1641 pub queueFlags: VkQueueFlags,
1642 pub queueCount: uint32_t,
1643 pub timestampValidBits: uint32_t,
1644 pub minImageTransferGranularity: VkExtent3D
1645 }
1646
1647 #[repr(C)]
1648 #[derive(Copy)]
1649 #[derive(Clone)]
1650 pub struct VkMemoryType {
1651 pub propertyFlags: VkMemoryPropertyFlags,
1652 pub heapIndex: uint32_t
1653 }
1654
1655 #[repr(C)]
1656 #[derive(Copy)]
1657 #[derive(Clone)]
1658 pub struct VkMemoryHeap {
1659 pub size: VkDeviceSize,
1660 pub flags: VkMemoryHeapFlags
1661 }
1662
1663 #[repr(C)]
1664 #[derive(Copy)]
1665 #[derive(Clone)]
1666 pub struct VkPhysicalDeviceMemoryProperties {
1667 pub memoryTypeCount: uint32_t,
1668 pub memoryTypes: [VkMemoryType;VK_MAX_MEMORY_TYPES],
1669 pub memoryHeapCount: uint32_t,
1670 pub memoryHeaps: [VkMemoryHeap;VK_MAX_MEMORY_HEAPS]
1671 }
1672
1673 #[repr(C)]
1674 #[derive(Copy)]
1675 #[derive(Clone)]
1676 pub struct VkDeviceQueueCreateInfo {
1677 pub sType: VkStructureType,
1678 pub pNext: *const c_void,
1679 pub flags: VkDeviceQueueCreateFlags,
1680 pub queueFamilyIndex: uint32_t,
1681 pub queueCount: uint32_t,
1682 pub pQueuePriorities: *const c_float
1683 }
1684
1685 #[repr(C)]
1686 #[derive(Copy)]
1687 #[derive(Clone)]
1688 pub struct VkDeviceCreateInfo {
1689 pub sType: VkStructureType,
1690 pub pNext: *const c_void,
1691 pub flags: VkDeviceCreateFlags,
1692 pub queueCreateInfoCount: uint32_t,
1693 pub pQueueCreateInfos: *const VkDeviceQueueCreateInfo,
1694 pub enabledLayerCount: uint32_t,
1695 pub ppEnabledLayerNames: *const *const c_char,
1696 pub enabledExtensionCount: uint32_t,
1697 pub ppEnabledExtensionNames: *const *const c_char,
1698 pub pEnabledFeatures: *const VkPhysicalDeviceFeatures
1699 }
1700
1701 #[repr(C)]
1702 #[derive(Copy)]
1703 pub struct VkExtensionProperties {
1704 pub extensionName: [c_char; VK_MAX_EXTENSION_NAME_SIZE],
1705 pub specVersion: uint32_t
1706 }
1707
1708 impl Clone for VkExtensionProperties {
1710 fn clone(&self) -> Self {
1711 unsafe {
1712 ::std::mem::transmute_copy(self)
1713 }
1714 }
1715 }
1716
1717 #[repr(C)]
1718 #[derive(Copy)]
1719 pub struct VkLayerProperties {
1720 pub layerName: [c_char;VK_MAX_EXTENSION_NAME_SIZE],
1721 pub specVersion: uint32_t,
1722 pub implementationVersion: uint32_t,
1723 pub description: [c_char;VK_MAX_DESCRIPTION_SIZE]
1724 }
1725
1726 impl Clone for VkLayerProperties {
1728 fn clone(&self) -> Self {
1729 unsafe {
1730 ::std::mem::transmute_copy(self)
1731 }
1732 }
1733 }
1734
1735 #[repr(C)]
1736 #[derive(Copy)]
1737 #[derive(Clone)]
1738 pub struct VkSubmitInfo {
1739 pub sType: VkStructureType,
1740 pub pNext: *const c_void,
1741 pub waitSemaphoreCount: uint32_t,
1742 pub pWaitSemaphores: *const VkSemaphore,
1743 pub pWaitDstStageMask: *const VkPipelineStageFlags,
1744 pub commandBufferCount: uint32_t,
1745 pub pCommandBuffers: *const VkCommandBuffer,
1746 pub signalSemaphoreCount: uint32_t,
1747 pub pSignalSemaphores: *const VkSemaphore
1748 }
1749
1750 #[repr(C)]
1751 #[derive(Copy)]
1752 #[derive(Clone)]
1753 pub struct VkMemoryAllocateInfo {
1754 pub sType: VkStructureType,
1755 pub pNext: *const c_void,
1756 pub allocationSize: VkDeviceSize,
1757 pub memoryTypeIndex: uint32_t,
1758 }
1759
1760 #[repr(C)]
1761 #[derive(Copy)]
1762 #[derive(Clone)]
1763 pub struct VkMappedMemoryRange {
1764 pub sType: VkStructureType,
1765 pub pNext: *const c_void,
1766 pub memory: VkDeviceMemory,
1767 pub offset: VkDeviceSize,
1768 pub size: VkDeviceSize
1769 }
1770
1771 #[repr(C)]
1772 #[derive(Copy)]
1773 #[derive(Clone)]
1774 pub struct VkMemoryRequirements {
1775 pub size: VkDeviceSize,
1776 pub alignment: VkDeviceSize,
1777 pub memoryTypeBits: uint32_t
1778 }
1779
1780 #[repr(C)]
1781 #[derive(Copy)]
1782 #[derive(Clone)]
1783 pub struct VkSparseImageFormatProperties {
1784 pub aspectMask: VkImageAspectFlags,
1785 pub imageGranularity: VkExtent3D,
1786 pub flags: VkSparseImageFormatFlags
1787 }
1788
1789 #[repr(C)]
1790 #[derive(Copy)]
1791 #[derive(Clone)]
1792 pub struct VkSparseImageMemoryRequirements {
1793 pub formatProperties: VkSparseImageFormatProperties,
1794 pub imageMipTailFirstLod: uint32_t,
1795 pub imageMipTailSize: VkDeviceSize,
1796 pub imageMipTailOffset: VkDeviceSize,
1797 pub imageMipTailStride: VkDeviceSize
1798 }
1799
1800 #[repr(C)]
1801 #[derive(Copy)]
1802 #[derive(Clone)]
1803 pub struct VkSparseMemoryBind {
1804 pub resourceOffset: VkDeviceSize,
1805 pub size: VkDeviceSize,
1806 pub memory: VkDeviceMemory,
1807 pub memoryOffset: VkDeviceSize,
1808 pub flags: VkSparseMemoryBindFlags
1809 }
1810
1811 #[repr(C)]
1812 #[derive(Copy)]
1813 #[derive(Clone)]
1814 pub struct VkSparseBufferMemoryBindInfo {
1815 pub buffer: VkBuffer,
1816 pub bindCount: uint32_t,
1817 pub pBinds: *const VkSparseMemoryBind
1818 }
1819
1820 #[repr(C)]
1821 #[derive(Copy)]
1822 #[derive(Clone)]
1823 pub struct VkSparseImageOpaqueMemoryBindInfo {
1824 pub image: VkImage,
1825 pub bindCount: uint32_t,
1826 pub pBinds: *const VkSparseMemoryBind
1827 }
1828
1829 #[repr(C)]
1830 #[derive(Copy)]
1831 #[derive(Clone)]
1832 pub struct VkImageSubresource {
1833 pub aspectMask: VkImageAspectFlags,
1834 pub mipLevel: uint32_t,
1835 pub arrayLayer: uint32_t
1836 }
1837
1838 #[repr(C)]
1839 #[derive(Copy)]
1840 #[derive(Clone)]
1841 pub struct VkOffset3D {
1842 pub x: int32_t,
1843 pub y: int32_t,
1844 pub z: int32_t
1845 }
1846
1847 #[repr(C)]
1848 #[derive(Copy)]
1849 #[derive(Clone)]
1850 pub struct VkSparseImageMemoryBind {
1851 pub subresource: VkImageSubresource,
1852 pub offset: VkOffset3D,
1853 pub extent: VkExtent3D,
1854 pub memory: VkDeviceMemory,
1855 pub memoryOffset: VkDeviceSize,
1856 pub flags: VkSparseMemoryBindFlags
1857 }
1858
1859 #[repr(C)]
1860 #[derive(Copy)]
1861 #[derive(Clone)]
1862 pub struct VkSparseImageMemoryBindInfo {
1863 pub image: VkImage,
1864 pub bindCount: uint32_t,
1865 pub pBinds: *const VkSparseImageMemoryBind
1866 }
1867
1868 #[repr(C)]
1869 #[derive(Copy)]
1870 #[derive(Clone)]
1871 pub struct VkBindSparseInfo {
1872 pub sType: VkStructureType,
1873 pub pNext: *const c_void,
1874 pub waitSemaphoreCount: uint32_t,
1875 pub pWaitSemaphores: *const VkSemaphore,
1876 pub bufferBindCount: uint32_t,
1877 pub pBufferBinds: *const VkSparseBufferMemoryBindInfo,
1878 pub imageOpaqueBindCount: uint32_t,
1879 pub pImageOpaqueBinds: *const VkSparseImageOpaqueMemoryBindInfo,
1880 pub imageBindCount: uint32_t,
1881 pub pImageBinds: *const VkSparseImageMemoryBindInfo,
1882 pub signalSemaphoreCount: uint32_t,
1883 pub pSignalSemaphores: *const VkSemaphore
1884 }
1885
1886 #[repr(C)]
1887 #[derive(Copy)]
1888 #[derive(Clone)]
1889 pub struct VkFenceCreateInfo {
1890 pub sType: VkStructureType,
1891 pub pNext: *const c_void,
1892 pub flags: VkFenceCreateFlags
1893 }
1894
1895 #[repr(C)]
1896 #[derive(Copy)]
1897 #[derive(Clone)]
1898 pub struct VkSemaphoreCreateInfo {
1899 pub sType: VkStructureType,
1900 pub pNext: *const c_void,
1901 pub flags: VkSemaphoreCreateFlags
1902 }
1903
1904 #[repr(C)]
1905 #[derive(Copy)]
1906 #[derive(Clone)]
1907 pub struct VkEventCreateInfo {
1908 pub sType: VkStructureType,
1909 pub pNext: *const c_void,
1910 pub flags: VkEventCreateFlags
1911 }
1912
1913 #[repr(C)]
1914 #[derive(Copy)]
1915 #[derive(Clone)]
1916 pub struct VkQueryPoolCreateInfo {
1917 pub sType: VkStructureType,
1918 pub pNext: *const c_void,
1919 pub flags: VkQueryPoolCreateFlags,
1920 pub queryType: VkQueryType,
1921 pub queryCount: uint32_t,
1922 pub pipelineStatistics: VkQueryPipelineStatisticFlags,
1923 }
1924
1925 #[repr(C)]
1926 #[derive(Copy)]
1927 #[derive(Clone)]
1928 pub struct VkBufferCreateInfo {
1929 pub sType: VkStructureType,
1930 pub pNext: *const c_void,
1931 pub flags: VkBufferCreateFlags,
1932 pub size: VkDeviceSize,
1933 pub usage: VkBufferUsageFlags,
1934 pub sharingMode: VkSharingMode,
1935 pub queueFamilyIndexCount: uint32_t,
1936 pub pQueueFamilyIndices: *const uint32_t
1937 }
1938
1939 #[repr(C)]
1940 #[derive(Copy)]
1941 #[derive(Clone)]
1942 pub struct VkBufferViewCreateInfo {
1943 pub sType: VkStructureType,
1944 pub pNext: *const c_void,
1945 pub flags: VkBufferViewCreateFlags,
1946 pub buffer: VkBuffer,
1947 pub format: VkFormat,
1948 pub offset: VkDeviceSize,
1949 pub range: VkDeviceSize
1950 }
1951
1952 #[repr(C)]
1953 #[derive(Copy)]
1954 #[derive(Clone)]
1955 pub struct VkImageCreateInfo {
1956 pub sType: VkStructureType,
1957 pub pNext: *const c_void,
1958 pub flags: VkImageCreateFlags,
1959 pub imageType: VkImageType,
1960 pub format: VkFormat,
1961 pub extent: VkExtent3D,
1962 pub mipLevels: uint32_t,
1963 pub arrayLayers: uint32_t,
1964 pub samples: VkSampleCountFlags,
1965 pub tiling: VkImageTiling,
1966 pub usage: VkImageUsageFlags,
1967 pub sharingMode: VkSharingMode,
1968 pub queueFamilyIndexCount: uint32_t,
1969 pub pQueueFamilyIndices: *const uint32_t,
1970 pub initialLayout: VkImageLayout
1971 }
1972
1973 #[repr(C)]
1974 #[derive(Copy)]
1975 #[derive(Clone)]
1976 pub struct VkSubresourceLayout {
1977 pub offset: VkDeviceSize,
1978 pub size: VkDeviceSize,
1979 pub rowPitch: VkDeviceSize,
1980 pub arrayPitch: VkDeviceSize,
1981 pub depthPitch: VkDeviceSize
1982 }
1983
1984 #[repr(C)]
1985 #[derive(Copy)]
1986 #[derive(Clone)]
1987 pub struct VkComponentMapping {
1988 pub r: VkComponentSwizzle,
1989 pub g: VkComponentSwizzle,
1990 pub b: VkComponentSwizzle,
1991 pub a: VkComponentSwizzle
1992 }
1993
1994 #[repr(C)]
1995 #[derive(Copy)]
1996 #[derive(Clone)]
1997 pub struct VkImageSubresourceRange {
1998 pub aspectMask: VkImageAspectFlags,
1999 pub baseMipLevel: uint32_t,
2000 pub levelCount: uint32_t,
2001 pub baseArrayLayer: uint32_t,
2002 pub layerCount: uint32_t
2003 }
2004
2005 #[repr(C)]
2006 #[derive(Copy)]
2007 #[derive(Clone)]
2008 pub struct VkImageViewCreateInfo {
2009 pub sType: VkStructureType,
2010 pub pNext: *const c_void,
2011 pub flags: VkImageViewCreateFlags,
2012 pub image: VkImage,
2013 pub viewType: VkImageViewType,
2014 pub format: VkFormat,
2015 pub components: VkComponentMapping,
2016 pub subresourceRange: VkImageSubresourceRange
2017 }
2018
2019 #[repr(C)]
2020 #[derive(Copy)]
2021 #[derive(Clone)]
2022 pub struct VkShaderModuleCreateInfo {
2023 pub sType: VkStructureType,
2024 pub pNext: *const c_void,
2025 pub flags: VkShaderModuleCreateFlags,
2026 pub codeSize: size_t,
2027 pub pCode: *const uint32_t
2028 }
2029
2030 #[repr(C)]
2031 #[derive(Copy)]
2032 #[derive(Clone)]
2033 pub struct VkPipelineCacheCreateInfo {
2034 pub sType: VkStructureType,
2035 pub pNext: *const c_void,
2036 pub flags: VkPipelineCacheCreateFlags,
2037 pub initialDataSize: size_t,
2038 pub pInitialData: *const c_void
2039 }
2040
2041 #[repr(C)]
2042 #[derive(Copy)]
2043 #[derive(Clone)]
2044 pub struct VkSpecializationMapEntry {
2045 pub constantID: uint32_t,
2046 pub offset: uint32_t,
2047 pub size: size_t
2048 }
2049
2050 #[repr(C)]
2051 #[derive(Copy)]
2052 #[derive(Clone)]
2053 pub struct VkSpecializationInfo {
2054 pub mapEntryCount: uint32_t,
2055 pub pMapEntries: *const VkSpecializationMapEntry,
2056 pub dataSize: size_t,
2057 pub pData: *const c_void
2058 }
2059
2060 #[repr(C)]
2061 #[derive(Copy)]
2062 #[derive(Clone)]
2063 pub struct VkPipelineShaderStageCreateInfo {
2064 pub sType: VkStructureType,
2065 pub pNext: *const c_void,
2066 pub flags: VkPipelineShaderStageCreateFlags,
2067 pub stage: VkShaderStageFlags,
2068 pub module: VkShaderModule,
2069 pub pName: *const c_char,
2070 pub pSpecializationInfo: *const VkSpecializationInfo
2071 }
2072
2073 #[repr(C)]
2074 #[derive(Copy)]
2075 #[derive(Clone)]
2076 pub struct VkVertexInputBindingDescription {
2077 pub binding: uint32_t,
2078 pub stride: uint32_t,
2079 pub inputRate: VkVertexInputRate
2080 }
2081
2082 #[repr(C)]
2083 #[derive(Copy)]
2084 #[derive(Clone)]
2085 pub struct VkVertexInputAttributeDescription {
2086 pub location: uint32_t,
2087 pub binding: uint32_t,
2088 pub format: VkFormat,
2089 pub offset: uint32_t
2090 }
2091
2092 #[repr(C)]
2093 #[derive(Copy)]
2094 #[derive(Clone)]
2095 pub struct VkPipelineVertexInputStateCreateInfo {
2096 pub sType: VkStructureType,
2097 pub pNext: *const c_void,
2098 pub flags: VkPipelineVertexInputStateCreateFlags,
2099 pub vertexBindingDescriptionCount: uint32_t,
2100 pub pVertexBindingDescriptions: *const VkVertexInputBindingDescription,
2101 pub vertexAttributeDescriptionCount: uint32_t,
2102 pub pVertexAttributeDescriptions: *const VkVertexInputAttributeDescription
2103 }
2104
2105 #[repr(C)]
2106 #[derive(Copy)]
2107 #[derive(Clone)]
2108 pub struct VkPipelineInputAssemblyStateCreateInfo {
2109 pub sType: VkStructureType,
2110 pub pNext: *const c_void,
2111 pub flags: VkPipelineInputAssemblyStateCreateFlags,
2112 pub topology: VkPrimitiveTopology,
2113 pub primitiveRestartEnable: VkBool32
2114 }
2115
2116 #[repr(C)]
2117 #[derive(Copy)]
2118 #[derive(Clone)]
2119 pub struct VkPipelineTessellationStateCreateInfo {
2120 pub sType: VkStructureType,
2121 pub pNext: *const c_void,
2122 pub flags: VkPipelineTessellationStateCreateFlags,
2123 pub patchControlPoints: uint32_t
2124 }
2125
2126 #[repr(C)]
2127 #[derive(Copy)]
2128 #[derive(Clone)]
2129 pub struct VkViewport {
2130 pub x: c_float,
2131 pub y: c_float,
2132 pub width: c_float,
2133 pub height: c_float,
2134 pub minDepth: c_float,
2135 pub maxDepth: c_float
2136 }
2137
2138 #[repr(C)]
2139 #[derive(Copy)]
2140 #[derive(Clone)]
2141 pub struct VkOffset2D {
2142 pub x: int32_t,
2143 pub y: int32_t
2144 }
2145
2146 #[repr(C)]
2147 #[derive(Copy)]
2148 #[derive(Clone)]
2149 pub struct VkExtent2D {
2150 pub width: uint32_t,
2151 pub height: uint32_t
2152 }
2153
2154 #[repr(C)]
2155 #[derive(Copy)]
2156 #[derive(Clone)]
2157 pub struct VkRect2D {
2158 pub offset: VkOffset2D,
2159 pub extent: VkExtent2D
2160 }
2161
2162 #[repr(C)]
2163 #[derive(Copy)]
2164 #[derive(Clone)]
2165 pub struct VkPipelineViewportStateCreateInfo {
2166 pub sType: VkStructureType,
2167 pub pNext: *const c_void,
2168 pub flags: VkPipelineViewportStateCreateFlags,
2169 pub viewportCount: uint32_t,
2170 pub pViewports: *const VkViewport,
2171 pub scissorCount: uint32_t,
2172 pub pScissors: *const VkRect2D
2173 }
2174
2175 #[repr(C)]
2176 #[derive(Copy)]
2177 #[derive(Clone)]
2178 pub struct VkPipelineRasterizationStateCreateInfo {
2179 pub sType: VkStructureType,
2180 pub pNext: *const c_void,
2181 pub flags: VkPipelineRasterizationStateCreateFlags,
2182 pub depthClampEnable: VkBool32,
2183 pub rasterizerDiscardEnable: VkBool32,
2184 pub polygonMode: VkPolygonMode,
2185 pub cullMode: VkCullModeFlags,
2186 pub frontFace: VkFrontFace,
2187 pub depthBiasEnable: VkBool32,
2188 pub depthBiasConstantFactor: c_float,
2189 pub depthBiasClamp: c_float,
2190 pub depthBiasSlopeFactor: c_float,
2191 pub lineWidth: c_float
2192 }
2193
2194 #[repr(C)]
2195 #[derive(Copy)]
2196 #[derive(Clone)]
2197 pub struct VkPipelineMultisampleStateCreateInfo {
2198 pub sType: VkStructureType,
2199 pub pNext: *const c_void,
2200 pub flags: VkPipelineMultisampleStateCreateFlags,
2201 pub rasterizationSamples: VkSampleCountFlags,
2202 pub sampleShadingEnable: VkBool32,
2203 pub minSampleShading: c_float,
2204 pub pSampleMask: *const VkSampleMask,
2205 pub alphaToCoverageEnable: VkBool32,
2206 pub alphaToOneEnable: VkBool32
2207 }
2208
2209 #[repr(C)]
2210 #[derive(Copy)]
2211 #[derive(Clone)]
2212 pub struct VkStencilOpState {
2213 pub failOp: VkStencilOp,
2214 pub passOp: VkStencilOp,
2215 pub depthFailOp: VkStencilOp,
2216 pub compareOp: VkCompareOp,
2217 pub compareMask: uint32_t,
2218 pub writeMask: uint32_t,
2219 pub reference: uint32_t
2220 }
2221
2222 #[repr(C)]
2223 #[derive(Copy)]
2224 #[derive(Clone)]
2225 pub struct VkPipelineDepthStencilStateCreateInfo {
2226 pub sType: VkStructureType,
2227 pub pNext: *const c_void,
2228 pub flags: VkPipelineDepthStencilStateCreateFlags,
2229 pub depthTestEnable: VkBool32,
2230 pub depthWriteEnable: VkBool32,
2231 pub depthCompareOp: VkCompareOp,
2232 pub depthBoundsTestEnable: VkBool32,
2233 pub stencilTestEnable: VkBool32,
2234 pub front: VkStencilOpState,
2235 pub back: VkStencilOpState,
2236 pub minDepthBounds: c_float,
2237 pub maxDepthBounds: c_float
2238 }
2239
2240 #[repr(C)]
2241 #[derive(Copy)]
2242 #[derive(Clone)]
2243 pub struct VkPipelineColorBlendAttachmentState {
2244 pub blendEnable: VkBool32,
2245 pub srcColorBlendFactor: VkBlendFactor,
2246 pub dstColorBlendFactor: VkBlendFactor,
2247 pub colorBlendOp: VkBlendOp,
2248 pub srcAlphaBlendFactor: VkBlendFactor,
2249 pub dstAlphaBlendFactor: VkBlendFactor,
2250 pub alphaBlendOp: VkBlendOp,
2251 pub colorWriteMask: VkColorComponentFlags
2252 }
2253
2254 #[repr(C)]
2255 #[derive(Copy)]
2256 #[derive(Clone)]
2257 pub struct VkPipelineColorBlendStateCreateInfo {
2258 pub sType: VkStructureType,
2259 pub pNext: *const c_void,
2260 pub flags: VkPipelineColorBlendStateCreateFlags,
2261 pub logicOpEnable: VkBool32,
2262 pub logicOp: VkLogicOp,
2263 pub attachmentCount: uint32_t,
2264 pub pAttachments: *const VkPipelineColorBlendAttachmentState,
2265 pub blendConstants: [c_float;4]
2266 }
2267
2268 #[repr(C)]
2269 #[derive(Copy)]
2270 #[derive(Clone)]
2271 pub struct VkPipelineDynamicStateCreateInfo {
2272 pub sType: VkStructureType,
2273 pub pNext: *const c_void,
2274 pub flags: VkPipelineDynamicStateCreateFlags,
2275 pub dynamicStateCount: uint32_t,
2276 pub pDynamicStates: *const VkDynamicState
2277 }
2278
2279 #[repr(C)]
2280 #[derive(Copy)]
2281 #[derive(Clone)]
2282 pub struct VkGraphicsPipelineCreateInfo {
2283 pub sType: VkStructureType,
2284 pub pNext: *const c_void,
2285 pub flags: VkPipelineCreateFlags,
2286 pub stageCount: uint32_t,
2287 pub pStages: *const VkPipelineShaderStageCreateInfo,
2288 pub pVertexInputState: *const VkPipelineVertexInputStateCreateInfo,
2289 pub pInputAssemblyState: *const VkPipelineInputAssemblyStateCreateInfo,
2290 pub pTessellationState: *const VkPipelineTessellationStateCreateInfo,
2291 pub pViewportState: *const VkPipelineViewportStateCreateInfo,
2292 pub pRasterizationState: *const VkPipelineRasterizationStateCreateInfo,
2293 pub pMultisampleState: *const VkPipelineMultisampleStateCreateInfo,
2294 pub pDepthStencilState: *const VkPipelineDepthStencilStateCreateInfo,
2295 pub pColorBlendState: *const VkPipelineColorBlendStateCreateInfo,
2296 pub pDynamicState: *const VkPipelineDynamicStateCreateInfo,
2297 pub layout: VkPipelineLayout,
2298 pub renderPass: VkRenderPass,
2299 pub subpass: uint32_t,
2300 pub basePipelineHandle: VkPipeline,
2301 pub basePipelineIndex: int32_t
2302 }
2303
2304 #[repr(C)]
2305 #[derive(Copy)]
2306 #[derive(Clone)]
2307 pub struct VkComputePipelineCreateInfo {
2308 pub sType: VkStructureType,
2309 pub pNext: *const c_void,
2310 pub flags: VkPipelineCreateFlags,
2311 pub stage: VkPipelineShaderStageCreateInfo,
2312 pub layout: VkPipelineLayout,
2313 pub basePipelineHandle: VkPipeline,
2314 pub basePipelineIndex: int32_t
2315 }
2316
2317 #[repr(C)]
2318 #[derive(Copy)]
2319 #[derive(Clone)]
2320 pub struct VkPushConstantRange {
2321 pub stageFlags: VkShaderStageFlags,
2322 pub offset: uint32_t,
2323 pub size: uint32_t
2324 }
2325
2326 #[repr(C)]
2327 #[derive(Copy)]
2328 #[derive(Clone)]
2329 pub struct VkPipelineLayoutCreateInfo {
2330 pub sType: VkStructureType,
2331 pub pNext: *const c_void,
2332 pub flags: VkPipelineLayoutCreateFlags,
2333 pub setLayoutCount: uint32_t,
2334 pub pSetLayouts: *const VkDescriptorSetLayout,
2335 pub pushConstantRangeCount: uint32_t,
2336 pub pPushConstantRanges: *const VkPushConstantRange
2337 }
2338
2339 #[repr(C)]
2340 #[derive(Copy)]
2341 #[derive(Clone)]
2342 pub struct VkSamplerCreateInfo {
2343 pub sType: VkStructureType,
2344 pub pNext: *const c_void,
2345 pub flags: VkSamplerCreateFlags,
2346 pub magFilter: VkFilter,
2347 pub minFilter: VkFilter,
2348 pub mipmapMode: VkSamplerMipmapMode,
2349 pub addressModeU: VkSamplerAddressMode,
2350 pub addressModeV: VkSamplerAddressMode,
2351 pub addressModeW: VkSamplerAddressMode,
2352 pub mipLodBias: c_float,
2353 pub anisotropyEnable: VkBool32,
2354 pub maxAnisotropy: c_float,
2355 pub compareEnable: VkBool32,
2356 pub compareOp: VkCompareOp,
2357 pub minLod: c_float,
2358 pub maxLod: c_float,
2359 pub borderColor: VkBorderColor,
2360 pub unnormalizedCoordinates: VkBool32
2361 }
2362
2363 #[repr(C)]
2364 #[derive(Copy)]
2365 #[derive(Clone)]
2366 pub struct VkDescriptorSetLayoutBinding {
2367 pub binding: uint32_t,
2368 pub descriptorType: VkDescriptorType,
2369 pub descriptorCount: uint32_t,
2370 pub stageFlags: VkShaderStageFlags,
2371 pub pImmutableSamplers: *const VkSampler
2372 }
2373
2374 #[repr(C)]
2375 #[derive(Copy)]
2376 #[derive(Clone)]
2377 pub struct VkDescriptorSetLayoutCreateInfo {
2378 pub sType: VkStructureType,
2379 pub pNext: *const c_void,
2380 pub flags: VkDescriptorSetLayoutCreateFlags,
2381 pub bindingCount: uint32_t,
2382 pub pBindings: *const VkDescriptorSetLayoutBinding
2383 }
2384
2385 #[repr(C)]
2386 #[derive(Copy)]
2387 #[derive(Clone)]
2388 pub struct VkDescriptorPoolSize {
2389 pub dType: VkDescriptorType,
2391 pub descriptorCount: uint32_t,
2392 }
2393
2394 #[repr(C)]
2395 #[derive(Copy)]
2396 #[derive(Clone)]
2397 pub struct VkDescriptorPoolCreateInfo {
2398 pub sType: VkStructureType,
2399 pub pNext: *const c_void,
2400 pub flags: VkDescriptorPoolCreateFlags,
2401 pub maxSets: uint32_t,
2402 pub poolSizeCount: uint32_t,
2403 pub pPoolSizes: *const VkDescriptorPoolSize
2404 }
2405
2406 #[repr(C)]
2407 #[derive(Copy)]
2408 #[derive(Clone)]
2409 pub struct VkDescriptorSetAllocateInfo {
2410 pub sType: VkStructureType,
2411 pub pNext: *const c_void,
2412 pub descriptorPool: VkDescriptorPool,
2413 pub descriptorSetCount: uint32_t,
2414 pub pSetLayouts: *const VkDescriptorSetLayout
2415 }
2416
2417 #[repr(C)]
2418 #[derive(Copy)]
2419 #[derive(Clone)]
2420 pub struct VkDescriptorImageInfo {
2421 pub sampler: VkSampler,
2422 pub imageView: VkImageView,
2423 pub imageLayout: VkImageLayout
2424 }
2425
2426 #[repr(C)]
2427 #[derive(Copy)]
2428 #[derive(Clone)]
2429 pub struct VkDescriptorBufferInfo {
2430 pub buffer: VkBuffer,
2431 pub offset: VkDeviceSize,
2432 pub range: VkDeviceSize
2433 }
2434
2435 #[repr(C)]
2436 #[derive(Copy)]
2437 #[derive(Clone)]
2438 pub struct VkWriteDescriptorSet {
2439 pub sType: VkStructureType,
2440 pub pNext: *const c_void,
2441 pub dstSet: VkDescriptorSet,
2442 pub dstBinding: uint32_t,
2443 pub dstArrayElement: uint32_t,
2444 pub descriptorCount: uint32_t,
2445 pub descriptorType: VkDescriptorType,
2446 pub pImageInfo: *const VkDescriptorImageInfo,
2447 pub pBufferInfo: *const VkDescriptorBufferInfo,
2448 pub pTexelBufferView: *const VkBufferView
2449 }
2450
2451 #[repr(C)]
2452 #[derive(Copy)]
2453 #[derive(Clone)]
2454 pub struct VkCopyDescriptorSet {
2455 pub sType: VkStructureType,
2456 pub pNext: *const c_void,
2457 pub srcSet: VkDescriptorSet,
2458 pub srcBinding: uint32_t,
2459 pub srcArrayElement: uint32_t,
2460 pub dstSet: VkDescriptorSet,
2461 pub dstBinding: uint32_t,
2462 pub dstArrayElement: uint32_t,
2463 pub descriptorCount: uint32_t
2464 }
2465
2466 #[repr(C)]
2467 #[derive(Copy)]
2468 #[derive(Clone)]
2469 pub struct VkFramebufferCreateInfo {
2470 pub sType: VkStructureType,
2471 pub pNext: *const c_void,
2472 pub flags: VkFramebufferCreateFlags,
2473 pub renderPass: VkRenderPass,
2474 pub attachmentCount: uint32_t,
2475 pub pAttachments: *const VkImageView,
2476 pub width: uint32_t,
2477 pub height: uint32_t,
2478 pub layers: uint32_t
2479 }
2480
2481 #[repr(C)]
2482 #[derive(Copy)]
2483 #[derive(Clone)]
2484 pub struct VkAttachmentDescription {
2485 pub flags: VkAttachmentDescriptionFlags,
2486 pub format: VkFormat,
2487 pub samples: VkSampleCountFlags,
2488 pub loadOp: VkAttachmentLoadOp,
2489 pub storeOp: VkAttachmentStoreOp,
2490 pub stencilLoadOp: VkAttachmentLoadOp,
2491 pub stencilStoreOp: VkAttachmentStoreOp,
2492 pub initialLayout: VkImageLayout,
2493 pub finalLayout: VkImageLayout
2494 }
2495
2496 #[repr(C)]
2497 #[derive(Copy)]
2498 #[derive(Clone)]
2499 pub struct VkAttachmentReference {
2500 pub attachment: uint32_t,
2501 pub layout: VkImageLayout
2502 }
2503
2504 #[repr(C)]
2505 #[derive(Copy)]
2506 #[derive(Clone)]
2507 pub struct VkSubpassDescription {
2508 pub flags: VkSubpassDescriptionFlags,
2509 pub pipelineBindPoint: VkPipelineBindPoint,
2510 pub inputAttachmentCount: uint32_t,
2511 pub pInputAttachments: *const VkAttachmentReference,
2512 pub colorAttachmentCount: uint32_t,
2513 pub pColorAttachments: *const VkAttachmentReference,
2514 pub pResolveAttachments: *const VkAttachmentReference,
2515 pub pDepthStencilAttachment: *const VkAttachmentReference,
2516 pub preserveAttachmentCount: uint32_t,
2517 pub pPreserveAttachments: *const uint32_t
2518 }
2519
2520 #[repr(C)]
2521 #[derive(Copy)]
2522 #[derive(Clone)]
2523 pub struct VkSubpassDependency {
2524 pub srcSubpass: uint32_t,
2525 pub dstSubpass: uint32_t,
2526 pub srcStageMask: VkPipelineStageFlags,
2527 pub dstStageMask: VkPipelineStageFlags,
2528 pub srcAccessMask: VkAccessFlags,
2529 pub dstAccessMask: VkAccessFlags,
2530 pub dependencyFlags: VkDependencyFlags
2531 }
2532
2533 #[repr(C)]
2534 #[derive(Copy)]
2535 #[derive(Clone)]
2536 pub struct VkRenderPassCreateInfo {
2537 pub sType: VkStructureType,
2538 pub pNext: *const c_void,
2539 pub flags: VkRenderPassCreateFlags,
2540 pub attachmentCount: uint32_t,
2541 pub pAttachments: *const VkAttachmentDescription,
2542 pub subpassCount: uint32_t,
2543 pub pSubpasses: *const VkSubpassDescription,
2544 pub dependencyCount: uint32_t,
2545 pub pDependencies: *const VkSubpassDependency
2546 }
2547
2548 #[repr(C)]
2549 #[derive(Copy)]
2550 #[derive(Clone)]
2551 pub struct VkCommandPoolCreateInfo {
2552 pub sType: VkStructureType,
2553 pub pNext: *const c_void,
2554 pub flags: VkCommandPoolCreateFlags,
2555 pub queueFamilyIndex: uint32_t
2556 }
2557
2558 #[repr(C)]
2559 #[derive(Copy)]
2560 #[derive(Clone)]
2561 pub struct VkCommandBufferAllocateInfo {
2562 pub sType: VkStructureType,
2563 pub pNext: *const c_void,
2564 pub commandPool: VkCommandPool,
2565 pub level: VkCommandBufferLevel,
2566 pub commandBufferCount: uint32_t
2567 }
2568
2569 #[repr(C)]
2570 #[derive(Copy)]
2571 #[derive(Clone)]
2572 pub struct VkCommandBufferInheritanceInfo {
2573 pub sType: VkStructureType,
2574 pub pNext: *const c_void,
2575 pub renderPass: VkRenderPass,
2576 pub subpass: uint32_t,
2577 pub framebuffer: VkFramebuffer,
2578 pub occlusionQueryEnable: VkBool32,
2579 pub queryFlags: VkQueryControlFlags,
2580 pub pipelineStatistics: VkQueryPipelineStatisticFlags
2581 }
2582
2583 #[repr(C)]
2584 #[derive(Copy)]
2585 #[derive(Clone)]
2586 pub struct VkCommandBufferBeginInfo {
2587 pub sType: VkStructureType,
2588 pub pNext: *const c_void,
2589 pub flags: VkCommandBufferUsageFlags,
2590 pub pInheritanceInfo: *const VkCommandBufferInheritanceInfo
2591 }
2592
2593 #[repr(C)]
2594 #[derive(Copy)]
2595 #[derive(Clone)]
2596 pub struct VkBufferCopy {
2597 pub srcOffset: VkDeviceSize,
2598 pub dstOffset: VkDeviceSize,
2599 pub size: VkDeviceSize
2600 }
2601
2602 #[repr(C)]
2603 #[derive(Copy)]
2604 #[derive(Clone)]
2605 pub struct VkImageSubresourceLayers {
2606 pub aspectMask: VkImageAspectFlags,
2607 pub mipLevel: uint32_t,
2608 pub baseArrayLayer: uint32_t,
2609 pub layerCount: uint32_t
2610 }
2611
2612 #[repr(C)]
2613 #[derive(Copy)]
2614 #[derive(Clone)]
2615 pub struct VkImageCopy {
2616 pub srcSubresource: VkImageSubresourceLayers,
2617 pub srcOffset: VkOffset3D,
2618 pub dstSubresource: VkImageSubresourceLayers,
2619 pub dstOffset: VkOffset3D,
2620 pub extent: VkExtent3D
2621 }
2622
2623 #[repr(C)]
2624 #[derive(Copy)]
2625 #[derive(Clone)]
2626 pub struct VkImageBlit {
2627 pub srcSubresource: VkImageSubresourceLayers,
2628 pub srcOffsets: [VkOffset3D;2],
2629 pub dstSubresource: VkImageSubresourceLayers,
2630 pub dstOffsets: [VkOffset3D;2]
2631 }
2632
2633 #[repr(C)]
2634 #[derive(Copy)]
2635 #[derive(Clone)]
2636 pub struct VkBufferImageCopy {
2637 pub bufferOffset: VkDeviceSize,
2638 pub bufferRowLength: uint32_t,
2639 pub bufferImageHeight: uint32_t,
2640 pub imageSubresource: VkImageSubresourceLayers,
2641 pub imageOffset: VkOffset3D,
2642 pub imageExtent: VkExtent3D
2643 }
2644
2645 #[repr(C)]
2646 #[derive(Copy)]
2647 #[derive(Clone)]
2648 pub struct VkClearColorValue {
2649 union_data: [u8;16]
2650 }
2651
2652 #[repr(C)]
2653 pub enum VkClearColorValueUnion {
2654 Float32([c_float;4]),
2655 Int32([int32_t;4]),
2656 UInt32([uint32_t;4])
2657 }
2658
2659 impl From<VkClearColorValueUnion> for VkClearColorValue {
2660 fn from(union:VkClearColorValueUnion) -> Self {
2661 unsafe {
2662 match union {
2663 VkClearColorValueUnion::Float32(color4f) => {
2664 VkClearColorValue{union_data:transmute(color4f)}
2665 },
2666 VkClearColorValueUnion::Int32(color4i) => {
2667 VkClearColorValue{union_data:transmute(color4i)}
2668 },
2669 VkClearColorValueUnion::UInt32(color4u) => {
2670 VkClearColorValue{union_data:transmute(color4u)}
2671 },
2672 }
2673 }
2674 }
2675 }
2676
2677 #[repr(C)]
2678 #[derive(Copy)]
2679 #[derive(Clone)]
2680 pub struct VkClearDepthStencilValue {
2681 pub depth: c_float,
2682 pub stencil: uint32_t
2683 }
2684
2685 #[repr(C)]
2686 #[derive(Copy)]
2687 #[derive(Clone)]
2688 pub struct VkClearValue {
2689 union_data: [u8;16]
2690 }
2691
2692 pub enum VkClearValueUnion {
2693 Color(VkClearColorValue),
2694 DepthStencil(VkClearDepthStencilValue)
2695 }
2696
2697 impl From<VkClearValueUnion> for VkClearValue {
2698 fn from(union: VkClearValueUnion) -> Self {
2699 unsafe {
2700 match union {
2701 VkClearValueUnion::Color(clear_color_value) => {
2702 VkClearValue{union_data:clear_color_value.union_data}
2703 },
2704 VkClearValueUnion::DepthStencil(clear_depth_stencil_value) => {
2705 let mut clear_value:VkClearValue = ::std::mem::zeroed();
2706 {
2707 let clear_color_bytes: [u8;8] = transmute(clear_depth_stencil_value);
2708 let union_data_slice: &mut[u8] = &mut clear_value.union_data[0..8];
2709 union_data_slice.clone_from_slice(&clear_color_bytes);
2710 }
2711 clear_value
2712 }
2713 }
2714 }
2715 }
2716 }
2717
2718 #[repr(C)]
2719 #[derive(Copy)]
2720 #[derive(Clone)]
2721 pub struct VkClearAttachment {
2722 pub aspectMask: VkImageAspectFlags,
2723 pub colorAttachment: uint32_t,
2724 pub clearValue: VkClearValue
2725 }
2726
2727 #[repr(C)]
2728 #[derive(Copy)]
2729 #[derive(Clone)]
2730 pub struct VkClearRect {
2731 pub rect: VkRect2D,
2732 pub baseArrayLayer: uint32_t,
2733 pub layerCount: uint32_t
2734 }
2735
2736 #[repr(C)]
2737 #[derive(Copy)]
2738 #[derive(Clone)]
2739 pub struct VkImageResolve {
2740 pub srcSubresource: VkImageSubresourceLayers,
2741 pub srcOffset: VkOffset3D,
2742 pub dstSubresource: VkImageSubresourceLayers,
2743 pub dstOffset: VkOffset3D,
2744 pub extent: VkExtent3D
2745 }
2746
2747 #[repr(C)]
2748 #[derive(Copy)]
2749 #[derive(Clone)]
2750 pub struct VkMemoryBarrier {
2751 pub sType: VkStructureType,
2752 pub pNext: *const c_void,
2753 pub srcAccessMask: VkAccessFlags,
2754 pub dstAccessMask: VkAccessFlags
2755 }
2756
2757 #[repr(C)]
2758 #[derive(Copy)]
2759 #[derive(Clone)]
2760 pub struct VkBufferMemoryBarrier {
2761 pub sType: VkStructureType,
2762 pub pNext: *const c_void,
2763 pub srcAccessMask: VkAccessFlags,
2764 pub dstAccessMask: VkAccessFlags,
2765 pub srcQueueFamilyIndex: uint32_t,
2766 pub dstQueueFamilyIndex: uint32_t,
2767 pub buffer: VkBuffer,
2768 pub offset: VkDeviceSize,
2769 pub size: VkDeviceSize
2770 }
2771
2772 #[repr(C)]
2773 #[derive(Copy)]
2774 #[derive(Clone)]
2775 pub struct VkImageMemoryBarrier {
2776 pub sType: VkStructureType,
2777 pub pNext: *const c_void,
2778 pub srcAccessMask: VkAccessFlags,
2779 pub dstAccessMask: VkAccessFlags,
2780 pub oldLayout: VkImageLayout,
2781 pub newLayout: VkImageLayout,
2782 pub srcQueueFamilyIndex: uint32_t,
2783 pub dstQueueFamilyIndex: uint32_t,
2784 pub image: VkImage,
2785 pub subresourceRange: VkImageSubresourceRange
2786 }
2787
2788 #[repr(C)]
2789 #[derive(Copy)]
2790 #[derive(Clone)]
2791 pub struct VkRenderPassBeginInfo {
2792 pub sType: VkStructureType,
2793 pub pNext: *const c_void,
2794 pub renderPass: VkRenderPass,
2795 pub framebuffer: VkFramebuffer,
2796 pub renderArea: VkRect2D,
2797 pub clearValueCount: uint32_t,
2798 pub pClearValues: *const VkClearValue
2799 }
2800
2801 #[repr(C)]
2802 #[derive(Copy)]
2803 #[derive(Clone)]
2804 pub struct VkDispatchIndirectCommand {
2805 pub x: uint32_t,
2806 pub y: uint32_t,
2807 pub z: uint32_t
2808 }
2809
2810 #[repr(C)]
2811 #[derive(Copy)]
2812 #[derive(Clone)]
2813 pub struct VkDrawIndexedIndirectCommand {
2814 pub indexCount: uint32_t,
2815 pub instanceCount: uint32_t,
2816 pub firstIndex: uint32_t,
2817 pub vertexOffset: int32_t,
2818 pub firstInstance: uint32_t
2819 }
2820
2821 #[repr(C)]
2822 #[derive(Copy)]
2823 #[derive(Clone)]
2824 pub struct VkDrawIndirectCommand {
2825 pub vertexCount: uint32_t,
2826 pub instanceCount: uint32_t,
2827 pub firstVertex: uint32_t,
2828 pub firstInstance: uint32_t
2829 }
2830
2831 pub type vkCreateInstanceFn = unsafe extern "stdcall" fn(pCreateInfo: *const VkInstanceCreateInfo,
2832 pAllocator: *const VkAllocationCallbacks,
2833 pInstance: *mut VkInstance) -> VkResult;
2834
2835 pub type vkDestroyInstanceFn = unsafe extern "stdcall" fn(instance: VkInstance,
2836 pAllocator: *const VkAllocationCallbacks);
2837
2838 pub type vkEnumeratePhysicalDevicesFn = unsafe extern "stdcall" fn(instance: VkInstance,
2839 pPhysicalDeviceCount: *mut uint32_t,
2840 pPhysicalDevices: *mut VkPhysicalDevice) -> VkResult;
2841
2842 pub type vkGetPhysicalDeviceFeaturesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2843 pFeatures: *mut VkPhysicalDeviceFeatures);
2844
2845 pub type vkGetPhysicalDeviceFormatPropertiesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2846 format: VkFormat,
2847 pFormatProperties: *mut VkFormatProperties);
2848
2849 pub type vkGetPhysicalDeviceImageFormatPropertiesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2850 format: VkFormat,
2851 iType: VkImageType,
2852 tiling: VkImageTiling,
2853 usage: VkImageUsageFlags,
2854 flags: VkImageCreateFlags,
2855 pImageFormatProperties: *mut VkImageFormatProperties) -> VkResult;
2856
2857 pub type vkGetPhysicalDevicePropertiesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2858 pProperties: *mut VkPhysicalDeviceProperties);
2859
2860 pub type vkGetPhysicalDeviceQueueFamilyPropertiesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2861 pQueueFamilyPropertyCount: *mut uint32_t,
2862 pQueueFamilyProperties: *mut VkQueueFamilyProperties);
2863
2864 pub type vkGetPhysicalDeviceMemoryPropertiesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2865 pMemoryProperties: *mut VkPhysicalDeviceMemoryProperties);
2866
2867 pub type vkGetInstanceProcAddrFn = unsafe extern "stdcall" fn(instance: VkInstance,
2868 pName: *const c_char) -> vkVoidFunctionFn;
2869
2870 pub type vkGetDeviceProcAddrFn = unsafe extern "stdcall" fn(device: VkDevice,
2871 pName: *const c_char) -> vkVoidFunctionFn;
2872
2873 pub type vkCreateDeviceFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2874 pCreateInfo: *const VkDeviceCreateInfo,
2875 pAllocator: *const VkAllocationCallbacks,
2876 pDevice: *mut VkDevice) -> VkResult;
2877
2878 pub type vkDestroyDeviceFn = unsafe extern "stdcall" fn(device: VkDevice,
2879 pAllocator: *const VkAllocationCallbacks);
2880
2881 pub type vkEnumerateInstanceExtensionPropertiesFn = unsafe extern "stdcall" fn(pLayerName: *const c_char,
2882 pPropertyCount: *mut uint32_t,
2883 pProperties: *mut VkExtensionProperties) -> VkResult;
2884
2885 pub type vkEnumerateDeviceExtensionPropertiesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2886 pLayerName: *const c_char,
2887 pPropertyCount: *mut uint32_t,
2888 pProperties: *mut VkExtensionProperties) -> VkResult;
2889
2890 pub type vkEnumerateInstanceLayerPropertiesFn = unsafe extern "stdcall" fn(pPropertyCount: *mut uint32_t,
2891 pProperties: *mut VkLayerProperties) -> VkResult;
2892
2893 pub type vkEnumerateDeviceLayerPropertiesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2894 pPropertyCount: *mut uint32_t,
2895 pProperties: *mut VkLayerProperties) -> VkResult;
2896
2897 pub type vkGetDeviceQueueFn = unsafe extern "stdcall" fn(device: VkDevice,
2898 queueFamilyIndex: uint32_t,
2899 queueIndex: uint32_t,
2900 pQueue: *mut VkQueue);
2901
2902 pub type vkQueueSubmitFn = unsafe extern "stdcall" fn(queue: VkQueue,
2903 submitCount: uint32_t,
2904 pSubmits: *const VkSubmitInfo,
2905 fence: VkFence) -> VkResult;
2906
2907 pub type vkQueueWaitIdleFn = unsafe extern "stdcall" fn(queue: VkQueue) -> VkResult;
2908
2909 pub type vkDeviceWaitIdleFn = unsafe extern "stdcall" fn(device: VkDevice) -> VkResult;
2910
2911 pub type vkAllocateMemoryFn = unsafe extern "stdcall" fn(device: VkDevice,
2912 pAllocateInfo: *const VkMemoryAllocateInfo,
2913 pAllocator: *const VkAllocationCallbacks,
2914 pMemory: *mut VkDeviceMemory) -> VkResult;
2915
2916 pub type vkFreeMemoryFn = unsafe extern "stdcall" fn(device: VkDevice,
2917 memory: VkDeviceMemory,
2918 pAllocator: *const VkAllocationCallbacks);
2919
2920 pub type vkMapMemoryFn = unsafe extern "stdcall" fn(device: VkDevice,
2921 memory: VkDeviceMemory,
2922 offset: VkDeviceSize,
2923 size: VkDeviceSize,
2924 flags: VkMemoryMapFlags,
2925 ppData: *mut *mut c_void) -> VkResult;
2926
2927 pub type vkUnmapMemoryFn = unsafe extern "stdcall" fn(device: VkDevice,
2928 memory: VkDeviceMemory);
2929
2930 pub type vkFlushMappedMemoryRangesFn = unsafe extern "stdcall" fn(device: VkDevice,
2931 memoryRangeCount: uint32_t,
2932 pMemoryRanges: *const VkMappedMemoryRange) -> VkResult;
2933
2934 pub type vkInvalidateMappedMemoryRangesFn = unsafe extern "stdcall" fn(device: VkDevice,
2935 memoryRangeCount: uint32_t,
2936 pMemoryRanges: *const VkMappedMemoryRange) -> VkResult;
2937
2938 pub type vkGetDeviceMemoryCommitmentFn = unsafe extern "stdcall" fn(device: VkDevice,
2939 memory: VkDeviceMemory,
2940 pCommittedMemoryInBytes: *mut VkDeviceSize);
2941
2942 pub type vkBindBufferMemoryFn = unsafe extern "stdcall" fn(device: VkDevice,
2943 buffer: VkBuffer,
2944 memory: VkDeviceMemory,
2945 memoryOffset: VkDeviceSize) -> VkResult;
2946
2947 pub type vkBindImageMemoryFn = unsafe extern "stdcall" fn(device: VkDevice,
2948 image: VkImage,
2949 memory: VkDeviceMemory,
2950 memoryOffset: VkDeviceSize) -> VkResult;
2951
2952 pub type vkGetBufferMemoryRequirementsFn = unsafe extern "stdcall" fn(device: VkDevice,
2953 buffer: VkBuffer,
2954 pMemoryRequirements: *mut VkMemoryRequirements);
2955
2956 pub type vkGetImageMemoryRequirementsFn = unsafe extern "stdcall" fn(device: VkDevice,
2957 image: VkImage,
2958 pMemoryRequirements: *mut VkMemoryRequirements);
2959
2960 pub type vkGetImageSparseMemoryRequirementsFn = unsafe extern "stdcall" fn(device: VkDevice,
2961 image: VkImage,
2962 pSparseMemoryRequirementCount: *mut uint32_t,
2963 pSparseMemoryRequirements: *mut VkSparseImageMemoryRequirements);
2964
2965 pub type vkGetPhysicalDeviceSparseImageFormatPropertiesFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
2966 format: VkFormat,
2967 iType: VkImageType,
2968 samples: VkSampleCountFlags,
2969 usage: VkImageUsageFlags,
2970 tiling: VkImageTiling,
2971 pPropertyCount: *mut uint32_t,
2972 pProperties: *mut VkSparseImageFormatProperties);
2973 pub type vkQueueBindSparseFn = unsafe extern "stdcall" fn(queue: VkQueue,
2974 bindInfoCount: uint32_t,
2975 pBindInfo: *const VkBindSparseInfo,
2976 fence: VkFence) -> VkResult;
2977
2978 pub type vkCreateFenceFn = unsafe extern "stdcall" fn(device: VkDevice,
2979 pCreateInfo: *const VkFenceCreateInfo,
2980 pAllocator: *const VkAllocationCallbacks,
2981 pFence: *mut VkFence) -> VkResult;
2982
2983 pub type vkDestroyFenceFn = unsafe extern "stdcall" fn(device: VkDevice,
2984 fence: VkFence,
2985 pAllocator: *const VkAllocationCallbacks);
2986
2987 pub type vkResetFencesFn = unsafe extern "stdcall" fn(device: VkDevice,
2988 fenceCount: uint32_t,
2989 pFences: *const VkFence) -> VkResult;
2990
2991 pub type vkGetFenceStatusFn = unsafe extern "stdcall" fn(device: VkDevice,
2992 fence: VkFence) -> VkResult;
2993
2994 pub type vkWaitForFencesFn = unsafe extern "stdcall" fn(device: VkDevice,
2995 fenceCount: uint32_t,
2996 pFences: *const VkFence,
2997 waitAll: VkBool32,
2998 timeout: uint64_t) -> VkResult;
2999
3000 pub type vkCreateSemaphoreFn = unsafe extern "stdcall" fn(device: VkDevice,
3001 pCreateInfo: *const VkSemaphoreCreateInfo,
3002 pAllocator: *const VkAllocationCallbacks,
3003 pSemaphore: *mut VkSemaphore) -> VkResult;
3004
3005 pub type vkDestroySemaphoreFn = unsafe extern "stdcall" fn(device: VkDevice,
3006 semaphore: VkSemaphore,
3007 pAllocator: *const VkAllocationCallbacks);
3008
3009 pub type vkCreateEventFn = unsafe extern "stdcall" fn(device: VkDevice,
3010 pCreateInfo: *const VkEventCreateInfo,
3011 pAllocator: *const VkAllocationCallbacks,
3012 pEvent: *mut VkEvent) -> VkResult;
3013
3014 pub type vkDestroyEventFn = unsafe extern "stdcall" fn(device: VkDevice,
3015 event: VkEvent,
3016 pAllocator: *const VkAllocationCallbacks);
3017
3018 pub type vkGetEventStatusFn = unsafe extern "stdcall" fn(device: VkDevice,
3019 event: VkEvent) -> VkResult;
3020
3021 pub type vkSetEventFn = unsafe extern "stdcall" fn(device: VkDevice,
3022 event: VkEvent) -> VkResult;
3023
3024 pub type vkResetEventFn = unsafe extern "stdcall" fn(device: VkDevice,
3025 event: VkEvent) -> VkResult;
3026
3027 pub type vkCreateQueryPoolFn = unsafe extern "stdcall" fn(device: VkDevice,
3028 pCreateInfo: *const VkQueryPoolCreateInfo,
3029 pAllocator: *const VkAllocationCallbacks,
3030 pQueryPool: *mut VkQueryPool) -> VkResult;
3031
3032 pub type vkDestroyQueryPoolFn = unsafe extern "stdcall" fn(device: VkDevice,
3033 queryPool: VkQueryPool,
3034 pAllocator: *const VkAllocationCallbacks);
3035
3036 pub type vkGetQueryPoolResultsFn = unsafe extern "stdcall" fn(device: VkDevice,
3037 queryPool: VkQueryPool,
3038 firstQuery: uint32_t,
3039 queryCount: uint32_t,
3040 dataSize: size_t,
3041 pData: *mut c_void,
3042 stride: VkDeviceSize,
3043 flags: VkDeviceSize) -> VkResult;
3044
3045 pub type vkCreateBufferFn = unsafe extern "stdcall" fn(device: VkDevice,
3046 pCreateInfo: *const VkBufferCreateInfo,
3047 pAllocator: *const VkAllocationCallbacks,
3048 pBuffer: *mut VkBuffer) -> VkResult;
3049
3050 pub type vkDestroyBufferFn = unsafe extern "stdcall" fn(device: VkDevice,
3051 buffer: VkBuffer,
3052 pAllocator: *const VkAllocationCallbacks);
3053
3054 pub type vkCreateBufferViewFn = unsafe extern "stdcall" fn(device: VkDevice,
3055 pCreateInfo: *const VkBufferViewCreateInfo,
3056 pAllocator: *const VkAllocationCallbacks,
3057 pView: *mut VkBufferView) -> VkResult;
3058
3059 pub type vkDestroyBufferViewFn = unsafe extern "stdcall" fn(device: VkDevice,
3060 bufferView: VkBufferView,
3061 pAllocator: *const VkAllocationCallbacks);
3062
3063 pub type vkCreateImageFn = unsafe extern "stdcall" fn(device: VkDevice,
3064 pCreateInfo: *const VkImageCreateInfo,
3065 pAllocator: *const VkAllocationCallbacks,
3066 pImage: *mut VkImage) -> VkResult;
3067
3068 pub type vkDestroyImageFn = unsafe extern "stdcall" fn(device: VkDevice,
3069 image: VkImage,
3070 pAllocator: *const VkAllocationCallbacks);
3071
3072 pub type vkGetImageSubresourceLayoutFn = unsafe extern "stdcall" fn(device: VkDevice,
3073 image: VkImage,
3074 pSubresource: *const VkImageSubresource,
3075 pLayout: *mut VkSubresourceLayout);
3076
3077 pub type vkCreateImageViewFn = unsafe extern "stdcall" fn(device: VkDevice,
3078 pCreateInfo: *const VkImageViewCreateInfo,
3079 pAllocator: *const VkAllocationCallbacks,
3080 pView: *mut VkImageView) -> VkResult;
3081
3082 pub type vkDestroyImageViewFn = unsafe extern "stdcall" fn(device: VkDevice,
3083 imageView: VkImageView,
3084 pAllocator: *const VkAllocationCallbacks);
3085
3086 pub type vkCreateShaderModuleFn = unsafe extern "stdcall" fn(device: VkDevice,
3087 pCreateInfo: *const VkShaderModuleCreateInfo,
3088 pAllocator: *const VkAllocationCallbacks,
3089 pShaderModule: *mut VkShaderModule) -> VkResult;
3090
3091 pub type vkDestroyShaderModuleFn = unsafe extern "stdcall" fn(device: VkDevice,
3092 shaderModule: VkShaderModule,
3093 pAllocator: *const VkAllocationCallbacks);
3094
3095 pub type vkCreatePipelineCacheFn = unsafe extern "stdcall" fn(device: VkDevice,
3096 pCreateInfo: *const VkPipelineCacheCreateInfo,
3097 pAllocator: *const VkAllocationCallbacks,
3098 pPipelineCache: *mut VkPipelineCache) -> VkResult;
3099
3100 pub type vkDestroyPipelineCacheFn = unsafe extern "stdcall" fn(device: VkDevice,
3101 pipelineCache: VkPipelineCache,
3102 pAllocator: *const VkAllocationCallbacks);
3103
3104 pub type vkGetPipelineCacheDataFn = unsafe extern "stdcall" fn(device: VkDevice,
3105 pipelineCache: VkPipelineCache,
3106 pDataSize: *mut size_t,
3107 pData: *mut c_void) -> VkResult;
3108
3109 pub type vkMergePipelineCachesFn = unsafe extern "stdcall" fn(device: VkDevice,
3110 dstCache: VkPipelineCache,
3111 srcCacheCount: uint32_t,
3112 pSrcCaches: *const VkPipelineCache) -> VkResult;
3113
3114 pub type vkCreateGraphicsPipelinesFn = unsafe extern "stdcall" fn(device: VkDevice,
3115 pipelineCache: VkPipelineCache,
3116 createInfoCount: uint32_t,
3117 pCreateInfos: *const VkGraphicsPipelineCreateInfo,
3118 pAllocator: *const VkAllocationCallbacks,
3119 pPipelines: *mut VkPipeline) -> VkResult;
3120
3121 pub type vkCreateComputePipelinesFn = unsafe extern "stdcall" fn(device: VkDevice,
3122 pipelineCache: VkPipelineCache,
3123 createInfoCount: uint32_t,
3124 pCreateInfos: *const VkComputePipelineCreateInfo,
3125 pAllocator: *const VkAllocationCallbacks,
3126 pPipelines: *mut VkPipeline) -> VkResult;
3127
3128 pub type vkDestroyPipelineFn = unsafe extern "stdcall" fn(device: VkDevice,
3129 pipeline: VkPipeline,
3130 pAllocator: *const VkAllocationCallbacks);
3131
3132 pub type vkCreatePipelineLayoutFn = unsafe extern "stdcall" fn(device: VkDevice,
3133 pCreateInfo: *const VkPipelineLayoutCreateInfo,
3134 pAllocator: *const VkAllocationCallbacks,
3135 pPipelineLayout: *mut VkPipelineLayout) -> VkResult;
3136
3137 pub type vkDestroyPipelineLayoutFn = unsafe extern "stdcall" fn(device: VkDevice,
3138 pipelineLayout: VkPipelineLayout,
3139 pAllocator: *const VkAllocationCallbacks);
3140
3141 pub type vkCreateSamplerFn = unsafe extern "stdcall" fn(device: VkDevice,
3142 pCreateInfo: *const VkSamplerCreateInfo,
3143 pAllocator: *const VkAllocationCallbacks,
3144 pSampler: *mut VkSampler) -> VkResult;
3145
3146 pub type vkDestroySamplerFn = unsafe extern "stdcall" fn(device: VkDevice,
3147 sampler: VkSampler,
3148 pAllocator: *const VkAllocationCallbacks);
3149
3150 pub type vkCreateDescriptorSetLayoutFn = unsafe extern "stdcall" fn(device: VkDevice,
3151 pCreateInfo: *const VkDescriptorSetLayoutCreateInfo,
3152 pAllocator: *const VkAllocationCallbacks,
3153 pSetLayout: *mut VkDescriptorSetLayout) -> VkResult;
3154
3155 pub type vkDestroyDescriptorSetLayoutFn = unsafe extern "stdcall" fn(device: VkDevice,
3156 descriptorSetLayout: VkDescriptorSetLayout,
3157 pAllocator: *const VkAllocationCallbacks);
3158
3159 pub type vkCreateDescriptorPoolFn = unsafe extern "stdcall" fn(device: VkDevice,
3160 pCreateInfo: *const VkDescriptorPoolCreateInfo,
3161 pAllocator: *const VkAllocationCallbacks,
3162 pDescriptorPool: *mut VkDescriptorPool) -> VkResult;
3163
3164 pub type vkDestroyDescriptorPoolFn = unsafe extern "stdcall" fn(device: VkDevice,
3165 descriptorPool: VkDescriptorPool,
3166 pAllocator: *const VkAllocationCallbacks);
3167
3168 pub type vkResetDescriptorPoolFn = unsafe extern "stdcall" fn(device: VkDevice,
3169 descriptorPool: VkDescriptorPool,
3170 flags: VkDescriptorPoolResetFlags) -> VkResult;
3171
3172 pub type vkAllocateDescriptorSetsFn = unsafe extern "stdcall" fn(device: VkDevice,
3173 pAllocateInfo: *const VkDescriptorSetAllocateInfo,
3174 pDescriptorSets: *mut VkDescriptorSet) -> VkResult;
3175
3176 pub type vkFreeDescriptorSetsFn = unsafe extern "stdcall" fn(device: VkDevice,
3177 descriptorPool: VkDescriptorPool,
3178 descriptorSetCount: uint32_t,
3179 pDescriptorSets: *const VkDescriptorSet) -> VkResult;
3180
3181 pub type vkUpdateDescriptorSetsFn = unsafe extern "stdcall" fn(device: VkDevice,
3182 descriptorWriteCount: uint32_t,
3183 pDescriptorWrites: *const VkWriteDescriptorSet,
3184 descriptorCopyCount: uint32_t,
3185 pDescriptorCopies: *const VkCopyDescriptorSet);
3186
3187 pub type vkCreateFramebufferFn = unsafe extern "stdcall" fn(device: VkDevice,
3188 pCreateInfo: *const VkFramebufferCreateInfo,
3189 pAllocator: *const VkAllocationCallbacks,
3190 pFramebuffer: *mut VkFramebuffer) -> VkResult;
3191
3192 pub type vkDestroyFramebufferFn = unsafe extern "stdcall" fn(device: VkDevice,
3193 framebuffer: VkFramebuffer,
3194 pAllocator: *const VkAllocationCallbacks);
3195
3196 pub type vkCreateRenderPassFn = unsafe extern "stdcall" fn(device: VkDevice,
3197 pCreateInfo: *const VkRenderPassCreateInfo,
3198 pAllocator: *const VkAllocationCallbacks,
3199 pRenderPass: *mut VkRenderPass) -> VkResult;
3200
3201 pub type vkDestroyRenderPassFn = unsafe extern "stdcall" fn(device: VkDevice,
3202 renderPass: VkRenderPass,
3203 pAllocator: *const VkAllocationCallbacks);
3204
3205 pub type vkGetRenderAreaGranularityFn = unsafe extern "stdcall" fn(device: VkDevice,
3206 renderPass: VkRenderPass,
3207 pGranularity: *mut VkExtent2D);
3208
3209 pub type vkCreateCommandPoolFn = unsafe extern "stdcall" fn(device: VkDevice,
3210 pCreateInfo: *const VkCommandPoolCreateInfo,
3211 pAllocator: *const VkAllocationCallbacks,
3212 pCommandPool: *mut VkCommandPool) -> VkResult;
3213
3214 pub type vkDestroyCommandPoolFn = unsafe extern "stdcall" fn(device: VkDevice,
3215 commandPool: VkCommandPool,
3216 pAllocator: *const VkAllocationCallbacks);
3217
3218 pub type vkResetCommandPoolFn = unsafe extern "stdcall" fn(device: VkDevice,
3219 commandPool: VkCommandPool,
3220 flags: VkCommandPoolResetFlags) -> VkResult;
3221
3222 pub type vkAllocateCommandBuffersFn = unsafe extern "stdcall" fn(device: VkDevice,
3223 pAllocateInfo: *const VkCommandBufferAllocateInfo,
3224 pCommandBuffers: *mut VkCommandBuffer) -> VkResult;
3225
3226 pub type vkFreeCommandBuffersFn = unsafe extern "stdcall" fn(device: VkDevice,
3227 commandPool: VkCommandPool,
3228 commandBufferCount: uint32_t,
3229 pCommandBuffers: *const VkCommandBuffer);
3230
3231 pub type vkBeginCommandBufferFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3232 pBeginInfo: *const VkCommandBufferBeginInfo) -> VkResult;
3233
3234 pub type vkEndCommandBufferFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer) -> VkResult;
3235
3236 pub type vkResetCommandBufferFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3237 flags: VkCommandBufferResetFlags) -> VkResult;
3238
3239 pub type vkCmdBindPipelineFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3240 pipelineBindPoint: VkPipelineBindPoint,
3241 pipeline: VkPipeline);
3242
3243 pub type vkCmdSetViewportFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3244 firstViewport: uint32_t,
3245 viewportCount: uint32_t,
3246 pViewports: *const VkViewport);
3247
3248 pub type vkCmdSetScissorFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3249 firstScissor: uint32_t,
3250 scissorCount: uint32_t,
3251 pScissors: *const VkRect2D);
3252
3253 pub type vkCmdSetLineWidthFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3254 lineWidth: c_float);
3255
3256 pub type vkCmdSetDepthBiasFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3257 depthBiasConstantFactor: c_float,
3258 depthBiasClamp: c_float,
3259 depthBiasSlopeFactor: c_float);
3260
3261 pub type vkCmdSetBlendConstantsFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3263 blendConstants: [c_float;4]);
3264
3265 pub type vkCmdSetDepthBoundsFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3266 minDepthBounds: c_float,
3267 maxDepthBounds: c_float);
3268
3269 pub type vkCmdSetStencilCompareMaskFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3270 faceMask: VkStencilFaceFlags,
3271 compareMask: uint32_t);
3272
3273 pub type vkCmdSetStencilWriteMaskFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3274 faceMask: VkStencilFaceFlags,
3275 writeMask: uint32_t);
3276
3277 pub type vkCmdSetStencilReferenceFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3278 faceMask: VkStencilFaceFlags,
3279 reference: uint32_t);
3280
3281 pub type vkCmdBindDescriptorSetsFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3282 pipelineBindPoint: VkPipelineBindPoint,
3283 layout: VkPipelineLayout,
3284 firstSet: uint32_t,
3285 descriptorSetCount: uint32_t,
3286 pDescriptorSets: *const VkDescriptorSet,
3287 dynamicOffsetCount: uint32_t,
3288 pDynamicOffsets: *const uint32_t);
3289
3290 pub type vkCmdBindIndexBufferFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3291 buffer: VkBuffer,
3292 offset: VkDeviceSize,
3293 indexType: VkIndexType);
3294
3295 pub type vkCmdBindVertexBuffersFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3296 firstBinding: uint32_t,
3297 bindingCount: uint32_t,
3298 pBuffers: *const VkBuffer,
3299 pOffsets: *const VkDeviceSize);
3300
3301 pub type vkCmdDrawFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3302 vertexCount: uint32_t,
3303 instanceCount: uint32_t,
3304 firstVertex: uint32_t,
3305 firstInstance: uint32_t);
3306
3307 pub type vkCmdDrawIndexedFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3308 indexCount: uint32_t,
3309 instanceCount: uint32_t,
3310 firstIndex: uint32_t,
3311 vertexOffset: int32_t,
3312 firstInstance: uint32_t);
3313
3314 pub type vkCmdDrawIndirectFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3315 buffer: VkBuffer,
3316 offset: VkDeviceSize,
3317 drawCount: uint32_t,
3318 stride: uint32_t);
3319
3320 pub type vkCmdDrawIndexedIndirectFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3321 buffer: VkBuffer,
3322 offset: VkDeviceSize,
3323 drawCount: uint32_t,
3324 stride: uint32_t);
3325
3326 pub type vkCmdDispatchFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3327 x: uint32_t,
3328 y: uint32_t,
3329 z: uint32_t);
3330
3331 pub type vkCmdDispatchIndirectFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3332 buffer: VkBuffer,
3333 offset: VkDeviceSize);
3334
3335 pub type vkCmdCopyBufferFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3336 srcBuffer: VkBuffer,
3337 dstBuffer: VkBuffer,
3338 regionCount: uint32_t,
3339 pRegions: *const VkBufferCopy);
3340
3341 pub type vkCmdCopyImageFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3342 srcImage: VkImage,
3343 srcImageLayout: VkImageLayout,
3344 dstImage: VkImage,
3345 dstImageLayout: VkImageLayout,
3346 regionCount: uint32_t,
3347 pRegions: *const VkImageCopy);
3348
3349 pub type vkCmdBlitImageFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3350 srcImage: VkImage,
3351 srcImageLayout: VkImageLayout,
3352 dstImage: VkImage,
3353 dstImageLayout: VkImageLayout,
3354 regionCount: uint32_t,
3355 pRegions: *const VkImageBlit,
3356 filter: VkFilter);
3357
3358 pub type vkCmdCopyBufferToImageFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3359 srcBuffer: VkBuffer,
3360 dstImage: VkImage,
3361 dstImageLayout: VkImageLayout,
3362 regionCount: uint32_t,
3363 pRegions: *const VkBufferImageCopy);
3364
3365 pub type vkCmdCopyImageToBufferFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3366 srcImage: VkImage,
3367 srcImageLayout: VkImageLayout,
3368 dstBuffer: VkBuffer,
3369 regionCount: uint32_t,
3370 pRegions: *const VkBufferImageCopy);
3371
3372 pub type vkCmdUpdateBufferFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3373 dstBuffer: VkBuffer,
3374 dstOffset: VkDeviceSize,
3375 dataSize: VkDeviceSize,
3376 pData: *const uint32_t);
3377
3378 pub type vkCmdFillBufferFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3379 dstBuffer: VkBuffer,
3380 dstOffset: VkDeviceSize,
3381 size: VkDeviceSize,
3382 data: uint32_t);
3383
3384 pub type vkCmdClearColorImageFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3385 image: VkImage,
3386 imageLayout: VkImageLayout,
3387 pColor: *const VkClearColorValue,
3388 rangeCount: uint32_t,
3389 pRanges: *const VkImageSubresourceRange);
3390
3391 pub type vkCmdClearDepthStencilImageFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3392 image: VkImage,
3393 imageLayout: VkImageLayout,
3394 pDepthStencil: *const VkClearDepthStencilValue,
3395 rangeCount: uint32_t,
3396 pRanges: *const VkImageSubresourceRange);
3397
3398 pub type vkCmdClearAttachmentsFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3399 attachmentCount: uint32_t,
3400 pAttachments: *const VkClearAttachment,
3401 rectCount: uint32_t,
3402 pRects: *const VkClearRect);
3403
3404 pub type vkCmdResolveImageFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3405 srcImage: VkImage,
3406 srcImageLayout: VkImageLayout,
3407 dstImage: VkImage,
3408 dstImageLayout: VkImageLayout,
3409 regionCount: uint32_t,
3410 pRegions: *const VkImageResolve);
3411
3412 pub type vkCmdSetEventFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3413 event: VkEvent,
3414 stageMask: VkPipelineStageFlags);
3415
3416 pub type vkCmdResetEventFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3417 event: VkEvent,
3418 stageMask: VkPipelineStageFlags);
3419
3420 pub type vkCmdWaitEventsFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3421 eventCount: uint32_t,
3422 pEvents: *const VkEvent,
3423 srcStageMask: VkPipelineStageFlags,
3424 dstStageMask: VkPipelineStageFlags,
3425 memoryBarrierCount: uint32_t,
3426 pMemoryBarriers: *const VkMemoryBarrier,
3427 bufferMemoryBarrierCount: uint32_t,
3428 pBufferMemoryBarriers: *const VkBufferMemoryBarrier,
3429 imageMemoryBarrierCount: uint32_t,
3430 pImageMemoryBarriers: *const VkImageMemoryBarrier);
3431
3432 pub type vkCmdPipelineBarrierFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3433 srcStageMask: VkPipelineStageFlags,
3434 dstStageMask: VkPipelineStageFlags,
3435 dependencyFlags: VkDependencyFlags,
3436 memoryBarrierCount: uint32_t,
3437 pMemoryBarriers: *const VkMemoryBarrier,
3438 bufferMemoryBarrierCount: uint32_t,
3439 pBufferMemoryBarriers: *const VkBufferMemoryBarrier,
3440 imageMemoryBarrierCount: uint32_t,
3441 pImageMemoryBarriers: *const VkImageMemoryBarrier);
3442
3443 pub type vkCmdBeginQueryFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3444 queryPool: VkQueryPool,
3445 query: uint32_t,
3446 flags: VkQueryControlFlags);
3447
3448 pub type vkCmdEndQueryFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3449 queryPool: VkQueryPool,
3450 query: uint32_t);
3451
3452 pub type vkCmdResetQueryPoolFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3453 queryPool: VkQueryPool,
3454 firstQuery: uint32_t,
3455 queryCount: uint32_t);
3456
3457 pub type vkCmdWriteTimestampFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3458 pipelineStage: VkPipelineStageFlags,
3459 queryPool: VkQueryPool,
3460 query: uint32_t);
3461
3462 pub type vkCmdCopyQueryPoolResultsFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3463 queryPool: VkQueryPool,
3464 firstQuery: uint32_t,
3465 queryCount: uint32_t,
3466 dstBuffer: VkBuffer,
3467 dstOffset: VkDeviceSize,
3468 stride: VkDeviceSize,
3469 flags: VkQueryResultFlags);
3470
3471 pub type vkCmdPushConstantsFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3472 layout: VkPipelineLayout,
3473 stageFlags: VkShaderStageFlags,
3474 offset: uint32_t,
3475 size: uint32_t,
3476 pValues: *const c_void);
3477
3478 pub type vkCmdBeginRenderPassFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3479 pRenderPassBegin: *const VkRenderPassBeginInfo,
3480 contents: VkSubpassContents);
3481
3482 pub type vkCmdNextSubpassFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3483 contents: VkSubpassContents);
3484
3485 pub type vkCmdEndRenderPassFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer);
3486
3487 pub type vkCmdExecuteCommandsFn = unsafe extern "stdcall" fn(commandBuffer: VkCommandBuffer,
3488 commandBufferCount: uint32_t,
3489 pCommandBuffers: *const VkCommandBuffer);
3490
3491 pub struct VkCoreCommands {
3492 library: Option<DynamicLibrary>,
3493 vkCreateInstance: Option<vkCreateInstanceFn>,
3494 vkDestroyInstance: Option<vkDestroyInstanceFn>,
3495 vkEnumeratePhysicalDevices: Option<vkEnumeratePhysicalDevicesFn>,
3496 vkGetPhysicalDeviceFeatures: Option<vkGetPhysicalDeviceFeaturesFn>,
3497 vkGetPhysicalDeviceFormatProperties: Option<vkGetPhysicalDeviceFormatPropertiesFn>,
3498 vkGetPhysicalDeviceImageFormatProperties: Option<vkGetPhysicalDeviceImageFormatPropertiesFn>,
3499 vkGetPhysicalDeviceProperties: Option<vkGetPhysicalDevicePropertiesFn>,
3500 vkGetPhysicalDeviceQueueFamilyProperties: Option<vkGetPhysicalDeviceQueueFamilyPropertiesFn>,
3501 vkGetPhysicalDeviceMemoryProperties: Option<vkGetPhysicalDeviceMemoryPropertiesFn>,
3502 vkGetInstanceProcAddr: Option<vkGetInstanceProcAddrFn>,
3503 vkGetDeviceProcAddr: Option<vkGetDeviceProcAddrFn>,
3504 vkCreateDevice: Option<vkCreateDeviceFn>,
3505 vkDestroyDevice: Option<vkDestroyDeviceFn>,
3506 vkEnumerateInstanceExtensionProperties: Option<vkEnumerateInstanceExtensionPropertiesFn>,
3507 vkEnumerateDeviceExtensionProperties: Option<vkEnumerateDeviceExtensionPropertiesFn>,
3508 vkEnumerateInstanceLayerProperties: Option<vkEnumerateInstanceLayerPropertiesFn>,
3509 vkEnumerateDeviceLayerProperties: Option<vkEnumerateDeviceLayerPropertiesFn>,
3510 vkGetDeviceQueue: Option<vkGetDeviceQueueFn>,
3511 vkQueueSubmit: Option<vkQueueSubmitFn>,
3512 vkQueueWaitIdle: Option<vkQueueWaitIdleFn>,
3513 vkDeviceWaitIdle: Option<vkDeviceWaitIdleFn>,
3514 vkAllocateMemory: Option<vkAllocateMemoryFn>,
3515 vkFreeMemory: Option<vkFreeMemoryFn>,
3516 vkMapMemory: Option<vkMapMemoryFn>,
3517 vkUnmapMemory: Option<vkUnmapMemoryFn>,
3518 vkFlushMappedMemoryRanges: Option<vkFlushMappedMemoryRangesFn>,
3519 vkInvalidateMappedMemoryRanges: Option<vkInvalidateMappedMemoryRangesFn>,
3520 vkGetDeviceMemoryCommitment: Option<vkGetDeviceMemoryCommitmentFn>,
3521 vkBindBufferMemory: Option<vkBindBufferMemoryFn>,
3522 vkBindImageMemory: Option<vkBindImageMemoryFn>,
3523 vkGetBufferMemoryRequirements: Option<vkGetBufferMemoryRequirementsFn>,
3524 vkGetImageMemoryRequirements: Option<vkGetImageMemoryRequirementsFn>,
3525 vkGetImageSparseMemoryRequirements: Option<vkGetImageSparseMemoryRequirementsFn>,
3526 vkGetPhysicalDeviceSparseImageFormatProperties: Option<vkGetPhysicalDeviceSparseImageFormatPropertiesFn>,
3527 vkQueueBindSparse: Option<vkQueueBindSparseFn>,
3528 vkCreateFence: Option<vkCreateFenceFn>,
3529 vkDestroyFence: Option<vkDestroyFenceFn>,
3530 vkResetFences: Option<vkResetFencesFn>,
3531 vkGetFenceStatus: Option<vkGetFenceStatusFn>,
3532 vkWaitForFences: Option<vkWaitForFencesFn>,
3533 vkCreateSemaphore: Option<vkCreateSemaphoreFn>,
3534 vkDestroySemaphore: Option<vkDestroySemaphoreFn>,
3535 vkCreateEvent: Option<vkCreateEventFn>,
3536 vkDestroyEvent: Option<vkDestroyEventFn>,
3537 vkGetEventStatus: Option<vkGetEventStatusFn>,
3538 vkSetEvent: Option<vkSetEventFn>,
3539 vkResetEvent: Option<vkResetEventFn>,
3540 vkCreateQueryPool: Option<vkCreateQueryPoolFn>,
3541 vkDestroyQueryPool: Option<vkDestroyQueryPoolFn>,
3542 vkGetQueryPoolResults: Option<vkGetQueryPoolResultsFn>,
3543 vkCreateBuffer: Option<vkCreateBufferFn>,
3544 vkDestroyBuffer: Option<vkDestroyBufferFn>,
3545 vkCreateBufferView: Option<vkCreateBufferViewFn>,
3546 vkDestroyBufferView: Option<vkDestroyBufferViewFn>,
3547 vkCreateImage: Option<vkCreateImageFn>,
3548 vkDestroyImage: Option<vkDestroyImageFn>,
3549 vkGetImageSubresourceLayout: Option<vkGetImageSubresourceLayoutFn>,
3550 vkCreateImageView: Option<vkCreateImageViewFn>,
3551 vkDestroyImageView: Option<vkDestroyImageViewFn>,
3552 vkCreateShaderModule: Option<vkCreateShaderModuleFn>,
3553 vkDestroyShaderModule: Option<vkDestroyShaderModuleFn>,
3554 vkCreatePipelineCache: Option<vkCreatePipelineCacheFn>,
3555 vkDestroyPipelineCache: Option<vkDestroyPipelineCacheFn>,
3556 vkGetPipelineCacheData: Option<vkGetPipelineCacheDataFn>,
3557 vkMergePipelineCaches: Option<vkMergePipelineCachesFn>,
3558 vkCreateGraphicsPipelines: Option<vkCreateGraphicsPipelinesFn>,
3559 vkCreateComputePipelines: Option<vkCreateComputePipelinesFn>,
3560 vkDestroyPipeline: Option<vkDestroyPipelineFn>,
3561 vkCreatePipelineLayout: Option<vkCreatePipelineLayoutFn>,
3562 vkDestroyPipelineLayout: Option<vkDestroyPipelineLayoutFn>,
3563 vkCreateSampler: Option<vkCreateSamplerFn>,
3564 vkDestroySampler: Option<vkDestroySamplerFn>,
3565 vkCreateDescriptorSetLayout: Option<vkCreateDescriptorSetLayoutFn>,
3566 vkDestroyDescriptorSetLayout: Option<vkDestroyDescriptorSetLayoutFn>,
3567 vkCreateDescriptorPool: Option<vkCreateDescriptorPoolFn>,
3568 vkDestroyDescriptorPool: Option<vkDestroyDescriptorPoolFn>,
3569 vkResetDescriptorPool: Option<vkResetDescriptorPoolFn>,
3570 vkAllocateDescriptorSets: Option<vkAllocateDescriptorSetsFn>,
3571 vkFreeDescriptorSets: Option<vkFreeDescriptorSetsFn>,
3572 vkUpdateDescriptorSets: Option<vkUpdateDescriptorSetsFn>,
3573 vkCreateFramebuffer: Option<vkCreateFramebufferFn>,
3574 vkDestroyFramebuffer: Option<vkDestroyFramebufferFn>,
3575 vkCreateRenderPass: Option<vkCreateRenderPassFn>,
3576 vkDestroyRenderPass: Option<vkDestroyRenderPassFn>,
3577 vkGetRenderAreaGranularity: Option<vkGetRenderAreaGranularityFn>,
3578 vkCreateCommandPool: Option<vkCreateCommandPoolFn>,
3579 vkDestroyCommandPool: Option<vkDestroyCommandPoolFn>,
3580 vkResetCommandPool: Option<vkResetCommandPoolFn>,
3581 vkAllocateCommandBuffers: Option<vkAllocateCommandBuffersFn>,
3582 vkFreeCommandBuffers: Option<vkFreeCommandBuffersFn>,
3583 vkBeginCommandBuffer: Option<vkBeginCommandBufferFn>,
3584 vkEndCommandBuffer: Option<vkEndCommandBufferFn>,
3585 vkResetCommandBuffer: Option<vkResetCommandBufferFn>,
3586 vkCmdBindPipeline: Option<vkCmdBindPipelineFn>,
3587 vkCmdSetViewport: Option<vkCmdSetViewportFn>,
3588 vkCmdSetScissor: Option<vkCmdSetScissorFn>,
3589 vkCmdSetLineWidth: Option<vkCmdSetLineWidthFn>,
3590 vkCmdSetDepthBias: Option<vkCmdSetDepthBiasFn>,
3591 vkCmdSetBlendConstants: Option<vkCmdSetBlendConstantsFn>,
3592 vkCmdSetDepthBounds: Option<vkCmdSetDepthBoundsFn>,
3593 vkCmdSetStencilCompareMask: Option<vkCmdSetStencilCompareMaskFn>,
3594 vkCmdSetStencilWriteMask: Option<vkCmdSetStencilWriteMaskFn>,
3595 vkCmdSetStencilReference: Option<vkCmdSetStencilReferenceFn>,
3596 vkCmdBindDescriptorSets: Option<vkCmdBindDescriptorSetsFn>,
3597 vkCmdBindIndexBuffer: Option<vkCmdBindIndexBufferFn>,
3598 vkCmdBindVertexBuffers: Option<vkCmdBindVertexBuffersFn>,
3599 vkCmdDraw: Option<vkCmdDrawFn>,
3600 vkCmdDrawIndexed: Option<vkCmdDrawIndexedFn>,
3601 vkCmdDrawIndirect: Option<vkCmdDrawIndirectFn>,
3602 vkCmdDrawIndexedIndirect: Option<vkCmdDrawIndexedIndirectFn>,
3603 vkCmdDispatch: Option<vkCmdDispatchFn>,
3604 vkCmdDispatchIndirect: Option<vkCmdDispatchIndirectFn>,
3605 vkCmdCopyBuffer: Option<vkCmdCopyBufferFn>,
3606 vkCmdCopyImage: Option<vkCmdCopyImageFn>,
3607 vkCmdBlitImage: Option<vkCmdBlitImageFn>,
3608 vkCmdCopyBufferToImage: Option<vkCmdCopyBufferToImageFn>,
3609 vkCmdCopyImageToBuffer: Option<vkCmdCopyImageToBufferFn>,
3610 vkCmdUpdateBuffer: Option<vkCmdUpdateBufferFn>,
3611 vkCmdFillBuffer: Option<vkCmdFillBufferFn>,
3612 vkCmdClearColorImage: Option<vkCmdClearColorImageFn>,
3613 vkCmdClearDepthStencilImage: Option<vkCmdClearDepthStencilImageFn>,
3614 vkCmdClearAttachments: Option<vkCmdClearAttachmentsFn>,
3615 vkCmdResolveImage: Option<vkCmdResolveImageFn>,
3616 vkCmdSetEvent: Option<vkCmdSetEventFn>,
3617 vkCmdResetEvent: Option<vkCmdResetEventFn>,
3618 vkCmdWaitEvents: Option<vkCmdWaitEventsFn>,
3619 vkCmdPipelineBarrier: Option<vkCmdPipelineBarrierFn>,
3620 vkCmdBeginQuery: Option<vkCmdBeginQueryFn>,
3621 vkCmdEndQuery: Option<vkCmdEndQueryFn>,
3622 vkCmdResetQueryPool: Option<vkCmdResetQueryPoolFn>,
3623 vkCmdWriteTimestamp: Option<vkCmdWriteTimestampFn>,
3624 vkCmdCopyQueryPoolResults: Option<vkCmdCopyQueryPoolResultsFn>,
3625 vkCmdPushConstants: Option<vkCmdPushConstantsFn>,
3626 vkCmdBeginRenderPass: Option<vkCmdBeginRenderPassFn>,
3627 vkCmdNextSubpass: Option<vkCmdNextSubpassFn>,
3628 vkCmdEndRenderPass: Option<vkCmdEndRenderPassFn>,
3629 vkCmdExecuteCommands: Option<vkCmdExecuteCommandsFn>,
3630 }
3631
3632 impl VkCoreCommands {
3633 pub fn new() -> Result<VkCoreCommands, String> {
3634 unsafe {
3635 let mut vulkan_core: VkCoreCommands;
3636 vulkan_core = ::std::mem::zeroed::<VkCoreCommands>();
3637 let library_path = Path::new(VULKAN_LIBRARY);
3638 vulkan_core.library = match DynamicLibrary::open(Some(library_path)) {
3639 Err(error) => return Err(format!("Failed to load {}: {}", VULKAN_LIBRARY, error)),
3640 Ok(library) => Some(library),
3641 };
3642 vulkan_core.vkGetInstanceProcAddr = Some(transmute(try!(vulkan_core.library.as_ref().unwrap().symbol::<u8>("vkGetInstanceProcAddr"))));
3644 vulkan_core.vkCreateInstance = Some(transmute(load_command!(vulkan_core, VkInstance::null(), "vkCreateInstance")));
3646 vulkan_core.vkEnumerateInstanceExtensionProperties = Some(transmute(load_command!(vulkan_core, VkInstance::null(), "vkEnumerateInstanceExtensionProperties")));
3647 vulkan_core.vkEnumerateInstanceLayerProperties = Some(transmute(load_command!(vulkan_core, VkInstance::null(), "vkEnumerateInstanceLayerProperties")));
3648 Ok(vulkan_core)
3649 }
3650 }
3651
3652 pub fn load(&mut self, instance: VkInstance) -> Result<(), String> {
3653 unsafe {
3654 self.vkDestroyInstance = Some(transmute(load_command!(self, instance, "vkDestroyInstance")));
3656 self.vkEnumeratePhysicalDevices = Some(transmute(load_command!(self, instance, "vkEnumeratePhysicalDevices")));
3657 self.vkGetPhysicalDeviceFeatures = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceFeatures")));
3658 self.vkGetPhysicalDeviceFormatProperties = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceFormatProperties")));
3659 self.vkGetPhysicalDeviceImageFormatProperties = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceImageFormatProperties")));
3660 self.vkGetPhysicalDeviceProperties = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceProperties")));
3661 self.vkGetPhysicalDeviceQueueFamilyProperties = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceQueueFamilyProperties")));
3662 self.vkGetPhysicalDeviceMemoryProperties = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceMemoryProperties")));
3663 self.vkGetInstanceProcAddr = Some(transmute(load_command!(self, instance, "vkGetInstanceProcAddr")));
3664 self.vkGetDeviceProcAddr = Some(transmute(load_command!(self, instance, "vkGetDeviceProcAddr")));
3665 self.vkCreateDevice = Some(transmute(load_command!(self, instance, "vkCreateDevice")));
3666 self.vkDestroyDevice = Some(transmute(load_command!(self, instance, "vkDestroyDevice")));
3667 self.vkEnumerateDeviceExtensionProperties = Some(transmute(load_command!(self, instance, "vkEnumerateDeviceExtensionProperties")));
3669 self.vkEnumerateDeviceLayerProperties = Some(transmute(load_command!(self, instance, "vkEnumerateDeviceLayerProperties")));
3671 self.vkGetDeviceQueue = Some(transmute(load_command!(self, instance, "vkGetDeviceQueue")));
3672 self.vkQueueSubmit = Some(transmute(load_command!(self, instance, "vkQueueSubmit")));
3673 self.vkQueueWaitIdle = Some(transmute(load_command!(self, instance, "vkQueueWaitIdle")));
3674 self.vkDeviceWaitIdle = Some(transmute(load_command!(self, instance, "vkDeviceWaitIdle")));
3675 self.vkAllocateMemory = Some(transmute(load_command!(self, instance, "vkAllocateMemory")));
3676 self.vkFreeMemory = Some(transmute(load_command!(self, instance, "vkFreeMemory")));
3677 self.vkMapMemory = Some(transmute(load_command!(self, instance, "vkMapMemory")));
3678 self.vkUnmapMemory = Some(transmute(load_command!(self, instance, "vkUnmapMemory")));
3679 self.vkFlushMappedMemoryRanges = Some(transmute(load_command!(self, instance, "vkFlushMappedMemoryRanges")));
3680 self.vkInvalidateMappedMemoryRanges = Some(transmute(load_command!(self, instance, "vkInvalidateMappedMemoryRanges")));
3681 self.vkGetDeviceMemoryCommitment = Some(transmute(load_command!(self, instance, "vkGetDeviceMemoryCommitment")));
3682 self.vkBindBufferMemory = Some(transmute(load_command!(self, instance, "vkBindBufferMemory")));
3683 self.vkBindImageMemory = Some(transmute(load_command!(self, instance, "vkBindImageMemory")));
3684 self.vkGetBufferMemoryRequirements = Some(transmute(load_command!(self, instance, "vkGetBufferMemoryRequirements")));
3685 self.vkGetImageMemoryRequirements = Some(transmute(load_command!(self, instance, "vkGetImageMemoryRequirements")));
3686 self.vkGetImageSparseMemoryRequirements = Some(transmute(load_command!(self, instance, "vkGetImageSparseMemoryRequirements")));
3687 self.vkGetPhysicalDeviceSparseImageFormatProperties = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceSparseImageFormatProperties")));
3688 self.vkQueueBindSparse = Some(transmute(load_command!(self, instance, "vkQueueBindSparse")));
3689 self.vkCreateFence = Some(transmute(load_command!(self, instance, "vkCreateFence")));
3690 self.vkDestroyFence = Some(transmute(load_command!(self, instance, "vkDestroyFence")));
3691 self.vkResetFences = Some(transmute(load_command!(self, instance, "vkResetFences")));
3692 self.vkGetFenceStatus = Some(transmute(load_command!(self, instance, "vkGetFenceStatus")));
3693 self.vkWaitForFences = Some(transmute(load_command!(self, instance, "vkWaitForFences")));
3694 self.vkCreateSemaphore = Some(transmute(load_command!(self, instance, "vkCreateSemaphore")));
3695 self.vkDestroySemaphore = Some(transmute(load_command!(self, instance, "vkDestroySemaphore")));
3696 self.vkCreateEvent = Some(transmute(load_command!(self, instance, "vkCreateEvent")));
3697 self.vkDestroyEvent = Some(transmute(load_command!(self, instance, "vkDestroyEvent")));
3698 self.vkGetEventStatus = Some(transmute(load_command!(self, instance, "vkGetEventStatus")));
3699 self.vkSetEvent = Some(transmute(load_command!(self, instance, "vkSetEvent")));
3700 self.vkResetEvent = Some(transmute(load_command!(self, instance, "vkResetEvent")));
3701 self.vkCreateQueryPool = Some(transmute(load_command!(self, instance, "vkCreateQueryPool")));
3702 self.vkDestroyQueryPool = Some(transmute(load_command!(self, instance, "vkDestroyQueryPool")));
3703 self.vkGetQueryPoolResults = Some(transmute(load_command!(self, instance, "vkGetQueryPoolResults")));
3704 self.vkCreateBuffer = Some(transmute(load_command!(self, instance, "vkCreateBuffer")));
3705 self.vkDestroyBuffer = Some(transmute(load_command!(self, instance, "vkDestroyBuffer")));
3706 self.vkCreateBufferView = Some(transmute(load_command!(self, instance, "vkCreateBufferView")));
3707 self.vkDestroyBufferView = Some(transmute(load_command!(self, instance, "vkDestroyBufferView")));
3708 self.vkCreateImage = Some(transmute(load_command!(self, instance, "vkCreateImage")));
3709 self.vkDestroyImage = Some(transmute(load_command!(self, instance, "vkDestroyImage")));
3710 self.vkGetImageSubresourceLayout = Some(transmute(load_command!(self, instance, "vkGetImageSubresourceLayout")));
3711 self.vkCreateImageView = Some(transmute(load_command!(self, instance, "vkCreateImageView")));
3712 self.vkDestroyImageView = Some(transmute(load_command!(self, instance, "vkDestroyImageView")));
3713 self.vkCreateShaderModule = Some(transmute(load_command!(self, instance, "vkCreateShaderModule")));
3714 self.vkDestroyShaderModule = Some(transmute(load_command!(self, instance, "vkDestroyShaderModule")));
3715 self.vkCreatePipelineCache = Some(transmute(load_command!(self, instance, "vkCreatePipelineCache")));
3716 self.vkDestroyPipelineCache = Some(transmute(load_command!(self, instance, "vkDestroyPipelineCache")));
3717 self.vkGetPipelineCacheData = Some(transmute(load_command!(self, instance, "vkGetPipelineCacheData")));
3718 self.vkMergePipelineCaches = Some(transmute(load_command!(self, instance, "vkMergePipelineCaches")));
3719 self.vkCreateGraphicsPipelines = Some(transmute(load_command!(self, instance, "vkCreateGraphicsPipelines")));
3720 self.vkCreateComputePipelines = Some(transmute(load_command!(self, instance, "vkCreateComputePipelines")));
3721 self.vkDestroyPipeline = Some(transmute(load_command!(self, instance, "vkDestroyPipeline")));
3722 self.vkCreatePipelineLayout = Some(transmute(load_command!(self, instance, "vkCreatePipelineLayout")));
3723 self.vkDestroyPipelineLayout = Some(transmute(load_command!(self, instance, "vkDestroyPipelineLayout")));
3724 self.vkCreateSampler = Some(transmute(load_command!(self, instance, "vkCreateSampler")));
3725 self.vkDestroySampler = Some(transmute(load_command!(self, instance, "vkDestroySampler")));
3726 self.vkCreateDescriptorSetLayout = Some(transmute(load_command!(self, instance, "vkCreateDescriptorSetLayout")));
3727 self.vkDestroyDescriptorSetLayout = Some(transmute(load_command!(self, instance, "vkDestroyDescriptorSetLayout")));
3728 self.vkCreateDescriptorPool = Some(transmute(load_command!(self, instance, "vkCreateDescriptorPool")));
3729 self.vkDestroyDescriptorPool = Some(transmute(load_command!(self, instance, "vkDestroyDescriptorPool")));
3730 self.vkResetDescriptorPool = Some(transmute(load_command!(self, instance, "vkResetDescriptorPool")));
3731 self.vkAllocateDescriptorSets = Some(transmute(load_command!(self, instance, "vkAllocateDescriptorSets")));
3732 self.vkFreeDescriptorSets = Some(transmute(load_command!(self, instance, "vkFreeDescriptorSets")));
3733 self.vkUpdateDescriptorSets = Some(transmute(load_command!(self, instance, "vkUpdateDescriptorSets")));
3734 self.vkCreateFramebuffer = Some(transmute(load_command!(self, instance, "vkCreateFramebuffer")));
3735 self.vkDestroyFramebuffer = Some(transmute(load_command!(self, instance, "vkDestroyFramebuffer")));
3736 self.vkCreateRenderPass = Some(transmute(load_command!(self, instance, "vkCreateRenderPass")));
3737 self.vkDestroyRenderPass = Some(transmute(load_command!(self, instance, "vkDestroyRenderPass")));
3738 self.vkGetRenderAreaGranularity = Some(transmute(load_command!(self, instance, "vkGetRenderAreaGranularity")));
3739 self.vkCreateCommandPool = Some(transmute(load_command!(self, instance, "vkCreateCommandPool")));
3740 self.vkDestroyCommandPool = Some(transmute(load_command!(self, instance, "vkDestroyCommandPool")));
3741 self.vkResetCommandPool = Some(transmute(load_command!(self, instance, "vkResetCommandPool")));
3742 self.vkAllocateCommandBuffers = Some(transmute(load_command!(self, instance, "vkAllocateCommandBuffers")));
3743 self.vkFreeCommandBuffers = Some(transmute(load_command!(self, instance, "vkFreeCommandBuffers")));
3744 self.vkBeginCommandBuffer = Some(transmute(load_command!(self, instance, "vkBeginCommandBuffer")));
3745 self.vkEndCommandBuffer = Some(transmute(load_command!(self, instance, "vkEndCommandBuffer")));
3746 self.vkResetCommandBuffer = Some(transmute(load_command!(self, instance, "vkResetCommandBuffer")));
3747 self.vkCmdBindPipeline = Some(transmute(load_command!(self, instance, "vkCmdBindPipeline")));
3748 self.vkCmdSetViewport = Some(transmute(load_command!(self, instance, "vkCmdSetViewport")));
3749 self.vkCmdSetScissor = Some(transmute(load_command!(self, instance, "vkCmdSetScissor")));
3750 self.vkCmdSetLineWidth = Some(transmute(load_command!(self, instance, "vkCmdSetLineWidth")));
3751 self.vkCmdSetDepthBias = Some(transmute(load_command!(self, instance, "vkCmdSetDepthBias")));
3752 self.vkCmdSetBlendConstants = Some(transmute(load_command!(self, instance, "vkCmdSetBlendConstants")));
3753 self.vkCmdSetDepthBounds = Some(transmute(load_command!(self, instance, "vkCmdSetDepthBounds")));
3754 self.vkCmdSetStencilCompareMask = Some(transmute(load_command!(self, instance, "vkCmdSetStencilCompareMask")));
3755 self.vkCmdSetStencilWriteMask = Some(transmute(load_command!(self, instance, "vkCmdSetStencilWriteMask")));
3756 self.vkCmdSetStencilReference = Some(transmute(load_command!(self, instance, "vkCmdSetStencilReference")));
3757 self.vkCmdBindDescriptorSets = Some(transmute(load_command!(self, instance, "vkCmdBindDescriptorSets")));
3758 self.vkCmdBindIndexBuffer = Some(transmute(load_command!(self, instance, "vkCmdBindIndexBuffer")));
3759 self.vkCmdBindVertexBuffers = Some(transmute(load_command!(self, instance, "vkCmdBindVertexBuffers")));
3760 self.vkCmdDraw = Some(transmute(load_command!(self, instance, "vkCmdDraw")));
3761 self.vkCmdDrawIndexed = Some(transmute(load_command!(self, instance, "vkCmdDrawIndexed")));
3762 self.vkCmdDrawIndirect = Some(transmute(load_command!(self, instance, "vkCmdDrawIndirect")));
3763 self.vkCmdDrawIndexedIndirect = Some(transmute(load_command!(self, instance, "vkCmdDrawIndexedIndirect")));
3764 self.vkCmdDispatch = Some(transmute(load_command!(self, instance, "vkCmdDispatch")));
3765 self.vkCmdDispatchIndirect = Some(transmute(load_command!(self, instance, "vkCmdDispatchIndirect")));
3766 self.vkCmdCopyBuffer = Some(transmute(load_command!(self, instance, "vkCmdCopyBuffer")));
3767 self.vkCmdCopyImage = Some(transmute(load_command!(self, instance, "vkCmdCopyImage")));
3768 self.vkCmdBlitImage = Some(transmute(load_command!(self, instance, "vkCmdBlitImage")));
3769 self.vkCmdCopyBufferToImage = Some(transmute(load_command!(self, instance, "vkCmdCopyBufferToImage")));
3770 self.vkCmdCopyImageToBuffer = Some(transmute(load_command!(self, instance, "vkCmdCopyImageToBuffer")));
3771 self.vkCmdUpdateBuffer = Some(transmute(load_command!(self, instance, "vkCmdUpdateBuffer")));
3772 self.vkCmdFillBuffer = Some(transmute(load_command!(self, instance, "vkCmdFillBuffer")));
3773 self.vkCmdClearColorImage = Some(transmute(load_command!(self, instance, "vkCmdClearColorImage")));
3774 self.vkCmdClearDepthStencilImage = Some(transmute(load_command!(self, instance, "vkCmdClearDepthStencilImage")));
3775 self.vkCmdClearAttachments = Some(transmute(load_command!(self, instance, "vkCmdClearAttachments")));
3776 self.vkCmdResolveImage = Some(transmute(load_command!(self, instance, "vkCmdResolveImage")));
3777 self.vkCmdSetEvent = Some(transmute(load_command!(self, instance, "vkCmdSetEvent")));
3778 self.vkCmdResetEvent = Some(transmute(load_command!(self, instance, "vkCmdResetEvent")));
3779 self.vkCmdWaitEvents = Some(transmute(load_command!(self, instance, "vkCmdWaitEvents")));
3780 self.vkCmdPipelineBarrier = Some(transmute(load_command!(self, instance, "vkCmdPipelineBarrier")));
3781 self.vkCmdBeginQuery = Some(transmute(load_command!(self, instance, "vkCmdBeginQuery")));
3782 self.vkCmdEndQuery = Some(transmute(load_command!(self, instance, "vkCmdEndQuery")));
3783 self.vkCmdResetQueryPool = Some(transmute(load_command!(self, instance, "vkCmdResetQueryPool")));
3784 self.vkCmdWriteTimestamp = Some(transmute(load_command!(self, instance, "vkCmdWriteTimestamp")));
3785 self.vkCmdCopyQueryPoolResults = Some(transmute(load_command!(self, instance, "vkCmdCopyQueryPoolResults")));
3786 self.vkCmdPushConstants = Some(transmute(load_command!(self, instance, "vkCmdPushConstants")));
3787 self.vkCmdBeginRenderPass = Some(transmute(load_command!(self, instance, "vkCmdBeginRenderPass")));
3788 self.vkCmdNextSubpass = Some(transmute(load_command!(self, instance, "vkCmdNextSubpass")));
3789 self.vkCmdEndRenderPass = Some(transmute(load_command!(self, instance, "vkCmdEndRenderPass")));
3790 self.vkCmdExecuteCommands = Some(transmute(load_command!(self, instance, "vkCmdExecuteCommands")));
3791 }
3792 Ok(())
3793 }
3794
3795 pub unsafe fn vkCreateInstance(&self, pCreateInfo: *const VkInstanceCreateInfo, pAllocator: *const VkAllocationCallbacks, pInstance: *mut VkInstance) -> VkResult {
3796 invoke_command!(self, vkCreateInstance, pCreateInfo, pAllocator, pInstance)
3797 }
3798
3799 pub unsafe fn vkDestroyInstance(&self, instance: VkInstance, pAllocator: *const VkAllocationCallbacks) {
3800 invoke_command!(self, vkDestroyInstance, instance, pAllocator)
3801 }
3802
3803 pub unsafe fn vkEnumeratePhysicalDevices(&self, instance: VkInstance, pPhysicalDeviceCount: *mut uint32_t, pPhysicalDevices: *mut VkPhysicalDevice) -> VkResult {
3804 invoke_command!(self, vkEnumeratePhysicalDevices, instance, pPhysicalDeviceCount, pPhysicalDevices)
3805 }
3806
3807 pub unsafe fn vkGetPhysicalDeviceFeatures(&self, physicalDevice: VkPhysicalDevice, pFeatures: *mut VkPhysicalDeviceFeatures) {
3808 invoke_command!(self, vkGetPhysicalDeviceFeatures, physicalDevice, pFeatures)
3809 }
3810
3811 pub unsafe fn vkGetPhysicalDeviceFormatProperties(&self, physicalDevice: VkPhysicalDevice, format: VkFormat, pFormatProperties: *mut VkFormatProperties) {
3812 invoke_command!(self, vkGetPhysicalDeviceFormatProperties, physicalDevice, format, pFormatProperties)
3813 }
3814
3815 pub unsafe fn vkGetPhysicalDeviceImageFormatProperties(&self, physicalDevice: VkPhysicalDevice, format: VkFormat, iType: VkImageType, tiling: VkImageTiling, usage: VkImageUsageFlags, flags: VkImageCreateFlags, pImageFormatProperties: *mut VkImageFormatProperties) -> VkResult {
3816 invoke_command!(self, vkGetPhysicalDeviceImageFormatProperties, physicalDevice, format, iType, tiling, usage, flags, pImageFormatProperties)
3817 }
3818
3819 pub unsafe fn vkGetPhysicalDeviceProperties(&self, physicalDevice: VkPhysicalDevice, pProperties: *mut VkPhysicalDeviceProperties) {
3820 invoke_command!(self, vkGetPhysicalDeviceProperties, physicalDevice, pProperties)
3821 }
3822
3823 pub unsafe fn vkGetPhysicalDeviceQueueFamilyProperties(&self, physicalDevice: VkPhysicalDevice, pQueueFamilyPropertyCount: *mut uint32_t, pQueueFamilyProperties: *mut VkQueueFamilyProperties) {
3824 invoke_command!(self, vkGetPhysicalDeviceQueueFamilyProperties, physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties)
3825 }
3826
3827 pub unsafe fn vkGetPhysicalDeviceMemoryProperties(&self, physicalDevice: VkPhysicalDevice, pMemoryProperties: *mut VkPhysicalDeviceMemoryProperties) {
3828 invoke_command!(self, vkGetPhysicalDeviceMemoryProperties, physicalDevice, pMemoryProperties)
3829 }
3830
3831 pub unsafe fn vkGetInstanceProcAddr(&self, instance: VkInstance, pName: *const c_char) -> vkVoidFunctionFn {
3832 invoke_command!(self, vkGetInstanceProcAddr, instance, pName)
3833 }
3834
3835 pub unsafe fn vkGetDeviceProcAddr(&self, device: VkDevice, pName: *const c_char) -> vkVoidFunctionFn {
3836 invoke_command!(self, vkGetDeviceProcAddr, device, pName)
3837 }
3838
3839 pub unsafe fn vkCreateDevice(&self, physicalDevice: VkPhysicalDevice, pCreateInfo: *const VkDeviceCreateInfo, pAllocator: *const VkAllocationCallbacks, pDevice: *mut VkDevice) -> VkResult {
3840 invoke_command!(self, vkCreateDevice, physicalDevice, pCreateInfo, pAllocator, pDevice)
3841 }
3842
3843 pub unsafe fn vkDestroyDevice(&self, device: VkDevice, pAllocator: *const VkAllocationCallbacks) {
3844 invoke_command!(self, vkDestroyDevice, device, pAllocator)
3845 }
3846
3847 pub unsafe fn vkEnumerateInstanceExtensionProperties(&self, pLayerName: *const c_char, pPropertyCount: *mut uint32_t, pProperties: *mut VkExtensionProperties) -> VkResult {
3848 invoke_command!(self, vkEnumerateInstanceExtensionProperties, pLayerName, pPropertyCount, pProperties)
3849 }
3850
3851 pub unsafe fn vkEnumerateDeviceExtensionProperties(&self, physicalDevice: VkPhysicalDevice, pLayerName: *const c_char, pPropertyCount: *mut uint32_t, pProperties: *mut VkExtensionProperties) -> VkResult {
3852 invoke_command!(self, vkEnumerateDeviceExtensionProperties, physicalDevice, pLayerName, pPropertyCount, pProperties)
3853 }
3854
3855 pub unsafe fn vkEnumerateInstanceLayerProperties(&self, pPropertyCount: *mut uint32_t, pProperties: *mut VkLayerProperties) -> VkResult {
3856 invoke_command!(self, vkEnumerateInstanceLayerProperties, pPropertyCount, pProperties)
3857 }
3858
3859 pub unsafe fn vkEnumerateDeviceLayerProperties(&self, physicalDevice: VkPhysicalDevice, pPropertyCount: *mut uint32_t, pProperties: *mut VkLayerProperties) -> VkResult {
3860 invoke_command!(self, vkEnumerateDeviceLayerProperties, physicalDevice, pPropertyCount, pProperties)
3861 }
3862
3863 pub unsafe fn vkGetDeviceQueue(&self, device: VkDevice, queueFamilyIndex: uint32_t, queueIndex: uint32_t, pQueue: *mut VkQueue) {
3864 invoke_command!(self, vkGetDeviceQueue, device, queueFamilyIndex, queueIndex, pQueue)
3865 }
3866
3867 pub unsafe fn vkQueueSubmit(&self, queue: VkQueue, submitCount: uint32_t, pSubmits: *const VkSubmitInfo, fence: VkFence) -> VkResult {
3868 invoke_command!(self, vkQueueSubmit, queue, submitCount, pSubmits, fence)
3869 }
3870
3871 pub unsafe fn vkQueueWaitIdle(&self, queue: VkQueue) -> VkResult {
3872 invoke_command!(self, vkQueueWaitIdle, queue)
3873 }
3874
3875 pub unsafe fn vkDeviceWaitIdle(&self, device: VkDevice) -> VkResult {
3876 invoke_command!(self, vkDeviceWaitIdle, device)
3877 }
3878
3879 pub unsafe fn vkAllocateMemory(&self, device: VkDevice, pAllocateInfo: *const VkMemoryAllocateInfo, pAllocator: *const VkAllocationCallbacks, pMemory: *mut VkDeviceMemory) -> VkResult {
3880 invoke_command!(self, vkAllocateMemory, device, pAllocateInfo, pAllocator, pMemory)
3881 }
3882
3883 pub unsafe fn vkFreeMemory(&self, device: VkDevice, memory: VkDeviceMemory, pAllocator: *const VkAllocationCallbacks) {
3884 invoke_command!(self, vkFreeMemory, device, memory, pAllocator)
3885 }
3886
3887 pub unsafe fn vkMapMemory(&self, device: VkDevice, memory: VkDeviceMemory, offset: VkDeviceSize, size: VkDeviceSize, flags: VkMemoryMapFlags, ppData: *mut *mut c_void) -> VkResult {
3888 invoke_command!(self, vkMapMemory, device, memory, offset, size, flags, ppData)
3889 }
3890
3891 pub unsafe fn vkUnmapMemory(&self, device: VkDevice, memory: VkDeviceMemory) {
3892 invoke_command!(self, vkUnmapMemory, device, memory)
3893 }
3894
3895 pub unsafe fn vkFlushMappedMemoryRanges(&self, device: VkDevice, memoryRangeCount: uint32_t, pMemoryRanges: *const VkMappedMemoryRange) -> VkResult {
3896 invoke_command!(self, vkFlushMappedMemoryRanges, device, memoryRangeCount, pMemoryRanges)
3897 }
3898
3899 pub unsafe fn vkInvalidateMappedMemoryRanges(&self, device: VkDevice, memoryRangeCount: uint32_t, pMemoryRanges: *const VkMappedMemoryRange) -> VkResult {
3900 invoke_command!(self, vkInvalidateMappedMemoryRanges, device, memoryRangeCount, pMemoryRanges)
3901 }
3902
3903 pub unsafe fn vkGetDeviceMemoryCommitment(&self, device: VkDevice, memory: VkDeviceMemory, pCommittedMemoryInBytes: *mut VkDeviceSize) {
3904 invoke_command!(self, vkGetDeviceMemoryCommitment, device, memory, pCommittedMemoryInBytes)
3905 }
3906
3907 pub unsafe fn vkBindBufferMemory(&self, device: VkDevice, buffer: VkBuffer, memory: VkDeviceMemory, memoryOffset: VkDeviceSize) -> VkResult {
3908 invoke_command!(self, vkBindBufferMemory, device, buffer, memory, memoryOffset)
3909 }
3910
3911 pub unsafe fn vkBindImageMemory(&self, device: VkDevice, image: VkImage, memory: VkDeviceMemory, memoryOffset: VkDeviceSize) -> VkResult {
3912 invoke_command!(self, vkBindImageMemory, device, image, memory, memoryOffset)
3913 }
3914
3915 pub unsafe fn vkGetBufferMemoryRequirements(&self, device: VkDevice, buffer: VkBuffer, pMemoryRequirements: *mut VkMemoryRequirements) {
3916 invoke_command!(self, vkGetBufferMemoryRequirements, device, buffer, pMemoryRequirements)
3917 }
3918
3919 pub unsafe fn vkGetImageMemoryRequirements(&self, device: VkDevice, image: VkImage, pMemoryRequirements: *mut VkMemoryRequirements) {
3920 invoke_command!(self, vkGetImageMemoryRequirements, device, image, pMemoryRequirements)
3921 }
3922
3923 pub unsafe fn vkGetImageSparseMemoryRequirements(&self, device: VkDevice, image: VkImage, pSparseMemoryRequirementCount: *mut uint32_t, pSparseMemoryRequirements: *mut VkSparseImageMemoryRequirements) {
3924 invoke_command!(self, vkGetImageSparseMemoryRequirements, device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements)
3925 }
3926
3927 pub unsafe fn vkGetPhysicalDeviceSparseImageFormatProperties(&self, physicalDevice: VkPhysicalDevice, format: VkFormat, iType: VkImageType, samples: VkSampleCountFlags, usage: VkImageUsageFlags, tiling: VkImageTiling, pPropertyCount: *mut uint32_t, pProperties: *mut VkSparseImageFormatProperties) {
3928 invoke_command!(self, vkGetPhysicalDeviceSparseImageFormatProperties, physicalDevice, format, iType, samples, usage, tiling, pPropertyCount, pProperties)
3929 }
3930 pub unsafe fn vkQueueBindSparse(&self, queue: VkQueue, bindInfoCount: uint32_t, pBindInfo: *const VkBindSparseInfo, fence: VkFence) -> VkResult {
3931 invoke_command!(self, vkQueueBindSparse, queue, bindInfoCount, pBindInfo, fence)
3932 }
3933
3934 pub unsafe fn vkCreateFence(&self, device: VkDevice, pCreateInfo: *const VkFenceCreateInfo, pAllocator: *const VkAllocationCallbacks, pFence: *mut VkFence) -> VkResult {
3935 invoke_command!(self, vkCreateFence, device, pCreateInfo, pAllocator, pFence)
3936 }
3937
3938 pub unsafe fn vkDestroyFence(&self, device: VkDevice, fence: VkFence, pAllocator: *const VkAllocationCallbacks) {
3939 invoke_command!(self, vkDestroyFence, device, fence, pAllocator)
3940 }
3941
3942 pub unsafe fn vkResetFences(&self, device: VkDevice, fenceCount: uint32_t, pFences: *const VkFence) -> VkResult {
3943 invoke_command!(self, vkResetFences, device, fenceCount, pFences)
3944 }
3945
3946 pub unsafe fn vkGetFenceStatus(&self, device: VkDevice, fence: VkFence) -> VkResult {
3947 invoke_command!(self, vkGetFenceStatus, device, fence)
3948 }
3949
3950 pub unsafe fn vkWaitForFences(&self, device: VkDevice, fenceCount: uint32_t, pFences: *const VkFence, waitAll: VkBool32, timeout: uint64_t) -> VkResult {
3951 invoke_command!(self, vkWaitForFences, device, fenceCount, pFences, waitAll, timeout)
3952 }
3953
3954 pub unsafe fn vkCreateSemaphore(&self, device: VkDevice, pCreateInfo: *const VkSemaphoreCreateInfo, pAllocator: *const VkAllocationCallbacks, pSemaphore: *mut VkSemaphore) -> VkResult {
3955 invoke_command!(self, vkCreateSemaphore, device, pCreateInfo, pAllocator, pSemaphore)
3956 }
3957
3958 pub unsafe fn vkDestroySemaphore(&self, device: VkDevice, semaphore: VkSemaphore, pAllocator: *const VkAllocationCallbacks) {
3959 invoke_command!(self, vkDestroySemaphore, device, semaphore, pAllocator)
3960 }
3961
3962 pub unsafe fn vkCreateEvent(&self, device: VkDevice, pCreateInfo: *const VkEventCreateInfo, pAllocator: *const VkAllocationCallbacks, pEvent: *mut VkEvent) -> VkResult {
3963 invoke_command!(self, vkCreateEvent, device, pCreateInfo, pAllocator, pEvent)
3964 }
3965
3966 pub unsafe fn vkDestroyEvent(&self, device: VkDevice, event: VkEvent, pAllocator: *const VkAllocationCallbacks) {
3967 invoke_command!(self, vkDestroyEvent, device, event, pAllocator)
3968 }
3969
3970 pub unsafe fn vkGetEventStatus(&self, device: VkDevice, event: VkEvent) -> VkResult {
3971 invoke_command!(self, vkGetEventStatus, device, event)
3972 }
3973
3974 pub unsafe fn vkSetEvent(&self, device: VkDevice, event: VkEvent) -> VkResult {
3975 invoke_command!(self, vkSetEvent, device, event)
3976 }
3977
3978 pub unsafe fn vkResetEvent(&self, device: VkDevice, event: VkEvent) -> VkResult {
3979 invoke_command!(self, vkResetEvent, device, event)
3980 }
3981
3982 pub unsafe fn vkCreateQueryPool(&self, device: VkDevice, pCreateInfo: *const VkQueryPoolCreateInfo, pAllocator: *const VkAllocationCallbacks, pQueryPool: *mut VkQueryPool) -> VkResult {
3983 invoke_command!(self, vkCreateQueryPool, device, pCreateInfo, pAllocator, pQueryPool)
3984 }
3985
3986 pub unsafe fn vkDestroyQueryPool(&self, device: VkDevice, queryPool: VkQueryPool, pAllocator: *const VkAllocationCallbacks) {
3987 invoke_command!(self, vkDestroyQueryPool, device, queryPool, pAllocator)
3988 }
3989
3990 pub unsafe fn vkGetQueryPoolResults(&self, device: VkDevice, queryPool: VkQueryPool, firstQuery: uint32_t, queryCount: uint32_t, dataSize: size_t, pData: *mut c_void, stride: VkDeviceSize, flags: VkDeviceSize) -> VkResult {
3991 invoke_command!(self, vkGetQueryPoolResults, device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags)
3992 }
3993
3994 pub unsafe fn vkCreateBuffer(&self, device: VkDevice, pCreateInfo: *const VkBufferCreateInfo, pAllocator: *const VkAllocationCallbacks, pBuffer: *mut VkBuffer) -> VkResult {
3995 invoke_command!(self, vkCreateBuffer, device, pCreateInfo, pAllocator, pBuffer)
3996 }
3997
3998 pub unsafe fn vkDestroyBuffer(&self, device: VkDevice, buffer: VkBuffer, pAllocator: *const VkAllocationCallbacks) {
3999 invoke_command!(self, vkDestroyBuffer, device, buffer, pAllocator)
4000 }
4001
4002 pub unsafe fn vkCreateBufferView(&self, device: VkDevice, pCreateInfo: *const VkBufferViewCreateInfo, pAllocator: *const VkAllocationCallbacks, pView: *mut VkBufferView) -> VkResult {
4003 invoke_command!(self, vkCreateBufferView, device, pCreateInfo, pAllocator, pView)
4004 }
4005
4006 pub unsafe fn vkDestroyBufferView(&self, device: VkDevice, bufferView: VkBufferView, pAllocator: *const VkAllocationCallbacks) {
4007 invoke_command!(self, vkDestroyBufferView, device, bufferView, pAllocator)
4008 }
4009
4010 pub unsafe fn vkCreateImage(&self, device: VkDevice, pCreateInfo: *const VkImageCreateInfo, pAllocator: *const VkAllocationCallbacks, pImage: *mut VkImage) -> VkResult {
4011 invoke_command!(self, vkCreateImage, device, pCreateInfo, pAllocator, pImage)
4012 }
4013
4014 pub unsafe fn vkDestroyImage(&self, device: VkDevice, image: VkImage, pAllocator: *const VkAllocationCallbacks) {
4015 invoke_command!(self, vkDestroyImage, device, image, pAllocator)
4016 }
4017
4018 pub unsafe fn vkGetImageSubresourceLayout(&self, device: VkDevice, image: VkImage, pSubresource: *const VkImageSubresource, pLayout: *mut VkSubresourceLayout) {
4019 invoke_command!(self, vkGetImageSubresourceLayout, device, image, pSubresource, pLayout)
4020 }
4021
4022 pub unsafe fn vkCreateImageView(&self, device: VkDevice, pCreateInfo: *const VkImageViewCreateInfo, pAllocator: *const VkAllocationCallbacks, pView: *mut VkImageView) -> VkResult {
4023 invoke_command!(self, vkCreateImageView, device, pCreateInfo, pAllocator, pView)
4024 }
4025
4026 pub unsafe fn vkDestroyImageView(&self, device: VkDevice, imageView: VkImageView, pAllocator: *const VkAllocationCallbacks) {
4027 invoke_command!(self, vkDestroyImageView, device, imageView, pAllocator)
4028 }
4029
4030 pub unsafe fn vkCreateShaderModule(&self, device: VkDevice, pCreateInfo: *const VkShaderModuleCreateInfo, pAllocator: *const VkAllocationCallbacks, pShaderModule: *mut VkShaderModule) -> VkResult {
4031 invoke_command!(self, vkCreateShaderModule, device, pCreateInfo, pAllocator, pShaderModule)
4032 }
4033
4034 pub unsafe fn vkDestroyShaderModule(&self, device: VkDevice, shaderModule: VkShaderModule, pAllocator: *const VkAllocationCallbacks) {
4035 invoke_command!(self, vkDestroyShaderModule, device, shaderModule, pAllocator)
4036 }
4037
4038 pub unsafe fn vkCreatePipelineCache(&self, device: VkDevice, pCreateInfo: *const VkPipelineCacheCreateInfo, pAllocator: *const VkAllocationCallbacks, pPipelineCache: *mut VkPipelineCache) -> VkResult {
4039 invoke_command!(self, vkCreatePipelineCache, device, pCreateInfo, pAllocator, pPipelineCache)
4040 }
4041
4042 pub unsafe fn vkDestroyPipelineCache(&self, device: VkDevice, pipelineCache: VkPipelineCache, pAllocator: *const VkAllocationCallbacks) {
4043 invoke_command!(self, vkDestroyPipelineCache, device, pipelineCache, pAllocator)
4044 }
4045
4046 pub unsafe fn vkGetPipelineCacheData(&self, device: VkDevice, pipelineCache: VkPipelineCache, pDataSize: *mut size_t, pData: *mut c_void) -> VkResult {
4047 invoke_command!(self, vkGetPipelineCacheData, device, pipelineCache, pDataSize, pData)
4048 }
4049
4050 pub unsafe fn vkMergePipelineCaches(&self, device: VkDevice, dstCache: VkPipelineCache, srcCacheCount: uint32_t, pSrcCaches: *const VkPipelineCache) -> VkResult {
4051 invoke_command!(self, vkMergePipelineCaches, device, dstCache, srcCacheCount, pSrcCaches)
4052 }
4053
4054 pub unsafe fn vkCreateGraphicsPipelines(&self, device: VkDevice, pipelineCache: VkPipelineCache, createInfoCount: uint32_t, pCreateInfos: *const VkGraphicsPipelineCreateInfo, pAllocator: *const VkAllocationCallbacks, pPipelines: *mut VkPipeline) -> VkResult {
4055 invoke_command!(self, vkCreateGraphicsPipelines, device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines)
4056 }
4057
4058 pub unsafe fn vkCreateComputePipelines(&self, device: VkDevice, pipelineCache: VkPipelineCache, createInfoCount: uint32_t, pCreateInfos: *const VkComputePipelineCreateInfo, pAllocator: *const VkAllocationCallbacks, pPipelines: *mut VkPipeline) -> VkResult {
4059 invoke_command!(self, vkCreateComputePipelines, device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines)
4060 }
4061
4062 pub unsafe fn vkDestroyPipeline(&self, device: VkDevice, pipeline: VkPipeline, pAllocator: *const VkAllocationCallbacks) {
4063 invoke_command!(self, vkDestroyPipeline, device, pipeline, pAllocator)
4064 }
4065
4066 pub unsafe fn vkCreatePipelineLayout(&self, device: VkDevice, pCreateInfo: *const VkPipelineLayoutCreateInfo, pAllocator: *const VkAllocationCallbacks, pPipelineLayout: *mut VkPipelineLayout) -> VkResult {
4067 invoke_command!(self, vkCreatePipelineLayout, device, pCreateInfo, pAllocator, pPipelineLayout)
4068 }
4069
4070 pub unsafe fn vkDestroyPipelineLayout(&self, device: VkDevice, pipelineLayout: VkPipelineLayout, pAllocator: *const VkAllocationCallbacks) {
4071 invoke_command!(self, vkDestroyPipelineLayout, device, pipelineLayout, pAllocator)
4072 }
4073
4074 pub unsafe fn vkCreateSampler(&self, device: VkDevice, pCreateInfo: *const VkSamplerCreateInfo, pAllocator: *const VkAllocationCallbacks, pSampler: *mut VkSampler) -> VkResult {
4075 invoke_command!(self, vkCreateSampler, device, pCreateInfo, pAllocator, pSampler)
4076 }
4077
4078 pub unsafe fn vkDestroySampler(&self, device: VkDevice, sampler: VkSampler, pAllocator: *const VkAllocationCallbacks) {
4079 invoke_command!(self, vkDestroySampler, device, sampler, pAllocator)
4080 }
4081
4082 pub unsafe fn vkCreateDescriptorSetLayout(&self, device: VkDevice, pCreateInfo: *const VkDescriptorSetLayoutCreateInfo, pAllocator: *const VkAllocationCallbacks, pSetLayout: *mut VkDescriptorSetLayout) -> VkResult {
4083 invoke_command!(self, vkCreateDescriptorSetLayout, device, pCreateInfo, pAllocator, pSetLayout)
4084 }
4085
4086 pub unsafe fn vkDestroyDescriptorSetLayout(&self, device: VkDevice, descriptorSetLayout: VkDescriptorSetLayout, pAllocator: *const VkAllocationCallbacks) {
4087 invoke_command!(self, vkDestroyDescriptorSetLayout, device, descriptorSetLayout, pAllocator)
4088 }
4089
4090 pub unsafe fn vkCreateDescriptorPool(&self, device: VkDevice, pCreateInfo: *const VkDescriptorPoolCreateInfo, pAllocator: *const VkAllocationCallbacks, pDescriptorPool: *mut VkDescriptorPool) -> VkResult {
4091 invoke_command!(self, vkCreateDescriptorPool, device, pCreateInfo, pAllocator, pDescriptorPool)
4092 }
4093
4094 pub unsafe fn vkDestroyDescriptorPool(&self, device: VkDevice, descriptorPool: VkDescriptorPool, pAllocator: *const VkAllocationCallbacks) {
4095 invoke_command!(self, vkDestroyDescriptorPool, device, descriptorPool, pAllocator)
4096 }
4097
4098 pub unsafe fn vkResetDescriptorPool(&self, device: VkDevice, descriptorPool: VkDescriptorPool, flags: VkDescriptorPoolResetFlags) -> VkResult {
4099 invoke_command!(self, vkResetDescriptorPool, device, descriptorPool, flags)
4100 }
4101
4102 pub unsafe fn vkAllocateDescriptorSets(&self, device: VkDevice, pAllocateInfo: *const VkDescriptorSetAllocateInfo, pDescriptorSets: *mut VkDescriptorSet) -> VkResult {
4103 invoke_command!(self, vkAllocateDescriptorSets, device, pAllocateInfo, pDescriptorSets)
4104 }
4105
4106 pub unsafe fn vkFreeDescriptorSets(&self, device: VkDevice, descriptorPool: VkDescriptorPool, descriptorSetCount: uint32_t, pDescriptorSets: *const VkDescriptorSet) -> VkResult {
4107 invoke_command!(self, vkFreeDescriptorSets, device, descriptorPool, descriptorSetCount, pDescriptorSets)
4108 }
4109
4110 pub unsafe fn vkUpdateDescriptorSets(&self, device: VkDevice, descriptorWriteCount: uint32_t, pDescriptorWrites: *const VkWriteDescriptorSet, descriptorCopyCount: uint32_t, pDescriptorCopies: *const VkCopyDescriptorSet) {
4111 invoke_command!(self, vkUpdateDescriptorSets, device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies)
4112 }
4113
4114 pub unsafe fn vkCreateFramebuffer(&self, device: VkDevice, pCreateInfo: *const VkFramebufferCreateInfo, pAllocator: *const VkAllocationCallbacks, pFramebuffer: *mut VkFramebuffer) -> VkResult {
4115 invoke_command!(self, vkCreateFramebuffer, device, pCreateInfo, pAllocator, pFramebuffer)
4116 }
4117
4118 pub unsafe fn vkDestroyFramebuffer(&self, device: VkDevice, framebuffer: VkFramebuffer, pAllocator: *const VkAllocationCallbacks) {
4119 invoke_command!(self, vkDestroyFramebuffer, device, framebuffer, pAllocator)
4120 }
4121
4122 pub unsafe fn vkCreateRenderPass(&self, device: VkDevice, pCreateInfo: *const VkRenderPassCreateInfo, pAllocator: *const VkAllocationCallbacks, pRenderPass: *mut VkRenderPass) -> VkResult {
4123 invoke_command!(self, vkCreateRenderPass, device, pCreateInfo, pAllocator, pRenderPass)
4124 }
4125
4126 pub unsafe fn vkDestroyRenderPass(&self, device: VkDevice, renderPass: VkRenderPass, pAllocator: *const VkAllocationCallbacks) {
4127 invoke_command!(self, vkDestroyRenderPass, device, renderPass, pAllocator)
4128 }
4129
4130 pub unsafe fn vkGetRenderAreaGranularity(&self, device: VkDevice, renderPass: VkRenderPass, pGranularity: *mut VkExtent2D) {
4131 invoke_command!(self, vkGetRenderAreaGranularity, device, renderPass, pGranularity)
4132 }
4133
4134 pub unsafe fn vkCreateCommandPool(&self, device: VkDevice, pCreateInfo: *const VkCommandPoolCreateInfo, pAllocator: *const VkAllocationCallbacks, pCommandPool: *mut VkCommandPool) -> VkResult {
4135 invoke_command!(self, vkCreateCommandPool, device, pCreateInfo, pAllocator, pCommandPool)
4136 }
4137
4138 pub unsafe fn vkDestroyCommandPool(&self, device: VkDevice, commandPool: VkCommandPool, pAllocator: *const VkAllocationCallbacks) {
4139 invoke_command!(self, vkDestroyCommandPool, device, commandPool, pAllocator)
4140 }
4141
4142 pub unsafe fn vkResetCommandPool(&self, device: VkDevice, commandPool: VkCommandPool, flags: VkCommandPoolResetFlags) -> VkResult {
4143 invoke_command!(self, vkResetCommandPool, device, commandPool, flags)
4144 }
4145
4146 pub unsafe fn vkAllocateCommandBuffers(&self, device: VkDevice, pAllocateInfo: *const VkCommandBufferAllocateInfo, pCommandBuffers: *mut VkCommandBuffer) -> VkResult {
4147 invoke_command!(self, vkAllocateCommandBuffers, device, pAllocateInfo, pCommandBuffers)
4148 }
4149
4150 pub unsafe fn vkFreeCommandBuffers(&self, device: VkDevice, commandPool: VkCommandPool, commandBufferCount: uint32_t, pCommandBuffers: *const VkCommandBuffer) {
4151 invoke_command!(self, vkFreeCommandBuffers, device, commandPool, commandBufferCount, pCommandBuffers)
4152 }
4153
4154 pub unsafe fn vkBeginCommandBuffer(&self, commandBuffer: VkCommandBuffer, pBeginInfo: *const VkCommandBufferBeginInfo) -> VkResult {
4155 invoke_command!(self, vkBeginCommandBuffer, commandBuffer, pBeginInfo)
4156 }
4157
4158 pub unsafe fn vkEndCommandBuffer(&self, commandBuffer: VkCommandBuffer) -> VkResult {
4159 invoke_command!(self, vkEndCommandBuffer, commandBuffer)
4160 }
4161
4162 pub unsafe fn vkResetCommandBuffer(&self, commandBuffer: VkCommandBuffer, flags: VkCommandBufferResetFlags) -> VkResult {
4163 invoke_command!(self, vkResetCommandBuffer, commandBuffer, flags)
4164 }
4165
4166 pub unsafe fn vkCmdBindPipeline(&self, commandBuffer: VkCommandBuffer, pipelineBindPoint: VkPipelineBindPoint, pipeline: VkPipeline) {
4167 invoke_command!(self, vkCmdBindPipeline, commandBuffer, pipelineBindPoint, pipeline)
4168 }
4169
4170 pub unsafe fn vkCmdSetViewport(&self, commandBuffer: VkCommandBuffer, firstViewport: uint32_t, viewportCount: uint32_t, pViewports: *const VkViewport) {
4171 invoke_command!(self, vkCmdSetViewport, commandBuffer, firstViewport, viewportCount, pViewports)
4172 }
4173
4174 pub unsafe fn vkCmdSetScissor(&self, commandBuffer: VkCommandBuffer, firstScissor: uint32_t, scissorCount: uint32_t, pScissors: *const VkRect2D) {
4175 invoke_command!(self, vkCmdSetScissor, commandBuffer, firstScissor, scissorCount, pScissors)
4176 }
4177
4178 pub unsafe fn vkCmdSetLineWidth(&self, commandBuffer: VkCommandBuffer, lineWidth: c_float) {
4179 invoke_command!(self, vkCmdSetLineWidth, commandBuffer, lineWidth)
4180 }
4181
4182 pub unsafe fn vkCmdSetDepthBias(&self, commandBuffer: VkCommandBuffer, depthBiasConstantFactor: c_float, depthBiasClamp: c_float, depthBiasSlopeFactor: c_float) {
4183 invoke_command!(self, vkCmdSetDepthBias, commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor)
4184 }
4185
4186 pub unsafe fn vkCmdSetBlendConstants(&self, commandBuffer: VkCommandBuffer, blendConstants: [c_float; 4]) {
4188 invoke_command!(self, vkCmdSetBlendConstants, commandBuffer, blendConstants)
4189 }
4190
4191 pub unsafe fn vkCmdSetDepthBounds(&self, commandBuffer: VkCommandBuffer, minDepthBounds: c_float, maxDepthBounds: c_float) {
4192 invoke_command!(self, vkCmdSetDepthBounds, commandBuffer, minDepthBounds, maxDepthBounds)
4193 }
4194
4195 pub unsafe fn vkCmdSetStencilCompareMask(&self, commandBuffer: VkCommandBuffer, faceMask: VkStencilFaceFlags, compareMask: uint32_t) {
4196 invoke_command!(self, vkCmdSetStencilCompareMask, commandBuffer, faceMask, compareMask)
4197 }
4198
4199 pub unsafe fn vkCmdSetStencilWriteMask(&self, commandBuffer: VkCommandBuffer, faceMask: VkStencilFaceFlags, writeMask: uint32_t) {
4200 invoke_command!(self, vkCmdSetStencilWriteMask, commandBuffer, faceMask, writeMask)
4201 }
4202
4203 pub unsafe fn vkCmdSetStencilReference(&self, commandBuffer: VkCommandBuffer, faceMask: VkStencilFaceFlags, reference: uint32_t) {
4204 invoke_command!(self, vkCmdSetStencilReference, commandBuffer, faceMask, reference)
4205 }
4206
4207 pub unsafe fn vkCmdBindDescriptorSets(&self, commandBuffer: VkCommandBuffer, pipelineBindPoint: VkPipelineBindPoint, layout: VkPipelineLayout, firstSet: uint32_t, descriptorSetCount: uint32_t, pDescriptorSets: *const VkDescriptorSet, dynamicOffsetCount: uint32_t, pDynamicOffsets: *const uint32_t) {
4208 invoke_command!(self, vkCmdBindDescriptorSets, commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets)
4209 }
4210
4211 pub unsafe fn vkCmdBindIndexBuffer(&self, commandBuffer: VkCommandBuffer, buffer: VkBuffer, offset: VkDeviceSize, indexType: VkIndexType) {
4212 invoke_command!(self, vkCmdBindIndexBuffer, commandBuffer, buffer, offset, indexType)
4213 }
4214
4215 pub unsafe fn vkCmdBindVertexBuffers(&self, commandBuffer: VkCommandBuffer, firstBinding: uint32_t, bindingCount: uint32_t, pBuffers: *const VkBuffer, pOffsets: *const VkDeviceSize) {
4216 invoke_command!(self, vkCmdBindVertexBuffers, commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets)
4217 }
4218
4219 pub unsafe fn vkCmdDraw(&self, commandBuffer: VkCommandBuffer, vertexCount: uint32_t, instanceCount: uint32_t, firstVertex: uint32_t, firstInstance: uint32_t) {
4220 invoke_command!(self, vkCmdDraw, commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance)
4221 }
4222
4223 pub unsafe fn vkCmdDrawIndexed(&self, commandBuffer: VkCommandBuffer, indexCount: uint32_t, instanceCount: uint32_t, firstIndex: uint32_t, vertexOffset: int32_t, firstInstance: uint32_t) {
4224 invoke_command!(self, vkCmdDrawIndexed, commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance)
4225 }
4226
4227 pub unsafe fn vkCmdDrawIndirect(&self, commandBuffer: VkCommandBuffer, buffer: VkBuffer, offset: VkDeviceSize, drawCount: uint32_t, stride: uint32_t) {
4228 invoke_command!(self, vkCmdDrawIndirect, commandBuffer, buffer, offset, drawCount, stride)
4229 }
4230
4231 pub unsafe fn vkCmdDrawIndexedIndirect(&self, commandBuffer: VkCommandBuffer, buffer: VkBuffer, offset: VkDeviceSize, drawCount: uint32_t, stride: uint32_t) {
4232 invoke_command!(self, vkCmdDrawIndexedIndirect, commandBuffer, buffer, offset, drawCount, stride)
4233 }
4234
4235 pub unsafe fn vkCmdDispatch(&self, commandBuffer: VkCommandBuffer, x: uint32_t, y: uint32_t, z: uint32_t) {
4236 invoke_command!(self, vkCmdDispatch, commandBuffer, x, y, z)
4237 }
4238
4239 pub unsafe fn vkCmdDispatchIndirect(&self, commandBuffer: VkCommandBuffer, buffer: VkBuffer, offset: VkDeviceSize) {
4240 invoke_command!(self, vkCmdDispatchIndirect, commandBuffer, buffer, offset)
4241 }
4242
4243 pub unsafe fn vkCmdCopyBuffer(&self, commandBuffer: VkCommandBuffer, srcBuffer: VkBuffer, dstBuffer: VkBuffer, regionCount: uint32_t, pRegions: *const VkBufferCopy) {
4244 invoke_command!(self, vkCmdCopyBuffer, commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions)
4245 }
4246
4247 pub unsafe fn vkCmdCopyImage(&self, commandBuffer: VkCommandBuffer, srcImage: VkImage, srcImageLayout: VkImageLayout, dstImage: VkImage, dstImageLayout: VkImageLayout, regionCount: uint32_t, pRegions: *const VkImageCopy) {
4248 invoke_command!(self, vkCmdCopyImage, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions)
4249 }
4250
4251 pub unsafe fn vkCmdBlitImage(&self, commandBuffer: VkCommandBuffer, srcImage: VkImage, srcImageLayout: VkImageLayout, dstImage: VkImage, dstImageLayout: VkImageLayout, regionCount: uint32_t, pRegions: *const VkImageBlit, filter: VkFilter) {
4252 invoke_command!(self, vkCmdBlitImage, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter)
4253 }
4254
4255 pub unsafe fn vkCmdCopyBufferToImage(&self, commandBuffer: VkCommandBuffer, srcBuffer: VkBuffer, dstImage: VkImage, dstImageLayout: VkImageLayout, regionCount: uint32_t, pRegions: *const VkBufferImageCopy) {
4256 invoke_command!(self, vkCmdCopyBufferToImage, commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions)
4257 }
4258
4259 pub unsafe fn vkCmdCopyImageToBuffer(&self, commandBuffer: VkCommandBuffer, srcImage: VkImage, srcImageLayout: VkImageLayout, dstBuffer: VkBuffer, regionCount: uint32_t, pRegions: *const VkBufferImageCopy) {
4260 invoke_command!(self, vkCmdCopyImageToBuffer, commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions)
4261 }
4262
4263 pub unsafe fn vkCmdUpdateBuffer(&self, commandBuffer: VkCommandBuffer, dstBuffer: VkBuffer, dstOffset: VkDeviceSize, dataSize: VkDeviceSize, pData: *const uint32_t) {
4264 invoke_command!(self, vkCmdUpdateBuffer, commandBuffer, dstBuffer, dstOffset, dataSize, pData)
4265 }
4266
4267 pub unsafe fn vkCmdFillBuffer(&self, commandBuffer: VkCommandBuffer, dstBuffer: VkBuffer, dstOffset: VkDeviceSize, size: VkDeviceSize, data: uint32_t) {
4268 invoke_command!(self, vkCmdFillBuffer, commandBuffer, dstBuffer, dstOffset, size, data)
4269 }
4270
4271 pub unsafe fn vkCmdClearColorImage(&self, commandBuffer: VkCommandBuffer, image: VkImage, imageLayout: VkImageLayout, pColor: *const VkClearColorValue, rangeCount: uint32_t, pRanges: *const VkImageSubresourceRange) {
4272 invoke_command!(self, vkCmdClearColorImage, commandBuffer, image, imageLayout, pColor, rangeCount, pRanges)
4273 }
4274
4275 pub unsafe fn vkCmdClearDepthStencilImage(&self, commandBuffer: VkCommandBuffer, image: VkImage, imageLayout: VkImageLayout, pDepthStencil: *const VkClearDepthStencilValue, rangeCount: uint32_t, pRanges: *const VkImageSubresourceRange) {
4276 invoke_command!(self, vkCmdClearDepthStencilImage, commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges)
4277 }
4278
4279 pub unsafe fn vkCmdClearAttachments(&self, commandBuffer: VkCommandBuffer, attachmentCount: uint32_t, pAttachments: *const VkClearAttachment, rectCount: uint32_t, pRects: *const VkClearRect) {
4280 invoke_command!(self, vkCmdClearAttachments, commandBuffer, attachmentCount, pAttachments, rectCount, pRects)
4281 }
4282
4283 pub unsafe fn vkCmdResolveImage(&self, commandBuffer: VkCommandBuffer, srcImage: VkImage, srcImageLayout: VkImageLayout, dstImage: VkImage, dstImageLayout: VkImageLayout, regionCount: uint32_t, pRegions: *const VkImageResolve) {
4284 invoke_command!(self, vkCmdResolveImage, commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions)
4285 }
4286
4287 pub unsafe fn vkCmdSetEvent(&self, commandBuffer: VkCommandBuffer, event: VkEvent, stageMask: VkPipelineStageFlags) {
4288 invoke_command!(self, vkCmdSetEvent, commandBuffer, event, stageMask)
4289 }
4290
4291 pub unsafe fn vkCmdResetEvent(&self, commandBuffer: VkCommandBuffer, event: VkEvent, stageMask: VkPipelineStageFlags) {
4292 invoke_command!(self, vkCmdResetEvent, commandBuffer, event, stageMask)
4293 }
4294
4295 pub unsafe fn vkCmdWaitEvents(&self, commandBuffer: VkCommandBuffer, eventCount: uint32_t, pEvents: *const VkEvent, srcStageMask: VkPipelineStageFlags, dstStageMask: VkPipelineStageFlags, memoryBarrierCount: uint32_t, pMemoryBarriers: *const VkMemoryBarrier, bufferMemoryBarrierCount: uint32_t, pBufferMemoryBarriers: *const VkBufferMemoryBarrier, imageMemoryBarrierCount: uint32_t, pImageMemoryBarriers: *const VkImageMemoryBarrier) {
4296 invoke_command!(self, vkCmdWaitEvents, commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers)
4297 }
4298
4299 pub unsafe fn vkCmdPipelineBarrier(&self, commandBuffer: VkCommandBuffer, srcStageMask: VkPipelineStageFlags, dstStageMask: VkPipelineStageFlags, dependencyFlags: VkDependencyFlags, memoryBarrierCount: uint32_t, pMemoryBarriers: *const VkMemoryBarrier, bufferMemoryBarrierCount: uint32_t, pBufferMemoryBarriers: *const VkBufferMemoryBarrier, imageMemoryBarrierCount: uint32_t, pImageMemoryBarriers: *const VkImageMemoryBarrier) {
4300 invoke_command!(self, vkCmdPipelineBarrier, commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers)
4301 }
4302
4303 pub unsafe fn vkCmdBeginQuery(&self, commandBuffer: VkCommandBuffer, queryPool: VkQueryPool, query: uint32_t, flags: VkQueryControlFlags) {
4304 invoke_command!(self, vkCmdBeginQuery, commandBuffer, queryPool, query, flags)
4305 }
4306
4307 pub unsafe fn vkCmdEndQuery(&self, commandBuffer: VkCommandBuffer, queryPool: VkQueryPool, query: uint32_t) {
4308 invoke_command!(self, vkCmdEndQuery, commandBuffer, queryPool, query)
4309 }
4310
4311 pub unsafe fn vkCmdResetQueryPool(&self, commandBuffer: VkCommandBuffer, queryPool: VkQueryPool, firstQuery: uint32_t, queryCount: uint32_t) {
4312 invoke_command!(self, vkCmdResetQueryPool, commandBuffer, queryPool, firstQuery, queryCount)
4313 }
4314
4315 pub unsafe fn vkCmdWriteTimestamp(&self, commandBuffer: VkCommandBuffer, pipelineStage: VkPipelineStageFlags, queryPool: VkQueryPool, query: uint32_t) {
4316 invoke_command!(self, vkCmdWriteTimestamp, commandBuffer, pipelineStage, queryPool, query)
4317 }
4318
4319 pub unsafe fn vkCmdCopyQueryPoolResults(&self, commandBuffer: VkCommandBuffer, queryPool: VkQueryPool, firstQuery: uint32_t, queryCount: uint32_t, dstBuffer: VkBuffer, dstOffset: VkDeviceSize, stride: VkDeviceSize, flags: VkQueryResultFlags) {
4320 invoke_command!(self, vkCmdCopyQueryPoolResults, commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags)
4321 }
4322
4323 pub unsafe fn vkCmdPushConstants(&self, commandBuffer: VkCommandBuffer, layout: VkPipelineLayout, stageFlags: VkShaderStageFlags, offset: uint32_t, size: uint32_t, pValues: *const c_void) {
4324 invoke_command!(self, vkCmdPushConstants, commandBuffer, layout, stageFlags, offset, size, pValues)
4325 }
4326
4327 pub unsafe fn vkCmdBeginRenderPass(&self, commandBuffer: VkCommandBuffer, pRenderPassBegin: *const VkRenderPassBeginInfo, contents: VkSubpassContents) {
4328 invoke_command!(self, vkCmdBeginRenderPass, commandBuffer, pRenderPassBegin, contents)
4329 }
4330
4331 pub unsafe fn vkCmdNextSubpass(&self, commandBuffer: VkCommandBuffer, contents: VkSubpassContents) {
4332 invoke_command!(self, vkCmdNextSubpass, commandBuffer, contents)
4333 }
4334
4335 pub unsafe fn vkCmdEndRenderPass(&self, commandBuffer: VkCommandBuffer) {
4336 invoke_command!(self, vkCmdEndRenderPass, commandBuffer)
4337 }
4338
4339 pub unsafe fn vkCmdExecuteCommands(&self, commandBuffer: VkCommandBuffer, commandBufferCount: uint32_t, pCommandBuffers: *const VkCommandBuffer) {
4340 invoke_command!(self, vkCmdExecuteCommands, commandBuffer, commandBufferCount, pCommandBuffers)
4341 }
4342 }
4343}
4344
4345pub mod khr_surface {
4346 use ::libc::{c_char, uint64_t, uint32_t};
4347 use ::shared_library::dynamic_library::DynamicLibrary;
4348 use ::std::path::Path;
4349 use ::std::mem::transmute;
4350 use ::std::ffi::CString;
4351 use ::VULKAN_LIBRARY;
4352 use ::core::*;
4353
4354 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkSurfaceKHR);
4355
4356 pub const VK_KHR_SURFACE_SPEC_VERSION: uint32_t = 25;
4357 pub const VK_KHR_SURFACE_EXTENSION_NAME: *const c_char = b"VK_KHR_surface\0" as *const u8 as *const c_char;
4358 pub const VK_COLORSPACE_SRGB_NONLINEAR_KHR: VkColorSpaceKHR = VkColorSpaceKHR::VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
4359
4360 #[repr(i32)]
4361 #[derive(Eq)]
4362 #[derive(PartialEq)]
4363 #[derive(Debug)]
4364 #[derive(Copy)]
4365 #[derive(Clone)]
4366 pub enum VkColorSpaceKHR {
4367 VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0
4368 }
4369
4370 #[repr(i32)]
4371 #[derive(Eq)]
4372 #[derive(PartialEq)]
4373 #[derive(Debug)]
4374 #[derive(Copy)]
4375 #[derive(Clone)]
4376 pub enum VkPresentModeKHR {
4377 VK_PRESENT_MODE_IMMEDIATE_KHR = 0,
4378 VK_PRESENT_MODE_MAILBOX_KHR = 1,
4379 VK_PRESENT_MODE_FIFO_KHR = 2,
4380 VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3
4381 }
4382
4383 bitflags! {
4384 pub flags VkSurfaceTransformFlagsKHR: VkFlags {
4385 const VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001,
4386 const VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002,
4387 const VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004,
4388 const VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008,
4389 const VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010,
4390 const VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020,
4391 const VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040,
4392 const VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080,
4393 const VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100
4394 }
4395 }
4396
4397 bitflags! {
4398 pub flags VkCompositeAlphaFlagsKHR: VkFlags {
4399 const VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
4400 const VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002,
4401 const VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004,
4402 const VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008
4403 }
4404 }
4405
4406 #[repr(C)]
4407 #[derive(Copy)]
4408 #[derive(Clone)]
4409 pub struct VkSurfaceCapabilitiesKHR {
4410 pub minImageCount: uint32_t,
4411 pub maxImageCount: uint32_t,
4412 pub currentExtent: VkExtent2D,
4413 pub minImageExtent: VkExtent2D,
4414 pub maxImageExtent: VkExtent2D,
4415 pub maxImageArrayLayers: uint32_t,
4416 pub supportedTransforms: VkSurfaceTransformFlagsKHR,
4417 pub currentTransform: VkSurfaceTransformFlagsKHR,
4418 pub supportedCompositeAlpha: VkCompositeAlphaFlagsKHR,
4419 pub supportedUsageFlags: VkImageUsageFlags
4420 }
4421
4422 #[repr(C)]
4423 #[derive(Copy)]
4424 #[derive(Clone)]
4425 pub struct VkSurfaceFormatKHR {
4426 pub format: VkFormat,
4427 pub colorSpace: VkColorSpaceKHR
4428 }
4429
4430 pub type vkDestroySurfaceKHRFn = unsafe extern "stdcall" fn(instance: VkInstance,
4431 surface: VkSurfaceKHR,
4432 pAllocator: *const VkAllocationCallbacks);
4433
4434 pub type vkGetPhysicalDeviceSurfaceSupportKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4435 queueFamilyIndex: uint32_t,
4436 surface: VkSurfaceKHR,
4437 pSupported: *mut VkBool32) -> VkResult;
4438
4439 pub type vkGetPhysicalDeviceSurfaceCapabilitiesKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4440 surface: VkSurfaceKHR,
4441 pSurfaceCapabilities: *mut VkSurfaceCapabilitiesKHR) -> VkResult;
4442
4443 pub type vkGetPhysicalDeviceSurfaceFormatsKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4444 surface: VkSurfaceKHR,
4445 pSurfaceFormatCount: *mut uint32_t,
4446 pSurfaceFormats: *mut VkSurfaceFormatKHR) -> VkResult;
4447
4448 pub type vkGetPhysicalDeviceSurfacePresentModesKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4449 surface: VkSurfaceKHR,
4450 pPresentModeCount: *mut uint32_t,
4451 pPresentModes: *mut VkPresentModeKHR) -> VkResult;
4452
4453 pub struct VkKhrSurfaceCommands {
4454 library: Option<DynamicLibrary>,
4455 vkGetInstanceProcAddr: Option<vkGetInstanceProcAddrFn>,
4456 vkDestroySurfaceKHR: Option<vkDestroySurfaceKHRFn>,
4457 vkGetPhysicalDeviceSurfaceSupportKHR: Option<vkGetPhysicalDeviceSurfaceSupportKHRFn>,
4458 vkGetPhysicalDeviceSurfaceCapabilitiesKHR: Option<vkGetPhysicalDeviceSurfaceCapabilitiesKHRFn>,
4459 vkGetPhysicalDeviceSurfaceFormatsKHR: Option<vkGetPhysicalDeviceSurfaceFormatsKHRFn>,
4460 vkGetPhysicalDeviceSurfacePresentModesKHR: Option<vkGetPhysicalDeviceSurfacePresentModesKHRFn>
4461 }
4462
4463 impl VkKhrSurfaceCommands {
4464 pub fn new() -> Result<VkKhrSurfaceCommands, String> {
4465 unsafe {
4466 let mut vulkan_khr_surface: VkKhrSurfaceCommands = ::std::mem::zeroed::<VkKhrSurfaceCommands>();
4467 let library_path = Path::new(VULKAN_LIBRARY);
4468 vulkan_khr_surface.library = match DynamicLibrary::open(Some(library_path)) {
4469 Err(error) => return Err(format!("Failed to load {}: {}",VULKAN_LIBRARY,error)),
4470 Ok(library) => Some(library),
4471 };
4472 vulkan_khr_surface.vkGetInstanceProcAddr = Some(transmute(try!(vulkan_khr_surface.library.as_ref().unwrap().symbol::<u8>("vkGetInstanceProcAddr"))));
4473 Ok(vulkan_khr_surface)
4474 }
4475 }
4476
4477 pub fn load(&mut self, instance: VkInstance) -> Result<(), String> {
4478 unsafe {
4479 self.vkDestroySurfaceKHR = Some(transmute(load_command!(self, instance, "vkDestroySurfaceKHR")));
4480 self.vkGetPhysicalDeviceSurfaceSupportKHR = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceSurfaceSupportKHR")));
4481 self.vkGetPhysicalDeviceSurfaceCapabilitiesKHR = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR")));
4482 self.vkGetPhysicalDeviceSurfaceFormatsKHR = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceSurfaceFormatsKHR")));
4483 self.vkGetPhysicalDeviceSurfacePresentModesKHR = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceSurfacePresentModesKHR")));
4484 }
4485 Ok(())
4486 }
4487
4488 pub unsafe fn vkDestroySurfaceKHR(&self,
4489 instance: VkInstance,
4490 surface: VkSurfaceKHR,
4491 pAllocator: *const VkAllocationCallbacks) {
4492 invoke_command!(self, vkDestroySurfaceKHR, instance, surface, pAllocator)
4493 }
4494
4495 pub unsafe fn vkGetPhysicalDeviceSurfaceSupportKHR(&self,
4496 physicalDevice: VkPhysicalDevice,
4497 queueFamilyIndex: uint32_t,
4498 surface: VkSurfaceKHR,
4499 pSupported: *mut VkBool32) -> VkResult {
4500 invoke_command!(self, vkGetPhysicalDeviceSurfaceSupportKHR, physicalDevice, queueFamilyIndex, surface, pSupported)
4501 }
4502
4503 pub unsafe fn vkGetPhysicalDeviceSurfaceCapabilitiesKHR(&self,
4504 physicalDevice: VkPhysicalDevice,
4505 surface: VkSurfaceKHR,
4506 pSurfaceCapabilities: *mut VkSurfaceCapabilitiesKHR) -> VkResult {
4507 invoke_command!(self, vkGetPhysicalDeviceSurfaceCapabilitiesKHR, physicalDevice, surface, pSurfaceCapabilities)
4508 }
4509
4510 pub unsafe fn vkGetPhysicalDeviceSurfaceFormatsKHR(&self,
4511 physicalDevice: VkPhysicalDevice,
4512 surface: VkSurfaceKHR,
4513 pSurfaceFormatCount: *mut uint32_t,
4514 pSurfaceFormats: *mut VkSurfaceFormatKHR) -> VkResult {
4515 invoke_command!(self, vkGetPhysicalDeviceSurfaceFormatsKHR, physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats)
4516 }
4517
4518 pub unsafe fn vkGetPhysicalDeviceSurfacePresentModesKHR(&self,
4519 physicalDevice: VkPhysicalDevice,
4520 surface: VkSurfaceKHR,
4521 pPresentModeCount: *mut uint32_t,
4522 pPresentModes: *mut VkPresentModeKHR) -> VkResult {
4523 invoke_command!(self, vkGetPhysicalDeviceSurfacePresentModesKHR, physicalDevice, surface, pPresentModeCount, pPresentModes)
4524 }
4525 }
4526}
4527
4528pub mod khr_swapchain {
4529 use ::libc::{c_void, c_char, uint64_t, uint32_t};
4530 use ::shared_library::dynamic_library::DynamicLibrary;
4531 use ::std::path::Path;
4532 use ::std::mem::transmute;
4533 use ::std::ffi::CString;
4534 use ::VULKAN_LIBRARY;
4535 use ::core::*;
4536 use ::khr_surface::*;
4537
4538 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkSwapchainKHR);
4539
4540 pub const VK_KHR_SWAPCHAIN_SPEC_VERSION: uint32_t = 68;
4541 pub const VK_KHR_SWAPCHAIN_EXTENSION_NAME: *const c_char = b"VK_KHR_swapchain\0" as *const u8 as *const c_char;
4542
4543 reserved_bitflags! {
4544 pub flags VkSwapchainCreateFlagsKHR: VkFlags;
4545 }
4546
4547 #[repr(C)]
4548 #[derive(Copy)]
4549 #[derive(Clone)]
4550 pub struct VkSwapchainCreateInfoKHR {
4551 pub sType: VkStructureType,
4552 pub pNext: *const c_void,
4553 pub flags: VkSwapchainCreateFlagsKHR,
4554 pub surface: VkSurfaceKHR,
4555 pub minImageCount: uint32_t,
4556 pub imageFormat: VkFormat,
4557 pub imageColorSpace: VkColorSpaceKHR,
4558 pub imageExtent: VkExtent2D,
4559 pub imageArrayLayers: uint32_t,
4560 pub imageUsage: VkImageUsageFlags,
4561 pub imageSharingMode: VkSharingMode,
4562 pub queueFamilyIndexCount: uint32_t,
4563 pub pQueueFamilyIndices: *const uint32_t,
4564 pub preTransform: VkSurfaceTransformFlagsKHR,
4565 pub compositeAlpha: VkCompositeAlphaFlagsKHR,
4566 pub presentMode: VkPresentModeKHR,
4567 pub clipped: VkBool32,
4568 pub oldSwapchain: VkSwapchainKHR
4569 }
4570
4571 #[repr(C)]
4572 #[derive(Copy)]
4573 #[derive(Clone)]
4574 pub struct VkPresentInfoKHR {
4575 pub sType: VkStructureType,
4576 pub pNext: *const c_void,
4577 pub waitSemaphoreCount: uint32_t,
4578 pub pWaitSemaphores: *const VkSemaphore,
4579 pub swapchainCount: uint32_t,
4580 pub pSwapchains: *const VkSwapchainKHR,
4581 pub pImageIndices: *const uint32_t,
4582 pub pResults: *mut VkResult
4583 }
4584
4585 pub type vkCreateSwapchainKHRFn = unsafe extern "stdcall" fn(device: VkDevice,
4586 pCreateInfo: *const VkSwapchainCreateInfoKHR,
4587 pAllocator: *const VkAllocationCallbacks,
4588 pSwapchain: *mut VkSwapchainKHR) -> VkResult;
4589
4590 pub type vkDestroySwapchainKHRFn = unsafe extern "stdcall" fn(device: VkDevice,
4591 swapchain: VkSwapchainKHR,
4592 pAllocator: *const VkAllocationCallbacks);
4593
4594 pub type vkGetSwapchainImagesKHRFn = unsafe extern "stdcall" fn(device: VkDevice,
4595 swapchain: VkSwapchainKHR,
4596 pSwapchainImageCount: *mut uint32_t,
4597 pSwapchainImages: *mut VkImage) -> VkResult;
4598
4599 pub type vkAcquireNextImageKHRFn = unsafe extern "stdcall" fn(device: VkDevice,
4600 swapchain: VkSwapchainKHR,
4601 timeout: uint64_t,
4602 semaphore: VkSemaphore,
4603 fence: VkFence,
4604 pImageIndex: *mut uint32_t) -> VkResult;
4605
4606 pub type vkQueuePresentKHRFn = unsafe extern "stdcall" fn(queue: VkQueue,
4607 pPresentInfo: *const VkPresentInfoKHR) -> VkResult;
4608
4609 pub struct VkKhrSwapchainCommands {
4610 library: Option<DynamicLibrary>,
4611 vkGetInstanceProcAddr: Option<vkGetInstanceProcAddrFn>,
4612 vkCreateSwapchainKHR: Option<vkCreateSwapchainKHRFn>,
4613 vkDestroySwapchainKHR: Option<vkDestroySwapchainKHRFn>,
4614 vkGetSwapchainImagesKHR: Option<vkGetSwapchainImagesKHRFn>,
4615 vkAcquireNextImageKHR: Option<vkAcquireNextImageKHRFn>,
4616 vkQueuePresentKHR: Option<vkQueuePresentKHRFn>
4617 }
4618
4619 impl VkKhrSwapchainCommands {
4620 pub fn new() -> Result<VkKhrSwapchainCommands, String> {
4621 unsafe {
4622 let mut vulkan_khr_swapchain: VkKhrSwapchainCommands = ::std::mem::zeroed::<VkKhrSwapchainCommands>();
4623 let library_path = Path::new(VULKAN_LIBRARY);
4624 vulkan_khr_swapchain.library = match DynamicLibrary::open(Some(library_path)) {
4625 Err(error) => return Err(format!("Failed to load {}: {}",VULKAN_LIBRARY,error)),
4626 Ok(library) => Some(library),
4627 };
4628 vulkan_khr_swapchain.vkGetInstanceProcAddr = Some(transmute(try!(vulkan_khr_swapchain.library.as_ref().unwrap().symbol::<u8>("vkGetInstanceProcAddr"))));
4629 Ok(vulkan_khr_swapchain)
4630 }
4631 }
4632
4633 pub fn load(&mut self, instance: VkInstance) -> Result<(), String> {
4634 unsafe {
4635 self.vkCreateSwapchainKHR = Some(transmute(load_command!(self, instance, "vkCreateSwapchainKHR")));
4636 self.vkDestroySwapchainKHR = Some(transmute(load_command!(self, instance, "vkDestroySwapchainKHR")));
4637 self.vkGetSwapchainImagesKHR = Some(transmute(load_command!(self, instance, "vkGetSwapchainImagesKHR")));
4638 self.vkAcquireNextImageKHR = Some(transmute(load_command!(self, instance, "vkAcquireNextImageKHR")));
4639 self.vkQueuePresentKHR = Some(transmute(load_command!(self, instance, "vkQueuePresentKHR")));
4640 }
4641 Ok(())
4642 }
4643
4644 pub unsafe fn vkCreateSwapchainKHR(&self,
4645 device: VkDevice,
4646 pCreateInfo: *const VkSwapchainCreateInfoKHR,
4647 pAllocator: *const VkAllocationCallbacks,
4648 pSwapchain: *mut VkSwapchainKHR) -> VkResult {
4649 invoke_command!(self, vkCreateSwapchainKHR, device, pCreateInfo, pAllocator, pSwapchain)
4650 }
4651
4652 pub unsafe fn vkDestroySwapchainKHR(&self,
4653 device: VkDevice,
4654 swapchain: VkSwapchainKHR,
4655 pAllocator: *const VkAllocationCallbacks) {
4656 invoke_command!(self, vkDestroySwapchainKHR, device, swapchain, pAllocator)
4657 }
4658 pub unsafe fn vkGetSwapchainImagesKHR(&self,
4659 device: VkDevice,
4660 swapchain: VkSwapchainKHR,
4661 pSwapchainImageCount: *mut uint32_t,
4662 pSwapchainImages: *mut VkImage) -> VkResult {
4663 invoke_command!(self, vkGetSwapchainImagesKHR, device, swapchain, pSwapchainImageCount, pSwapchainImages)
4664 }
4665
4666 pub unsafe fn vkAcquireNextImageKHR(&self,
4667 device: VkDevice,
4668 swapchain: VkSwapchainKHR,
4669 timeout: uint64_t,
4670 semaphore: VkSemaphore,
4671 fence: VkFence,
4672 pImageIndex: *mut uint32_t) -> VkResult {
4673 invoke_command!(self, vkAcquireNextImageKHR, device, swapchain, timeout, semaphore, fence, pImageIndex)
4674 }
4675
4676 pub unsafe fn vkQueuePresentKHR(&self,
4677 queue: VkQueue,
4678 pPresentInfo: *const VkPresentInfoKHR) -> VkResult {
4679 invoke_command!(self, vkQueuePresentKHR, queue, pPresentInfo)
4680 }
4681 }
4682}
4683
4684pub mod khr_display {
4685 use ::libc::{c_void, c_char, c_float, uint64_t, uint32_t};
4686 use ::shared_library::dynamic_library::DynamicLibrary;
4687 use ::std::path::Path;
4688 use ::std::mem::transmute;
4689 use ::std::ffi::CString;
4690 use ::VULKAN_LIBRARY;
4691 use ::core::*;
4692 use ::khr_surface::*;
4693
4694 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkDisplayKHR);
4695 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkDisplayModeKHR);
4696
4697 pub const VK_KHR_DISPLAY_SPEC_VERSION: uint32_t = 21;
4698 pub const VK_KHR_DISPLAY_EXTENSION_NAME: *const c_char = b"VK_KHR_display\0" as *const u8 as *const c_char;
4699
4700 bitflags! {
4701 pub flags VkDisplayPlaneAlphaFlagsKHR: VkFlags {
4702 const VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001,
4703 const VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002,
4704 const VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
4705 const VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008
4706 }
4707 }
4708
4709 reserved_bitflags! {
4710 pub flags VkDisplayModeCreateFlagsKHR: VkFlags;
4711 }
4712 reserved_bitflags! {
4713 pub flags VkDisplaySurfaceCreateFlagsKHR: VkFlags;
4714 }
4715
4716 #[repr(C)]
4717 #[derive(Copy)]
4718 #[derive(Clone)]
4719 pub struct VkDisplayPropertiesKHR {
4720 pub display: VkDisplayKHR,
4721 pub displayName: *const c_char,
4722 pub physicalDimensions: VkExtent2D,
4723 pub physicalResolution: VkExtent2D,
4724 pub supportedTransforms: VkSurfaceTransformFlagsKHR,
4725 pub planeReorderPossible: VkBool32,
4726 pub persistentContent: VkBool32
4727 }
4728
4729 #[repr(C)]
4730 #[derive(Copy)]
4731 #[derive(Clone)]
4732 pub struct VkDisplayModeParametersKHR {
4733 pub visibleRegion: VkExtent2D,
4734 pub refreshRate: uint32_t
4735 }
4736
4737 #[repr(C)]
4738 #[derive(Copy)]
4739 #[derive(Clone)]
4740 pub struct VkDisplayModePropertiesKHR {
4741 pub displayMode: VkDisplayModeKHR,
4742 pub parameters: VkDisplayModeParametersKHR
4743 }
4744
4745 #[repr(C)]
4746 #[derive(Copy)]
4747 #[derive(Clone)]
4748 pub struct VkDisplayModeCreateInfoKHR {
4749 pub sType: VkStructureType,
4750 pub pNext: *const c_void,
4751 pub flags: VkDisplayModeCreateFlagsKHR,
4752 pub parameters: VkDisplayModeParametersKHR
4753 }
4754
4755 #[repr(C)]
4756 #[derive(Copy)]
4757 #[derive(Clone)]
4758 pub struct VkDisplayPlaneCapabilitiesKHR {
4759 pub supportedAlpha: VkDisplayPlaneAlphaFlagsKHR,
4760 pub minSrcPosition: VkOffset2D,
4761 pub maxSrcPosition: VkOffset2D,
4762 pub minSrcExtent: VkExtent2D,
4763 pub maxSrcExtent: VkExtent2D,
4764 pub minDstPosition: VkOffset2D,
4765 pub maxDstPosition: VkOffset2D,
4766 pub minDstExtent: VkExtent2D,
4767 pub maxDstExtent: VkExtent2D
4768 }
4769
4770 #[repr(C)]
4771 #[derive(Copy)]
4772 #[derive(Clone)]
4773 pub struct VkDisplayPlanePropertiesKHR {
4774 pub currentDisplay: VkDisplayKHR,
4775 pub currentStackIndex: uint32_t
4776 }
4777
4778 #[repr(C)]
4779 #[derive(Copy)]
4780 #[derive(Clone)]
4781 pub struct VkDisplaySurfaceCreateInfoKHR {
4782 pub sType: VkStructureType,
4783 pub pNext: *const c_void,
4784 pub flags: VkDisplaySurfaceCreateFlagsKHR,
4785 pub displayMode: VkDisplayModeKHR,
4786 pub planeIndex: uint32_t,
4787 pub planeStackIndex: uint32_t,
4788 pub transform: VkSurfaceTransformFlagsKHR,
4789 pub globalAlpha: c_float,
4790 pub alphaMode: VkDisplayPlaneAlphaFlagsKHR,
4791 pub imageExtent: VkExtent2D
4792 }
4793
4794 pub type vkGetPhysicalDeviceDisplayPropertiesKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4795 pPropertyCount: *mut uint32_t,
4796 pProperties: *mut VkDisplayPropertiesKHR) -> VkResult;
4797
4798 pub type vkGetPhysicalDeviceDisplayPlanePropertiesKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4799 pPropertyCount: *mut uint32_t,
4800 pProperties: *mut VkDisplayPlanePropertiesKHR) -> VkResult;
4801
4802 pub type vkGetDisplayPlaneSupportedDisplaysKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4803 planeIndex: uint32_t,
4804 pDisplayCount: *mut uint32_t,
4805 pDisplays: *mut VkDisplayKHR) -> VkResult;
4806
4807 pub type vkGetDisplayModePropertiesKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4808 display: VkDisplayKHR,
4809 pPropertyCount: *mut uint32_t,
4810 pProperties: *mut VkDisplayModePropertiesKHR) -> VkResult;
4811
4812 pub type vkCreateDisplayModeKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4813 display: VkDisplayKHR,
4814 pCreateInfo: *const VkDisplayModeCreateInfoKHR,
4815 pAllocator: *const VkAllocationCallbacks,
4816 pMode: *mut VkDisplayModeKHR) -> VkResult;
4817
4818 pub type vkGetDisplayPlaneCapabilitiesKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
4819 mode: VkDisplayModeKHR,
4820 planeIndex: uint32_t,
4821 pCapabilities: *mut VkDisplayPlaneCapabilitiesKHR) -> VkResult;
4822
4823 pub type vkCreateDisplayPlaneSurfaceKHRFn = unsafe extern "stdcall" fn(instance: VkInstance,
4824 pCreateInfo: *const VkDisplaySurfaceCreateInfoKHR,
4825 pAllocator: *const VkAllocationCallbacks,
4826 pSurface: *mut VkSurfaceKHR) -> VkResult;
4827
4828 pub struct VkKhrDisplayCommands {
4829 library: Option<DynamicLibrary>,
4830 vkGetInstanceProcAddr: Option<vkGetInstanceProcAddrFn>,
4831 vkGetPhysicalDeviceDisplayPropertiesKHR: Option<vkGetPhysicalDeviceDisplayPropertiesKHRFn>,
4832 vkGetPhysicalDeviceDisplayPlanePropertiesKHR: Option<vkGetPhysicalDeviceDisplayPlanePropertiesKHRFn>,
4833 vkGetDisplayPlaneSupportedDisplaysKHR: Option<vkGetDisplayPlaneSupportedDisplaysKHRFn>,
4834 vkGetDisplayModePropertiesKHR: Option<vkGetDisplayModePropertiesKHRFn>,
4835 vkCreateDisplayModeKHR: Option<vkCreateDisplayModeKHRFn>,
4836 vkGetDisplayPlaneCapabilitiesKHR: Option<vkGetDisplayPlaneCapabilitiesKHRFn>,
4837 vkCreateDisplayPlaneSurfaceKHR: Option<vkCreateDisplayPlaneSurfaceKHRFn>
4838 }
4839
4840 impl VkKhrDisplayCommands {
4841 pub fn new() -> Result<VkKhrDisplayCommands, String> {
4842 unsafe {
4843 let mut vulkan_khr_display: VkKhrDisplayCommands = ::std::mem::zeroed::<VkKhrDisplayCommands>();
4844 let library_path = Path::new(VULKAN_LIBRARY);
4845 vulkan_khr_display.library = match DynamicLibrary::open(Some(library_path)) {
4846 Err(error) => return Err(format!("Failed to load {}: {}",VULKAN_LIBRARY,error)),
4847 Ok(library) => Some(library),
4848 };
4849 vulkan_khr_display.vkGetInstanceProcAddr = Some(transmute(try!(vulkan_khr_display.library.as_ref().unwrap().symbol::<u8>("vkGetInstanceProcAddr"))));
4850 Ok(vulkan_khr_display)
4851 }
4852 }
4853
4854 pub fn load(&mut self, instance: VkInstance) -> Result<(), String> {
4855 unsafe {
4856 self.vkGetPhysicalDeviceDisplayPropertiesKHR = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceDisplayPropertiesKHR")));
4857 self.vkGetPhysicalDeviceDisplayPlanePropertiesKHR = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR")));
4858 self.vkGetDisplayPlaneSupportedDisplaysKHR = Some(transmute(load_command!(self, instance, "vkGetDisplayPlaneSupportedDisplaysKHR")));
4859 self.vkGetDisplayModePropertiesKHR = Some(transmute(load_command!(self, instance, "vkGetDisplayModePropertiesKHR")));
4860 self.vkCreateDisplayModeKHR = Some(transmute(load_command!(self, instance, "vkCreateDisplayModeKHR")));
4861 self.vkGetDisplayPlaneCapabilitiesKHR = Some(transmute(load_command!(self, instance, "vkGetDisplayPlaneCapabilitiesKHR")));
4862 self.vkCreateDisplayPlaneSurfaceKHR = Some(transmute(load_command!(self, instance, "vkCreateDisplayPlaneSurfaceKHR")));
4863 }
4864 Ok(())
4865 }
4866
4867 pub unsafe fn vkGetPhysicalDeviceDisplayPropertiesKHR(&self,
4868 physicalDevice: VkPhysicalDevice,
4869 pPropertyCount: *mut uint32_t,
4870 pProperties: *mut VkDisplayPropertiesKHR) -> VkResult {
4871 invoke_command!(self, vkGetPhysicalDeviceDisplayPropertiesKHR, physicalDevice, pPropertyCount, pProperties)
4872 }
4873
4874 pub unsafe fn vkGetPhysicalDeviceDisplayPlanePropertiesKHR(&self,
4875 physicalDevice: VkPhysicalDevice,
4876 pPropertyCount: *mut uint32_t,
4877 pProperties: *mut VkDisplayPlanePropertiesKHR) -> VkResult {
4878 invoke_command!(self, vkGetPhysicalDeviceDisplayPlanePropertiesKHR, physicalDevice, pPropertyCount, pProperties)
4879 }
4880
4881 pub unsafe fn vkGetDisplayPlaneSupportedDisplaysKHR(&self,
4882 physicalDevice: VkPhysicalDevice,
4883 planeIndex: uint32_t,
4884 pDisplayCount: *mut uint32_t,
4885 pDisplays: *mut VkDisplayKHR) -> VkResult {
4886 invoke_command!(self, vkGetDisplayPlaneSupportedDisplaysKHR, physicalDevice, planeIndex, pDisplayCount, pDisplays)
4887 }
4888
4889 pub unsafe fn vkGetDisplayModePropertiesKHR(&self,
4890 physicalDevice: VkPhysicalDevice,
4891 display: VkDisplayKHR,
4892 pPropertyCount: *mut uint32_t,
4893 pProperties: *mut VkDisplayModePropertiesKHR) -> VkResult {
4894 invoke_command!(self, vkGetDisplayModePropertiesKHR, physicalDevice, display, pPropertyCount, pProperties)
4895 }
4896
4897 pub unsafe fn vkCreateDisplayModeKHR(&self,
4898 physicalDevice: VkPhysicalDevice,
4899 display: VkDisplayKHR,
4900 pCreateInfo: *const VkDisplayModeCreateInfoKHR,
4901 pAllocator: *const VkAllocationCallbacks,
4902 pMode: *mut VkDisplayModeKHR) -> VkResult {
4903 invoke_command!(self, vkCreateDisplayModeKHR, physicalDevice, display, pCreateInfo, pAllocator, pMode)
4904 }
4905
4906 pub unsafe fn vkGetDisplayPlaneCapabilitiesKHR(&self,
4907 physicalDevice: VkPhysicalDevice,
4908 mode: VkDisplayModeKHR,
4909 planeIndex: uint32_t,
4910 pCapabilities: *mut VkDisplayPlaneCapabilitiesKHR) -> VkResult {
4911 invoke_command!(self, vkGetDisplayPlaneCapabilitiesKHR, physicalDevice, mode, planeIndex, pCapabilities)
4912 }
4913
4914 pub unsafe fn vkCreateDisplayPlaneSurfaceKHR(&self,
4915 instance: VkInstance,
4916 pCreateInfo: *const VkDisplaySurfaceCreateInfoKHR,
4917 pAllocator: *const VkAllocationCallbacks,
4918 pSurface: *mut VkSurfaceKHR) -> VkResult {
4919 invoke_command!(self, vkCreateDisplayPlaneSurfaceKHR, instance, pCreateInfo, pAllocator, pSurface)
4920 }
4921 }
4922}
4923
4924pub mod khr_display_swapchain {
4925 use ::libc::{c_void, c_char, uint32_t};
4926 use ::shared_library::dynamic_library::DynamicLibrary;
4927 use ::std::path::Path;
4928 use ::std::mem::transmute;
4929 use ::std::ffi::CString;
4930 use ::VULKAN_LIBRARY;
4931 use ::core::*;
4932 use ::khr_swapchain::*;
4933
4934 pub const VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION: uint32_t = 9;
4935 pub const VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME: *const c_char = b"VK_KHR_display_swapchain\0" as *const u8 as *const c_char;
4936
4937 #[repr(C)]
4938 #[derive(Copy)]
4939 #[derive(Clone)]
4940 pub struct VkDisplayPresentInfoKHR {
4941 pub sType: VkStructureType,
4942 pub pNext: *const c_void,
4943 pub srcRect: VkRect2D,
4944 pub dstRect: VkRect2D,
4945 pub persistent: VkBool32
4946 }
4947
4948 pub type vkCreateSharedSwapchainsKHRFn = unsafe extern "stdcall" fn(device: VkDevice,
4949 swapchainCount: uint32_t,
4950 pCreateInfos: *const VkSwapchainCreateInfoKHR,
4951 pAllocator: *const VkAllocationCallbacks,
4952 pSwapchains: *mut VkSwapchainKHR) -> VkResult;
4953
4954 pub struct VkKhrDisplaySwapchainCommands {
4955 library: Option<DynamicLibrary>,
4956 vkGetInstanceProcAddr: Option<vkGetInstanceProcAddrFn>,
4957 vkCreateSharedSwapchainsKHR: Option<vkCreateSharedSwapchainsKHRFn>,
4958 }
4959
4960 impl VkKhrDisplaySwapchainCommands {
4961 pub fn new() -> Result<VkKhrDisplaySwapchainCommands, String> {
4962 unsafe {
4963 let mut vulkan_khr_display_swapchain: VkKhrDisplaySwapchainCommands = ::std::mem::zeroed::<VkKhrDisplaySwapchainCommands>();
4964 let library_path = Path::new(VULKAN_LIBRARY);
4965 vulkan_khr_display_swapchain.library = match DynamicLibrary::open(Some(library_path)) {
4966 Err(error) => return Err(format!("Failed to load {}: {}",VULKAN_LIBRARY,error)),
4967 Ok(library) => Some(library),
4968 };
4969 vulkan_khr_display_swapchain.vkGetInstanceProcAddr = Some(transmute(try!(vulkan_khr_display_swapchain.library.as_ref().unwrap().symbol::<u8>("vkGetInstanceProcAddr"))));
4970 Ok(vulkan_khr_display_swapchain)
4971 }
4972 }
4973
4974 pub fn load(&mut self, instance: VkInstance) -> Result<(), String> {
4975 unsafe {
4976 self.vkCreateSharedSwapchainsKHR = Some(transmute(load_command!(self, instance, "vkCreateSharedSwapchainsKHR")));
4977 }
4978 Ok(())
4979 }
4980
4981 pub unsafe fn vkCreateSharedSwapchainsKHR(&self,
4982 device: VkDevice,
4983 swapchainCount: uint32_t,
4984 pCreateInfos: *const VkSwapchainCreateInfoKHR,
4985 pAllocator: *const VkAllocationCallbacks,
4986 pSwapchains: *mut VkSwapchainKHR) -> VkResult {
4987 invoke_command!(self, vkCreateSharedSwapchainsKHR, device, swapchainCount, pCreateInfos, pAllocator, pSwapchains)
4988 }
4989 }
4990}
4991
4992pub mod khr_win32_surface {
4993 use ::libc::{c_void, c_char, uint32_t};
4994 use ::shared_library::dynamic_library::DynamicLibrary;
4995 use ::std::path::Path;
4996 use ::std::ffi::CString;
4997 use ::std::mem::transmute;
4998 use ::VULKAN_LIBRARY;
4999 use ::core::*;
5000 use ::khr_surface::*;
5001
5002 pub mod platform {
5003 use ::libc::c_void;
5004 pub type HINSTANCE = *mut c_void;
5005 pub type HWND = *mut c_void;
5006 }
5007
5008 pub const VK_KHR_WIN32_SURFACE_SPEC_VERSION: uint32_t = 5;
5009 pub const VK_KHR_WIN32_SURFACE_EXTENSION_NAME: *const c_char = b"VK_KHR_win32_surface\0" as *const u8 as *const c_char;
5010
5011 reserved_bitflags! {
5012 pub flags VkWin32SurfaceCreateFlagsKHR: VkFlags;
5013 }
5014
5015 #[repr(C)]
5016 #[derive(Copy)]
5017 #[derive(Clone)]
5018 pub struct VkWin32SurfaceCreateInfoKHR {
5019 pub sType: VkStructureType,
5020 pub pNext: *const c_void,
5021 pub flags: VkWin32SurfaceCreateFlagsKHR,
5022 pub hinstance: platform::HINSTANCE,
5023 pub hwnd: platform::HWND
5024 }
5025
5026 pub type vkCreateWin32SurfaceKHRFn = unsafe extern "stdcall" fn(instance: VkInstance,
5027 pCreateInfo: *const VkWin32SurfaceCreateInfoKHR,
5028 pAllocator: *const VkAllocationCallbacks,
5029 pSurface: *mut VkSurfaceKHR) -> VkResult;
5030
5031 pub type vkGetPhysicalDeviceWin32PresentationSupportKHRFn = unsafe extern "stdcall" fn(physicalDevice: VkPhysicalDevice,
5032 queueFamilyIndex: uint32_t) -> VkBool32;
5033
5034 pub struct VkKhrWin32SurfaceCommands {
5035 library: Option<DynamicLibrary>,
5036 vkGetInstanceProcAddr: Option<vkGetInstanceProcAddrFn>,
5037 vkCreateWin32SurfaceKHR: Option<vkCreateWin32SurfaceKHRFn>,
5038 vkGetPhysicalDeviceWin32PresentationSupportKHR: Option<vkGetPhysicalDeviceWin32PresentationSupportKHRFn>
5039 }
5040
5041 impl VkKhrWin32SurfaceCommands {
5042 pub fn new() -> Result<VkKhrWin32SurfaceCommands, String> {
5043 unsafe {
5044 let mut vulkan_khr_win32_surface: VkKhrWin32SurfaceCommands = ::std::mem::zeroed::<VkKhrWin32SurfaceCommands>();
5045 let library_path = Path::new(VULKAN_LIBRARY);
5046 vulkan_khr_win32_surface.library = match DynamicLibrary::open(Some(library_path)) {
5047 Err(error) => return Err(format!("Failed to load {}: {}",VULKAN_LIBRARY,error)),
5048 Ok(library) => Some(library),
5049 };
5050 vulkan_khr_win32_surface.vkGetInstanceProcAddr = Some(transmute(try!(vulkan_khr_win32_surface.library.as_ref().unwrap().symbol::<u8>("vkGetInstanceProcAddr"))));
5051 Ok(vulkan_khr_win32_surface)
5052 }
5053 }
5054
5055 pub fn load(&mut self, instance: VkInstance) -> Result<(), String> {
5056 unsafe {
5057 self.vkCreateWin32SurfaceKHR = Some(transmute(load_command!(self, instance, "vkCreateWin32SurfaceKHR")));
5058 self.vkGetPhysicalDeviceWin32PresentationSupportKHR = Some(transmute(load_command!(self, instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR")));
5059 }
5060 Ok(())
5061 }
5062
5063 pub unsafe fn vkCreateWin32SurfaceKHR(&self,
5064 instance: VkInstance,
5065 pCreateInfo: *const VkWin32SurfaceCreateInfoKHR,
5066 pAllocator: *const VkAllocationCallbacks,
5067 pSurface: *mut VkSurfaceKHR) -> VkResult {
5068 invoke_command!(self, vkCreateWin32SurfaceKHR, instance, pCreateInfo, pAllocator, pSurface)
5069 }
5070
5071 pub unsafe fn vkGetPhysicalDeviceWin32PresentationSupportKHR(&self,
5072 physicalDevice: VkPhysicalDevice,
5073 queueFamilyIndex: uint32_t) -> VkBool32 {
5074 invoke_command!(self, vkGetPhysicalDeviceWin32PresentationSupportKHR, physicalDevice, queueFamilyIndex)
5075 }
5076 }
5077}
5078
5079pub mod ext_debug_report {
5080 use ::libc::{c_void, c_char, uint32_t, int32_t, uint64_t, size_t};
5081 use ::shared_library::dynamic_library::DynamicLibrary;
5082 use ::std::path::Path;
5083 use ::std::ffi::CString;
5084 use ::std::mem::transmute;
5085 use ::VULKAN_LIBRARY;
5086 use ::core::*;
5087
5088 VK_DEFINE_NON_DISPATCHABLE_HANDLE!(VkDebugReportCallbackEXT);
5089
5090 pub const VK_EXT_DEBUG_REPORT_SPEC_VERSION: uint32_t = 2;
5091 pub const VK_EXT_DEBUG_REPORT_EXTENSION_NAME: *const c_char = b"VK_EXT_debug_report\0" as *const u8 as *const c_char;
5092 pub const VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT: VkStructureType = VkStructureType::VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
5093
5094 #[repr(i32)]
5095 #[derive(Eq)]
5096 #[derive(PartialEq)]
5097 #[derive(Debug)]
5098 #[derive(Copy)]
5099 #[derive(Clone)]
5100 pub enum VkDebugReportObjectTypeEXT {
5101 VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0,
5102 VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1,
5103 VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2,
5104 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3,
5105 VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4,
5106 VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5,
5107 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6,
5108 VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7,
5109 VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8,
5110 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9,
5111 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10,
5112 VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11,
5113 VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12,
5114 VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13,
5115 VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14,
5116 VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15,
5117 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16,
5118 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17,
5119 VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18,
5120 VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19,
5121 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20,
5122 VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21,
5123 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22,
5124 VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23,
5125 VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24,
5126 VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25,
5127 VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26,
5128 VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27,
5129 VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28
5130 }
5131
5132 #[repr(i32)]
5133 #[derive(Eq)]
5134 #[derive(PartialEq)]
5135 #[derive(Debug)]
5136 #[derive(Copy)]
5137 #[derive(Clone)]
5138 pub enum VkDebugReportErrorEXT {
5139 VK_DEBUG_REPORT_ERROR_NONE_EXT = 0,
5140 VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1
5141 }
5142
5143 bitflags! {
5144 pub flags VkDebugReportFlagsEXT: VkFlags {
5145 const VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001,
5146 const VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002,
5147 const VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004,
5148 const VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008,
5149 const VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010
5150 }
5151 }
5152
5153 pub type vkDebugReportCallbackEXTFn = unsafe extern "stdcall" fn(flags: VkDebugReportFlagsEXT,
5154 objectType: VkDebugReportObjectTypeEXT,
5155 object: uint64_t,
5156 location: size_t,
5157 messageCode: int32_t,
5158 pLayerPrefix: *const c_char,
5159 pMessage: *const c_char,
5160 pUserData: *mut c_void) -> VkBool32;
5161 #[repr(C)]
5162 #[derive(Copy)]
5163 pub struct VkDebugReportCallbackCreateInfoEXT {
5164 pub sType: VkStructureType,
5165 pub pNext: *const c_void,
5166 pub flags: VkDebugReportFlagsEXT,
5167 pub pfnCallback: Option<vkDebugReportCallbackEXTFn>,
5168 pub pUserData: *mut c_void
5169 }
5170
5171 impl Clone for VkDebugReportCallbackCreateInfoEXT {
5173 fn clone(&self) -> Self {
5174 unsafe {
5175 ::std::mem::transmute_copy(self)
5176 }
5177 }
5178 }
5179
5180 pub type vkCreateDebugReportCallbackEXTFn = unsafe extern "stdcall" fn(instance: VkInstance,
5181 pCreateInfo: *const VkDebugReportCallbackCreateInfoEXT,
5182 pAllocator: *const VkAllocationCallbacks,
5183 pCallback: *mut VkDebugReportCallbackEXT) -> VkResult;
5184
5185 pub type vkDestroyDebugReportCallbackEXTFn = unsafe extern "stdcall" fn(instance: VkInstance,
5186 callback: VkDebugReportCallbackEXT,
5187 pAllocator: *const VkAllocationCallbacks);
5188
5189 pub type vkDebugReportMessageEXTFn = unsafe extern "stdcall" fn(instance: VkInstance,
5190 flags: VkDebugReportFlagsEXT,
5191 objectType: VkDebugReportObjectTypeEXT,
5192 object: uint64_t,
5193 location: size_t,
5194 messageCode: int32_t,
5195 pLayerPrefix: *const c_char,
5196 pMessage: *const c_char);
5197
5198 pub struct VkExtDebugReportCommands {
5199 library: Option<DynamicLibrary>,
5200 vkGetInstanceProcAddr: Option<vkGetInstanceProcAddrFn>,
5201 vkCreateDebugReportCallbackEXT: Option<vkCreateDebugReportCallbackEXTFn>,
5202 vkDestroyDebugReportCallbackEXT: Option<vkDestroyDebugReportCallbackEXTFn>,
5203 vkDebugReportMessageEXT: Option<vkDebugReportMessageEXTFn>
5204 }
5205
5206 impl VkExtDebugReportCommands {
5207 pub fn new() -> Result<VkExtDebugReportCommands, String> {
5208 unsafe {
5209 let mut vulkan_ext_debug_report: VkExtDebugReportCommands = ::std::mem::zeroed::<VkExtDebugReportCommands>();
5210 let library_path = Path::new(VULKAN_LIBRARY);
5211 vulkan_ext_debug_report.library = match DynamicLibrary::open(Some(library_path)) {
5212 Err(error) => return Err(format!("Failed to load {}: {}",VULKAN_LIBRARY,error)),
5213 Ok(library) => Some(library),
5214 };
5215 vulkan_ext_debug_report.vkGetInstanceProcAddr = Some(transmute(try!(vulkan_ext_debug_report.library.as_ref().unwrap().symbol::<u8>("vkGetInstanceProcAddr"))));
5216 Ok(vulkan_ext_debug_report)
5217 }
5218 }
5219
5220 pub fn load(&mut self, instance: VkInstance) -> Result<(), String> {
5221 unsafe {
5222 self.vkCreateDebugReportCallbackEXT = Some(transmute(load_command!(self, instance, "vkCreateDebugReportCallbackEXT")));
5223 self.vkDestroyDebugReportCallbackEXT = Some(transmute(load_command!(self, instance, "vkDestroyDebugReportCallbackEXT")));
5224 self.vkDebugReportMessageEXT = Some(transmute(load_command!(self, instance, "vkDebugReportMessageEXT")));
5225 }
5226 Ok(())
5227 }
5228
5229 pub unsafe fn vkCreateDebugReportCallbackEXT(&self,
5230 instance: VkInstance,
5231 pCreateInfo: *const VkDebugReportCallbackCreateInfoEXT,
5232 pAllocator: *const VkAllocationCallbacks,
5233 pCallback: *mut VkDebugReportCallbackEXT) -> VkResult {
5234 invoke_command!(self, vkCreateDebugReportCallbackEXT, instance, pCreateInfo, pAllocator, pCallback)
5235 }
5236
5237 pub unsafe fn vkDestroyDebugReportCallbackEXT(&self,
5238 instance: VkInstance,
5239 callback: VkDebugReportCallbackEXT,
5240 pAllocator: *const VkAllocationCallbacks) {
5241 invoke_command!(self, vkDestroyDebugReportCallbackEXT, instance, callback, pAllocator)
5242 }
5243
5244 pub unsafe fn vkDebugReportMessageEXT(&self,
5245 instance: VkInstance,
5246 flags: VkDebugReportFlagsEXT,
5247 objectType: VkDebugReportObjectTypeEXT,
5248 object: uint64_t,
5249 location: size_t,
5250 messageCode: int32_t,
5251 pLayerPrefix: *const c_char,
5252 pMessage: *const c_char) {
5253 invoke_command!(self, vkDebugReportMessageEXT, instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage)
5254 }
5255 }
5256}