1 # ! [ allow ( clippy :: too_many_arguments , clippy :: cognitive_complexity , clippy :: wrong_self_convention ) ]use std::fmt;
2 use std::os::raw::*;
3 #[doc = r" Iterates through the pointer chain. Includes the item that is passed into the function."]
4 #[doc = r" Stops at the last `BaseOutStructure` that has a null `p_next` field."]
ptr_chain_iter<T>(ptr: &mut T) -> impl Iterator<Item = *mut BaseOutStructure>5 pub(crate) unsafe fn ptr_chain_iter<T>(ptr: &mut T) -> impl Iterator<Item = *mut BaseOutStructure> {
6 let ptr: *mut BaseOutStructure = ptr as *mut T as _;
7 (0..).scan(ptr, |p_ptr, _| {
8 if p_ptr.is_null() {
9 return None;
10 }
11 let n_ptr = (**p_ptr).p_next as *mut BaseOutStructure;
12 let old = *p_ptr;
13 *p_ptr = n_ptr;
14 Some(old)
15 })
16 }
17 pub trait Handle {
18 const TYPE: ObjectType;
as_raw(self) -> u6419 fn as_raw(self) -> u64;
from_raw(_: u64) -> Self20 fn from_raw(_: u64) -> Self;
21 }
22 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_MAKE_VERSION.html>"]
make_version(major: u32, minor: u32, patch: u32) -> u3223 pub const fn make_version(major: u32, minor: u32, patch: u32) -> u32 {
24 (major << 22) | (minor << 12) | patch
25 }
26 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_VERSION_MAJOR.html>"]
version_major(version: u32) -> u3227 pub const fn version_major(version: u32) -> u32 {
28 version >> 22
29 }
30 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_VERSION_MINOR.html>"]
version_minor(version: u32) -> u3231 pub const fn version_minor(version: u32) -> u32 {
32 (version >> 12) & 0x3ff
33 }
34 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_VERSION_PATCH.html>"]
version_patch(version: u32) -> u3235 pub const fn version_patch(version: u32) -> u32 {
36 version & 0xfff
37 }
38 pub type RROutput = c_ulong;
39 pub type VisualID = c_uint;
40 pub type Display = *const c_void;
41 pub type Window = c_ulong;
42 #[allow(non_camel_case_types)]
43 pub type xcb_connection_t = c_void;
44 #[allow(non_camel_case_types)]
45 pub type xcb_window_t = u32;
46 #[allow(non_camel_case_types)]
47 pub type xcb_visualid_t = u32;
48 pub type MirConnection = *const c_void;
49 pub type MirSurface = *const c_void;
50 pub type HINSTANCE = *const c_void;
51 pub type HWND = *const c_void;
52 #[allow(non_camel_case_types)]
53 pub type wl_display = c_void;
54 #[allow(non_camel_case_types)]
55 pub type wl_surface = c_void;
56 pub type HANDLE = *mut c_void;
57 pub type HMONITOR = HANDLE;
58 pub type DWORD = c_ulong;
59 pub type LPCWSTR = *const u16;
60 #[allow(non_camel_case_types)]
61 pub type zx_handle_t = u32;
62 #[allow(non_camel_case_types)]
63 pub type SECURITY_ATTRIBUTES = ();
64 pub type ANativeWindow = c_void;
65 pub type AHardwareBuffer = c_void;
66 #[doc = r" This definition is experimental and won't adhere to semver rules."]
67 pub type GgpStreamDescriptor = u32;
68 #[doc = r" This definition is experimental and won't adhere to semver rules."]
69 pub type GgpFrameToken = u32;
70 pub type CAMetalLayer = c_void;
71 #[macro_export]
72 macro_rules! vk_bitflags_wrapped {
73 ( $ name : ident , $ all : expr , $ flag_type : ty ) => {
74 impl Default for $name {
75 fn default() -> $name {
76 $name(0)
77 }
78 }
79 impl $name {
80 #[inline]
81 pub const fn empty() -> $name {
82 $name(0)
83 }
84 #[inline]
85 pub const fn all() -> $name {
86 $name($all)
87 }
88 #[inline]
89 pub const fn from_raw(x: $flag_type) -> Self {
90 $name(x)
91 }
92 #[inline]
93 pub const fn as_raw(self) -> $flag_type {
94 self.0
95 }
96 #[inline]
97 pub fn is_empty(self) -> bool {
98 self == $name::empty()
99 }
100 #[inline]
101 pub fn is_all(self) -> bool {
102 self & $name::all() == $name::all()
103 }
104 #[inline]
105 pub fn intersects(self, other: $name) -> bool {
106 self & other != $name::empty()
107 }
108 #[doc = r" Returns whether `other` is a subset of `self`"]
109 #[inline]
110 pub fn contains(self, other: $name) -> bool {
111 self & other == other
112 }
113 }
114 impl ::std::ops::BitOr for $name {
115 type Output = $name;
116 #[inline]
117 fn bitor(self, rhs: $name) -> $name {
118 $name(self.0 | rhs.0)
119 }
120 }
121 impl ::std::ops::BitOrAssign for $name {
122 #[inline]
123 fn bitor_assign(&mut self, rhs: $name) {
124 *self = *self | rhs
125 }
126 }
127 impl ::std::ops::BitAnd for $name {
128 type Output = $name;
129 #[inline]
130 fn bitand(self, rhs: $name) -> $name {
131 $name(self.0 & rhs.0)
132 }
133 }
134 impl ::std::ops::BitAndAssign for $name {
135 #[inline]
136 fn bitand_assign(&mut self, rhs: $name) {
137 *self = *self & rhs
138 }
139 }
140 impl ::std::ops::BitXor for $name {
141 type Output = $name;
142 #[inline]
143 fn bitxor(self, rhs: $name) -> $name {
144 $name(self.0 ^ rhs.0)
145 }
146 }
147 impl ::std::ops::BitXorAssign for $name {
148 #[inline]
149 fn bitxor_assign(&mut self, rhs: $name) {
150 *self = *self ^ rhs
151 }
152 }
153 impl ::std::ops::Sub for $name {
154 type Output = $name;
155 #[inline]
156 fn sub(self, rhs: $name) -> $name {
157 self & !rhs
158 }
159 }
160 impl ::std::ops::SubAssign for $name {
161 #[inline]
162 fn sub_assign(&mut self, rhs: $name) {
163 *self = *self - rhs
164 }
165 }
166 impl ::std::ops::Not for $name {
167 type Output = $name;
168 #[inline]
169 fn not(self) -> $name {
170 self ^ $name::all()
171 }
172 }
173 };
174 }
175 #[macro_export]
176 macro_rules! handle_nondispatchable {
177 ( $ name : ident , $ ty : ident ) => {
178 handle_nondispatchable!($name, $ty, doc = "");
179 };
180 ( $ name : ident , $ ty : ident , $ doc_link : meta ) => {
181 #[repr(transparent)]
182 #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash, Default)]
183 #[$doc_link]
184 pub struct $name(u64);
185 impl Handle for $name {
186 const TYPE: ObjectType = ObjectType::$ty;
187 fn as_raw(self) -> u64 {
188 self.0 as u64
189 }
190 fn from_raw(x: u64) -> Self {
191 $name(x as _)
192 }
193 }
194 impl $name {
195 pub const fn null() -> $name {
196 $name(0)
197 }
198 }
199 impl fmt::Pointer for $name {
200 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
201 write!(f, "0x{:x}", self.0)
202 }
203 }
204 impl fmt::Debug for $name {
205 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
206 write!(f, "0x{:x}", self.0)
207 }
208 }
209 };
210 }
211 #[macro_export]
212 macro_rules! define_handle {
213 ( $ name : ident , $ ty : ident ) => {
214 define_handle!($name, $ty, doc = "");
215 };
216 ( $ name : ident , $ ty : ident , $ doc_link : meta ) => {
217 #[repr(transparent)]
218 #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash)]
219 #[$doc_link]
220 pub struct $name(*mut u8);
221 impl Default for $name {
222 fn default() -> $name {
223 $name::null()
224 }
225 }
226 impl Handle for $name {
227 const TYPE: ObjectType = ObjectType::$ty;
228 fn as_raw(self) -> u64 {
229 self.0 as u64
230 }
231 fn from_raw(x: u64) -> Self {
232 $name(x as _)
233 }
234 }
235 unsafe impl Send for $name {}
236 unsafe impl Sync for $name {}
237 impl $name {
238 pub const fn null() -> Self {
239 $name(::std::ptr::null_mut())
240 }
241 }
242 impl fmt::Pointer for $name {
243 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
244 fmt::Pointer::fmt(&self.0, f)
245 }
246 }
247 impl fmt::Debug for $name {
248 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
249 fmt::Debug::fmt(&self.0, f)
250 }
251 }
252 };
253 }
254 #[allow(non_camel_case_types)]
255 pub type PFN_vkGetInstanceProcAddr =
256 extern "system" fn(instance: Instance, p_name: *const c_char) -> PFN_vkVoidFunction;
257 pub struct StaticFn {
258 pub get_instance_proc_addr:
259 extern "system" fn(instance: Instance, p_name: *const c_char) -> PFN_vkVoidFunction,
260 }
261 unsafe impl Send for StaticFn {}
262 unsafe impl Sync for StaticFn {}
263 impl ::std::clone::Clone for StaticFn {
clone(&self) -> Self264 fn clone(&self) -> Self {
265 StaticFn {
266 get_instance_proc_addr: self.get_instance_proc_addr,
267 }
268 }
269 }
270 impl StaticFn {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,271 pub fn load<F>(mut _f: F) -> Self
272 where
273 F: FnMut(&::std::ffi::CStr) -> *const c_void,
274 {
275 StaticFn {
276 get_instance_proc_addr: unsafe {
277 extern "system" fn get_instance_proc_addr(
278 _instance: Instance,
279 _p_name: *const c_char,
280 ) -> PFN_vkVoidFunction {
281 panic!(concat!(
282 "Unable to load ",
283 stringify!(get_instance_proc_addr)
284 ))
285 }
286 let raw_name = stringify!(vkGetInstanceProcAddr);
287 let cname = ::std::ffi::CString::new(raw_name).unwrap();
288 let val = _f(&cname);
289 if val.is_null() {
290 get_instance_proc_addr
291 } else {
292 ::std::mem::transmute(val)
293 }
294 },
295 }
296 }
297 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetInstanceProcAddr.html>"]
get_instance_proc_addr( &self, instance: Instance, p_name: *const c_char, ) -> PFN_vkVoidFunction298 pub unsafe fn get_instance_proc_addr(
299 &self,
300 instance: Instance,
301 p_name: *const c_char,
302 ) -> PFN_vkVoidFunction {
303 (self.get_instance_proc_addr)(instance, p_name)
304 }
305 }
306 #[allow(non_camel_case_types)]
307 pub type PFN_vkCreateInstance = extern "system" fn(
308 p_create_info: *const InstanceCreateInfo,
309 p_allocator: *const AllocationCallbacks,
310 p_instance: *mut Instance,
311 ) -> Result;
312 #[allow(non_camel_case_types)]
313 pub type PFN_vkEnumerateInstanceExtensionProperties = extern "system" fn(
314 p_layer_name: *const c_char,
315 p_property_count: *mut u32,
316 p_properties: *mut ExtensionProperties,
317 ) -> Result;
318 #[allow(non_camel_case_types)]
319 pub type PFN_vkEnumerateInstanceLayerProperties =
320 extern "system" fn(p_property_count: *mut u32, p_properties: *mut LayerProperties) -> Result;
321 pub struct EntryFnV1_0 {
322 pub create_instance: extern "system" fn(
323 p_create_info: *const InstanceCreateInfo,
324 p_allocator: *const AllocationCallbacks,
325 p_instance: *mut Instance,
326 ) -> Result,
327 pub enumerate_instance_extension_properties: extern "system" fn(
328 p_layer_name: *const c_char,
329 p_property_count: *mut u32,
330 p_properties: *mut ExtensionProperties,
331 ) -> Result,
332 pub enumerate_instance_layer_properties: extern "system" fn(
333 p_property_count: *mut u32,
334 p_properties: *mut LayerProperties,
335 ) -> Result,
336 }
337 unsafe impl Send for EntryFnV1_0 {}
338 unsafe impl Sync for EntryFnV1_0 {}
339 impl ::std::clone::Clone for EntryFnV1_0 {
clone(&self) -> Self340 fn clone(&self) -> Self {
341 EntryFnV1_0 {
342 create_instance: self.create_instance,
343 enumerate_instance_extension_properties: self.enumerate_instance_extension_properties,
344 enumerate_instance_layer_properties: self.enumerate_instance_layer_properties,
345 }
346 }
347 }
348 impl EntryFnV1_0 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,349 pub fn load<F>(mut _f: F) -> Self
350 where
351 F: FnMut(&::std::ffi::CStr) -> *const c_void,
352 {
353 EntryFnV1_0 {
354 create_instance: unsafe {
355 extern "system" fn create_instance(
356 _p_create_info: *const InstanceCreateInfo,
357 _p_allocator: *const AllocationCallbacks,
358 _p_instance: *mut Instance,
359 ) -> Result {
360 panic!(concat!("Unable to load ", stringify!(create_instance)))
361 }
362 let raw_name = stringify!(vkCreateInstance);
363 let cname = ::std::ffi::CString::new(raw_name).unwrap();
364 let val = _f(&cname);
365 if val.is_null() {
366 create_instance
367 } else {
368 ::std::mem::transmute(val)
369 }
370 },
371 enumerate_instance_extension_properties: unsafe {
372 extern "system" fn enumerate_instance_extension_properties(
373 _p_layer_name: *const c_char,
374 _p_property_count: *mut u32,
375 _p_properties: *mut ExtensionProperties,
376 ) -> Result {
377 panic!(concat!(
378 "Unable to load ",
379 stringify!(enumerate_instance_extension_properties)
380 ))
381 }
382 let raw_name = stringify!(vkEnumerateInstanceExtensionProperties);
383 let cname = ::std::ffi::CString::new(raw_name).unwrap();
384 let val = _f(&cname);
385 if val.is_null() {
386 enumerate_instance_extension_properties
387 } else {
388 ::std::mem::transmute(val)
389 }
390 },
391 enumerate_instance_layer_properties: unsafe {
392 extern "system" fn enumerate_instance_layer_properties(
393 _p_property_count: *mut u32,
394 _p_properties: *mut LayerProperties,
395 ) -> Result {
396 panic!(concat!(
397 "Unable to load ",
398 stringify!(enumerate_instance_layer_properties)
399 ))
400 }
401 let raw_name = stringify!(vkEnumerateInstanceLayerProperties);
402 let cname = ::std::ffi::CString::new(raw_name).unwrap();
403 let val = _f(&cname);
404 if val.is_null() {
405 enumerate_instance_layer_properties
406 } else {
407 ::std::mem::transmute(val)
408 }
409 },
410 }
411 }
412 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateInstance.html>"]
create_instance( &self, p_create_info: *const InstanceCreateInfo, p_allocator: *const AllocationCallbacks, p_instance: *mut Instance, ) -> Result413 pub unsafe fn create_instance(
414 &self,
415 p_create_info: *const InstanceCreateInfo,
416 p_allocator: *const AllocationCallbacks,
417 p_instance: *mut Instance,
418 ) -> Result {
419 (self.create_instance)(p_create_info, p_allocator, p_instance)
420 }
421 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceExtensionProperties.html>"]
enumerate_instance_extension_properties( &self, p_layer_name: *const c_char, p_property_count: *mut u32, p_properties: *mut ExtensionProperties, ) -> Result422 pub unsafe fn enumerate_instance_extension_properties(
423 &self,
424 p_layer_name: *const c_char,
425 p_property_count: *mut u32,
426 p_properties: *mut ExtensionProperties,
427 ) -> Result {
428 (self.enumerate_instance_extension_properties)(p_layer_name, p_property_count, p_properties)
429 }
430 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceLayerProperties.html>"]
enumerate_instance_layer_properties( &self, p_property_count: *mut u32, p_properties: *mut LayerProperties, ) -> Result431 pub unsafe fn enumerate_instance_layer_properties(
432 &self,
433 p_property_count: *mut u32,
434 p_properties: *mut LayerProperties,
435 ) -> Result {
436 (self.enumerate_instance_layer_properties)(p_property_count, p_properties)
437 }
438 }
439 #[allow(non_camel_case_types)]
440 pub type PFN_vkDestroyInstance =
441 extern "system" fn(instance: Instance, p_allocator: *const AllocationCallbacks) -> c_void;
442 #[allow(non_camel_case_types)]
443 pub type PFN_vkEnumeratePhysicalDevices = extern "system" fn(
444 instance: Instance,
445 p_physical_device_count: *mut u32,
446 p_physical_devices: *mut PhysicalDevice,
447 ) -> Result;
448 #[allow(non_camel_case_types)]
449 pub type PFN_vkGetPhysicalDeviceFeatures = extern "system" fn(
450 physical_device: PhysicalDevice,
451 p_features: *mut PhysicalDeviceFeatures,
452 ) -> c_void;
453 #[allow(non_camel_case_types)]
454 pub type PFN_vkGetPhysicalDeviceFormatProperties = extern "system" fn(
455 physical_device: PhysicalDevice,
456 format: Format,
457 p_format_properties: *mut FormatProperties,
458 ) -> c_void;
459 #[allow(non_camel_case_types)]
460 pub type PFN_vkGetPhysicalDeviceImageFormatProperties = extern "system" fn(
461 physical_device: PhysicalDevice,
462 format: Format,
463 ty: ImageType,
464 tiling: ImageTiling,
465 usage: ImageUsageFlags,
466 flags: ImageCreateFlags,
467 p_image_format_properties: *mut ImageFormatProperties,
468 ) -> Result;
469 #[allow(non_camel_case_types)]
470 pub type PFN_vkGetPhysicalDeviceProperties = extern "system" fn(
471 physical_device: PhysicalDevice,
472 p_properties: *mut PhysicalDeviceProperties,
473 ) -> c_void;
474 #[allow(non_camel_case_types)]
475 pub type PFN_vkGetPhysicalDeviceQueueFamilyProperties = extern "system" fn(
476 physical_device: PhysicalDevice,
477 p_queue_family_property_count: *mut u32,
478 p_queue_family_properties: *mut QueueFamilyProperties,
479 ) -> c_void;
480 #[allow(non_camel_case_types)]
481 pub type PFN_vkGetPhysicalDeviceMemoryProperties = extern "system" fn(
482 physical_device: PhysicalDevice,
483 p_memory_properties: *mut PhysicalDeviceMemoryProperties,
484 ) -> c_void;
485 #[allow(non_camel_case_types)]
486 pub type PFN_vkGetDeviceProcAddr =
487 extern "system" fn(device: Device, p_name: *const c_char) -> PFN_vkVoidFunction;
488 #[allow(non_camel_case_types)]
489 pub type PFN_vkCreateDevice = extern "system" fn(
490 physical_device: PhysicalDevice,
491 p_create_info: *const DeviceCreateInfo,
492 p_allocator: *const AllocationCallbacks,
493 p_device: *mut Device,
494 ) -> Result;
495 #[allow(non_camel_case_types)]
496 pub type PFN_vkEnumerateDeviceExtensionProperties = extern "system" fn(
497 physical_device: PhysicalDevice,
498 p_layer_name: *const c_char,
499 p_property_count: *mut u32,
500 p_properties: *mut ExtensionProperties,
501 ) -> Result;
502 #[allow(non_camel_case_types)]
503 pub type PFN_vkEnumerateDeviceLayerProperties = extern "system" fn(
504 physical_device: PhysicalDevice,
505 p_property_count: *mut u32,
506 p_properties: *mut LayerProperties,
507 ) -> Result;
508 #[allow(non_camel_case_types)]
509 pub type PFN_vkGetPhysicalDeviceSparseImageFormatProperties = extern "system" fn(
510 physical_device: PhysicalDevice,
511 format: Format,
512 ty: ImageType,
513 samples: SampleCountFlags,
514 usage: ImageUsageFlags,
515 tiling: ImageTiling,
516 p_property_count: *mut u32,
517 p_properties: *mut SparseImageFormatProperties,
518 ) -> c_void;
519 pub struct InstanceFnV1_0 {
520 pub destroy_instance:
521 extern "system" fn(instance: Instance, p_allocator: *const AllocationCallbacks) -> c_void,
522 pub enumerate_physical_devices: extern "system" fn(
523 instance: Instance,
524 p_physical_device_count: *mut u32,
525 p_physical_devices: *mut PhysicalDevice,
526 ) -> Result,
527 pub get_physical_device_features: extern "system" fn(
528 physical_device: PhysicalDevice,
529 p_features: *mut PhysicalDeviceFeatures,
530 ) -> c_void,
531 pub get_physical_device_format_properties: extern "system" fn(
532 physical_device: PhysicalDevice,
533 format: Format,
534 p_format_properties: *mut FormatProperties,
535 ) -> c_void,
536 pub get_physical_device_image_format_properties: extern "system" fn(
537 physical_device: PhysicalDevice,
538 format: Format,
539 ty: ImageType,
540 tiling: ImageTiling,
541 usage: ImageUsageFlags,
542 flags: ImageCreateFlags,
543 p_image_format_properties: *mut ImageFormatProperties,
544 ) -> Result,
545 pub get_physical_device_properties: extern "system" fn(
546 physical_device: PhysicalDevice,
547 p_properties: *mut PhysicalDeviceProperties,
548 ) -> c_void,
549 pub get_physical_device_queue_family_properties: extern "system" fn(
550 physical_device: PhysicalDevice,
551 p_queue_family_property_count: *mut u32,
552 p_queue_family_properties: *mut QueueFamilyProperties,
553 ) -> c_void,
554 pub get_physical_device_memory_properties: extern "system" fn(
555 physical_device: PhysicalDevice,
556 p_memory_properties: *mut PhysicalDeviceMemoryProperties,
557 ) -> c_void,
558 pub get_device_proc_addr:
559 extern "system" fn(device: Device, p_name: *const c_char) -> PFN_vkVoidFunction,
560 pub create_device: extern "system" fn(
561 physical_device: PhysicalDevice,
562 p_create_info: *const DeviceCreateInfo,
563 p_allocator: *const AllocationCallbacks,
564 p_device: *mut Device,
565 ) -> Result,
566 pub enumerate_device_extension_properties: extern "system" fn(
567 physical_device: PhysicalDevice,
568 p_layer_name: *const c_char,
569 p_property_count: *mut u32,
570 p_properties: *mut ExtensionProperties,
571 ) -> Result,
572 pub enumerate_device_layer_properties: extern "system" fn(
573 physical_device: PhysicalDevice,
574 p_property_count: *mut u32,
575 p_properties: *mut LayerProperties,
576 ) -> Result,
577 pub get_physical_device_sparse_image_format_properties: extern "system" fn(
578 physical_device: PhysicalDevice,
579 format: Format,
580 ty: ImageType,
581 samples: SampleCountFlags,
582 usage: ImageUsageFlags,
583 tiling: ImageTiling,
584 p_property_count: *mut u32,
585 p_properties: *mut SparseImageFormatProperties,
586 ) -> c_void,
587 }
588 unsafe impl Send for InstanceFnV1_0 {}
589 unsafe impl Sync for InstanceFnV1_0 {}
590 impl ::std::clone::Clone for InstanceFnV1_0 {
clone(&self) -> Self591 fn clone(&self) -> Self {
592 InstanceFnV1_0 {
593 destroy_instance: self.destroy_instance,
594 enumerate_physical_devices: self.enumerate_physical_devices,
595 get_physical_device_features: self.get_physical_device_features,
596 get_physical_device_format_properties: self.get_physical_device_format_properties,
597 get_physical_device_image_format_properties: self
598 .get_physical_device_image_format_properties,
599 get_physical_device_properties: self.get_physical_device_properties,
600 get_physical_device_queue_family_properties: self
601 .get_physical_device_queue_family_properties,
602 get_physical_device_memory_properties: self.get_physical_device_memory_properties,
603 get_device_proc_addr: self.get_device_proc_addr,
604 create_device: self.create_device,
605 enumerate_device_extension_properties: self.enumerate_device_extension_properties,
606 enumerate_device_layer_properties: self.enumerate_device_layer_properties,
607 get_physical_device_sparse_image_format_properties: self
608 .get_physical_device_sparse_image_format_properties,
609 }
610 }
611 }
612 impl InstanceFnV1_0 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,613 pub fn load<F>(mut _f: F) -> Self
614 where
615 F: FnMut(&::std::ffi::CStr) -> *const c_void,
616 {
617 InstanceFnV1_0 {
618 destroy_instance: unsafe {
619 extern "system" fn destroy_instance(
620 _instance: Instance,
621 _p_allocator: *const AllocationCallbacks,
622 ) -> c_void {
623 panic!(concat!("Unable to load ", stringify!(destroy_instance)))
624 }
625 let raw_name = stringify!(vkDestroyInstance);
626 let cname = ::std::ffi::CString::new(raw_name).unwrap();
627 let val = _f(&cname);
628 if val.is_null() {
629 destroy_instance
630 } else {
631 ::std::mem::transmute(val)
632 }
633 },
634 enumerate_physical_devices: unsafe {
635 extern "system" fn enumerate_physical_devices(
636 _instance: Instance,
637 _p_physical_device_count: *mut u32,
638 _p_physical_devices: *mut PhysicalDevice,
639 ) -> Result {
640 panic!(concat!(
641 "Unable to load ",
642 stringify!(enumerate_physical_devices)
643 ))
644 }
645 let raw_name = stringify!(vkEnumeratePhysicalDevices);
646 let cname = ::std::ffi::CString::new(raw_name).unwrap();
647 let val = _f(&cname);
648 if val.is_null() {
649 enumerate_physical_devices
650 } else {
651 ::std::mem::transmute(val)
652 }
653 },
654 get_physical_device_features: unsafe {
655 extern "system" fn get_physical_device_features(
656 _physical_device: PhysicalDevice,
657 _p_features: *mut PhysicalDeviceFeatures,
658 ) -> c_void {
659 panic!(concat!(
660 "Unable to load ",
661 stringify!(get_physical_device_features)
662 ))
663 }
664 let raw_name = stringify!(vkGetPhysicalDeviceFeatures);
665 let cname = ::std::ffi::CString::new(raw_name).unwrap();
666 let val = _f(&cname);
667 if val.is_null() {
668 get_physical_device_features
669 } else {
670 ::std::mem::transmute(val)
671 }
672 },
673 get_physical_device_format_properties: unsafe {
674 extern "system" fn get_physical_device_format_properties(
675 _physical_device: PhysicalDevice,
676 _format: Format,
677 _p_format_properties: *mut FormatProperties,
678 ) -> c_void {
679 panic!(concat!(
680 "Unable to load ",
681 stringify!(get_physical_device_format_properties)
682 ))
683 }
684 let raw_name = stringify!(vkGetPhysicalDeviceFormatProperties);
685 let cname = ::std::ffi::CString::new(raw_name).unwrap();
686 let val = _f(&cname);
687 if val.is_null() {
688 get_physical_device_format_properties
689 } else {
690 ::std::mem::transmute(val)
691 }
692 },
693 get_physical_device_image_format_properties: unsafe {
694 extern "system" fn get_physical_device_image_format_properties(
695 _physical_device: PhysicalDevice,
696 _format: Format,
697 _ty: ImageType,
698 _tiling: ImageTiling,
699 _usage: ImageUsageFlags,
700 _flags: ImageCreateFlags,
701 _p_image_format_properties: *mut ImageFormatProperties,
702 ) -> Result {
703 panic!(concat!(
704 "Unable to load ",
705 stringify!(get_physical_device_image_format_properties)
706 ))
707 }
708 let raw_name = stringify!(vkGetPhysicalDeviceImageFormatProperties);
709 let cname = ::std::ffi::CString::new(raw_name).unwrap();
710 let val = _f(&cname);
711 if val.is_null() {
712 get_physical_device_image_format_properties
713 } else {
714 ::std::mem::transmute(val)
715 }
716 },
717 get_physical_device_properties: unsafe {
718 extern "system" fn get_physical_device_properties(
719 _physical_device: PhysicalDevice,
720 _p_properties: *mut PhysicalDeviceProperties,
721 ) -> c_void {
722 panic!(concat!(
723 "Unable to load ",
724 stringify!(get_physical_device_properties)
725 ))
726 }
727 let raw_name = stringify!(vkGetPhysicalDeviceProperties);
728 let cname = ::std::ffi::CString::new(raw_name).unwrap();
729 let val = _f(&cname);
730 if val.is_null() {
731 get_physical_device_properties
732 } else {
733 ::std::mem::transmute(val)
734 }
735 },
736 get_physical_device_queue_family_properties: unsafe {
737 extern "system" fn get_physical_device_queue_family_properties(
738 _physical_device: PhysicalDevice,
739 _p_queue_family_property_count: *mut u32,
740 _p_queue_family_properties: *mut QueueFamilyProperties,
741 ) -> c_void {
742 panic!(concat!(
743 "Unable to load ",
744 stringify!(get_physical_device_queue_family_properties)
745 ))
746 }
747 let raw_name = stringify!(vkGetPhysicalDeviceQueueFamilyProperties);
748 let cname = ::std::ffi::CString::new(raw_name).unwrap();
749 let val = _f(&cname);
750 if val.is_null() {
751 get_physical_device_queue_family_properties
752 } else {
753 ::std::mem::transmute(val)
754 }
755 },
756 get_physical_device_memory_properties: unsafe {
757 extern "system" fn get_physical_device_memory_properties(
758 _physical_device: PhysicalDevice,
759 _p_memory_properties: *mut PhysicalDeviceMemoryProperties,
760 ) -> c_void {
761 panic!(concat!(
762 "Unable to load ",
763 stringify!(get_physical_device_memory_properties)
764 ))
765 }
766 let raw_name = stringify!(vkGetPhysicalDeviceMemoryProperties);
767 let cname = ::std::ffi::CString::new(raw_name).unwrap();
768 let val = _f(&cname);
769 if val.is_null() {
770 get_physical_device_memory_properties
771 } else {
772 ::std::mem::transmute(val)
773 }
774 },
775 get_device_proc_addr: unsafe {
776 extern "system" fn get_device_proc_addr(
777 _device: Device,
778 _p_name: *const c_char,
779 ) -> PFN_vkVoidFunction {
780 panic!(concat!("Unable to load ", stringify!(get_device_proc_addr)))
781 }
782 let raw_name = stringify!(vkGetDeviceProcAddr);
783 let cname = ::std::ffi::CString::new(raw_name).unwrap();
784 let val = _f(&cname);
785 if val.is_null() {
786 get_device_proc_addr
787 } else {
788 ::std::mem::transmute(val)
789 }
790 },
791 create_device: unsafe {
792 extern "system" fn create_device(
793 _physical_device: PhysicalDevice,
794 _p_create_info: *const DeviceCreateInfo,
795 _p_allocator: *const AllocationCallbacks,
796 _p_device: *mut Device,
797 ) -> Result {
798 panic!(concat!("Unable to load ", stringify!(create_device)))
799 }
800 let raw_name = stringify!(vkCreateDevice);
801 let cname = ::std::ffi::CString::new(raw_name).unwrap();
802 let val = _f(&cname);
803 if val.is_null() {
804 create_device
805 } else {
806 ::std::mem::transmute(val)
807 }
808 },
809 enumerate_device_extension_properties: unsafe {
810 extern "system" fn enumerate_device_extension_properties(
811 _physical_device: PhysicalDevice,
812 _p_layer_name: *const c_char,
813 _p_property_count: *mut u32,
814 _p_properties: *mut ExtensionProperties,
815 ) -> Result {
816 panic!(concat!(
817 "Unable to load ",
818 stringify!(enumerate_device_extension_properties)
819 ))
820 }
821 let raw_name = stringify!(vkEnumerateDeviceExtensionProperties);
822 let cname = ::std::ffi::CString::new(raw_name).unwrap();
823 let val = _f(&cname);
824 if val.is_null() {
825 enumerate_device_extension_properties
826 } else {
827 ::std::mem::transmute(val)
828 }
829 },
830 enumerate_device_layer_properties: unsafe {
831 extern "system" fn enumerate_device_layer_properties(
832 _physical_device: PhysicalDevice,
833 _p_property_count: *mut u32,
834 _p_properties: *mut LayerProperties,
835 ) -> Result {
836 panic!(concat!(
837 "Unable to load ",
838 stringify!(enumerate_device_layer_properties)
839 ))
840 }
841 let raw_name = stringify!(vkEnumerateDeviceLayerProperties);
842 let cname = ::std::ffi::CString::new(raw_name).unwrap();
843 let val = _f(&cname);
844 if val.is_null() {
845 enumerate_device_layer_properties
846 } else {
847 ::std::mem::transmute(val)
848 }
849 },
850 get_physical_device_sparse_image_format_properties: unsafe {
851 extern "system" fn get_physical_device_sparse_image_format_properties(
852 _physical_device: PhysicalDevice,
853 _format: Format,
854 _ty: ImageType,
855 _samples: SampleCountFlags,
856 _usage: ImageUsageFlags,
857 _tiling: ImageTiling,
858 _p_property_count: *mut u32,
859 _p_properties: *mut SparseImageFormatProperties,
860 ) -> c_void {
861 panic!(concat!(
862 "Unable to load ",
863 stringify!(get_physical_device_sparse_image_format_properties)
864 ))
865 }
866 let raw_name = stringify!(vkGetPhysicalDeviceSparseImageFormatProperties);
867 let cname = ::std::ffi::CString::new(raw_name).unwrap();
868 let val = _f(&cname);
869 if val.is_null() {
870 get_physical_device_sparse_image_format_properties
871 } else {
872 ::std::mem::transmute(val)
873 }
874 },
875 }
876 }
877 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyInstance.html>"]
destroy_instance( &self, instance: Instance, p_allocator: *const AllocationCallbacks, ) -> c_void878 pub unsafe fn destroy_instance(
879 &self,
880 instance: Instance,
881 p_allocator: *const AllocationCallbacks,
882 ) -> c_void {
883 (self.destroy_instance)(instance, p_allocator)
884 }
885 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumeratePhysicalDevices.html>"]
enumerate_physical_devices( &self, instance: Instance, p_physical_device_count: *mut u32, p_physical_devices: *mut PhysicalDevice, ) -> Result886 pub unsafe fn enumerate_physical_devices(
887 &self,
888 instance: Instance,
889 p_physical_device_count: *mut u32,
890 p_physical_devices: *mut PhysicalDevice,
891 ) -> Result {
892 (self.enumerate_physical_devices)(instance, p_physical_device_count, p_physical_devices)
893 }
894 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFeatures.html>"]
get_physical_device_features( &self, physical_device: PhysicalDevice, p_features: *mut PhysicalDeviceFeatures, ) -> c_void895 pub unsafe fn get_physical_device_features(
896 &self,
897 physical_device: PhysicalDevice,
898 p_features: *mut PhysicalDeviceFeatures,
899 ) -> c_void {
900 (self.get_physical_device_features)(physical_device, p_features)
901 }
902 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFormatProperties.html>"]
get_physical_device_format_properties( &self, physical_device: PhysicalDevice, format: Format, p_format_properties: *mut FormatProperties, ) -> c_void903 pub unsafe fn get_physical_device_format_properties(
904 &self,
905 physical_device: PhysicalDevice,
906 format: Format,
907 p_format_properties: *mut FormatProperties,
908 ) -> c_void {
909 (self.get_physical_device_format_properties)(physical_device, format, p_format_properties)
910 }
911 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceImageFormatProperties.html>"]
get_physical_device_image_format_properties( &self, physical_device: PhysicalDevice, format: Format, ty: ImageType, tiling: ImageTiling, usage: ImageUsageFlags, flags: ImageCreateFlags, p_image_format_properties: *mut ImageFormatProperties, ) -> Result912 pub unsafe fn get_physical_device_image_format_properties(
913 &self,
914 physical_device: PhysicalDevice,
915 format: Format,
916 ty: ImageType,
917 tiling: ImageTiling,
918 usage: ImageUsageFlags,
919 flags: ImageCreateFlags,
920 p_image_format_properties: *mut ImageFormatProperties,
921 ) -> Result {
922 (self.get_physical_device_image_format_properties)(
923 physical_device,
924 format,
925 ty,
926 tiling,
927 usage,
928 flags,
929 p_image_format_properties,
930 )
931 }
932 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceProperties.html>"]
get_physical_device_properties( &self, physical_device: PhysicalDevice, p_properties: *mut PhysicalDeviceProperties, ) -> c_void933 pub unsafe fn get_physical_device_properties(
934 &self,
935 physical_device: PhysicalDevice,
936 p_properties: *mut PhysicalDeviceProperties,
937 ) -> c_void {
938 (self.get_physical_device_properties)(physical_device, p_properties)
939 }
940 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceQueueFamilyProperties.html>"]
get_physical_device_queue_family_properties( &self, physical_device: PhysicalDevice, p_queue_family_property_count: *mut u32, p_queue_family_properties: *mut QueueFamilyProperties, ) -> c_void941 pub unsafe fn get_physical_device_queue_family_properties(
942 &self,
943 physical_device: PhysicalDevice,
944 p_queue_family_property_count: *mut u32,
945 p_queue_family_properties: *mut QueueFamilyProperties,
946 ) -> c_void {
947 (self.get_physical_device_queue_family_properties)(
948 physical_device,
949 p_queue_family_property_count,
950 p_queue_family_properties,
951 )
952 }
953 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceMemoryProperties.html>"]
get_physical_device_memory_properties( &self, physical_device: PhysicalDevice, p_memory_properties: *mut PhysicalDeviceMemoryProperties, ) -> c_void954 pub unsafe fn get_physical_device_memory_properties(
955 &self,
956 physical_device: PhysicalDevice,
957 p_memory_properties: *mut PhysicalDeviceMemoryProperties,
958 ) -> c_void {
959 (self.get_physical_device_memory_properties)(physical_device, p_memory_properties)
960 }
961 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceProcAddr.html>"]
get_device_proc_addr( &self, device: Device, p_name: *const c_char, ) -> PFN_vkVoidFunction962 pub unsafe fn get_device_proc_addr(
963 &self,
964 device: Device,
965 p_name: *const c_char,
966 ) -> PFN_vkVoidFunction {
967 (self.get_device_proc_addr)(device, p_name)
968 }
969 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDevice.html>"]
create_device( &self, physical_device: PhysicalDevice, p_create_info: *const DeviceCreateInfo, p_allocator: *const AllocationCallbacks, p_device: *mut Device, ) -> Result970 pub unsafe fn create_device(
971 &self,
972 physical_device: PhysicalDevice,
973 p_create_info: *const DeviceCreateInfo,
974 p_allocator: *const AllocationCallbacks,
975 p_device: *mut Device,
976 ) -> Result {
977 (self.create_device)(physical_device, p_create_info, p_allocator, p_device)
978 }
979 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateDeviceExtensionProperties.html>"]
enumerate_device_extension_properties( &self, physical_device: PhysicalDevice, p_layer_name: *const c_char, p_property_count: *mut u32, p_properties: *mut ExtensionProperties, ) -> Result980 pub unsafe fn enumerate_device_extension_properties(
981 &self,
982 physical_device: PhysicalDevice,
983 p_layer_name: *const c_char,
984 p_property_count: *mut u32,
985 p_properties: *mut ExtensionProperties,
986 ) -> Result {
987 (self.enumerate_device_extension_properties)(
988 physical_device,
989 p_layer_name,
990 p_property_count,
991 p_properties,
992 )
993 }
994 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateDeviceLayerProperties.html>"]
enumerate_device_layer_properties( &self, physical_device: PhysicalDevice, p_property_count: *mut u32, p_properties: *mut LayerProperties, ) -> Result995 pub unsafe fn enumerate_device_layer_properties(
996 &self,
997 physical_device: PhysicalDevice,
998 p_property_count: *mut u32,
999 p_properties: *mut LayerProperties,
1000 ) -> Result {
1001 (self.enumerate_device_layer_properties)(physical_device, p_property_count, p_properties)
1002 }
1003 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSparseImageFormatProperties.html>"]
get_physical_device_sparse_image_format_properties( &self, physical_device: PhysicalDevice, format: Format, ty: ImageType, samples: SampleCountFlags, usage: ImageUsageFlags, tiling: ImageTiling, p_property_count: *mut u32, p_properties: *mut SparseImageFormatProperties, ) -> c_void1004 pub unsafe fn get_physical_device_sparse_image_format_properties(
1005 &self,
1006 physical_device: PhysicalDevice,
1007 format: Format,
1008 ty: ImageType,
1009 samples: SampleCountFlags,
1010 usage: ImageUsageFlags,
1011 tiling: ImageTiling,
1012 p_property_count: *mut u32,
1013 p_properties: *mut SparseImageFormatProperties,
1014 ) -> c_void {
1015 (self.get_physical_device_sparse_image_format_properties)(
1016 physical_device,
1017 format,
1018 ty,
1019 samples,
1020 usage,
1021 tiling,
1022 p_property_count,
1023 p_properties,
1024 )
1025 }
1026 }
1027 #[allow(non_camel_case_types)]
1028 pub type PFN_vkDestroyDevice =
1029 extern "system" fn(device: Device, p_allocator: *const AllocationCallbacks) -> c_void;
1030 #[allow(non_camel_case_types)]
1031 pub type PFN_vkGetDeviceQueue = extern "system" fn(
1032 device: Device,
1033 queue_family_index: u32,
1034 queue_index: u32,
1035 p_queue: *mut Queue,
1036 ) -> c_void;
1037 #[allow(non_camel_case_types)]
1038 pub type PFN_vkQueueSubmit = extern "system" fn(
1039 queue: Queue,
1040 submit_count: u32,
1041 p_submits: *const SubmitInfo,
1042 fence: Fence,
1043 ) -> Result;
1044 #[allow(non_camel_case_types)]
1045 pub type PFN_vkQueueWaitIdle = extern "system" fn(queue: Queue) -> Result;
1046 #[allow(non_camel_case_types)]
1047 pub type PFN_vkDeviceWaitIdle = extern "system" fn(device: Device) -> Result;
1048 #[allow(non_camel_case_types)]
1049 pub type PFN_vkAllocateMemory = extern "system" fn(
1050 device: Device,
1051 p_allocate_info: *const MemoryAllocateInfo,
1052 p_allocator: *const AllocationCallbacks,
1053 p_memory: *mut DeviceMemory,
1054 ) -> Result;
1055 #[allow(non_camel_case_types)]
1056 pub type PFN_vkFreeMemory = extern "system" fn(
1057 device: Device,
1058 memory: DeviceMemory,
1059 p_allocator: *const AllocationCallbacks,
1060 ) -> c_void;
1061 #[allow(non_camel_case_types)]
1062 pub type PFN_vkMapMemory = extern "system" fn(
1063 device: Device,
1064 memory: DeviceMemory,
1065 offset: DeviceSize,
1066 size: DeviceSize,
1067 flags: MemoryMapFlags,
1068 pp_data: *mut *mut c_void,
1069 ) -> Result;
1070 #[allow(non_camel_case_types)]
1071 pub type PFN_vkUnmapMemory = extern "system" fn(device: Device, memory: DeviceMemory) -> c_void;
1072 #[allow(non_camel_case_types)]
1073 pub type PFN_vkFlushMappedMemoryRanges = extern "system" fn(
1074 device: Device,
1075 memory_range_count: u32,
1076 p_memory_ranges: *const MappedMemoryRange,
1077 ) -> Result;
1078 #[allow(non_camel_case_types)]
1079 pub type PFN_vkInvalidateMappedMemoryRanges = extern "system" fn(
1080 device: Device,
1081 memory_range_count: u32,
1082 p_memory_ranges: *const MappedMemoryRange,
1083 ) -> Result;
1084 #[allow(non_camel_case_types)]
1085 pub type PFN_vkGetDeviceMemoryCommitment = extern "system" fn(
1086 device: Device,
1087 memory: DeviceMemory,
1088 p_committed_memory_in_bytes: *mut DeviceSize,
1089 ) -> c_void;
1090 #[allow(non_camel_case_types)]
1091 pub type PFN_vkBindBufferMemory = extern "system" fn(
1092 device: Device,
1093 buffer: Buffer,
1094 memory: DeviceMemory,
1095 memory_offset: DeviceSize,
1096 ) -> Result;
1097 #[allow(non_camel_case_types)]
1098 pub type PFN_vkBindImageMemory = extern "system" fn(
1099 device: Device,
1100 image: Image,
1101 memory: DeviceMemory,
1102 memory_offset: DeviceSize,
1103 ) -> Result;
1104 #[allow(non_camel_case_types)]
1105 pub type PFN_vkGetBufferMemoryRequirements = extern "system" fn(
1106 device: Device,
1107 buffer: Buffer,
1108 p_memory_requirements: *mut MemoryRequirements,
1109 ) -> c_void;
1110 #[allow(non_camel_case_types)]
1111 pub type PFN_vkGetImageMemoryRequirements = extern "system" fn(
1112 device: Device,
1113 image: Image,
1114 p_memory_requirements: *mut MemoryRequirements,
1115 ) -> c_void;
1116 #[allow(non_camel_case_types)]
1117 pub type PFN_vkGetImageSparseMemoryRequirements = extern "system" fn(
1118 device: Device,
1119 image: Image,
1120 p_sparse_memory_requirement_count: *mut u32,
1121 p_sparse_memory_requirements: *mut SparseImageMemoryRequirements,
1122 ) -> c_void;
1123 #[allow(non_camel_case_types)]
1124 pub type PFN_vkQueueBindSparse = extern "system" fn(
1125 queue: Queue,
1126 bind_info_count: u32,
1127 p_bind_info: *const BindSparseInfo,
1128 fence: Fence,
1129 ) -> Result;
1130 #[allow(non_camel_case_types)]
1131 pub type PFN_vkCreateFence = extern "system" fn(
1132 device: Device,
1133 p_create_info: *const FenceCreateInfo,
1134 p_allocator: *const AllocationCallbacks,
1135 p_fence: *mut Fence,
1136 ) -> Result;
1137 #[allow(non_camel_case_types)]
1138 pub type PFN_vkDestroyFence = extern "system" fn(
1139 device: Device,
1140 fence: Fence,
1141 p_allocator: *const AllocationCallbacks,
1142 ) -> c_void;
1143 #[allow(non_camel_case_types)]
1144 pub type PFN_vkResetFences =
1145 extern "system" fn(device: Device, fence_count: u32, p_fences: *const Fence) -> Result;
1146 #[allow(non_camel_case_types)]
1147 pub type PFN_vkGetFenceStatus = extern "system" fn(device: Device, fence: Fence) -> Result;
1148 #[allow(non_camel_case_types)]
1149 pub type PFN_vkWaitForFences = extern "system" fn(
1150 device: Device,
1151 fence_count: u32,
1152 p_fences: *const Fence,
1153 wait_all: Bool32,
1154 timeout: u64,
1155 ) -> Result;
1156 #[allow(non_camel_case_types)]
1157 pub type PFN_vkCreateSemaphore = extern "system" fn(
1158 device: Device,
1159 p_create_info: *const SemaphoreCreateInfo,
1160 p_allocator: *const AllocationCallbacks,
1161 p_semaphore: *mut Semaphore,
1162 ) -> Result;
1163 #[allow(non_camel_case_types)]
1164 pub type PFN_vkDestroySemaphore = extern "system" fn(
1165 device: Device,
1166 semaphore: Semaphore,
1167 p_allocator: *const AllocationCallbacks,
1168 ) -> c_void;
1169 #[allow(non_camel_case_types)]
1170 pub type PFN_vkCreateEvent = extern "system" fn(
1171 device: Device,
1172 p_create_info: *const EventCreateInfo,
1173 p_allocator: *const AllocationCallbacks,
1174 p_event: *mut Event,
1175 ) -> Result;
1176 #[allow(non_camel_case_types)]
1177 pub type PFN_vkDestroyEvent = extern "system" fn(
1178 device: Device,
1179 event: Event,
1180 p_allocator: *const AllocationCallbacks,
1181 ) -> c_void;
1182 #[allow(non_camel_case_types)]
1183 pub type PFN_vkGetEventStatus = extern "system" fn(device: Device, event: Event) -> Result;
1184 #[allow(non_camel_case_types)]
1185 pub type PFN_vkSetEvent = extern "system" fn(device: Device, event: Event) -> Result;
1186 #[allow(non_camel_case_types)]
1187 pub type PFN_vkResetEvent = extern "system" fn(device: Device, event: Event) -> Result;
1188 #[allow(non_camel_case_types)]
1189 pub type PFN_vkCreateQueryPool = extern "system" fn(
1190 device: Device,
1191 p_create_info: *const QueryPoolCreateInfo,
1192 p_allocator: *const AllocationCallbacks,
1193 p_query_pool: *mut QueryPool,
1194 ) -> Result;
1195 #[allow(non_camel_case_types)]
1196 pub type PFN_vkDestroyQueryPool = extern "system" fn(
1197 device: Device,
1198 query_pool: QueryPool,
1199 p_allocator: *const AllocationCallbacks,
1200 ) -> c_void;
1201 #[allow(non_camel_case_types)]
1202 pub type PFN_vkGetQueryPoolResults = extern "system" fn(
1203 device: Device,
1204 query_pool: QueryPool,
1205 first_query: u32,
1206 query_count: u32,
1207 data_size: usize,
1208 p_data: *mut c_void,
1209 stride: DeviceSize,
1210 flags: QueryResultFlags,
1211 ) -> Result;
1212 #[allow(non_camel_case_types)]
1213 pub type PFN_vkCreateBuffer = extern "system" fn(
1214 device: Device,
1215 p_create_info: *const BufferCreateInfo,
1216 p_allocator: *const AllocationCallbacks,
1217 p_buffer: *mut Buffer,
1218 ) -> Result;
1219 #[allow(non_camel_case_types)]
1220 pub type PFN_vkDestroyBuffer = extern "system" fn(
1221 device: Device,
1222 buffer: Buffer,
1223 p_allocator: *const AllocationCallbacks,
1224 ) -> c_void;
1225 #[allow(non_camel_case_types)]
1226 pub type PFN_vkCreateBufferView = extern "system" fn(
1227 device: Device,
1228 p_create_info: *const BufferViewCreateInfo,
1229 p_allocator: *const AllocationCallbacks,
1230 p_view: *mut BufferView,
1231 ) -> Result;
1232 #[allow(non_camel_case_types)]
1233 pub type PFN_vkDestroyBufferView = extern "system" fn(
1234 device: Device,
1235 buffer_view: BufferView,
1236 p_allocator: *const AllocationCallbacks,
1237 ) -> c_void;
1238 #[allow(non_camel_case_types)]
1239 pub type PFN_vkCreateImage = extern "system" fn(
1240 device: Device,
1241 p_create_info: *const ImageCreateInfo,
1242 p_allocator: *const AllocationCallbacks,
1243 p_image: *mut Image,
1244 ) -> Result;
1245 #[allow(non_camel_case_types)]
1246 pub type PFN_vkDestroyImage = extern "system" fn(
1247 device: Device,
1248 image: Image,
1249 p_allocator: *const AllocationCallbacks,
1250 ) -> c_void;
1251 #[allow(non_camel_case_types)]
1252 pub type PFN_vkGetImageSubresourceLayout = extern "system" fn(
1253 device: Device,
1254 image: Image,
1255 p_subresource: *const ImageSubresource,
1256 p_layout: *mut SubresourceLayout,
1257 ) -> c_void;
1258 #[allow(non_camel_case_types)]
1259 pub type PFN_vkCreateImageView = extern "system" fn(
1260 device: Device,
1261 p_create_info: *const ImageViewCreateInfo,
1262 p_allocator: *const AllocationCallbacks,
1263 p_view: *mut ImageView,
1264 ) -> Result;
1265 #[allow(non_camel_case_types)]
1266 pub type PFN_vkDestroyImageView = extern "system" fn(
1267 device: Device,
1268 image_view: ImageView,
1269 p_allocator: *const AllocationCallbacks,
1270 ) -> c_void;
1271 #[allow(non_camel_case_types)]
1272 pub type PFN_vkCreateShaderModule = extern "system" fn(
1273 device: Device,
1274 p_create_info: *const ShaderModuleCreateInfo,
1275 p_allocator: *const AllocationCallbacks,
1276 p_shader_module: *mut ShaderModule,
1277 ) -> Result;
1278 #[allow(non_camel_case_types)]
1279 pub type PFN_vkDestroyShaderModule = extern "system" fn(
1280 device: Device,
1281 shader_module: ShaderModule,
1282 p_allocator: *const AllocationCallbacks,
1283 ) -> c_void;
1284 #[allow(non_camel_case_types)]
1285 pub type PFN_vkCreatePipelineCache = extern "system" fn(
1286 device: Device,
1287 p_create_info: *const PipelineCacheCreateInfo,
1288 p_allocator: *const AllocationCallbacks,
1289 p_pipeline_cache: *mut PipelineCache,
1290 ) -> Result;
1291 #[allow(non_camel_case_types)]
1292 pub type PFN_vkDestroyPipelineCache = extern "system" fn(
1293 device: Device,
1294 pipeline_cache: PipelineCache,
1295 p_allocator: *const AllocationCallbacks,
1296 ) -> c_void;
1297 #[allow(non_camel_case_types)]
1298 pub type PFN_vkGetPipelineCacheData = extern "system" fn(
1299 device: Device,
1300 pipeline_cache: PipelineCache,
1301 p_data_size: *mut usize,
1302 p_data: *mut c_void,
1303 ) -> Result;
1304 #[allow(non_camel_case_types)]
1305 pub type PFN_vkMergePipelineCaches = extern "system" fn(
1306 device: Device,
1307 dst_cache: PipelineCache,
1308 src_cache_count: u32,
1309 p_src_caches: *const PipelineCache,
1310 ) -> Result;
1311 #[allow(non_camel_case_types)]
1312 pub type PFN_vkCreateGraphicsPipelines = extern "system" fn(
1313 device: Device,
1314 pipeline_cache: PipelineCache,
1315 create_info_count: u32,
1316 p_create_infos: *const GraphicsPipelineCreateInfo,
1317 p_allocator: *const AllocationCallbacks,
1318 p_pipelines: *mut Pipeline,
1319 ) -> Result;
1320 #[allow(non_camel_case_types)]
1321 pub type PFN_vkCreateComputePipelines = extern "system" fn(
1322 device: Device,
1323 pipeline_cache: PipelineCache,
1324 create_info_count: u32,
1325 p_create_infos: *const ComputePipelineCreateInfo,
1326 p_allocator: *const AllocationCallbacks,
1327 p_pipelines: *mut Pipeline,
1328 ) -> Result;
1329 #[allow(non_camel_case_types)]
1330 pub type PFN_vkDestroyPipeline = extern "system" fn(
1331 device: Device,
1332 pipeline: Pipeline,
1333 p_allocator: *const AllocationCallbacks,
1334 ) -> c_void;
1335 #[allow(non_camel_case_types)]
1336 pub type PFN_vkCreatePipelineLayout = extern "system" fn(
1337 device: Device,
1338 p_create_info: *const PipelineLayoutCreateInfo,
1339 p_allocator: *const AllocationCallbacks,
1340 p_pipeline_layout: *mut PipelineLayout,
1341 ) -> Result;
1342 #[allow(non_camel_case_types)]
1343 pub type PFN_vkDestroyPipelineLayout = extern "system" fn(
1344 device: Device,
1345 pipeline_layout: PipelineLayout,
1346 p_allocator: *const AllocationCallbacks,
1347 ) -> c_void;
1348 #[allow(non_camel_case_types)]
1349 pub type PFN_vkCreateSampler = extern "system" fn(
1350 device: Device,
1351 p_create_info: *const SamplerCreateInfo,
1352 p_allocator: *const AllocationCallbacks,
1353 p_sampler: *mut Sampler,
1354 ) -> Result;
1355 #[allow(non_camel_case_types)]
1356 pub type PFN_vkDestroySampler = extern "system" fn(
1357 device: Device,
1358 sampler: Sampler,
1359 p_allocator: *const AllocationCallbacks,
1360 ) -> c_void;
1361 #[allow(non_camel_case_types)]
1362 pub type PFN_vkCreateDescriptorSetLayout = extern "system" fn(
1363 device: Device,
1364 p_create_info: *const DescriptorSetLayoutCreateInfo,
1365 p_allocator: *const AllocationCallbacks,
1366 p_set_layout: *mut DescriptorSetLayout,
1367 ) -> Result;
1368 #[allow(non_camel_case_types)]
1369 pub type PFN_vkDestroyDescriptorSetLayout = extern "system" fn(
1370 device: Device,
1371 descriptor_set_layout: DescriptorSetLayout,
1372 p_allocator: *const AllocationCallbacks,
1373 ) -> c_void;
1374 #[allow(non_camel_case_types)]
1375 pub type PFN_vkCreateDescriptorPool = extern "system" fn(
1376 device: Device,
1377 p_create_info: *const DescriptorPoolCreateInfo,
1378 p_allocator: *const AllocationCallbacks,
1379 p_descriptor_pool: *mut DescriptorPool,
1380 ) -> Result;
1381 #[allow(non_camel_case_types)]
1382 pub type PFN_vkDestroyDescriptorPool = extern "system" fn(
1383 device: Device,
1384 descriptor_pool: DescriptorPool,
1385 p_allocator: *const AllocationCallbacks,
1386 ) -> c_void;
1387 #[allow(non_camel_case_types)]
1388 pub type PFN_vkResetDescriptorPool = extern "system" fn(
1389 device: Device,
1390 descriptor_pool: DescriptorPool,
1391 flags: DescriptorPoolResetFlags,
1392 ) -> Result;
1393 #[allow(non_camel_case_types)]
1394 pub type PFN_vkAllocateDescriptorSets = extern "system" fn(
1395 device: Device,
1396 p_allocate_info: *const DescriptorSetAllocateInfo,
1397 p_descriptor_sets: *mut DescriptorSet,
1398 ) -> Result;
1399 #[allow(non_camel_case_types)]
1400 pub type PFN_vkFreeDescriptorSets = extern "system" fn(
1401 device: Device,
1402 descriptor_pool: DescriptorPool,
1403 descriptor_set_count: u32,
1404 p_descriptor_sets: *const DescriptorSet,
1405 ) -> Result;
1406 #[allow(non_camel_case_types)]
1407 pub type PFN_vkUpdateDescriptorSets = extern "system" fn(
1408 device: Device,
1409 descriptor_write_count: u32,
1410 p_descriptor_writes: *const WriteDescriptorSet,
1411 descriptor_copy_count: u32,
1412 p_descriptor_copies: *const CopyDescriptorSet,
1413 ) -> c_void;
1414 #[allow(non_camel_case_types)]
1415 pub type PFN_vkCreateFramebuffer = extern "system" fn(
1416 device: Device,
1417 p_create_info: *const FramebufferCreateInfo,
1418 p_allocator: *const AllocationCallbacks,
1419 p_framebuffer: *mut Framebuffer,
1420 ) -> Result;
1421 #[allow(non_camel_case_types)]
1422 pub type PFN_vkDestroyFramebuffer = extern "system" fn(
1423 device: Device,
1424 framebuffer: Framebuffer,
1425 p_allocator: *const AllocationCallbacks,
1426 ) -> c_void;
1427 #[allow(non_camel_case_types)]
1428 pub type PFN_vkCreateRenderPass = extern "system" fn(
1429 device: Device,
1430 p_create_info: *const RenderPassCreateInfo,
1431 p_allocator: *const AllocationCallbacks,
1432 p_render_pass: *mut RenderPass,
1433 ) -> Result;
1434 #[allow(non_camel_case_types)]
1435 pub type PFN_vkDestroyRenderPass = extern "system" fn(
1436 device: Device,
1437 render_pass: RenderPass,
1438 p_allocator: *const AllocationCallbacks,
1439 ) -> c_void;
1440 #[allow(non_camel_case_types)]
1441 pub type PFN_vkGetRenderAreaGranularity = extern "system" fn(
1442 device: Device,
1443 render_pass: RenderPass,
1444 p_granularity: *mut Extent2D,
1445 ) -> c_void;
1446 #[allow(non_camel_case_types)]
1447 pub type PFN_vkCreateCommandPool = extern "system" fn(
1448 device: Device,
1449 p_create_info: *const CommandPoolCreateInfo,
1450 p_allocator: *const AllocationCallbacks,
1451 p_command_pool: *mut CommandPool,
1452 ) -> Result;
1453 #[allow(non_camel_case_types)]
1454 pub type PFN_vkDestroyCommandPool = extern "system" fn(
1455 device: Device,
1456 command_pool: CommandPool,
1457 p_allocator: *const AllocationCallbacks,
1458 ) -> c_void;
1459 #[allow(non_camel_case_types)]
1460 pub type PFN_vkResetCommandPool = extern "system" fn(
1461 device: Device,
1462 command_pool: CommandPool,
1463 flags: CommandPoolResetFlags,
1464 ) -> Result;
1465 #[allow(non_camel_case_types)]
1466 pub type PFN_vkAllocateCommandBuffers = extern "system" fn(
1467 device: Device,
1468 p_allocate_info: *const CommandBufferAllocateInfo,
1469 p_command_buffers: *mut CommandBuffer,
1470 ) -> Result;
1471 #[allow(non_camel_case_types)]
1472 pub type PFN_vkFreeCommandBuffers = extern "system" fn(
1473 device: Device,
1474 command_pool: CommandPool,
1475 command_buffer_count: u32,
1476 p_command_buffers: *const CommandBuffer,
1477 ) -> c_void;
1478 #[allow(non_camel_case_types)]
1479 pub type PFN_vkBeginCommandBuffer = extern "system" fn(
1480 command_buffer: CommandBuffer,
1481 p_begin_info: *const CommandBufferBeginInfo,
1482 ) -> Result;
1483 #[allow(non_camel_case_types)]
1484 pub type PFN_vkEndCommandBuffer = extern "system" fn(command_buffer: CommandBuffer) -> Result;
1485 #[allow(non_camel_case_types)]
1486 pub type PFN_vkResetCommandBuffer =
1487 extern "system" fn(command_buffer: CommandBuffer, flags: CommandBufferResetFlags) -> Result;
1488 #[allow(non_camel_case_types)]
1489 pub type PFN_vkCmdBindPipeline = extern "system" fn(
1490 command_buffer: CommandBuffer,
1491 pipeline_bind_point: PipelineBindPoint,
1492 pipeline: Pipeline,
1493 ) -> c_void;
1494 #[allow(non_camel_case_types)]
1495 pub type PFN_vkCmdSetViewport = extern "system" fn(
1496 command_buffer: CommandBuffer,
1497 first_viewport: u32,
1498 viewport_count: u32,
1499 p_viewports: *const Viewport,
1500 ) -> c_void;
1501 #[allow(non_camel_case_types)]
1502 pub type PFN_vkCmdSetScissor = extern "system" fn(
1503 command_buffer: CommandBuffer,
1504 first_scissor: u32,
1505 scissor_count: u32,
1506 p_scissors: *const Rect2D,
1507 ) -> c_void;
1508 #[allow(non_camel_case_types)]
1509 pub type PFN_vkCmdSetLineWidth =
1510 extern "system" fn(command_buffer: CommandBuffer, line_width: f32) -> c_void;
1511 #[allow(non_camel_case_types)]
1512 pub type PFN_vkCmdSetDepthBias = extern "system" fn(
1513 command_buffer: CommandBuffer,
1514 depth_bias_constant_factor: f32,
1515 depth_bias_clamp: f32,
1516 depth_bias_slope_factor: f32,
1517 ) -> c_void;
1518 #[allow(non_camel_case_types)]
1519 pub type PFN_vkCmdSetBlendConstants =
1520 extern "system" fn(command_buffer: CommandBuffer, blend_constants: &[f32; 4]) -> c_void;
1521 #[allow(non_camel_case_types)]
1522 pub type PFN_vkCmdSetDepthBounds = extern "system" fn(
1523 command_buffer: CommandBuffer,
1524 min_depth_bounds: f32,
1525 max_depth_bounds: f32,
1526 ) -> c_void;
1527 #[allow(non_camel_case_types)]
1528 pub type PFN_vkCmdSetStencilCompareMask = extern "system" fn(
1529 command_buffer: CommandBuffer,
1530 face_mask: StencilFaceFlags,
1531 compare_mask: u32,
1532 ) -> c_void;
1533 #[allow(non_camel_case_types)]
1534 pub type PFN_vkCmdSetStencilWriteMask = extern "system" fn(
1535 command_buffer: CommandBuffer,
1536 face_mask: StencilFaceFlags,
1537 write_mask: u32,
1538 ) -> c_void;
1539 #[allow(non_camel_case_types)]
1540 pub type PFN_vkCmdSetStencilReference = extern "system" fn(
1541 command_buffer: CommandBuffer,
1542 face_mask: StencilFaceFlags,
1543 reference: u32,
1544 ) -> c_void;
1545 #[allow(non_camel_case_types)]
1546 pub type PFN_vkCmdBindDescriptorSets = extern "system" fn(
1547 command_buffer: CommandBuffer,
1548 pipeline_bind_point: PipelineBindPoint,
1549 layout: PipelineLayout,
1550 first_set: u32,
1551 descriptor_set_count: u32,
1552 p_descriptor_sets: *const DescriptorSet,
1553 dynamic_offset_count: u32,
1554 p_dynamic_offsets: *const u32,
1555 ) -> c_void;
1556 #[allow(non_camel_case_types)]
1557 pub type PFN_vkCmdBindIndexBuffer = extern "system" fn(
1558 command_buffer: CommandBuffer,
1559 buffer: Buffer,
1560 offset: DeviceSize,
1561 index_type: IndexType,
1562 ) -> c_void;
1563 #[allow(non_camel_case_types)]
1564 pub type PFN_vkCmdBindVertexBuffers = extern "system" fn(
1565 command_buffer: CommandBuffer,
1566 first_binding: u32,
1567 binding_count: u32,
1568 p_buffers: *const Buffer,
1569 p_offsets: *const DeviceSize,
1570 ) -> c_void;
1571 #[allow(non_camel_case_types)]
1572 pub type PFN_vkCmdDraw = extern "system" fn(
1573 command_buffer: CommandBuffer,
1574 vertex_count: u32,
1575 instance_count: u32,
1576 first_vertex: u32,
1577 first_instance: u32,
1578 ) -> c_void;
1579 #[allow(non_camel_case_types)]
1580 pub type PFN_vkCmdDrawIndexed = extern "system" fn(
1581 command_buffer: CommandBuffer,
1582 index_count: u32,
1583 instance_count: u32,
1584 first_index: u32,
1585 vertex_offset: i32,
1586 first_instance: u32,
1587 ) -> c_void;
1588 #[allow(non_camel_case_types)]
1589 pub type PFN_vkCmdDrawIndirect = extern "system" fn(
1590 command_buffer: CommandBuffer,
1591 buffer: Buffer,
1592 offset: DeviceSize,
1593 draw_count: u32,
1594 stride: u32,
1595 ) -> c_void;
1596 #[allow(non_camel_case_types)]
1597 pub type PFN_vkCmdDrawIndexedIndirect = extern "system" fn(
1598 command_buffer: CommandBuffer,
1599 buffer: Buffer,
1600 offset: DeviceSize,
1601 draw_count: u32,
1602 stride: u32,
1603 ) -> c_void;
1604 #[allow(non_camel_case_types)]
1605 pub type PFN_vkCmdDispatch = extern "system" fn(
1606 command_buffer: CommandBuffer,
1607 group_count_x: u32,
1608 group_count_y: u32,
1609 group_count_z: u32,
1610 ) -> c_void;
1611 #[allow(non_camel_case_types)]
1612 pub type PFN_vkCmdDispatchIndirect =
1613 extern "system" fn(command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize) -> c_void;
1614 #[allow(non_camel_case_types)]
1615 pub type PFN_vkCmdCopyBuffer = extern "system" fn(
1616 command_buffer: CommandBuffer,
1617 src_buffer: Buffer,
1618 dst_buffer: Buffer,
1619 region_count: u32,
1620 p_regions: *const BufferCopy,
1621 ) -> c_void;
1622 #[allow(non_camel_case_types)]
1623 pub type PFN_vkCmdCopyImage = extern "system" fn(
1624 command_buffer: CommandBuffer,
1625 src_image: Image,
1626 src_image_layout: ImageLayout,
1627 dst_image: Image,
1628 dst_image_layout: ImageLayout,
1629 region_count: u32,
1630 p_regions: *const ImageCopy,
1631 ) -> c_void;
1632 #[allow(non_camel_case_types)]
1633 pub type PFN_vkCmdBlitImage = extern "system" fn(
1634 command_buffer: CommandBuffer,
1635 src_image: Image,
1636 src_image_layout: ImageLayout,
1637 dst_image: Image,
1638 dst_image_layout: ImageLayout,
1639 region_count: u32,
1640 p_regions: *const ImageBlit,
1641 filter: Filter,
1642 ) -> c_void;
1643 #[allow(non_camel_case_types)]
1644 pub type PFN_vkCmdCopyBufferToImage = extern "system" fn(
1645 command_buffer: CommandBuffer,
1646 src_buffer: Buffer,
1647 dst_image: Image,
1648 dst_image_layout: ImageLayout,
1649 region_count: u32,
1650 p_regions: *const BufferImageCopy,
1651 ) -> c_void;
1652 #[allow(non_camel_case_types)]
1653 pub type PFN_vkCmdCopyImageToBuffer = extern "system" fn(
1654 command_buffer: CommandBuffer,
1655 src_image: Image,
1656 src_image_layout: ImageLayout,
1657 dst_buffer: Buffer,
1658 region_count: u32,
1659 p_regions: *const BufferImageCopy,
1660 ) -> c_void;
1661 #[allow(non_camel_case_types)]
1662 pub type PFN_vkCmdUpdateBuffer = extern "system" fn(
1663 command_buffer: CommandBuffer,
1664 dst_buffer: Buffer,
1665 dst_offset: DeviceSize,
1666 data_size: DeviceSize,
1667 p_data: *const c_void,
1668 ) -> c_void;
1669 #[allow(non_camel_case_types)]
1670 pub type PFN_vkCmdFillBuffer = extern "system" fn(
1671 command_buffer: CommandBuffer,
1672 dst_buffer: Buffer,
1673 dst_offset: DeviceSize,
1674 size: DeviceSize,
1675 data: u32,
1676 ) -> c_void;
1677 #[allow(non_camel_case_types)]
1678 pub type PFN_vkCmdClearColorImage = extern "system" fn(
1679 command_buffer: CommandBuffer,
1680 image: Image,
1681 image_layout: ImageLayout,
1682 p_color: *const ClearColorValue,
1683 range_count: u32,
1684 p_ranges: *const ImageSubresourceRange,
1685 ) -> c_void;
1686 #[allow(non_camel_case_types)]
1687 pub type PFN_vkCmdClearDepthStencilImage = extern "system" fn(
1688 command_buffer: CommandBuffer,
1689 image: Image,
1690 image_layout: ImageLayout,
1691 p_depth_stencil: *const ClearDepthStencilValue,
1692 range_count: u32,
1693 p_ranges: *const ImageSubresourceRange,
1694 ) -> c_void;
1695 #[allow(non_camel_case_types)]
1696 pub type PFN_vkCmdClearAttachments = extern "system" fn(
1697 command_buffer: CommandBuffer,
1698 attachment_count: u32,
1699 p_attachments: *const ClearAttachment,
1700 rect_count: u32,
1701 p_rects: *const ClearRect,
1702 ) -> c_void;
1703 #[allow(non_camel_case_types)]
1704 pub type PFN_vkCmdResolveImage = extern "system" fn(
1705 command_buffer: CommandBuffer,
1706 src_image: Image,
1707 src_image_layout: ImageLayout,
1708 dst_image: Image,
1709 dst_image_layout: ImageLayout,
1710 region_count: u32,
1711 p_regions: *const ImageResolve,
1712 ) -> c_void;
1713 #[allow(non_camel_case_types)]
1714 pub type PFN_vkCmdSetEvent = extern "system" fn(
1715 command_buffer: CommandBuffer,
1716 event: Event,
1717 stage_mask: PipelineStageFlags,
1718 ) -> c_void;
1719 #[allow(non_camel_case_types)]
1720 pub type PFN_vkCmdResetEvent = extern "system" fn(
1721 command_buffer: CommandBuffer,
1722 event: Event,
1723 stage_mask: PipelineStageFlags,
1724 ) -> c_void;
1725 #[allow(non_camel_case_types)]
1726 pub type PFN_vkCmdWaitEvents = extern "system" fn(
1727 command_buffer: CommandBuffer,
1728 event_count: u32,
1729 p_events: *const Event,
1730 src_stage_mask: PipelineStageFlags,
1731 dst_stage_mask: PipelineStageFlags,
1732 memory_barrier_count: u32,
1733 p_memory_barriers: *const MemoryBarrier,
1734 buffer_memory_barrier_count: u32,
1735 p_buffer_memory_barriers: *const BufferMemoryBarrier,
1736 image_memory_barrier_count: u32,
1737 p_image_memory_barriers: *const ImageMemoryBarrier,
1738 ) -> c_void;
1739 #[allow(non_camel_case_types)]
1740 pub type PFN_vkCmdPipelineBarrier = extern "system" fn(
1741 command_buffer: CommandBuffer,
1742 src_stage_mask: PipelineStageFlags,
1743 dst_stage_mask: PipelineStageFlags,
1744 dependency_flags: DependencyFlags,
1745 memory_barrier_count: u32,
1746 p_memory_barriers: *const MemoryBarrier,
1747 buffer_memory_barrier_count: u32,
1748 p_buffer_memory_barriers: *const BufferMemoryBarrier,
1749 image_memory_barrier_count: u32,
1750 p_image_memory_barriers: *const ImageMemoryBarrier,
1751 ) -> c_void;
1752 #[allow(non_camel_case_types)]
1753 pub type PFN_vkCmdBeginQuery = extern "system" fn(
1754 command_buffer: CommandBuffer,
1755 query_pool: QueryPool,
1756 query: u32,
1757 flags: QueryControlFlags,
1758 ) -> c_void;
1759 #[allow(non_camel_case_types)]
1760 pub type PFN_vkCmdEndQuery =
1761 extern "system" fn(command_buffer: CommandBuffer, query_pool: QueryPool, query: u32) -> c_void;
1762 #[allow(non_camel_case_types)]
1763 pub type PFN_vkCmdResetQueryPool = extern "system" fn(
1764 command_buffer: CommandBuffer,
1765 query_pool: QueryPool,
1766 first_query: u32,
1767 query_count: u32,
1768 ) -> c_void;
1769 #[allow(non_camel_case_types)]
1770 pub type PFN_vkCmdWriteTimestamp = extern "system" fn(
1771 command_buffer: CommandBuffer,
1772 pipeline_stage: PipelineStageFlags,
1773 query_pool: QueryPool,
1774 query: u32,
1775 ) -> c_void;
1776 #[allow(non_camel_case_types)]
1777 pub type PFN_vkCmdCopyQueryPoolResults = extern "system" fn(
1778 command_buffer: CommandBuffer,
1779 query_pool: QueryPool,
1780 first_query: u32,
1781 query_count: u32,
1782 dst_buffer: Buffer,
1783 dst_offset: DeviceSize,
1784 stride: DeviceSize,
1785 flags: QueryResultFlags,
1786 ) -> c_void;
1787 #[allow(non_camel_case_types)]
1788 pub type PFN_vkCmdPushConstants = extern "system" fn(
1789 command_buffer: CommandBuffer,
1790 layout: PipelineLayout,
1791 stage_flags: ShaderStageFlags,
1792 offset: u32,
1793 size: u32,
1794 p_values: *const c_void,
1795 ) -> c_void;
1796 #[allow(non_camel_case_types)]
1797 pub type PFN_vkCmdBeginRenderPass = extern "system" fn(
1798 command_buffer: CommandBuffer,
1799 p_render_pass_begin: *const RenderPassBeginInfo,
1800 contents: SubpassContents,
1801 ) -> c_void;
1802 #[allow(non_camel_case_types)]
1803 pub type PFN_vkCmdNextSubpass =
1804 extern "system" fn(command_buffer: CommandBuffer, contents: SubpassContents) -> c_void;
1805 #[allow(non_camel_case_types)]
1806 pub type PFN_vkCmdEndRenderPass = extern "system" fn(command_buffer: CommandBuffer) -> c_void;
1807 #[allow(non_camel_case_types)]
1808 pub type PFN_vkCmdExecuteCommands = extern "system" fn(
1809 command_buffer: CommandBuffer,
1810 command_buffer_count: u32,
1811 p_command_buffers: *const CommandBuffer,
1812 ) -> c_void;
1813 pub struct DeviceFnV1_0 {
1814 pub destroy_device:
1815 extern "system" fn(device: Device, p_allocator: *const AllocationCallbacks) -> c_void,
1816 pub get_device_queue: extern "system" fn(
1817 device: Device,
1818 queue_family_index: u32,
1819 queue_index: u32,
1820 p_queue: *mut Queue,
1821 ) -> c_void,
1822 pub queue_submit: extern "system" fn(
1823 queue: Queue,
1824 submit_count: u32,
1825 p_submits: *const SubmitInfo,
1826 fence: Fence,
1827 ) -> Result,
1828 pub queue_wait_idle: extern "system" fn(queue: Queue) -> Result,
1829 pub device_wait_idle: extern "system" fn(device: Device) -> Result,
1830 pub allocate_memory: extern "system" fn(
1831 device: Device,
1832 p_allocate_info: *const MemoryAllocateInfo,
1833 p_allocator: *const AllocationCallbacks,
1834 p_memory: *mut DeviceMemory,
1835 ) -> Result,
1836 pub free_memory: extern "system" fn(
1837 device: Device,
1838 memory: DeviceMemory,
1839 p_allocator: *const AllocationCallbacks,
1840 ) -> c_void,
1841 pub map_memory: extern "system" fn(
1842 device: Device,
1843 memory: DeviceMemory,
1844 offset: DeviceSize,
1845 size: DeviceSize,
1846 flags: MemoryMapFlags,
1847 pp_data: *mut *mut c_void,
1848 ) -> Result,
1849 pub unmap_memory: extern "system" fn(device: Device, memory: DeviceMemory) -> c_void,
1850 pub flush_mapped_memory_ranges: extern "system" fn(
1851 device: Device,
1852 memory_range_count: u32,
1853 p_memory_ranges: *const MappedMemoryRange,
1854 ) -> Result,
1855 pub invalidate_mapped_memory_ranges: extern "system" fn(
1856 device: Device,
1857 memory_range_count: u32,
1858 p_memory_ranges: *const MappedMemoryRange,
1859 ) -> Result,
1860 pub get_device_memory_commitment: extern "system" fn(
1861 device: Device,
1862 memory: DeviceMemory,
1863 p_committed_memory_in_bytes: *mut DeviceSize,
1864 ) -> c_void,
1865 pub bind_buffer_memory: extern "system" fn(
1866 device: Device,
1867 buffer: Buffer,
1868 memory: DeviceMemory,
1869 memory_offset: DeviceSize,
1870 ) -> Result,
1871 pub bind_image_memory: extern "system" fn(
1872 device: Device,
1873 image: Image,
1874 memory: DeviceMemory,
1875 memory_offset: DeviceSize,
1876 ) -> Result,
1877 pub get_buffer_memory_requirements: extern "system" fn(
1878 device: Device,
1879 buffer: Buffer,
1880 p_memory_requirements: *mut MemoryRequirements,
1881 ) -> c_void,
1882 pub get_image_memory_requirements: extern "system" fn(
1883 device: Device,
1884 image: Image,
1885 p_memory_requirements: *mut MemoryRequirements,
1886 ) -> c_void,
1887 pub get_image_sparse_memory_requirements: extern "system" fn(
1888 device: Device,
1889 image: Image,
1890 p_sparse_memory_requirement_count: *mut u32,
1891 p_sparse_memory_requirements: *mut SparseImageMemoryRequirements,
1892 ) -> c_void,
1893 pub queue_bind_sparse: extern "system" fn(
1894 queue: Queue,
1895 bind_info_count: u32,
1896 p_bind_info: *const BindSparseInfo,
1897 fence: Fence,
1898 ) -> Result,
1899 pub create_fence: extern "system" fn(
1900 device: Device,
1901 p_create_info: *const FenceCreateInfo,
1902 p_allocator: *const AllocationCallbacks,
1903 p_fence: *mut Fence,
1904 ) -> Result,
1905 pub destroy_fence: extern "system" fn(
1906 device: Device,
1907 fence: Fence,
1908 p_allocator: *const AllocationCallbacks,
1909 ) -> c_void,
1910 pub reset_fences:
1911 extern "system" fn(device: Device, fence_count: u32, p_fences: *const Fence) -> Result,
1912 pub get_fence_status: extern "system" fn(device: Device, fence: Fence) -> Result,
1913 pub wait_for_fences: extern "system" fn(
1914 device: Device,
1915 fence_count: u32,
1916 p_fences: *const Fence,
1917 wait_all: Bool32,
1918 timeout: u64,
1919 ) -> Result,
1920 pub create_semaphore: extern "system" fn(
1921 device: Device,
1922 p_create_info: *const SemaphoreCreateInfo,
1923 p_allocator: *const AllocationCallbacks,
1924 p_semaphore: *mut Semaphore,
1925 ) -> Result,
1926 pub destroy_semaphore: extern "system" fn(
1927 device: Device,
1928 semaphore: Semaphore,
1929 p_allocator: *const AllocationCallbacks,
1930 ) -> c_void,
1931 pub create_event: extern "system" fn(
1932 device: Device,
1933 p_create_info: *const EventCreateInfo,
1934 p_allocator: *const AllocationCallbacks,
1935 p_event: *mut Event,
1936 ) -> Result,
1937 pub destroy_event: extern "system" fn(
1938 device: Device,
1939 event: Event,
1940 p_allocator: *const AllocationCallbacks,
1941 ) -> c_void,
1942 pub get_event_status: extern "system" fn(device: Device, event: Event) -> Result,
1943 pub set_event: extern "system" fn(device: Device, event: Event) -> Result,
1944 pub reset_event: extern "system" fn(device: Device, event: Event) -> Result,
1945 pub create_query_pool: extern "system" fn(
1946 device: Device,
1947 p_create_info: *const QueryPoolCreateInfo,
1948 p_allocator: *const AllocationCallbacks,
1949 p_query_pool: *mut QueryPool,
1950 ) -> Result,
1951 pub destroy_query_pool: extern "system" fn(
1952 device: Device,
1953 query_pool: QueryPool,
1954 p_allocator: *const AllocationCallbacks,
1955 ) -> c_void,
1956 pub get_query_pool_results: extern "system" fn(
1957 device: Device,
1958 query_pool: QueryPool,
1959 first_query: u32,
1960 query_count: u32,
1961 data_size: usize,
1962 p_data: *mut c_void,
1963 stride: DeviceSize,
1964 flags: QueryResultFlags,
1965 ) -> Result,
1966 pub create_buffer: extern "system" fn(
1967 device: Device,
1968 p_create_info: *const BufferCreateInfo,
1969 p_allocator: *const AllocationCallbacks,
1970 p_buffer: *mut Buffer,
1971 ) -> Result,
1972 pub destroy_buffer: extern "system" fn(
1973 device: Device,
1974 buffer: Buffer,
1975 p_allocator: *const AllocationCallbacks,
1976 ) -> c_void,
1977 pub create_buffer_view: extern "system" fn(
1978 device: Device,
1979 p_create_info: *const BufferViewCreateInfo,
1980 p_allocator: *const AllocationCallbacks,
1981 p_view: *mut BufferView,
1982 ) -> Result,
1983 pub destroy_buffer_view: extern "system" fn(
1984 device: Device,
1985 buffer_view: BufferView,
1986 p_allocator: *const AllocationCallbacks,
1987 ) -> c_void,
1988 pub create_image: extern "system" fn(
1989 device: Device,
1990 p_create_info: *const ImageCreateInfo,
1991 p_allocator: *const AllocationCallbacks,
1992 p_image: *mut Image,
1993 ) -> Result,
1994 pub destroy_image: extern "system" fn(
1995 device: Device,
1996 image: Image,
1997 p_allocator: *const AllocationCallbacks,
1998 ) -> c_void,
1999 pub get_image_subresource_layout: extern "system" fn(
2000 device: Device,
2001 image: Image,
2002 p_subresource: *const ImageSubresource,
2003 p_layout: *mut SubresourceLayout,
2004 ) -> c_void,
2005 pub create_image_view: extern "system" fn(
2006 device: Device,
2007 p_create_info: *const ImageViewCreateInfo,
2008 p_allocator: *const AllocationCallbacks,
2009 p_view: *mut ImageView,
2010 ) -> Result,
2011 pub destroy_image_view: extern "system" fn(
2012 device: Device,
2013 image_view: ImageView,
2014 p_allocator: *const AllocationCallbacks,
2015 ) -> c_void,
2016 pub create_shader_module: extern "system" fn(
2017 device: Device,
2018 p_create_info: *const ShaderModuleCreateInfo,
2019 p_allocator: *const AllocationCallbacks,
2020 p_shader_module: *mut ShaderModule,
2021 ) -> Result,
2022 pub destroy_shader_module: extern "system" fn(
2023 device: Device,
2024 shader_module: ShaderModule,
2025 p_allocator: *const AllocationCallbacks,
2026 ) -> c_void,
2027 pub create_pipeline_cache: extern "system" fn(
2028 device: Device,
2029 p_create_info: *const PipelineCacheCreateInfo,
2030 p_allocator: *const AllocationCallbacks,
2031 p_pipeline_cache: *mut PipelineCache,
2032 ) -> Result,
2033 pub destroy_pipeline_cache: extern "system" fn(
2034 device: Device,
2035 pipeline_cache: PipelineCache,
2036 p_allocator: *const AllocationCallbacks,
2037 ) -> c_void,
2038 pub get_pipeline_cache_data: extern "system" fn(
2039 device: Device,
2040 pipeline_cache: PipelineCache,
2041 p_data_size: *mut usize,
2042 p_data: *mut c_void,
2043 ) -> Result,
2044 pub merge_pipeline_caches: extern "system" fn(
2045 device: Device,
2046 dst_cache: PipelineCache,
2047 src_cache_count: u32,
2048 p_src_caches: *const PipelineCache,
2049 ) -> Result,
2050 pub create_graphics_pipelines: extern "system" fn(
2051 device: Device,
2052 pipeline_cache: PipelineCache,
2053 create_info_count: u32,
2054 p_create_infos: *const GraphicsPipelineCreateInfo,
2055 p_allocator: *const AllocationCallbacks,
2056 p_pipelines: *mut Pipeline,
2057 ) -> Result,
2058 pub create_compute_pipelines: extern "system" fn(
2059 device: Device,
2060 pipeline_cache: PipelineCache,
2061 create_info_count: u32,
2062 p_create_infos: *const ComputePipelineCreateInfo,
2063 p_allocator: *const AllocationCallbacks,
2064 p_pipelines: *mut Pipeline,
2065 ) -> Result,
2066 pub destroy_pipeline: extern "system" fn(
2067 device: Device,
2068 pipeline: Pipeline,
2069 p_allocator: *const AllocationCallbacks,
2070 ) -> c_void,
2071 pub create_pipeline_layout: extern "system" fn(
2072 device: Device,
2073 p_create_info: *const PipelineLayoutCreateInfo,
2074 p_allocator: *const AllocationCallbacks,
2075 p_pipeline_layout: *mut PipelineLayout,
2076 ) -> Result,
2077 pub destroy_pipeline_layout: extern "system" fn(
2078 device: Device,
2079 pipeline_layout: PipelineLayout,
2080 p_allocator: *const AllocationCallbacks,
2081 ) -> c_void,
2082 pub create_sampler: extern "system" fn(
2083 device: Device,
2084 p_create_info: *const SamplerCreateInfo,
2085 p_allocator: *const AllocationCallbacks,
2086 p_sampler: *mut Sampler,
2087 ) -> Result,
2088 pub destroy_sampler: extern "system" fn(
2089 device: Device,
2090 sampler: Sampler,
2091 p_allocator: *const AllocationCallbacks,
2092 ) -> c_void,
2093 pub create_descriptor_set_layout: extern "system" fn(
2094 device: Device,
2095 p_create_info: *const DescriptorSetLayoutCreateInfo,
2096 p_allocator: *const AllocationCallbacks,
2097 p_set_layout: *mut DescriptorSetLayout,
2098 ) -> Result,
2099 pub destroy_descriptor_set_layout: extern "system" fn(
2100 device: Device,
2101 descriptor_set_layout: DescriptorSetLayout,
2102 p_allocator: *const AllocationCallbacks,
2103 ) -> c_void,
2104 pub create_descriptor_pool: extern "system" fn(
2105 device: Device,
2106 p_create_info: *const DescriptorPoolCreateInfo,
2107 p_allocator: *const AllocationCallbacks,
2108 p_descriptor_pool: *mut DescriptorPool,
2109 ) -> Result,
2110 pub destroy_descriptor_pool: extern "system" fn(
2111 device: Device,
2112 descriptor_pool: DescriptorPool,
2113 p_allocator: *const AllocationCallbacks,
2114 ) -> c_void,
2115 pub reset_descriptor_pool: extern "system" fn(
2116 device: Device,
2117 descriptor_pool: DescriptorPool,
2118 flags: DescriptorPoolResetFlags,
2119 ) -> Result,
2120 pub allocate_descriptor_sets: extern "system" fn(
2121 device: Device,
2122 p_allocate_info: *const DescriptorSetAllocateInfo,
2123 p_descriptor_sets: *mut DescriptorSet,
2124 ) -> Result,
2125 pub free_descriptor_sets: extern "system" fn(
2126 device: Device,
2127 descriptor_pool: DescriptorPool,
2128 descriptor_set_count: u32,
2129 p_descriptor_sets: *const DescriptorSet,
2130 ) -> Result,
2131 pub update_descriptor_sets: extern "system" fn(
2132 device: Device,
2133 descriptor_write_count: u32,
2134 p_descriptor_writes: *const WriteDescriptorSet,
2135 descriptor_copy_count: u32,
2136 p_descriptor_copies: *const CopyDescriptorSet,
2137 ) -> c_void,
2138 pub create_framebuffer: extern "system" fn(
2139 device: Device,
2140 p_create_info: *const FramebufferCreateInfo,
2141 p_allocator: *const AllocationCallbacks,
2142 p_framebuffer: *mut Framebuffer,
2143 ) -> Result,
2144 pub destroy_framebuffer: extern "system" fn(
2145 device: Device,
2146 framebuffer: Framebuffer,
2147 p_allocator: *const AllocationCallbacks,
2148 ) -> c_void,
2149 pub create_render_pass: extern "system" fn(
2150 device: Device,
2151 p_create_info: *const RenderPassCreateInfo,
2152 p_allocator: *const AllocationCallbacks,
2153 p_render_pass: *mut RenderPass,
2154 ) -> Result,
2155 pub destroy_render_pass: extern "system" fn(
2156 device: Device,
2157 render_pass: RenderPass,
2158 p_allocator: *const AllocationCallbacks,
2159 ) -> c_void,
2160 pub get_render_area_granularity: extern "system" fn(
2161 device: Device,
2162 render_pass: RenderPass,
2163 p_granularity: *mut Extent2D,
2164 ) -> c_void,
2165 pub create_command_pool: extern "system" fn(
2166 device: Device,
2167 p_create_info: *const CommandPoolCreateInfo,
2168 p_allocator: *const AllocationCallbacks,
2169 p_command_pool: *mut CommandPool,
2170 ) -> Result,
2171 pub destroy_command_pool: extern "system" fn(
2172 device: Device,
2173 command_pool: CommandPool,
2174 p_allocator: *const AllocationCallbacks,
2175 ) -> c_void,
2176 pub reset_command_pool: extern "system" fn(
2177 device: Device,
2178 command_pool: CommandPool,
2179 flags: CommandPoolResetFlags,
2180 ) -> Result,
2181 pub allocate_command_buffers: extern "system" fn(
2182 device: Device,
2183 p_allocate_info: *const CommandBufferAllocateInfo,
2184 p_command_buffers: *mut CommandBuffer,
2185 ) -> Result,
2186 pub free_command_buffers: extern "system" fn(
2187 device: Device,
2188 command_pool: CommandPool,
2189 command_buffer_count: u32,
2190 p_command_buffers: *const CommandBuffer,
2191 ) -> c_void,
2192 pub begin_command_buffer: extern "system" fn(
2193 command_buffer: CommandBuffer,
2194 p_begin_info: *const CommandBufferBeginInfo,
2195 ) -> Result,
2196 pub end_command_buffer: extern "system" fn(command_buffer: CommandBuffer) -> Result,
2197 pub reset_command_buffer:
2198 extern "system" fn(command_buffer: CommandBuffer, flags: CommandBufferResetFlags) -> Result,
2199 pub cmd_bind_pipeline: extern "system" fn(
2200 command_buffer: CommandBuffer,
2201 pipeline_bind_point: PipelineBindPoint,
2202 pipeline: Pipeline,
2203 ) -> c_void,
2204 pub cmd_set_viewport: extern "system" fn(
2205 command_buffer: CommandBuffer,
2206 first_viewport: u32,
2207 viewport_count: u32,
2208 p_viewports: *const Viewport,
2209 ) -> c_void,
2210 pub cmd_set_scissor: extern "system" fn(
2211 command_buffer: CommandBuffer,
2212 first_scissor: u32,
2213 scissor_count: u32,
2214 p_scissors: *const Rect2D,
2215 ) -> c_void,
2216 pub cmd_set_line_width:
2217 extern "system" fn(command_buffer: CommandBuffer, line_width: f32) -> c_void,
2218 pub cmd_set_depth_bias: extern "system" fn(
2219 command_buffer: CommandBuffer,
2220 depth_bias_constant_factor: f32,
2221 depth_bias_clamp: f32,
2222 depth_bias_slope_factor: f32,
2223 ) -> c_void,
2224 pub cmd_set_blend_constants:
2225 extern "system" fn(command_buffer: CommandBuffer, blend_constants: &[f32; 4]) -> c_void,
2226 pub cmd_set_depth_bounds: extern "system" fn(
2227 command_buffer: CommandBuffer,
2228 min_depth_bounds: f32,
2229 max_depth_bounds: f32,
2230 ) -> c_void,
2231 pub cmd_set_stencil_compare_mask: extern "system" fn(
2232 command_buffer: CommandBuffer,
2233 face_mask: StencilFaceFlags,
2234 compare_mask: u32,
2235 ) -> c_void,
2236 pub cmd_set_stencil_write_mask: extern "system" fn(
2237 command_buffer: CommandBuffer,
2238 face_mask: StencilFaceFlags,
2239 write_mask: u32,
2240 ) -> c_void,
2241 pub cmd_set_stencil_reference: extern "system" fn(
2242 command_buffer: CommandBuffer,
2243 face_mask: StencilFaceFlags,
2244 reference: u32,
2245 ) -> c_void,
2246 pub cmd_bind_descriptor_sets: extern "system" fn(
2247 command_buffer: CommandBuffer,
2248 pipeline_bind_point: PipelineBindPoint,
2249 layout: PipelineLayout,
2250 first_set: u32,
2251 descriptor_set_count: u32,
2252 p_descriptor_sets: *const DescriptorSet,
2253 dynamic_offset_count: u32,
2254 p_dynamic_offsets: *const u32,
2255 ) -> c_void,
2256 pub cmd_bind_index_buffer: extern "system" fn(
2257 command_buffer: CommandBuffer,
2258 buffer: Buffer,
2259 offset: DeviceSize,
2260 index_type: IndexType,
2261 ) -> c_void,
2262 pub cmd_bind_vertex_buffers: extern "system" fn(
2263 command_buffer: CommandBuffer,
2264 first_binding: u32,
2265 binding_count: u32,
2266 p_buffers: *const Buffer,
2267 p_offsets: *const DeviceSize,
2268 ) -> c_void,
2269 pub cmd_draw: extern "system" fn(
2270 command_buffer: CommandBuffer,
2271 vertex_count: u32,
2272 instance_count: u32,
2273 first_vertex: u32,
2274 first_instance: u32,
2275 ) -> c_void,
2276 pub cmd_draw_indexed: extern "system" fn(
2277 command_buffer: CommandBuffer,
2278 index_count: u32,
2279 instance_count: u32,
2280 first_index: u32,
2281 vertex_offset: i32,
2282 first_instance: u32,
2283 ) -> c_void,
2284 pub cmd_draw_indirect: extern "system" fn(
2285 command_buffer: CommandBuffer,
2286 buffer: Buffer,
2287 offset: DeviceSize,
2288 draw_count: u32,
2289 stride: u32,
2290 ) -> c_void,
2291 pub cmd_draw_indexed_indirect: extern "system" fn(
2292 command_buffer: CommandBuffer,
2293 buffer: Buffer,
2294 offset: DeviceSize,
2295 draw_count: u32,
2296 stride: u32,
2297 ) -> c_void,
2298 pub cmd_dispatch: extern "system" fn(
2299 command_buffer: CommandBuffer,
2300 group_count_x: u32,
2301 group_count_y: u32,
2302 group_count_z: u32,
2303 ) -> c_void,
2304 pub cmd_dispatch_indirect: extern "system" fn(
2305 command_buffer: CommandBuffer,
2306 buffer: Buffer,
2307 offset: DeviceSize,
2308 ) -> c_void,
2309 pub cmd_copy_buffer: extern "system" fn(
2310 command_buffer: CommandBuffer,
2311 src_buffer: Buffer,
2312 dst_buffer: Buffer,
2313 region_count: u32,
2314 p_regions: *const BufferCopy,
2315 ) -> c_void,
2316 pub cmd_copy_image: extern "system" fn(
2317 command_buffer: CommandBuffer,
2318 src_image: Image,
2319 src_image_layout: ImageLayout,
2320 dst_image: Image,
2321 dst_image_layout: ImageLayout,
2322 region_count: u32,
2323 p_regions: *const ImageCopy,
2324 ) -> c_void,
2325 pub cmd_blit_image: extern "system" fn(
2326 command_buffer: CommandBuffer,
2327 src_image: Image,
2328 src_image_layout: ImageLayout,
2329 dst_image: Image,
2330 dst_image_layout: ImageLayout,
2331 region_count: u32,
2332 p_regions: *const ImageBlit,
2333 filter: Filter,
2334 ) -> c_void,
2335 pub cmd_copy_buffer_to_image: extern "system" fn(
2336 command_buffer: CommandBuffer,
2337 src_buffer: Buffer,
2338 dst_image: Image,
2339 dst_image_layout: ImageLayout,
2340 region_count: u32,
2341 p_regions: *const BufferImageCopy,
2342 ) -> c_void,
2343 pub cmd_copy_image_to_buffer: extern "system" fn(
2344 command_buffer: CommandBuffer,
2345 src_image: Image,
2346 src_image_layout: ImageLayout,
2347 dst_buffer: Buffer,
2348 region_count: u32,
2349 p_regions: *const BufferImageCopy,
2350 ) -> c_void,
2351 pub cmd_update_buffer: extern "system" fn(
2352 command_buffer: CommandBuffer,
2353 dst_buffer: Buffer,
2354 dst_offset: DeviceSize,
2355 data_size: DeviceSize,
2356 p_data: *const c_void,
2357 ) -> c_void,
2358 pub cmd_fill_buffer: extern "system" fn(
2359 command_buffer: CommandBuffer,
2360 dst_buffer: Buffer,
2361 dst_offset: DeviceSize,
2362 size: DeviceSize,
2363 data: u32,
2364 ) -> c_void,
2365 pub cmd_clear_color_image: extern "system" fn(
2366 command_buffer: CommandBuffer,
2367 image: Image,
2368 image_layout: ImageLayout,
2369 p_color: *const ClearColorValue,
2370 range_count: u32,
2371 p_ranges: *const ImageSubresourceRange,
2372 ) -> c_void,
2373 pub cmd_clear_depth_stencil_image: extern "system" fn(
2374 command_buffer: CommandBuffer,
2375 image: Image,
2376 image_layout: ImageLayout,
2377 p_depth_stencil: *const ClearDepthStencilValue,
2378 range_count: u32,
2379 p_ranges: *const ImageSubresourceRange,
2380 ) -> c_void,
2381 pub cmd_clear_attachments: extern "system" fn(
2382 command_buffer: CommandBuffer,
2383 attachment_count: u32,
2384 p_attachments: *const ClearAttachment,
2385 rect_count: u32,
2386 p_rects: *const ClearRect,
2387 ) -> c_void,
2388 pub cmd_resolve_image: extern "system" fn(
2389 command_buffer: CommandBuffer,
2390 src_image: Image,
2391 src_image_layout: ImageLayout,
2392 dst_image: Image,
2393 dst_image_layout: ImageLayout,
2394 region_count: u32,
2395 p_regions: *const ImageResolve,
2396 ) -> c_void,
2397 pub cmd_set_event: extern "system" fn(
2398 command_buffer: CommandBuffer,
2399 event: Event,
2400 stage_mask: PipelineStageFlags,
2401 ) -> c_void,
2402 pub cmd_reset_event: extern "system" fn(
2403 command_buffer: CommandBuffer,
2404 event: Event,
2405 stage_mask: PipelineStageFlags,
2406 ) -> c_void,
2407 pub cmd_wait_events: extern "system" fn(
2408 command_buffer: CommandBuffer,
2409 event_count: u32,
2410 p_events: *const Event,
2411 src_stage_mask: PipelineStageFlags,
2412 dst_stage_mask: PipelineStageFlags,
2413 memory_barrier_count: u32,
2414 p_memory_barriers: *const MemoryBarrier,
2415 buffer_memory_barrier_count: u32,
2416 p_buffer_memory_barriers: *const BufferMemoryBarrier,
2417 image_memory_barrier_count: u32,
2418 p_image_memory_barriers: *const ImageMemoryBarrier,
2419 ) -> c_void,
2420 pub cmd_pipeline_barrier: extern "system" fn(
2421 command_buffer: CommandBuffer,
2422 src_stage_mask: PipelineStageFlags,
2423 dst_stage_mask: PipelineStageFlags,
2424 dependency_flags: DependencyFlags,
2425 memory_barrier_count: u32,
2426 p_memory_barriers: *const MemoryBarrier,
2427 buffer_memory_barrier_count: u32,
2428 p_buffer_memory_barriers: *const BufferMemoryBarrier,
2429 image_memory_barrier_count: u32,
2430 p_image_memory_barriers: *const ImageMemoryBarrier,
2431 ) -> c_void,
2432 pub cmd_begin_query: extern "system" fn(
2433 command_buffer: CommandBuffer,
2434 query_pool: QueryPool,
2435 query: u32,
2436 flags: QueryControlFlags,
2437 ) -> c_void,
2438 pub cmd_end_query: extern "system" fn(
2439 command_buffer: CommandBuffer,
2440 query_pool: QueryPool,
2441 query: u32,
2442 ) -> c_void,
2443 pub cmd_reset_query_pool: extern "system" fn(
2444 command_buffer: CommandBuffer,
2445 query_pool: QueryPool,
2446 first_query: u32,
2447 query_count: u32,
2448 ) -> c_void,
2449 pub cmd_write_timestamp: extern "system" fn(
2450 command_buffer: CommandBuffer,
2451 pipeline_stage: PipelineStageFlags,
2452 query_pool: QueryPool,
2453 query: u32,
2454 ) -> c_void,
2455 pub cmd_copy_query_pool_results: extern "system" fn(
2456 command_buffer: CommandBuffer,
2457 query_pool: QueryPool,
2458 first_query: u32,
2459 query_count: u32,
2460 dst_buffer: Buffer,
2461 dst_offset: DeviceSize,
2462 stride: DeviceSize,
2463 flags: QueryResultFlags,
2464 ) -> c_void,
2465 pub cmd_push_constants: extern "system" fn(
2466 command_buffer: CommandBuffer,
2467 layout: PipelineLayout,
2468 stage_flags: ShaderStageFlags,
2469 offset: u32,
2470 size: u32,
2471 p_values: *const c_void,
2472 ) -> c_void,
2473 pub cmd_begin_render_pass: extern "system" fn(
2474 command_buffer: CommandBuffer,
2475 p_render_pass_begin: *const RenderPassBeginInfo,
2476 contents: SubpassContents,
2477 ) -> c_void,
2478 pub cmd_next_subpass:
2479 extern "system" fn(command_buffer: CommandBuffer, contents: SubpassContents) -> c_void,
2480 pub cmd_end_render_pass: extern "system" fn(command_buffer: CommandBuffer) -> c_void,
2481 pub cmd_execute_commands: extern "system" fn(
2482 command_buffer: CommandBuffer,
2483 command_buffer_count: u32,
2484 p_command_buffers: *const CommandBuffer,
2485 ) -> c_void,
2486 }
2487 unsafe impl Send for DeviceFnV1_0 {}
2488 unsafe impl Sync for DeviceFnV1_0 {}
2489 impl ::std::clone::Clone for DeviceFnV1_0 {
clone(&self) -> Self2490 fn clone(&self) -> Self {
2491 DeviceFnV1_0 {
2492 destroy_device: self.destroy_device,
2493 get_device_queue: self.get_device_queue,
2494 queue_submit: self.queue_submit,
2495 queue_wait_idle: self.queue_wait_idle,
2496 device_wait_idle: self.device_wait_idle,
2497 allocate_memory: self.allocate_memory,
2498 free_memory: self.free_memory,
2499 map_memory: self.map_memory,
2500 unmap_memory: self.unmap_memory,
2501 flush_mapped_memory_ranges: self.flush_mapped_memory_ranges,
2502 invalidate_mapped_memory_ranges: self.invalidate_mapped_memory_ranges,
2503 get_device_memory_commitment: self.get_device_memory_commitment,
2504 bind_buffer_memory: self.bind_buffer_memory,
2505 bind_image_memory: self.bind_image_memory,
2506 get_buffer_memory_requirements: self.get_buffer_memory_requirements,
2507 get_image_memory_requirements: self.get_image_memory_requirements,
2508 get_image_sparse_memory_requirements: self.get_image_sparse_memory_requirements,
2509 queue_bind_sparse: self.queue_bind_sparse,
2510 create_fence: self.create_fence,
2511 destroy_fence: self.destroy_fence,
2512 reset_fences: self.reset_fences,
2513 get_fence_status: self.get_fence_status,
2514 wait_for_fences: self.wait_for_fences,
2515 create_semaphore: self.create_semaphore,
2516 destroy_semaphore: self.destroy_semaphore,
2517 create_event: self.create_event,
2518 destroy_event: self.destroy_event,
2519 get_event_status: self.get_event_status,
2520 set_event: self.set_event,
2521 reset_event: self.reset_event,
2522 create_query_pool: self.create_query_pool,
2523 destroy_query_pool: self.destroy_query_pool,
2524 get_query_pool_results: self.get_query_pool_results,
2525 create_buffer: self.create_buffer,
2526 destroy_buffer: self.destroy_buffer,
2527 create_buffer_view: self.create_buffer_view,
2528 destroy_buffer_view: self.destroy_buffer_view,
2529 create_image: self.create_image,
2530 destroy_image: self.destroy_image,
2531 get_image_subresource_layout: self.get_image_subresource_layout,
2532 create_image_view: self.create_image_view,
2533 destroy_image_view: self.destroy_image_view,
2534 create_shader_module: self.create_shader_module,
2535 destroy_shader_module: self.destroy_shader_module,
2536 create_pipeline_cache: self.create_pipeline_cache,
2537 destroy_pipeline_cache: self.destroy_pipeline_cache,
2538 get_pipeline_cache_data: self.get_pipeline_cache_data,
2539 merge_pipeline_caches: self.merge_pipeline_caches,
2540 create_graphics_pipelines: self.create_graphics_pipelines,
2541 create_compute_pipelines: self.create_compute_pipelines,
2542 destroy_pipeline: self.destroy_pipeline,
2543 create_pipeline_layout: self.create_pipeline_layout,
2544 destroy_pipeline_layout: self.destroy_pipeline_layout,
2545 create_sampler: self.create_sampler,
2546 destroy_sampler: self.destroy_sampler,
2547 create_descriptor_set_layout: self.create_descriptor_set_layout,
2548 destroy_descriptor_set_layout: self.destroy_descriptor_set_layout,
2549 create_descriptor_pool: self.create_descriptor_pool,
2550 destroy_descriptor_pool: self.destroy_descriptor_pool,
2551 reset_descriptor_pool: self.reset_descriptor_pool,
2552 allocate_descriptor_sets: self.allocate_descriptor_sets,
2553 free_descriptor_sets: self.free_descriptor_sets,
2554 update_descriptor_sets: self.update_descriptor_sets,
2555 create_framebuffer: self.create_framebuffer,
2556 destroy_framebuffer: self.destroy_framebuffer,
2557 create_render_pass: self.create_render_pass,
2558 destroy_render_pass: self.destroy_render_pass,
2559 get_render_area_granularity: self.get_render_area_granularity,
2560 create_command_pool: self.create_command_pool,
2561 destroy_command_pool: self.destroy_command_pool,
2562 reset_command_pool: self.reset_command_pool,
2563 allocate_command_buffers: self.allocate_command_buffers,
2564 free_command_buffers: self.free_command_buffers,
2565 begin_command_buffer: self.begin_command_buffer,
2566 end_command_buffer: self.end_command_buffer,
2567 reset_command_buffer: self.reset_command_buffer,
2568 cmd_bind_pipeline: self.cmd_bind_pipeline,
2569 cmd_set_viewport: self.cmd_set_viewport,
2570 cmd_set_scissor: self.cmd_set_scissor,
2571 cmd_set_line_width: self.cmd_set_line_width,
2572 cmd_set_depth_bias: self.cmd_set_depth_bias,
2573 cmd_set_blend_constants: self.cmd_set_blend_constants,
2574 cmd_set_depth_bounds: self.cmd_set_depth_bounds,
2575 cmd_set_stencil_compare_mask: self.cmd_set_stencil_compare_mask,
2576 cmd_set_stencil_write_mask: self.cmd_set_stencil_write_mask,
2577 cmd_set_stencil_reference: self.cmd_set_stencil_reference,
2578 cmd_bind_descriptor_sets: self.cmd_bind_descriptor_sets,
2579 cmd_bind_index_buffer: self.cmd_bind_index_buffer,
2580 cmd_bind_vertex_buffers: self.cmd_bind_vertex_buffers,
2581 cmd_draw: self.cmd_draw,
2582 cmd_draw_indexed: self.cmd_draw_indexed,
2583 cmd_draw_indirect: self.cmd_draw_indirect,
2584 cmd_draw_indexed_indirect: self.cmd_draw_indexed_indirect,
2585 cmd_dispatch: self.cmd_dispatch,
2586 cmd_dispatch_indirect: self.cmd_dispatch_indirect,
2587 cmd_copy_buffer: self.cmd_copy_buffer,
2588 cmd_copy_image: self.cmd_copy_image,
2589 cmd_blit_image: self.cmd_blit_image,
2590 cmd_copy_buffer_to_image: self.cmd_copy_buffer_to_image,
2591 cmd_copy_image_to_buffer: self.cmd_copy_image_to_buffer,
2592 cmd_update_buffer: self.cmd_update_buffer,
2593 cmd_fill_buffer: self.cmd_fill_buffer,
2594 cmd_clear_color_image: self.cmd_clear_color_image,
2595 cmd_clear_depth_stencil_image: self.cmd_clear_depth_stencil_image,
2596 cmd_clear_attachments: self.cmd_clear_attachments,
2597 cmd_resolve_image: self.cmd_resolve_image,
2598 cmd_set_event: self.cmd_set_event,
2599 cmd_reset_event: self.cmd_reset_event,
2600 cmd_wait_events: self.cmd_wait_events,
2601 cmd_pipeline_barrier: self.cmd_pipeline_barrier,
2602 cmd_begin_query: self.cmd_begin_query,
2603 cmd_end_query: self.cmd_end_query,
2604 cmd_reset_query_pool: self.cmd_reset_query_pool,
2605 cmd_write_timestamp: self.cmd_write_timestamp,
2606 cmd_copy_query_pool_results: self.cmd_copy_query_pool_results,
2607 cmd_push_constants: self.cmd_push_constants,
2608 cmd_begin_render_pass: self.cmd_begin_render_pass,
2609 cmd_next_subpass: self.cmd_next_subpass,
2610 cmd_end_render_pass: self.cmd_end_render_pass,
2611 cmd_execute_commands: self.cmd_execute_commands,
2612 }
2613 }
2614 }
2615 impl DeviceFnV1_0 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,2616 pub fn load<F>(mut _f: F) -> Self
2617 where
2618 F: FnMut(&::std::ffi::CStr) -> *const c_void,
2619 {
2620 DeviceFnV1_0 {
2621 destroy_device: unsafe {
2622 extern "system" fn destroy_device(
2623 _device: Device,
2624 _p_allocator: *const AllocationCallbacks,
2625 ) -> c_void {
2626 panic!(concat!("Unable to load ", stringify!(destroy_device)))
2627 }
2628 let raw_name = stringify!(vkDestroyDevice);
2629 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2630 let val = _f(&cname);
2631 if val.is_null() {
2632 destroy_device
2633 } else {
2634 ::std::mem::transmute(val)
2635 }
2636 },
2637 get_device_queue: unsafe {
2638 extern "system" fn get_device_queue(
2639 _device: Device,
2640 _queue_family_index: u32,
2641 _queue_index: u32,
2642 _p_queue: *mut Queue,
2643 ) -> c_void {
2644 panic!(concat!("Unable to load ", stringify!(get_device_queue)))
2645 }
2646 let raw_name = stringify!(vkGetDeviceQueue);
2647 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2648 let val = _f(&cname);
2649 if val.is_null() {
2650 get_device_queue
2651 } else {
2652 ::std::mem::transmute(val)
2653 }
2654 },
2655 queue_submit: unsafe {
2656 extern "system" fn queue_submit(
2657 _queue: Queue,
2658 _submit_count: u32,
2659 _p_submits: *const SubmitInfo,
2660 _fence: Fence,
2661 ) -> Result {
2662 panic!(concat!("Unable to load ", stringify!(queue_submit)))
2663 }
2664 let raw_name = stringify!(vkQueueSubmit);
2665 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2666 let val = _f(&cname);
2667 if val.is_null() {
2668 queue_submit
2669 } else {
2670 ::std::mem::transmute(val)
2671 }
2672 },
2673 queue_wait_idle: unsafe {
2674 extern "system" fn queue_wait_idle(_queue: Queue) -> Result {
2675 panic!(concat!("Unable to load ", stringify!(queue_wait_idle)))
2676 }
2677 let raw_name = stringify!(vkQueueWaitIdle);
2678 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2679 let val = _f(&cname);
2680 if val.is_null() {
2681 queue_wait_idle
2682 } else {
2683 ::std::mem::transmute(val)
2684 }
2685 },
2686 device_wait_idle: unsafe {
2687 extern "system" fn device_wait_idle(_device: Device) -> Result {
2688 panic!(concat!("Unable to load ", stringify!(device_wait_idle)))
2689 }
2690 let raw_name = stringify!(vkDeviceWaitIdle);
2691 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2692 let val = _f(&cname);
2693 if val.is_null() {
2694 device_wait_idle
2695 } else {
2696 ::std::mem::transmute(val)
2697 }
2698 },
2699 allocate_memory: unsafe {
2700 extern "system" fn allocate_memory(
2701 _device: Device,
2702 _p_allocate_info: *const MemoryAllocateInfo,
2703 _p_allocator: *const AllocationCallbacks,
2704 _p_memory: *mut DeviceMemory,
2705 ) -> Result {
2706 panic!(concat!("Unable to load ", stringify!(allocate_memory)))
2707 }
2708 let raw_name = stringify!(vkAllocateMemory);
2709 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2710 let val = _f(&cname);
2711 if val.is_null() {
2712 allocate_memory
2713 } else {
2714 ::std::mem::transmute(val)
2715 }
2716 },
2717 free_memory: unsafe {
2718 extern "system" fn free_memory(
2719 _device: Device,
2720 _memory: DeviceMemory,
2721 _p_allocator: *const AllocationCallbacks,
2722 ) -> c_void {
2723 panic!(concat!("Unable to load ", stringify!(free_memory)))
2724 }
2725 let raw_name = stringify!(vkFreeMemory);
2726 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2727 let val = _f(&cname);
2728 if val.is_null() {
2729 free_memory
2730 } else {
2731 ::std::mem::transmute(val)
2732 }
2733 },
2734 map_memory: unsafe {
2735 extern "system" fn map_memory(
2736 _device: Device,
2737 _memory: DeviceMemory,
2738 _offset: DeviceSize,
2739 _size: DeviceSize,
2740 _flags: MemoryMapFlags,
2741 _pp_data: *mut *mut c_void,
2742 ) -> Result {
2743 panic!(concat!("Unable to load ", stringify!(map_memory)))
2744 }
2745 let raw_name = stringify!(vkMapMemory);
2746 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2747 let val = _f(&cname);
2748 if val.is_null() {
2749 map_memory
2750 } else {
2751 ::std::mem::transmute(val)
2752 }
2753 },
2754 unmap_memory: unsafe {
2755 extern "system" fn unmap_memory(_device: Device, _memory: DeviceMemory) -> c_void {
2756 panic!(concat!("Unable to load ", stringify!(unmap_memory)))
2757 }
2758 let raw_name = stringify!(vkUnmapMemory);
2759 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2760 let val = _f(&cname);
2761 if val.is_null() {
2762 unmap_memory
2763 } else {
2764 ::std::mem::transmute(val)
2765 }
2766 },
2767 flush_mapped_memory_ranges: unsafe {
2768 extern "system" fn flush_mapped_memory_ranges(
2769 _device: Device,
2770 _memory_range_count: u32,
2771 _p_memory_ranges: *const MappedMemoryRange,
2772 ) -> Result {
2773 panic!(concat!(
2774 "Unable to load ",
2775 stringify!(flush_mapped_memory_ranges)
2776 ))
2777 }
2778 let raw_name = stringify!(vkFlushMappedMemoryRanges);
2779 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2780 let val = _f(&cname);
2781 if val.is_null() {
2782 flush_mapped_memory_ranges
2783 } else {
2784 ::std::mem::transmute(val)
2785 }
2786 },
2787 invalidate_mapped_memory_ranges: unsafe {
2788 extern "system" fn invalidate_mapped_memory_ranges(
2789 _device: Device,
2790 _memory_range_count: u32,
2791 _p_memory_ranges: *const MappedMemoryRange,
2792 ) -> Result {
2793 panic!(concat!(
2794 "Unable to load ",
2795 stringify!(invalidate_mapped_memory_ranges)
2796 ))
2797 }
2798 let raw_name = stringify!(vkInvalidateMappedMemoryRanges);
2799 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2800 let val = _f(&cname);
2801 if val.is_null() {
2802 invalidate_mapped_memory_ranges
2803 } else {
2804 ::std::mem::transmute(val)
2805 }
2806 },
2807 get_device_memory_commitment: unsafe {
2808 extern "system" fn get_device_memory_commitment(
2809 _device: Device,
2810 _memory: DeviceMemory,
2811 _p_committed_memory_in_bytes: *mut DeviceSize,
2812 ) -> c_void {
2813 panic!(concat!(
2814 "Unable to load ",
2815 stringify!(get_device_memory_commitment)
2816 ))
2817 }
2818 let raw_name = stringify!(vkGetDeviceMemoryCommitment);
2819 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2820 let val = _f(&cname);
2821 if val.is_null() {
2822 get_device_memory_commitment
2823 } else {
2824 ::std::mem::transmute(val)
2825 }
2826 },
2827 bind_buffer_memory: unsafe {
2828 extern "system" fn bind_buffer_memory(
2829 _device: Device,
2830 _buffer: Buffer,
2831 _memory: DeviceMemory,
2832 _memory_offset: DeviceSize,
2833 ) -> Result {
2834 panic!(concat!("Unable to load ", stringify!(bind_buffer_memory)))
2835 }
2836 let raw_name = stringify!(vkBindBufferMemory);
2837 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2838 let val = _f(&cname);
2839 if val.is_null() {
2840 bind_buffer_memory
2841 } else {
2842 ::std::mem::transmute(val)
2843 }
2844 },
2845 bind_image_memory: unsafe {
2846 extern "system" fn bind_image_memory(
2847 _device: Device,
2848 _image: Image,
2849 _memory: DeviceMemory,
2850 _memory_offset: DeviceSize,
2851 ) -> Result {
2852 panic!(concat!("Unable to load ", stringify!(bind_image_memory)))
2853 }
2854 let raw_name = stringify!(vkBindImageMemory);
2855 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2856 let val = _f(&cname);
2857 if val.is_null() {
2858 bind_image_memory
2859 } else {
2860 ::std::mem::transmute(val)
2861 }
2862 },
2863 get_buffer_memory_requirements: unsafe {
2864 extern "system" fn get_buffer_memory_requirements(
2865 _device: Device,
2866 _buffer: Buffer,
2867 _p_memory_requirements: *mut MemoryRequirements,
2868 ) -> c_void {
2869 panic!(concat!(
2870 "Unable to load ",
2871 stringify!(get_buffer_memory_requirements)
2872 ))
2873 }
2874 let raw_name = stringify!(vkGetBufferMemoryRequirements);
2875 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2876 let val = _f(&cname);
2877 if val.is_null() {
2878 get_buffer_memory_requirements
2879 } else {
2880 ::std::mem::transmute(val)
2881 }
2882 },
2883 get_image_memory_requirements: unsafe {
2884 extern "system" fn get_image_memory_requirements(
2885 _device: Device,
2886 _image: Image,
2887 _p_memory_requirements: *mut MemoryRequirements,
2888 ) -> c_void {
2889 panic!(concat!(
2890 "Unable to load ",
2891 stringify!(get_image_memory_requirements)
2892 ))
2893 }
2894 let raw_name = stringify!(vkGetImageMemoryRequirements);
2895 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2896 let val = _f(&cname);
2897 if val.is_null() {
2898 get_image_memory_requirements
2899 } else {
2900 ::std::mem::transmute(val)
2901 }
2902 },
2903 get_image_sparse_memory_requirements: unsafe {
2904 extern "system" fn get_image_sparse_memory_requirements(
2905 _device: Device,
2906 _image: Image,
2907 _p_sparse_memory_requirement_count: *mut u32,
2908 _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements,
2909 ) -> c_void {
2910 panic!(concat!(
2911 "Unable to load ",
2912 stringify!(get_image_sparse_memory_requirements)
2913 ))
2914 }
2915 let raw_name = stringify!(vkGetImageSparseMemoryRequirements);
2916 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2917 let val = _f(&cname);
2918 if val.is_null() {
2919 get_image_sparse_memory_requirements
2920 } else {
2921 ::std::mem::transmute(val)
2922 }
2923 },
2924 queue_bind_sparse: unsafe {
2925 extern "system" fn queue_bind_sparse(
2926 _queue: Queue,
2927 _bind_info_count: u32,
2928 _p_bind_info: *const BindSparseInfo,
2929 _fence: Fence,
2930 ) -> Result {
2931 panic!(concat!("Unable to load ", stringify!(queue_bind_sparse)))
2932 }
2933 let raw_name = stringify!(vkQueueBindSparse);
2934 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2935 let val = _f(&cname);
2936 if val.is_null() {
2937 queue_bind_sparse
2938 } else {
2939 ::std::mem::transmute(val)
2940 }
2941 },
2942 create_fence: unsafe {
2943 extern "system" fn create_fence(
2944 _device: Device,
2945 _p_create_info: *const FenceCreateInfo,
2946 _p_allocator: *const AllocationCallbacks,
2947 _p_fence: *mut Fence,
2948 ) -> Result {
2949 panic!(concat!("Unable to load ", stringify!(create_fence)))
2950 }
2951 let raw_name = stringify!(vkCreateFence);
2952 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2953 let val = _f(&cname);
2954 if val.is_null() {
2955 create_fence
2956 } else {
2957 ::std::mem::transmute(val)
2958 }
2959 },
2960 destroy_fence: unsafe {
2961 extern "system" fn destroy_fence(
2962 _device: Device,
2963 _fence: Fence,
2964 _p_allocator: *const AllocationCallbacks,
2965 ) -> c_void {
2966 panic!(concat!("Unable to load ", stringify!(destroy_fence)))
2967 }
2968 let raw_name = stringify!(vkDestroyFence);
2969 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2970 let val = _f(&cname);
2971 if val.is_null() {
2972 destroy_fence
2973 } else {
2974 ::std::mem::transmute(val)
2975 }
2976 },
2977 reset_fences: unsafe {
2978 extern "system" fn reset_fences(
2979 _device: Device,
2980 _fence_count: u32,
2981 _p_fences: *const Fence,
2982 ) -> Result {
2983 panic!(concat!("Unable to load ", stringify!(reset_fences)))
2984 }
2985 let raw_name = stringify!(vkResetFences);
2986 let cname = ::std::ffi::CString::new(raw_name).unwrap();
2987 let val = _f(&cname);
2988 if val.is_null() {
2989 reset_fences
2990 } else {
2991 ::std::mem::transmute(val)
2992 }
2993 },
2994 get_fence_status: unsafe {
2995 extern "system" fn get_fence_status(_device: Device, _fence: Fence) -> Result {
2996 panic!(concat!("Unable to load ", stringify!(get_fence_status)))
2997 }
2998 let raw_name = stringify!(vkGetFenceStatus);
2999 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3000 let val = _f(&cname);
3001 if val.is_null() {
3002 get_fence_status
3003 } else {
3004 ::std::mem::transmute(val)
3005 }
3006 },
3007 wait_for_fences: unsafe {
3008 extern "system" fn wait_for_fences(
3009 _device: Device,
3010 _fence_count: u32,
3011 _p_fences: *const Fence,
3012 _wait_all: Bool32,
3013 _timeout: u64,
3014 ) -> Result {
3015 panic!(concat!("Unable to load ", stringify!(wait_for_fences)))
3016 }
3017 let raw_name = stringify!(vkWaitForFences);
3018 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3019 let val = _f(&cname);
3020 if val.is_null() {
3021 wait_for_fences
3022 } else {
3023 ::std::mem::transmute(val)
3024 }
3025 },
3026 create_semaphore: unsafe {
3027 extern "system" fn create_semaphore(
3028 _device: Device,
3029 _p_create_info: *const SemaphoreCreateInfo,
3030 _p_allocator: *const AllocationCallbacks,
3031 _p_semaphore: *mut Semaphore,
3032 ) -> Result {
3033 panic!(concat!("Unable to load ", stringify!(create_semaphore)))
3034 }
3035 let raw_name = stringify!(vkCreateSemaphore);
3036 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3037 let val = _f(&cname);
3038 if val.is_null() {
3039 create_semaphore
3040 } else {
3041 ::std::mem::transmute(val)
3042 }
3043 },
3044 destroy_semaphore: unsafe {
3045 extern "system" fn destroy_semaphore(
3046 _device: Device,
3047 _semaphore: Semaphore,
3048 _p_allocator: *const AllocationCallbacks,
3049 ) -> c_void {
3050 panic!(concat!("Unable to load ", stringify!(destroy_semaphore)))
3051 }
3052 let raw_name = stringify!(vkDestroySemaphore);
3053 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3054 let val = _f(&cname);
3055 if val.is_null() {
3056 destroy_semaphore
3057 } else {
3058 ::std::mem::transmute(val)
3059 }
3060 },
3061 create_event: unsafe {
3062 extern "system" fn create_event(
3063 _device: Device,
3064 _p_create_info: *const EventCreateInfo,
3065 _p_allocator: *const AllocationCallbacks,
3066 _p_event: *mut Event,
3067 ) -> Result {
3068 panic!(concat!("Unable to load ", stringify!(create_event)))
3069 }
3070 let raw_name = stringify!(vkCreateEvent);
3071 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3072 let val = _f(&cname);
3073 if val.is_null() {
3074 create_event
3075 } else {
3076 ::std::mem::transmute(val)
3077 }
3078 },
3079 destroy_event: unsafe {
3080 extern "system" fn destroy_event(
3081 _device: Device,
3082 _event: Event,
3083 _p_allocator: *const AllocationCallbacks,
3084 ) -> c_void {
3085 panic!(concat!("Unable to load ", stringify!(destroy_event)))
3086 }
3087 let raw_name = stringify!(vkDestroyEvent);
3088 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3089 let val = _f(&cname);
3090 if val.is_null() {
3091 destroy_event
3092 } else {
3093 ::std::mem::transmute(val)
3094 }
3095 },
3096 get_event_status: unsafe {
3097 extern "system" fn get_event_status(_device: Device, _event: Event) -> Result {
3098 panic!(concat!("Unable to load ", stringify!(get_event_status)))
3099 }
3100 let raw_name = stringify!(vkGetEventStatus);
3101 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3102 let val = _f(&cname);
3103 if val.is_null() {
3104 get_event_status
3105 } else {
3106 ::std::mem::transmute(val)
3107 }
3108 },
3109 set_event: unsafe {
3110 extern "system" fn set_event(_device: Device, _event: Event) -> Result {
3111 panic!(concat!("Unable to load ", stringify!(set_event)))
3112 }
3113 let raw_name = stringify!(vkSetEvent);
3114 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3115 let val = _f(&cname);
3116 if val.is_null() {
3117 set_event
3118 } else {
3119 ::std::mem::transmute(val)
3120 }
3121 },
3122 reset_event: unsafe {
3123 extern "system" fn reset_event(_device: Device, _event: Event) -> Result {
3124 panic!(concat!("Unable to load ", stringify!(reset_event)))
3125 }
3126 let raw_name = stringify!(vkResetEvent);
3127 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3128 let val = _f(&cname);
3129 if val.is_null() {
3130 reset_event
3131 } else {
3132 ::std::mem::transmute(val)
3133 }
3134 },
3135 create_query_pool: unsafe {
3136 extern "system" fn create_query_pool(
3137 _device: Device,
3138 _p_create_info: *const QueryPoolCreateInfo,
3139 _p_allocator: *const AllocationCallbacks,
3140 _p_query_pool: *mut QueryPool,
3141 ) -> Result {
3142 panic!(concat!("Unable to load ", stringify!(create_query_pool)))
3143 }
3144 let raw_name = stringify!(vkCreateQueryPool);
3145 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3146 let val = _f(&cname);
3147 if val.is_null() {
3148 create_query_pool
3149 } else {
3150 ::std::mem::transmute(val)
3151 }
3152 },
3153 destroy_query_pool: unsafe {
3154 extern "system" fn destroy_query_pool(
3155 _device: Device,
3156 _query_pool: QueryPool,
3157 _p_allocator: *const AllocationCallbacks,
3158 ) -> c_void {
3159 panic!(concat!("Unable to load ", stringify!(destroy_query_pool)))
3160 }
3161 let raw_name = stringify!(vkDestroyQueryPool);
3162 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3163 let val = _f(&cname);
3164 if val.is_null() {
3165 destroy_query_pool
3166 } else {
3167 ::std::mem::transmute(val)
3168 }
3169 },
3170 get_query_pool_results: unsafe {
3171 extern "system" fn get_query_pool_results(
3172 _device: Device,
3173 _query_pool: QueryPool,
3174 _first_query: u32,
3175 _query_count: u32,
3176 _data_size: usize,
3177 _p_data: *mut c_void,
3178 _stride: DeviceSize,
3179 _flags: QueryResultFlags,
3180 ) -> Result {
3181 panic!(concat!(
3182 "Unable to load ",
3183 stringify!(get_query_pool_results)
3184 ))
3185 }
3186 let raw_name = stringify!(vkGetQueryPoolResults);
3187 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3188 let val = _f(&cname);
3189 if val.is_null() {
3190 get_query_pool_results
3191 } else {
3192 ::std::mem::transmute(val)
3193 }
3194 },
3195 create_buffer: unsafe {
3196 extern "system" fn create_buffer(
3197 _device: Device,
3198 _p_create_info: *const BufferCreateInfo,
3199 _p_allocator: *const AllocationCallbacks,
3200 _p_buffer: *mut Buffer,
3201 ) -> Result {
3202 panic!(concat!("Unable to load ", stringify!(create_buffer)))
3203 }
3204 let raw_name = stringify!(vkCreateBuffer);
3205 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3206 let val = _f(&cname);
3207 if val.is_null() {
3208 create_buffer
3209 } else {
3210 ::std::mem::transmute(val)
3211 }
3212 },
3213 destroy_buffer: unsafe {
3214 extern "system" fn destroy_buffer(
3215 _device: Device,
3216 _buffer: Buffer,
3217 _p_allocator: *const AllocationCallbacks,
3218 ) -> c_void {
3219 panic!(concat!("Unable to load ", stringify!(destroy_buffer)))
3220 }
3221 let raw_name = stringify!(vkDestroyBuffer);
3222 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3223 let val = _f(&cname);
3224 if val.is_null() {
3225 destroy_buffer
3226 } else {
3227 ::std::mem::transmute(val)
3228 }
3229 },
3230 create_buffer_view: unsafe {
3231 extern "system" fn create_buffer_view(
3232 _device: Device,
3233 _p_create_info: *const BufferViewCreateInfo,
3234 _p_allocator: *const AllocationCallbacks,
3235 _p_view: *mut BufferView,
3236 ) -> Result {
3237 panic!(concat!("Unable to load ", stringify!(create_buffer_view)))
3238 }
3239 let raw_name = stringify!(vkCreateBufferView);
3240 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3241 let val = _f(&cname);
3242 if val.is_null() {
3243 create_buffer_view
3244 } else {
3245 ::std::mem::transmute(val)
3246 }
3247 },
3248 destroy_buffer_view: unsafe {
3249 extern "system" fn destroy_buffer_view(
3250 _device: Device,
3251 _buffer_view: BufferView,
3252 _p_allocator: *const AllocationCallbacks,
3253 ) -> c_void {
3254 panic!(concat!("Unable to load ", stringify!(destroy_buffer_view)))
3255 }
3256 let raw_name = stringify!(vkDestroyBufferView);
3257 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3258 let val = _f(&cname);
3259 if val.is_null() {
3260 destroy_buffer_view
3261 } else {
3262 ::std::mem::transmute(val)
3263 }
3264 },
3265 create_image: unsafe {
3266 extern "system" fn create_image(
3267 _device: Device,
3268 _p_create_info: *const ImageCreateInfo,
3269 _p_allocator: *const AllocationCallbacks,
3270 _p_image: *mut Image,
3271 ) -> Result {
3272 panic!(concat!("Unable to load ", stringify!(create_image)))
3273 }
3274 let raw_name = stringify!(vkCreateImage);
3275 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3276 let val = _f(&cname);
3277 if val.is_null() {
3278 create_image
3279 } else {
3280 ::std::mem::transmute(val)
3281 }
3282 },
3283 destroy_image: unsafe {
3284 extern "system" fn destroy_image(
3285 _device: Device,
3286 _image: Image,
3287 _p_allocator: *const AllocationCallbacks,
3288 ) -> c_void {
3289 panic!(concat!("Unable to load ", stringify!(destroy_image)))
3290 }
3291 let raw_name = stringify!(vkDestroyImage);
3292 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3293 let val = _f(&cname);
3294 if val.is_null() {
3295 destroy_image
3296 } else {
3297 ::std::mem::transmute(val)
3298 }
3299 },
3300 get_image_subresource_layout: unsafe {
3301 extern "system" fn get_image_subresource_layout(
3302 _device: Device,
3303 _image: Image,
3304 _p_subresource: *const ImageSubresource,
3305 _p_layout: *mut SubresourceLayout,
3306 ) -> c_void {
3307 panic!(concat!(
3308 "Unable to load ",
3309 stringify!(get_image_subresource_layout)
3310 ))
3311 }
3312 let raw_name = stringify!(vkGetImageSubresourceLayout);
3313 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3314 let val = _f(&cname);
3315 if val.is_null() {
3316 get_image_subresource_layout
3317 } else {
3318 ::std::mem::transmute(val)
3319 }
3320 },
3321 create_image_view: unsafe {
3322 extern "system" fn create_image_view(
3323 _device: Device,
3324 _p_create_info: *const ImageViewCreateInfo,
3325 _p_allocator: *const AllocationCallbacks,
3326 _p_view: *mut ImageView,
3327 ) -> Result {
3328 panic!(concat!("Unable to load ", stringify!(create_image_view)))
3329 }
3330 let raw_name = stringify!(vkCreateImageView);
3331 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3332 let val = _f(&cname);
3333 if val.is_null() {
3334 create_image_view
3335 } else {
3336 ::std::mem::transmute(val)
3337 }
3338 },
3339 destroy_image_view: unsafe {
3340 extern "system" fn destroy_image_view(
3341 _device: Device,
3342 _image_view: ImageView,
3343 _p_allocator: *const AllocationCallbacks,
3344 ) -> c_void {
3345 panic!(concat!("Unable to load ", stringify!(destroy_image_view)))
3346 }
3347 let raw_name = stringify!(vkDestroyImageView);
3348 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3349 let val = _f(&cname);
3350 if val.is_null() {
3351 destroy_image_view
3352 } else {
3353 ::std::mem::transmute(val)
3354 }
3355 },
3356 create_shader_module: unsafe {
3357 extern "system" fn create_shader_module(
3358 _device: Device,
3359 _p_create_info: *const ShaderModuleCreateInfo,
3360 _p_allocator: *const AllocationCallbacks,
3361 _p_shader_module: *mut ShaderModule,
3362 ) -> Result {
3363 panic!(concat!("Unable to load ", stringify!(create_shader_module)))
3364 }
3365 let raw_name = stringify!(vkCreateShaderModule);
3366 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3367 let val = _f(&cname);
3368 if val.is_null() {
3369 create_shader_module
3370 } else {
3371 ::std::mem::transmute(val)
3372 }
3373 },
3374 destroy_shader_module: unsafe {
3375 extern "system" fn destroy_shader_module(
3376 _device: Device,
3377 _shader_module: ShaderModule,
3378 _p_allocator: *const AllocationCallbacks,
3379 ) -> c_void {
3380 panic!(concat!(
3381 "Unable to load ",
3382 stringify!(destroy_shader_module)
3383 ))
3384 }
3385 let raw_name = stringify!(vkDestroyShaderModule);
3386 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3387 let val = _f(&cname);
3388 if val.is_null() {
3389 destroy_shader_module
3390 } else {
3391 ::std::mem::transmute(val)
3392 }
3393 },
3394 create_pipeline_cache: unsafe {
3395 extern "system" fn create_pipeline_cache(
3396 _device: Device,
3397 _p_create_info: *const PipelineCacheCreateInfo,
3398 _p_allocator: *const AllocationCallbacks,
3399 _p_pipeline_cache: *mut PipelineCache,
3400 ) -> Result {
3401 panic!(concat!(
3402 "Unable to load ",
3403 stringify!(create_pipeline_cache)
3404 ))
3405 }
3406 let raw_name = stringify!(vkCreatePipelineCache);
3407 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3408 let val = _f(&cname);
3409 if val.is_null() {
3410 create_pipeline_cache
3411 } else {
3412 ::std::mem::transmute(val)
3413 }
3414 },
3415 destroy_pipeline_cache: unsafe {
3416 extern "system" fn destroy_pipeline_cache(
3417 _device: Device,
3418 _pipeline_cache: PipelineCache,
3419 _p_allocator: *const AllocationCallbacks,
3420 ) -> c_void {
3421 panic!(concat!(
3422 "Unable to load ",
3423 stringify!(destroy_pipeline_cache)
3424 ))
3425 }
3426 let raw_name = stringify!(vkDestroyPipelineCache);
3427 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3428 let val = _f(&cname);
3429 if val.is_null() {
3430 destroy_pipeline_cache
3431 } else {
3432 ::std::mem::transmute(val)
3433 }
3434 },
3435 get_pipeline_cache_data: unsafe {
3436 extern "system" fn get_pipeline_cache_data(
3437 _device: Device,
3438 _pipeline_cache: PipelineCache,
3439 _p_data_size: *mut usize,
3440 _p_data: *mut c_void,
3441 ) -> Result {
3442 panic!(concat!(
3443 "Unable to load ",
3444 stringify!(get_pipeline_cache_data)
3445 ))
3446 }
3447 let raw_name = stringify!(vkGetPipelineCacheData);
3448 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3449 let val = _f(&cname);
3450 if val.is_null() {
3451 get_pipeline_cache_data
3452 } else {
3453 ::std::mem::transmute(val)
3454 }
3455 },
3456 merge_pipeline_caches: unsafe {
3457 extern "system" fn merge_pipeline_caches(
3458 _device: Device,
3459 _dst_cache: PipelineCache,
3460 _src_cache_count: u32,
3461 _p_src_caches: *const PipelineCache,
3462 ) -> Result {
3463 panic!(concat!(
3464 "Unable to load ",
3465 stringify!(merge_pipeline_caches)
3466 ))
3467 }
3468 let raw_name = stringify!(vkMergePipelineCaches);
3469 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3470 let val = _f(&cname);
3471 if val.is_null() {
3472 merge_pipeline_caches
3473 } else {
3474 ::std::mem::transmute(val)
3475 }
3476 },
3477 create_graphics_pipelines: unsafe {
3478 extern "system" fn create_graphics_pipelines(
3479 _device: Device,
3480 _pipeline_cache: PipelineCache,
3481 _create_info_count: u32,
3482 _p_create_infos: *const GraphicsPipelineCreateInfo,
3483 _p_allocator: *const AllocationCallbacks,
3484 _p_pipelines: *mut Pipeline,
3485 ) -> Result {
3486 panic!(concat!(
3487 "Unable to load ",
3488 stringify!(create_graphics_pipelines)
3489 ))
3490 }
3491 let raw_name = stringify!(vkCreateGraphicsPipelines);
3492 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3493 let val = _f(&cname);
3494 if val.is_null() {
3495 create_graphics_pipelines
3496 } else {
3497 ::std::mem::transmute(val)
3498 }
3499 },
3500 create_compute_pipelines: unsafe {
3501 extern "system" fn create_compute_pipelines(
3502 _device: Device,
3503 _pipeline_cache: PipelineCache,
3504 _create_info_count: u32,
3505 _p_create_infos: *const ComputePipelineCreateInfo,
3506 _p_allocator: *const AllocationCallbacks,
3507 _p_pipelines: *mut Pipeline,
3508 ) -> Result {
3509 panic!(concat!(
3510 "Unable to load ",
3511 stringify!(create_compute_pipelines)
3512 ))
3513 }
3514 let raw_name = stringify!(vkCreateComputePipelines);
3515 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3516 let val = _f(&cname);
3517 if val.is_null() {
3518 create_compute_pipelines
3519 } else {
3520 ::std::mem::transmute(val)
3521 }
3522 },
3523 destroy_pipeline: unsafe {
3524 extern "system" fn destroy_pipeline(
3525 _device: Device,
3526 _pipeline: Pipeline,
3527 _p_allocator: *const AllocationCallbacks,
3528 ) -> c_void {
3529 panic!(concat!("Unable to load ", stringify!(destroy_pipeline)))
3530 }
3531 let raw_name = stringify!(vkDestroyPipeline);
3532 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3533 let val = _f(&cname);
3534 if val.is_null() {
3535 destroy_pipeline
3536 } else {
3537 ::std::mem::transmute(val)
3538 }
3539 },
3540 create_pipeline_layout: unsafe {
3541 extern "system" fn create_pipeline_layout(
3542 _device: Device,
3543 _p_create_info: *const PipelineLayoutCreateInfo,
3544 _p_allocator: *const AllocationCallbacks,
3545 _p_pipeline_layout: *mut PipelineLayout,
3546 ) -> Result {
3547 panic!(concat!(
3548 "Unable to load ",
3549 stringify!(create_pipeline_layout)
3550 ))
3551 }
3552 let raw_name = stringify!(vkCreatePipelineLayout);
3553 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3554 let val = _f(&cname);
3555 if val.is_null() {
3556 create_pipeline_layout
3557 } else {
3558 ::std::mem::transmute(val)
3559 }
3560 },
3561 destroy_pipeline_layout: unsafe {
3562 extern "system" fn destroy_pipeline_layout(
3563 _device: Device,
3564 _pipeline_layout: PipelineLayout,
3565 _p_allocator: *const AllocationCallbacks,
3566 ) -> c_void {
3567 panic!(concat!(
3568 "Unable to load ",
3569 stringify!(destroy_pipeline_layout)
3570 ))
3571 }
3572 let raw_name = stringify!(vkDestroyPipelineLayout);
3573 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3574 let val = _f(&cname);
3575 if val.is_null() {
3576 destroy_pipeline_layout
3577 } else {
3578 ::std::mem::transmute(val)
3579 }
3580 },
3581 create_sampler: unsafe {
3582 extern "system" fn create_sampler(
3583 _device: Device,
3584 _p_create_info: *const SamplerCreateInfo,
3585 _p_allocator: *const AllocationCallbacks,
3586 _p_sampler: *mut Sampler,
3587 ) -> Result {
3588 panic!(concat!("Unable to load ", stringify!(create_sampler)))
3589 }
3590 let raw_name = stringify!(vkCreateSampler);
3591 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3592 let val = _f(&cname);
3593 if val.is_null() {
3594 create_sampler
3595 } else {
3596 ::std::mem::transmute(val)
3597 }
3598 },
3599 destroy_sampler: unsafe {
3600 extern "system" fn destroy_sampler(
3601 _device: Device,
3602 _sampler: Sampler,
3603 _p_allocator: *const AllocationCallbacks,
3604 ) -> c_void {
3605 panic!(concat!("Unable to load ", stringify!(destroy_sampler)))
3606 }
3607 let raw_name = stringify!(vkDestroySampler);
3608 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3609 let val = _f(&cname);
3610 if val.is_null() {
3611 destroy_sampler
3612 } else {
3613 ::std::mem::transmute(val)
3614 }
3615 },
3616 create_descriptor_set_layout: unsafe {
3617 extern "system" fn create_descriptor_set_layout(
3618 _device: Device,
3619 _p_create_info: *const DescriptorSetLayoutCreateInfo,
3620 _p_allocator: *const AllocationCallbacks,
3621 _p_set_layout: *mut DescriptorSetLayout,
3622 ) -> Result {
3623 panic!(concat!(
3624 "Unable to load ",
3625 stringify!(create_descriptor_set_layout)
3626 ))
3627 }
3628 let raw_name = stringify!(vkCreateDescriptorSetLayout);
3629 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3630 let val = _f(&cname);
3631 if val.is_null() {
3632 create_descriptor_set_layout
3633 } else {
3634 ::std::mem::transmute(val)
3635 }
3636 },
3637 destroy_descriptor_set_layout: unsafe {
3638 extern "system" fn destroy_descriptor_set_layout(
3639 _device: Device,
3640 _descriptor_set_layout: DescriptorSetLayout,
3641 _p_allocator: *const AllocationCallbacks,
3642 ) -> c_void {
3643 panic!(concat!(
3644 "Unable to load ",
3645 stringify!(destroy_descriptor_set_layout)
3646 ))
3647 }
3648 let raw_name = stringify!(vkDestroyDescriptorSetLayout);
3649 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3650 let val = _f(&cname);
3651 if val.is_null() {
3652 destroy_descriptor_set_layout
3653 } else {
3654 ::std::mem::transmute(val)
3655 }
3656 },
3657 create_descriptor_pool: unsafe {
3658 extern "system" fn create_descriptor_pool(
3659 _device: Device,
3660 _p_create_info: *const DescriptorPoolCreateInfo,
3661 _p_allocator: *const AllocationCallbacks,
3662 _p_descriptor_pool: *mut DescriptorPool,
3663 ) -> Result {
3664 panic!(concat!(
3665 "Unable to load ",
3666 stringify!(create_descriptor_pool)
3667 ))
3668 }
3669 let raw_name = stringify!(vkCreateDescriptorPool);
3670 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3671 let val = _f(&cname);
3672 if val.is_null() {
3673 create_descriptor_pool
3674 } else {
3675 ::std::mem::transmute(val)
3676 }
3677 },
3678 destroy_descriptor_pool: unsafe {
3679 extern "system" fn destroy_descriptor_pool(
3680 _device: Device,
3681 _descriptor_pool: DescriptorPool,
3682 _p_allocator: *const AllocationCallbacks,
3683 ) -> c_void {
3684 panic!(concat!(
3685 "Unable to load ",
3686 stringify!(destroy_descriptor_pool)
3687 ))
3688 }
3689 let raw_name = stringify!(vkDestroyDescriptorPool);
3690 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3691 let val = _f(&cname);
3692 if val.is_null() {
3693 destroy_descriptor_pool
3694 } else {
3695 ::std::mem::transmute(val)
3696 }
3697 },
3698 reset_descriptor_pool: unsafe {
3699 extern "system" fn reset_descriptor_pool(
3700 _device: Device,
3701 _descriptor_pool: DescriptorPool,
3702 _flags: DescriptorPoolResetFlags,
3703 ) -> Result {
3704 panic!(concat!(
3705 "Unable to load ",
3706 stringify!(reset_descriptor_pool)
3707 ))
3708 }
3709 let raw_name = stringify!(vkResetDescriptorPool);
3710 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3711 let val = _f(&cname);
3712 if val.is_null() {
3713 reset_descriptor_pool
3714 } else {
3715 ::std::mem::transmute(val)
3716 }
3717 },
3718 allocate_descriptor_sets: unsafe {
3719 extern "system" fn allocate_descriptor_sets(
3720 _device: Device,
3721 _p_allocate_info: *const DescriptorSetAllocateInfo,
3722 _p_descriptor_sets: *mut DescriptorSet,
3723 ) -> Result {
3724 panic!(concat!(
3725 "Unable to load ",
3726 stringify!(allocate_descriptor_sets)
3727 ))
3728 }
3729 let raw_name = stringify!(vkAllocateDescriptorSets);
3730 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3731 let val = _f(&cname);
3732 if val.is_null() {
3733 allocate_descriptor_sets
3734 } else {
3735 ::std::mem::transmute(val)
3736 }
3737 },
3738 free_descriptor_sets: unsafe {
3739 extern "system" fn free_descriptor_sets(
3740 _device: Device,
3741 _descriptor_pool: DescriptorPool,
3742 _descriptor_set_count: u32,
3743 _p_descriptor_sets: *const DescriptorSet,
3744 ) -> Result {
3745 panic!(concat!("Unable to load ", stringify!(free_descriptor_sets)))
3746 }
3747 let raw_name = stringify!(vkFreeDescriptorSets);
3748 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3749 let val = _f(&cname);
3750 if val.is_null() {
3751 free_descriptor_sets
3752 } else {
3753 ::std::mem::transmute(val)
3754 }
3755 },
3756 update_descriptor_sets: unsafe {
3757 extern "system" fn update_descriptor_sets(
3758 _device: Device,
3759 _descriptor_write_count: u32,
3760 _p_descriptor_writes: *const WriteDescriptorSet,
3761 _descriptor_copy_count: u32,
3762 _p_descriptor_copies: *const CopyDescriptorSet,
3763 ) -> c_void {
3764 panic!(concat!(
3765 "Unable to load ",
3766 stringify!(update_descriptor_sets)
3767 ))
3768 }
3769 let raw_name = stringify!(vkUpdateDescriptorSets);
3770 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3771 let val = _f(&cname);
3772 if val.is_null() {
3773 update_descriptor_sets
3774 } else {
3775 ::std::mem::transmute(val)
3776 }
3777 },
3778 create_framebuffer: unsafe {
3779 extern "system" fn create_framebuffer(
3780 _device: Device,
3781 _p_create_info: *const FramebufferCreateInfo,
3782 _p_allocator: *const AllocationCallbacks,
3783 _p_framebuffer: *mut Framebuffer,
3784 ) -> Result {
3785 panic!(concat!("Unable to load ", stringify!(create_framebuffer)))
3786 }
3787 let raw_name = stringify!(vkCreateFramebuffer);
3788 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3789 let val = _f(&cname);
3790 if val.is_null() {
3791 create_framebuffer
3792 } else {
3793 ::std::mem::transmute(val)
3794 }
3795 },
3796 destroy_framebuffer: unsafe {
3797 extern "system" fn destroy_framebuffer(
3798 _device: Device,
3799 _framebuffer: Framebuffer,
3800 _p_allocator: *const AllocationCallbacks,
3801 ) -> c_void {
3802 panic!(concat!("Unable to load ", stringify!(destroy_framebuffer)))
3803 }
3804 let raw_name = stringify!(vkDestroyFramebuffer);
3805 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3806 let val = _f(&cname);
3807 if val.is_null() {
3808 destroy_framebuffer
3809 } else {
3810 ::std::mem::transmute(val)
3811 }
3812 },
3813 create_render_pass: unsafe {
3814 extern "system" fn create_render_pass(
3815 _device: Device,
3816 _p_create_info: *const RenderPassCreateInfo,
3817 _p_allocator: *const AllocationCallbacks,
3818 _p_render_pass: *mut RenderPass,
3819 ) -> Result {
3820 panic!(concat!("Unable to load ", stringify!(create_render_pass)))
3821 }
3822 let raw_name = stringify!(vkCreateRenderPass);
3823 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3824 let val = _f(&cname);
3825 if val.is_null() {
3826 create_render_pass
3827 } else {
3828 ::std::mem::transmute(val)
3829 }
3830 },
3831 destroy_render_pass: unsafe {
3832 extern "system" fn destroy_render_pass(
3833 _device: Device,
3834 _render_pass: RenderPass,
3835 _p_allocator: *const AllocationCallbacks,
3836 ) -> c_void {
3837 panic!(concat!("Unable to load ", stringify!(destroy_render_pass)))
3838 }
3839 let raw_name = stringify!(vkDestroyRenderPass);
3840 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3841 let val = _f(&cname);
3842 if val.is_null() {
3843 destroy_render_pass
3844 } else {
3845 ::std::mem::transmute(val)
3846 }
3847 },
3848 get_render_area_granularity: unsafe {
3849 extern "system" fn get_render_area_granularity(
3850 _device: Device,
3851 _render_pass: RenderPass,
3852 _p_granularity: *mut Extent2D,
3853 ) -> c_void {
3854 panic!(concat!(
3855 "Unable to load ",
3856 stringify!(get_render_area_granularity)
3857 ))
3858 }
3859 let raw_name = stringify!(vkGetRenderAreaGranularity);
3860 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3861 let val = _f(&cname);
3862 if val.is_null() {
3863 get_render_area_granularity
3864 } else {
3865 ::std::mem::transmute(val)
3866 }
3867 },
3868 create_command_pool: unsafe {
3869 extern "system" fn create_command_pool(
3870 _device: Device,
3871 _p_create_info: *const CommandPoolCreateInfo,
3872 _p_allocator: *const AllocationCallbacks,
3873 _p_command_pool: *mut CommandPool,
3874 ) -> Result {
3875 panic!(concat!("Unable to load ", stringify!(create_command_pool)))
3876 }
3877 let raw_name = stringify!(vkCreateCommandPool);
3878 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3879 let val = _f(&cname);
3880 if val.is_null() {
3881 create_command_pool
3882 } else {
3883 ::std::mem::transmute(val)
3884 }
3885 },
3886 destroy_command_pool: unsafe {
3887 extern "system" fn destroy_command_pool(
3888 _device: Device,
3889 _command_pool: CommandPool,
3890 _p_allocator: *const AllocationCallbacks,
3891 ) -> c_void {
3892 panic!(concat!("Unable to load ", stringify!(destroy_command_pool)))
3893 }
3894 let raw_name = stringify!(vkDestroyCommandPool);
3895 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3896 let val = _f(&cname);
3897 if val.is_null() {
3898 destroy_command_pool
3899 } else {
3900 ::std::mem::transmute(val)
3901 }
3902 },
3903 reset_command_pool: unsafe {
3904 extern "system" fn reset_command_pool(
3905 _device: Device,
3906 _command_pool: CommandPool,
3907 _flags: CommandPoolResetFlags,
3908 ) -> Result {
3909 panic!(concat!("Unable to load ", stringify!(reset_command_pool)))
3910 }
3911 let raw_name = stringify!(vkResetCommandPool);
3912 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3913 let val = _f(&cname);
3914 if val.is_null() {
3915 reset_command_pool
3916 } else {
3917 ::std::mem::transmute(val)
3918 }
3919 },
3920 allocate_command_buffers: unsafe {
3921 extern "system" fn allocate_command_buffers(
3922 _device: Device,
3923 _p_allocate_info: *const CommandBufferAllocateInfo,
3924 _p_command_buffers: *mut CommandBuffer,
3925 ) -> Result {
3926 panic!(concat!(
3927 "Unable to load ",
3928 stringify!(allocate_command_buffers)
3929 ))
3930 }
3931 let raw_name = stringify!(vkAllocateCommandBuffers);
3932 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3933 let val = _f(&cname);
3934 if val.is_null() {
3935 allocate_command_buffers
3936 } else {
3937 ::std::mem::transmute(val)
3938 }
3939 },
3940 free_command_buffers: unsafe {
3941 extern "system" fn free_command_buffers(
3942 _device: Device,
3943 _command_pool: CommandPool,
3944 _command_buffer_count: u32,
3945 _p_command_buffers: *const CommandBuffer,
3946 ) -> c_void {
3947 panic!(concat!("Unable to load ", stringify!(free_command_buffers)))
3948 }
3949 let raw_name = stringify!(vkFreeCommandBuffers);
3950 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3951 let val = _f(&cname);
3952 if val.is_null() {
3953 free_command_buffers
3954 } else {
3955 ::std::mem::transmute(val)
3956 }
3957 },
3958 begin_command_buffer: unsafe {
3959 extern "system" fn begin_command_buffer(
3960 _command_buffer: CommandBuffer,
3961 _p_begin_info: *const CommandBufferBeginInfo,
3962 ) -> Result {
3963 panic!(concat!("Unable to load ", stringify!(begin_command_buffer)))
3964 }
3965 let raw_name = stringify!(vkBeginCommandBuffer);
3966 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3967 let val = _f(&cname);
3968 if val.is_null() {
3969 begin_command_buffer
3970 } else {
3971 ::std::mem::transmute(val)
3972 }
3973 },
3974 end_command_buffer: unsafe {
3975 extern "system" fn end_command_buffer(_command_buffer: CommandBuffer) -> Result {
3976 panic!(concat!("Unable to load ", stringify!(end_command_buffer)))
3977 }
3978 let raw_name = stringify!(vkEndCommandBuffer);
3979 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3980 let val = _f(&cname);
3981 if val.is_null() {
3982 end_command_buffer
3983 } else {
3984 ::std::mem::transmute(val)
3985 }
3986 },
3987 reset_command_buffer: unsafe {
3988 extern "system" fn reset_command_buffer(
3989 _command_buffer: CommandBuffer,
3990 _flags: CommandBufferResetFlags,
3991 ) -> Result {
3992 panic!(concat!("Unable to load ", stringify!(reset_command_buffer)))
3993 }
3994 let raw_name = stringify!(vkResetCommandBuffer);
3995 let cname = ::std::ffi::CString::new(raw_name).unwrap();
3996 let val = _f(&cname);
3997 if val.is_null() {
3998 reset_command_buffer
3999 } else {
4000 ::std::mem::transmute(val)
4001 }
4002 },
4003 cmd_bind_pipeline: unsafe {
4004 extern "system" fn cmd_bind_pipeline(
4005 _command_buffer: CommandBuffer,
4006 _pipeline_bind_point: PipelineBindPoint,
4007 _pipeline: Pipeline,
4008 ) -> c_void {
4009 panic!(concat!("Unable to load ", stringify!(cmd_bind_pipeline)))
4010 }
4011 let raw_name = stringify!(vkCmdBindPipeline);
4012 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4013 let val = _f(&cname);
4014 if val.is_null() {
4015 cmd_bind_pipeline
4016 } else {
4017 ::std::mem::transmute(val)
4018 }
4019 },
4020 cmd_set_viewport: unsafe {
4021 extern "system" fn cmd_set_viewport(
4022 _command_buffer: CommandBuffer,
4023 _first_viewport: u32,
4024 _viewport_count: u32,
4025 _p_viewports: *const Viewport,
4026 ) -> c_void {
4027 panic!(concat!("Unable to load ", stringify!(cmd_set_viewport)))
4028 }
4029 let raw_name = stringify!(vkCmdSetViewport);
4030 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4031 let val = _f(&cname);
4032 if val.is_null() {
4033 cmd_set_viewport
4034 } else {
4035 ::std::mem::transmute(val)
4036 }
4037 },
4038 cmd_set_scissor: unsafe {
4039 extern "system" fn cmd_set_scissor(
4040 _command_buffer: CommandBuffer,
4041 _first_scissor: u32,
4042 _scissor_count: u32,
4043 _p_scissors: *const Rect2D,
4044 ) -> c_void {
4045 panic!(concat!("Unable to load ", stringify!(cmd_set_scissor)))
4046 }
4047 let raw_name = stringify!(vkCmdSetScissor);
4048 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4049 let val = _f(&cname);
4050 if val.is_null() {
4051 cmd_set_scissor
4052 } else {
4053 ::std::mem::transmute(val)
4054 }
4055 },
4056 cmd_set_line_width: unsafe {
4057 extern "system" fn cmd_set_line_width(
4058 _command_buffer: CommandBuffer,
4059 _line_width: f32,
4060 ) -> c_void {
4061 panic!(concat!("Unable to load ", stringify!(cmd_set_line_width)))
4062 }
4063 let raw_name = stringify!(vkCmdSetLineWidth);
4064 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4065 let val = _f(&cname);
4066 if val.is_null() {
4067 cmd_set_line_width
4068 } else {
4069 ::std::mem::transmute(val)
4070 }
4071 },
4072 cmd_set_depth_bias: unsafe {
4073 extern "system" fn cmd_set_depth_bias(
4074 _command_buffer: CommandBuffer,
4075 _depth_bias_constant_factor: f32,
4076 _depth_bias_clamp: f32,
4077 _depth_bias_slope_factor: f32,
4078 ) -> c_void {
4079 panic!(concat!("Unable to load ", stringify!(cmd_set_depth_bias)))
4080 }
4081 let raw_name = stringify!(vkCmdSetDepthBias);
4082 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4083 let val = _f(&cname);
4084 if val.is_null() {
4085 cmd_set_depth_bias
4086 } else {
4087 ::std::mem::transmute(val)
4088 }
4089 },
4090 cmd_set_blend_constants: unsafe {
4091 extern "system" fn cmd_set_blend_constants(
4092 _command_buffer: CommandBuffer,
4093 _blend_constants: &[f32; 4],
4094 ) -> c_void {
4095 panic!(concat!(
4096 "Unable to load ",
4097 stringify!(cmd_set_blend_constants)
4098 ))
4099 }
4100 let raw_name = stringify!(vkCmdSetBlendConstants);
4101 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4102 let val = _f(&cname);
4103 if val.is_null() {
4104 cmd_set_blend_constants
4105 } else {
4106 ::std::mem::transmute(val)
4107 }
4108 },
4109 cmd_set_depth_bounds: unsafe {
4110 extern "system" fn cmd_set_depth_bounds(
4111 _command_buffer: CommandBuffer,
4112 _min_depth_bounds: f32,
4113 _max_depth_bounds: f32,
4114 ) -> c_void {
4115 panic!(concat!("Unable to load ", stringify!(cmd_set_depth_bounds)))
4116 }
4117 let raw_name = stringify!(vkCmdSetDepthBounds);
4118 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4119 let val = _f(&cname);
4120 if val.is_null() {
4121 cmd_set_depth_bounds
4122 } else {
4123 ::std::mem::transmute(val)
4124 }
4125 },
4126 cmd_set_stencil_compare_mask: unsafe {
4127 extern "system" fn cmd_set_stencil_compare_mask(
4128 _command_buffer: CommandBuffer,
4129 _face_mask: StencilFaceFlags,
4130 _compare_mask: u32,
4131 ) -> c_void {
4132 panic!(concat!(
4133 "Unable to load ",
4134 stringify!(cmd_set_stencil_compare_mask)
4135 ))
4136 }
4137 let raw_name = stringify!(vkCmdSetStencilCompareMask);
4138 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4139 let val = _f(&cname);
4140 if val.is_null() {
4141 cmd_set_stencil_compare_mask
4142 } else {
4143 ::std::mem::transmute(val)
4144 }
4145 },
4146 cmd_set_stencil_write_mask: unsafe {
4147 extern "system" fn cmd_set_stencil_write_mask(
4148 _command_buffer: CommandBuffer,
4149 _face_mask: StencilFaceFlags,
4150 _write_mask: u32,
4151 ) -> c_void {
4152 panic!(concat!(
4153 "Unable to load ",
4154 stringify!(cmd_set_stencil_write_mask)
4155 ))
4156 }
4157 let raw_name = stringify!(vkCmdSetStencilWriteMask);
4158 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4159 let val = _f(&cname);
4160 if val.is_null() {
4161 cmd_set_stencil_write_mask
4162 } else {
4163 ::std::mem::transmute(val)
4164 }
4165 },
4166 cmd_set_stencil_reference: unsafe {
4167 extern "system" fn cmd_set_stencil_reference(
4168 _command_buffer: CommandBuffer,
4169 _face_mask: StencilFaceFlags,
4170 _reference: u32,
4171 ) -> c_void {
4172 panic!(concat!(
4173 "Unable to load ",
4174 stringify!(cmd_set_stencil_reference)
4175 ))
4176 }
4177 let raw_name = stringify!(vkCmdSetStencilReference);
4178 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4179 let val = _f(&cname);
4180 if val.is_null() {
4181 cmd_set_stencil_reference
4182 } else {
4183 ::std::mem::transmute(val)
4184 }
4185 },
4186 cmd_bind_descriptor_sets: unsafe {
4187 extern "system" fn cmd_bind_descriptor_sets(
4188 _command_buffer: CommandBuffer,
4189 _pipeline_bind_point: PipelineBindPoint,
4190 _layout: PipelineLayout,
4191 _first_set: u32,
4192 _descriptor_set_count: u32,
4193 _p_descriptor_sets: *const DescriptorSet,
4194 _dynamic_offset_count: u32,
4195 _p_dynamic_offsets: *const u32,
4196 ) -> c_void {
4197 panic!(concat!(
4198 "Unable to load ",
4199 stringify!(cmd_bind_descriptor_sets)
4200 ))
4201 }
4202 let raw_name = stringify!(vkCmdBindDescriptorSets);
4203 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4204 let val = _f(&cname);
4205 if val.is_null() {
4206 cmd_bind_descriptor_sets
4207 } else {
4208 ::std::mem::transmute(val)
4209 }
4210 },
4211 cmd_bind_index_buffer: unsafe {
4212 extern "system" fn cmd_bind_index_buffer(
4213 _command_buffer: CommandBuffer,
4214 _buffer: Buffer,
4215 _offset: DeviceSize,
4216 _index_type: IndexType,
4217 ) -> c_void {
4218 panic!(concat!(
4219 "Unable to load ",
4220 stringify!(cmd_bind_index_buffer)
4221 ))
4222 }
4223 let raw_name = stringify!(vkCmdBindIndexBuffer);
4224 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4225 let val = _f(&cname);
4226 if val.is_null() {
4227 cmd_bind_index_buffer
4228 } else {
4229 ::std::mem::transmute(val)
4230 }
4231 },
4232 cmd_bind_vertex_buffers: unsafe {
4233 extern "system" fn cmd_bind_vertex_buffers(
4234 _command_buffer: CommandBuffer,
4235 _first_binding: u32,
4236 _binding_count: u32,
4237 _p_buffers: *const Buffer,
4238 _p_offsets: *const DeviceSize,
4239 ) -> c_void {
4240 panic!(concat!(
4241 "Unable to load ",
4242 stringify!(cmd_bind_vertex_buffers)
4243 ))
4244 }
4245 let raw_name = stringify!(vkCmdBindVertexBuffers);
4246 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4247 let val = _f(&cname);
4248 if val.is_null() {
4249 cmd_bind_vertex_buffers
4250 } else {
4251 ::std::mem::transmute(val)
4252 }
4253 },
4254 cmd_draw: unsafe {
4255 extern "system" fn cmd_draw(
4256 _command_buffer: CommandBuffer,
4257 _vertex_count: u32,
4258 _instance_count: u32,
4259 _first_vertex: u32,
4260 _first_instance: u32,
4261 ) -> c_void {
4262 panic!(concat!("Unable to load ", stringify!(cmd_draw)))
4263 }
4264 let raw_name = stringify!(vkCmdDraw);
4265 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4266 let val = _f(&cname);
4267 if val.is_null() {
4268 cmd_draw
4269 } else {
4270 ::std::mem::transmute(val)
4271 }
4272 },
4273 cmd_draw_indexed: unsafe {
4274 extern "system" fn cmd_draw_indexed(
4275 _command_buffer: CommandBuffer,
4276 _index_count: u32,
4277 _instance_count: u32,
4278 _first_index: u32,
4279 _vertex_offset: i32,
4280 _first_instance: u32,
4281 ) -> c_void {
4282 panic!(concat!("Unable to load ", stringify!(cmd_draw_indexed)))
4283 }
4284 let raw_name = stringify!(vkCmdDrawIndexed);
4285 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4286 let val = _f(&cname);
4287 if val.is_null() {
4288 cmd_draw_indexed
4289 } else {
4290 ::std::mem::transmute(val)
4291 }
4292 },
4293 cmd_draw_indirect: unsafe {
4294 extern "system" fn cmd_draw_indirect(
4295 _command_buffer: CommandBuffer,
4296 _buffer: Buffer,
4297 _offset: DeviceSize,
4298 _draw_count: u32,
4299 _stride: u32,
4300 ) -> c_void {
4301 panic!(concat!("Unable to load ", stringify!(cmd_draw_indirect)))
4302 }
4303 let raw_name = stringify!(vkCmdDrawIndirect);
4304 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4305 let val = _f(&cname);
4306 if val.is_null() {
4307 cmd_draw_indirect
4308 } else {
4309 ::std::mem::transmute(val)
4310 }
4311 },
4312 cmd_draw_indexed_indirect: unsafe {
4313 extern "system" fn cmd_draw_indexed_indirect(
4314 _command_buffer: CommandBuffer,
4315 _buffer: Buffer,
4316 _offset: DeviceSize,
4317 _draw_count: u32,
4318 _stride: u32,
4319 ) -> c_void {
4320 panic!(concat!(
4321 "Unable to load ",
4322 stringify!(cmd_draw_indexed_indirect)
4323 ))
4324 }
4325 let raw_name = stringify!(vkCmdDrawIndexedIndirect);
4326 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4327 let val = _f(&cname);
4328 if val.is_null() {
4329 cmd_draw_indexed_indirect
4330 } else {
4331 ::std::mem::transmute(val)
4332 }
4333 },
4334 cmd_dispatch: unsafe {
4335 extern "system" fn cmd_dispatch(
4336 _command_buffer: CommandBuffer,
4337 _group_count_x: u32,
4338 _group_count_y: u32,
4339 _group_count_z: u32,
4340 ) -> c_void {
4341 panic!(concat!("Unable to load ", stringify!(cmd_dispatch)))
4342 }
4343 let raw_name = stringify!(vkCmdDispatch);
4344 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4345 let val = _f(&cname);
4346 if val.is_null() {
4347 cmd_dispatch
4348 } else {
4349 ::std::mem::transmute(val)
4350 }
4351 },
4352 cmd_dispatch_indirect: unsafe {
4353 extern "system" fn cmd_dispatch_indirect(
4354 _command_buffer: CommandBuffer,
4355 _buffer: Buffer,
4356 _offset: DeviceSize,
4357 ) -> c_void {
4358 panic!(concat!(
4359 "Unable to load ",
4360 stringify!(cmd_dispatch_indirect)
4361 ))
4362 }
4363 let raw_name = stringify!(vkCmdDispatchIndirect);
4364 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4365 let val = _f(&cname);
4366 if val.is_null() {
4367 cmd_dispatch_indirect
4368 } else {
4369 ::std::mem::transmute(val)
4370 }
4371 },
4372 cmd_copy_buffer: unsafe {
4373 extern "system" fn cmd_copy_buffer(
4374 _command_buffer: CommandBuffer,
4375 _src_buffer: Buffer,
4376 _dst_buffer: Buffer,
4377 _region_count: u32,
4378 _p_regions: *const BufferCopy,
4379 ) -> c_void {
4380 panic!(concat!("Unable to load ", stringify!(cmd_copy_buffer)))
4381 }
4382 let raw_name = stringify!(vkCmdCopyBuffer);
4383 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4384 let val = _f(&cname);
4385 if val.is_null() {
4386 cmd_copy_buffer
4387 } else {
4388 ::std::mem::transmute(val)
4389 }
4390 },
4391 cmd_copy_image: unsafe {
4392 extern "system" fn cmd_copy_image(
4393 _command_buffer: CommandBuffer,
4394 _src_image: Image,
4395 _src_image_layout: ImageLayout,
4396 _dst_image: Image,
4397 _dst_image_layout: ImageLayout,
4398 _region_count: u32,
4399 _p_regions: *const ImageCopy,
4400 ) -> c_void {
4401 panic!(concat!("Unable to load ", stringify!(cmd_copy_image)))
4402 }
4403 let raw_name = stringify!(vkCmdCopyImage);
4404 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4405 let val = _f(&cname);
4406 if val.is_null() {
4407 cmd_copy_image
4408 } else {
4409 ::std::mem::transmute(val)
4410 }
4411 },
4412 cmd_blit_image: unsafe {
4413 extern "system" fn cmd_blit_image(
4414 _command_buffer: CommandBuffer,
4415 _src_image: Image,
4416 _src_image_layout: ImageLayout,
4417 _dst_image: Image,
4418 _dst_image_layout: ImageLayout,
4419 _region_count: u32,
4420 _p_regions: *const ImageBlit,
4421 _filter: Filter,
4422 ) -> c_void {
4423 panic!(concat!("Unable to load ", stringify!(cmd_blit_image)))
4424 }
4425 let raw_name = stringify!(vkCmdBlitImage);
4426 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4427 let val = _f(&cname);
4428 if val.is_null() {
4429 cmd_blit_image
4430 } else {
4431 ::std::mem::transmute(val)
4432 }
4433 },
4434 cmd_copy_buffer_to_image: unsafe {
4435 extern "system" fn cmd_copy_buffer_to_image(
4436 _command_buffer: CommandBuffer,
4437 _src_buffer: Buffer,
4438 _dst_image: Image,
4439 _dst_image_layout: ImageLayout,
4440 _region_count: u32,
4441 _p_regions: *const BufferImageCopy,
4442 ) -> c_void {
4443 panic!(concat!(
4444 "Unable to load ",
4445 stringify!(cmd_copy_buffer_to_image)
4446 ))
4447 }
4448 let raw_name = stringify!(vkCmdCopyBufferToImage);
4449 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4450 let val = _f(&cname);
4451 if val.is_null() {
4452 cmd_copy_buffer_to_image
4453 } else {
4454 ::std::mem::transmute(val)
4455 }
4456 },
4457 cmd_copy_image_to_buffer: unsafe {
4458 extern "system" fn cmd_copy_image_to_buffer(
4459 _command_buffer: CommandBuffer,
4460 _src_image: Image,
4461 _src_image_layout: ImageLayout,
4462 _dst_buffer: Buffer,
4463 _region_count: u32,
4464 _p_regions: *const BufferImageCopy,
4465 ) -> c_void {
4466 panic!(concat!(
4467 "Unable to load ",
4468 stringify!(cmd_copy_image_to_buffer)
4469 ))
4470 }
4471 let raw_name = stringify!(vkCmdCopyImageToBuffer);
4472 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4473 let val = _f(&cname);
4474 if val.is_null() {
4475 cmd_copy_image_to_buffer
4476 } else {
4477 ::std::mem::transmute(val)
4478 }
4479 },
4480 cmd_update_buffer: unsafe {
4481 extern "system" fn cmd_update_buffer(
4482 _command_buffer: CommandBuffer,
4483 _dst_buffer: Buffer,
4484 _dst_offset: DeviceSize,
4485 _data_size: DeviceSize,
4486 _p_data: *const c_void,
4487 ) -> c_void {
4488 panic!(concat!("Unable to load ", stringify!(cmd_update_buffer)))
4489 }
4490 let raw_name = stringify!(vkCmdUpdateBuffer);
4491 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4492 let val = _f(&cname);
4493 if val.is_null() {
4494 cmd_update_buffer
4495 } else {
4496 ::std::mem::transmute(val)
4497 }
4498 },
4499 cmd_fill_buffer: unsafe {
4500 extern "system" fn cmd_fill_buffer(
4501 _command_buffer: CommandBuffer,
4502 _dst_buffer: Buffer,
4503 _dst_offset: DeviceSize,
4504 _size: DeviceSize,
4505 _data: u32,
4506 ) -> c_void {
4507 panic!(concat!("Unable to load ", stringify!(cmd_fill_buffer)))
4508 }
4509 let raw_name = stringify!(vkCmdFillBuffer);
4510 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4511 let val = _f(&cname);
4512 if val.is_null() {
4513 cmd_fill_buffer
4514 } else {
4515 ::std::mem::transmute(val)
4516 }
4517 },
4518 cmd_clear_color_image: unsafe {
4519 extern "system" fn cmd_clear_color_image(
4520 _command_buffer: CommandBuffer,
4521 _image: Image,
4522 _image_layout: ImageLayout,
4523 _p_color: *const ClearColorValue,
4524 _range_count: u32,
4525 _p_ranges: *const ImageSubresourceRange,
4526 ) -> c_void {
4527 panic!(concat!(
4528 "Unable to load ",
4529 stringify!(cmd_clear_color_image)
4530 ))
4531 }
4532 let raw_name = stringify!(vkCmdClearColorImage);
4533 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4534 let val = _f(&cname);
4535 if val.is_null() {
4536 cmd_clear_color_image
4537 } else {
4538 ::std::mem::transmute(val)
4539 }
4540 },
4541 cmd_clear_depth_stencil_image: unsafe {
4542 extern "system" fn cmd_clear_depth_stencil_image(
4543 _command_buffer: CommandBuffer,
4544 _image: Image,
4545 _image_layout: ImageLayout,
4546 _p_depth_stencil: *const ClearDepthStencilValue,
4547 _range_count: u32,
4548 _p_ranges: *const ImageSubresourceRange,
4549 ) -> c_void {
4550 panic!(concat!(
4551 "Unable to load ",
4552 stringify!(cmd_clear_depth_stencil_image)
4553 ))
4554 }
4555 let raw_name = stringify!(vkCmdClearDepthStencilImage);
4556 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4557 let val = _f(&cname);
4558 if val.is_null() {
4559 cmd_clear_depth_stencil_image
4560 } else {
4561 ::std::mem::transmute(val)
4562 }
4563 },
4564 cmd_clear_attachments: unsafe {
4565 extern "system" fn cmd_clear_attachments(
4566 _command_buffer: CommandBuffer,
4567 _attachment_count: u32,
4568 _p_attachments: *const ClearAttachment,
4569 _rect_count: u32,
4570 _p_rects: *const ClearRect,
4571 ) -> c_void {
4572 panic!(concat!(
4573 "Unable to load ",
4574 stringify!(cmd_clear_attachments)
4575 ))
4576 }
4577 let raw_name = stringify!(vkCmdClearAttachments);
4578 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4579 let val = _f(&cname);
4580 if val.is_null() {
4581 cmd_clear_attachments
4582 } else {
4583 ::std::mem::transmute(val)
4584 }
4585 },
4586 cmd_resolve_image: unsafe {
4587 extern "system" fn cmd_resolve_image(
4588 _command_buffer: CommandBuffer,
4589 _src_image: Image,
4590 _src_image_layout: ImageLayout,
4591 _dst_image: Image,
4592 _dst_image_layout: ImageLayout,
4593 _region_count: u32,
4594 _p_regions: *const ImageResolve,
4595 ) -> c_void {
4596 panic!(concat!("Unable to load ", stringify!(cmd_resolve_image)))
4597 }
4598 let raw_name = stringify!(vkCmdResolveImage);
4599 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4600 let val = _f(&cname);
4601 if val.is_null() {
4602 cmd_resolve_image
4603 } else {
4604 ::std::mem::transmute(val)
4605 }
4606 },
4607 cmd_set_event: unsafe {
4608 extern "system" fn cmd_set_event(
4609 _command_buffer: CommandBuffer,
4610 _event: Event,
4611 _stage_mask: PipelineStageFlags,
4612 ) -> c_void {
4613 panic!(concat!("Unable to load ", stringify!(cmd_set_event)))
4614 }
4615 let raw_name = stringify!(vkCmdSetEvent);
4616 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4617 let val = _f(&cname);
4618 if val.is_null() {
4619 cmd_set_event
4620 } else {
4621 ::std::mem::transmute(val)
4622 }
4623 },
4624 cmd_reset_event: unsafe {
4625 extern "system" fn cmd_reset_event(
4626 _command_buffer: CommandBuffer,
4627 _event: Event,
4628 _stage_mask: PipelineStageFlags,
4629 ) -> c_void {
4630 panic!(concat!("Unable to load ", stringify!(cmd_reset_event)))
4631 }
4632 let raw_name = stringify!(vkCmdResetEvent);
4633 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4634 let val = _f(&cname);
4635 if val.is_null() {
4636 cmd_reset_event
4637 } else {
4638 ::std::mem::transmute(val)
4639 }
4640 },
4641 cmd_wait_events: unsafe {
4642 extern "system" fn cmd_wait_events(
4643 _command_buffer: CommandBuffer,
4644 _event_count: u32,
4645 _p_events: *const Event,
4646 _src_stage_mask: PipelineStageFlags,
4647 _dst_stage_mask: PipelineStageFlags,
4648 _memory_barrier_count: u32,
4649 _p_memory_barriers: *const MemoryBarrier,
4650 _buffer_memory_barrier_count: u32,
4651 _p_buffer_memory_barriers: *const BufferMemoryBarrier,
4652 _image_memory_barrier_count: u32,
4653 _p_image_memory_barriers: *const ImageMemoryBarrier,
4654 ) -> c_void {
4655 panic!(concat!("Unable to load ", stringify!(cmd_wait_events)))
4656 }
4657 let raw_name = stringify!(vkCmdWaitEvents);
4658 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4659 let val = _f(&cname);
4660 if val.is_null() {
4661 cmd_wait_events
4662 } else {
4663 ::std::mem::transmute(val)
4664 }
4665 },
4666 cmd_pipeline_barrier: unsafe {
4667 extern "system" fn cmd_pipeline_barrier(
4668 _command_buffer: CommandBuffer,
4669 _src_stage_mask: PipelineStageFlags,
4670 _dst_stage_mask: PipelineStageFlags,
4671 _dependency_flags: DependencyFlags,
4672 _memory_barrier_count: u32,
4673 _p_memory_barriers: *const MemoryBarrier,
4674 _buffer_memory_barrier_count: u32,
4675 _p_buffer_memory_barriers: *const BufferMemoryBarrier,
4676 _image_memory_barrier_count: u32,
4677 _p_image_memory_barriers: *const ImageMemoryBarrier,
4678 ) -> c_void {
4679 panic!(concat!("Unable to load ", stringify!(cmd_pipeline_barrier)))
4680 }
4681 let raw_name = stringify!(vkCmdPipelineBarrier);
4682 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4683 let val = _f(&cname);
4684 if val.is_null() {
4685 cmd_pipeline_barrier
4686 } else {
4687 ::std::mem::transmute(val)
4688 }
4689 },
4690 cmd_begin_query: unsafe {
4691 extern "system" fn cmd_begin_query(
4692 _command_buffer: CommandBuffer,
4693 _query_pool: QueryPool,
4694 _query: u32,
4695 _flags: QueryControlFlags,
4696 ) -> c_void {
4697 panic!(concat!("Unable to load ", stringify!(cmd_begin_query)))
4698 }
4699 let raw_name = stringify!(vkCmdBeginQuery);
4700 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4701 let val = _f(&cname);
4702 if val.is_null() {
4703 cmd_begin_query
4704 } else {
4705 ::std::mem::transmute(val)
4706 }
4707 },
4708 cmd_end_query: unsafe {
4709 extern "system" fn cmd_end_query(
4710 _command_buffer: CommandBuffer,
4711 _query_pool: QueryPool,
4712 _query: u32,
4713 ) -> c_void {
4714 panic!(concat!("Unable to load ", stringify!(cmd_end_query)))
4715 }
4716 let raw_name = stringify!(vkCmdEndQuery);
4717 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4718 let val = _f(&cname);
4719 if val.is_null() {
4720 cmd_end_query
4721 } else {
4722 ::std::mem::transmute(val)
4723 }
4724 },
4725 cmd_reset_query_pool: unsafe {
4726 extern "system" fn cmd_reset_query_pool(
4727 _command_buffer: CommandBuffer,
4728 _query_pool: QueryPool,
4729 _first_query: u32,
4730 _query_count: u32,
4731 ) -> c_void {
4732 panic!(concat!("Unable to load ", stringify!(cmd_reset_query_pool)))
4733 }
4734 let raw_name = stringify!(vkCmdResetQueryPool);
4735 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4736 let val = _f(&cname);
4737 if val.is_null() {
4738 cmd_reset_query_pool
4739 } else {
4740 ::std::mem::transmute(val)
4741 }
4742 },
4743 cmd_write_timestamp: unsafe {
4744 extern "system" fn cmd_write_timestamp(
4745 _command_buffer: CommandBuffer,
4746 _pipeline_stage: PipelineStageFlags,
4747 _query_pool: QueryPool,
4748 _query: u32,
4749 ) -> c_void {
4750 panic!(concat!("Unable to load ", stringify!(cmd_write_timestamp)))
4751 }
4752 let raw_name = stringify!(vkCmdWriteTimestamp);
4753 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4754 let val = _f(&cname);
4755 if val.is_null() {
4756 cmd_write_timestamp
4757 } else {
4758 ::std::mem::transmute(val)
4759 }
4760 },
4761 cmd_copy_query_pool_results: unsafe {
4762 extern "system" fn cmd_copy_query_pool_results(
4763 _command_buffer: CommandBuffer,
4764 _query_pool: QueryPool,
4765 _first_query: u32,
4766 _query_count: u32,
4767 _dst_buffer: Buffer,
4768 _dst_offset: DeviceSize,
4769 _stride: DeviceSize,
4770 _flags: QueryResultFlags,
4771 ) -> c_void {
4772 panic!(concat!(
4773 "Unable to load ",
4774 stringify!(cmd_copy_query_pool_results)
4775 ))
4776 }
4777 let raw_name = stringify!(vkCmdCopyQueryPoolResults);
4778 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4779 let val = _f(&cname);
4780 if val.is_null() {
4781 cmd_copy_query_pool_results
4782 } else {
4783 ::std::mem::transmute(val)
4784 }
4785 },
4786 cmd_push_constants: unsafe {
4787 extern "system" fn cmd_push_constants(
4788 _command_buffer: CommandBuffer,
4789 _layout: PipelineLayout,
4790 _stage_flags: ShaderStageFlags,
4791 _offset: u32,
4792 _size: u32,
4793 _p_values: *const c_void,
4794 ) -> c_void {
4795 panic!(concat!("Unable to load ", stringify!(cmd_push_constants)))
4796 }
4797 let raw_name = stringify!(vkCmdPushConstants);
4798 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4799 let val = _f(&cname);
4800 if val.is_null() {
4801 cmd_push_constants
4802 } else {
4803 ::std::mem::transmute(val)
4804 }
4805 },
4806 cmd_begin_render_pass: unsafe {
4807 extern "system" fn cmd_begin_render_pass(
4808 _command_buffer: CommandBuffer,
4809 _p_render_pass_begin: *const RenderPassBeginInfo,
4810 _contents: SubpassContents,
4811 ) -> c_void {
4812 panic!(concat!(
4813 "Unable to load ",
4814 stringify!(cmd_begin_render_pass)
4815 ))
4816 }
4817 let raw_name = stringify!(vkCmdBeginRenderPass);
4818 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4819 let val = _f(&cname);
4820 if val.is_null() {
4821 cmd_begin_render_pass
4822 } else {
4823 ::std::mem::transmute(val)
4824 }
4825 },
4826 cmd_next_subpass: unsafe {
4827 extern "system" fn cmd_next_subpass(
4828 _command_buffer: CommandBuffer,
4829 _contents: SubpassContents,
4830 ) -> c_void {
4831 panic!(concat!("Unable to load ", stringify!(cmd_next_subpass)))
4832 }
4833 let raw_name = stringify!(vkCmdNextSubpass);
4834 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4835 let val = _f(&cname);
4836 if val.is_null() {
4837 cmd_next_subpass
4838 } else {
4839 ::std::mem::transmute(val)
4840 }
4841 },
4842 cmd_end_render_pass: unsafe {
4843 extern "system" fn cmd_end_render_pass(_command_buffer: CommandBuffer) -> c_void {
4844 panic!(concat!("Unable to load ", stringify!(cmd_end_render_pass)))
4845 }
4846 let raw_name = stringify!(vkCmdEndRenderPass);
4847 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4848 let val = _f(&cname);
4849 if val.is_null() {
4850 cmd_end_render_pass
4851 } else {
4852 ::std::mem::transmute(val)
4853 }
4854 },
4855 cmd_execute_commands: unsafe {
4856 extern "system" fn cmd_execute_commands(
4857 _command_buffer: CommandBuffer,
4858 _command_buffer_count: u32,
4859 _p_command_buffers: *const CommandBuffer,
4860 ) -> c_void {
4861 panic!(concat!("Unable to load ", stringify!(cmd_execute_commands)))
4862 }
4863 let raw_name = stringify!(vkCmdExecuteCommands);
4864 let cname = ::std::ffi::CString::new(raw_name).unwrap();
4865 let val = _f(&cname);
4866 if val.is_null() {
4867 cmd_execute_commands
4868 } else {
4869 ::std::mem::transmute(val)
4870 }
4871 },
4872 }
4873 }
4874 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyDevice.html>"]
destroy_device( &self, device: Device, p_allocator: *const AllocationCallbacks, ) -> c_void4875 pub unsafe fn destroy_device(
4876 &self,
4877 device: Device,
4878 p_allocator: *const AllocationCallbacks,
4879 ) -> c_void {
4880 (self.destroy_device)(device, p_allocator)
4881 }
4882 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceQueue.html>"]
get_device_queue( &self, device: Device, queue_family_index: u32, queue_index: u32, p_queue: *mut Queue, ) -> c_void4883 pub unsafe fn get_device_queue(
4884 &self,
4885 device: Device,
4886 queue_family_index: u32,
4887 queue_index: u32,
4888 p_queue: *mut Queue,
4889 ) -> c_void {
4890 (self.get_device_queue)(device, queue_family_index, queue_index, p_queue)
4891 }
4892 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkQueueSubmit.html>"]
queue_submit( &self, queue: Queue, submit_count: u32, p_submits: *const SubmitInfo, fence: Fence, ) -> Result4893 pub unsafe fn queue_submit(
4894 &self,
4895 queue: Queue,
4896 submit_count: u32,
4897 p_submits: *const SubmitInfo,
4898 fence: Fence,
4899 ) -> Result {
4900 (self.queue_submit)(queue, submit_count, p_submits, fence)
4901 }
4902 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkQueueWaitIdle.html>"]
queue_wait_idle(&self, queue: Queue) -> Result4903 pub unsafe fn queue_wait_idle(&self, queue: Queue) -> Result {
4904 (self.queue_wait_idle)(queue)
4905 }
4906 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDeviceWaitIdle.html>"]
device_wait_idle(&self, device: Device) -> Result4907 pub unsafe fn device_wait_idle(&self, device: Device) -> Result {
4908 (self.device_wait_idle)(device)
4909 }
4910 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkAllocateMemory.html>"]
allocate_memory( &self, device: Device, p_allocate_info: *const MemoryAllocateInfo, p_allocator: *const AllocationCallbacks, p_memory: *mut DeviceMemory, ) -> Result4911 pub unsafe fn allocate_memory(
4912 &self,
4913 device: Device,
4914 p_allocate_info: *const MemoryAllocateInfo,
4915 p_allocator: *const AllocationCallbacks,
4916 p_memory: *mut DeviceMemory,
4917 ) -> Result {
4918 (self.allocate_memory)(device, p_allocate_info, p_allocator, p_memory)
4919 }
4920 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkFreeMemory.html>"]
free_memory( &self, device: Device, memory: DeviceMemory, p_allocator: *const AllocationCallbacks, ) -> c_void4921 pub unsafe fn free_memory(
4922 &self,
4923 device: Device,
4924 memory: DeviceMemory,
4925 p_allocator: *const AllocationCallbacks,
4926 ) -> c_void {
4927 (self.free_memory)(device, memory, p_allocator)
4928 }
4929 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkMapMemory.html>"]
map_memory( &self, device: Device, memory: DeviceMemory, offset: DeviceSize, size: DeviceSize, flags: MemoryMapFlags, pp_data: *mut *mut c_void, ) -> Result4930 pub unsafe fn map_memory(
4931 &self,
4932 device: Device,
4933 memory: DeviceMemory,
4934 offset: DeviceSize,
4935 size: DeviceSize,
4936 flags: MemoryMapFlags,
4937 pp_data: *mut *mut c_void,
4938 ) -> Result {
4939 (self.map_memory)(device, memory, offset, size, flags, pp_data)
4940 }
4941 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkUnmapMemory.html>"]
unmap_memory(&self, device: Device, memory: DeviceMemory) -> c_void4942 pub unsafe fn unmap_memory(&self, device: Device, memory: DeviceMemory) -> c_void {
4943 (self.unmap_memory)(device, memory)
4944 }
4945 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkFlushMappedMemoryRanges.html>"]
flush_mapped_memory_ranges( &self, device: Device, memory_range_count: u32, p_memory_ranges: *const MappedMemoryRange, ) -> Result4946 pub unsafe fn flush_mapped_memory_ranges(
4947 &self,
4948 device: Device,
4949 memory_range_count: u32,
4950 p_memory_ranges: *const MappedMemoryRange,
4951 ) -> Result {
4952 (self.flush_mapped_memory_ranges)(device, memory_range_count, p_memory_ranges)
4953 }
4954 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkInvalidateMappedMemoryRanges.html>"]
invalidate_mapped_memory_ranges( &self, device: Device, memory_range_count: u32, p_memory_ranges: *const MappedMemoryRange, ) -> Result4955 pub unsafe fn invalidate_mapped_memory_ranges(
4956 &self,
4957 device: Device,
4958 memory_range_count: u32,
4959 p_memory_ranges: *const MappedMemoryRange,
4960 ) -> Result {
4961 (self.invalidate_mapped_memory_ranges)(device, memory_range_count, p_memory_ranges)
4962 }
4963 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceMemoryCommitment.html>"]
get_device_memory_commitment( &self, device: Device, memory: DeviceMemory, p_committed_memory_in_bytes: *mut DeviceSize, ) -> c_void4964 pub unsafe fn get_device_memory_commitment(
4965 &self,
4966 device: Device,
4967 memory: DeviceMemory,
4968 p_committed_memory_in_bytes: *mut DeviceSize,
4969 ) -> c_void {
4970 (self.get_device_memory_commitment)(device, memory, p_committed_memory_in_bytes)
4971 }
4972 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBindBufferMemory.html>"]
bind_buffer_memory( &self, device: Device, buffer: Buffer, memory: DeviceMemory, memory_offset: DeviceSize, ) -> Result4973 pub unsafe fn bind_buffer_memory(
4974 &self,
4975 device: Device,
4976 buffer: Buffer,
4977 memory: DeviceMemory,
4978 memory_offset: DeviceSize,
4979 ) -> Result {
4980 (self.bind_buffer_memory)(device, buffer, memory, memory_offset)
4981 }
4982 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBindImageMemory.html>"]
bind_image_memory( &self, device: Device, image: Image, memory: DeviceMemory, memory_offset: DeviceSize, ) -> Result4983 pub unsafe fn bind_image_memory(
4984 &self,
4985 device: Device,
4986 image: Image,
4987 memory: DeviceMemory,
4988 memory_offset: DeviceSize,
4989 ) -> Result {
4990 (self.bind_image_memory)(device, image, memory, memory_offset)
4991 }
4992 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetBufferMemoryRequirements.html>"]
get_buffer_memory_requirements( &self, device: Device, buffer: Buffer, p_memory_requirements: *mut MemoryRequirements, ) -> c_void4993 pub unsafe fn get_buffer_memory_requirements(
4994 &self,
4995 device: Device,
4996 buffer: Buffer,
4997 p_memory_requirements: *mut MemoryRequirements,
4998 ) -> c_void {
4999 (self.get_buffer_memory_requirements)(device, buffer, p_memory_requirements)
5000 }
5001 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetImageMemoryRequirements.html>"]
get_image_memory_requirements( &self, device: Device, image: Image, p_memory_requirements: *mut MemoryRequirements, ) -> c_void5002 pub unsafe fn get_image_memory_requirements(
5003 &self,
5004 device: Device,
5005 image: Image,
5006 p_memory_requirements: *mut MemoryRequirements,
5007 ) -> c_void {
5008 (self.get_image_memory_requirements)(device, image, p_memory_requirements)
5009 }
5010 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetImageSparseMemoryRequirements.html>"]
get_image_sparse_memory_requirements( &self, device: Device, image: Image, p_sparse_memory_requirement_count: *mut u32, p_sparse_memory_requirements: *mut SparseImageMemoryRequirements, ) -> c_void5011 pub unsafe fn get_image_sparse_memory_requirements(
5012 &self,
5013 device: Device,
5014 image: Image,
5015 p_sparse_memory_requirement_count: *mut u32,
5016 p_sparse_memory_requirements: *mut SparseImageMemoryRequirements,
5017 ) -> c_void {
5018 (self.get_image_sparse_memory_requirements)(
5019 device,
5020 image,
5021 p_sparse_memory_requirement_count,
5022 p_sparse_memory_requirements,
5023 )
5024 }
5025 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkQueueBindSparse.html>"]
queue_bind_sparse( &self, queue: Queue, bind_info_count: u32, p_bind_info: *const BindSparseInfo, fence: Fence, ) -> Result5026 pub unsafe fn queue_bind_sparse(
5027 &self,
5028 queue: Queue,
5029 bind_info_count: u32,
5030 p_bind_info: *const BindSparseInfo,
5031 fence: Fence,
5032 ) -> Result {
5033 (self.queue_bind_sparse)(queue, bind_info_count, p_bind_info, fence)
5034 }
5035 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateFence.html>"]
create_fence( &self, device: Device, p_create_info: *const FenceCreateInfo, p_allocator: *const AllocationCallbacks, p_fence: *mut Fence, ) -> Result5036 pub unsafe fn create_fence(
5037 &self,
5038 device: Device,
5039 p_create_info: *const FenceCreateInfo,
5040 p_allocator: *const AllocationCallbacks,
5041 p_fence: *mut Fence,
5042 ) -> Result {
5043 (self.create_fence)(device, p_create_info, p_allocator, p_fence)
5044 }
5045 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyFence.html>"]
destroy_fence( &self, device: Device, fence: Fence, p_allocator: *const AllocationCallbacks, ) -> c_void5046 pub unsafe fn destroy_fence(
5047 &self,
5048 device: Device,
5049 fence: Fence,
5050 p_allocator: *const AllocationCallbacks,
5051 ) -> c_void {
5052 (self.destroy_fence)(device, fence, p_allocator)
5053 }
5054 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkResetFences.html>"]
reset_fences( &self, device: Device, fence_count: u32, p_fences: *const Fence, ) -> Result5055 pub unsafe fn reset_fences(
5056 &self,
5057 device: Device,
5058 fence_count: u32,
5059 p_fences: *const Fence,
5060 ) -> Result {
5061 (self.reset_fences)(device, fence_count, p_fences)
5062 }
5063 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetFenceStatus.html>"]
get_fence_status(&self, device: Device, fence: Fence) -> Result5064 pub unsafe fn get_fence_status(&self, device: Device, fence: Fence) -> Result {
5065 (self.get_fence_status)(device, fence)
5066 }
5067 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkWaitForFences.html>"]
wait_for_fences( &self, device: Device, fence_count: u32, p_fences: *const Fence, wait_all: Bool32, timeout: u64, ) -> Result5068 pub unsafe fn wait_for_fences(
5069 &self,
5070 device: Device,
5071 fence_count: u32,
5072 p_fences: *const Fence,
5073 wait_all: Bool32,
5074 timeout: u64,
5075 ) -> Result {
5076 (self.wait_for_fences)(device, fence_count, p_fences, wait_all, timeout)
5077 }
5078 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateSemaphore.html>"]
create_semaphore( &self, device: Device, p_create_info: *const SemaphoreCreateInfo, p_allocator: *const AllocationCallbacks, p_semaphore: *mut Semaphore, ) -> Result5079 pub unsafe fn create_semaphore(
5080 &self,
5081 device: Device,
5082 p_create_info: *const SemaphoreCreateInfo,
5083 p_allocator: *const AllocationCallbacks,
5084 p_semaphore: *mut Semaphore,
5085 ) -> Result {
5086 (self.create_semaphore)(device, p_create_info, p_allocator, p_semaphore)
5087 }
5088 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroySemaphore.html>"]
destroy_semaphore( &self, device: Device, semaphore: Semaphore, p_allocator: *const AllocationCallbacks, ) -> c_void5089 pub unsafe fn destroy_semaphore(
5090 &self,
5091 device: Device,
5092 semaphore: Semaphore,
5093 p_allocator: *const AllocationCallbacks,
5094 ) -> c_void {
5095 (self.destroy_semaphore)(device, semaphore, p_allocator)
5096 }
5097 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateEvent.html>"]
create_event( &self, device: Device, p_create_info: *const EventCreateInfo, p_allocator: *const AllocationCallbacks, p_event: *mut Event, ) -> Result5098 pub unsafe fn create_event(
5099 &self,
5100 device: Device,
5101 p_create_info: *const EventCreateInfo,
5102 p_allocator: *const AllocationCallbacks,
5103 p_event: *mut Event,
5104 ) -> Result {
5105 (self.create_event)(device, p_create_info, p_allocator, p_event)
5106 }
5107 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyEvent.html>"]
destroy_event( &self, device: Device, event: Event, p_allocator: *const AllocationCallbacks, ) -> c_void5108 pub unsafe fn destroy_event(
5109 &self,
5110 device: Device,
5111 event: Event,
5112 p_allocator: *const AllocationCallbacks,
5113 ) -> c_void {
5114 (self.destroy_event)(device, event, p_allocator)
5115 }
5116 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetEventStatus.html>"]
get_event_status(&self, device: Device, event: Event) -> Result5117 pub unsafe fn get_event_status(&self, device: Device, event: Event) -> Result {
5118 (self.get_event_status)(device, event)
5119 }
5120 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkSetEvent.html>"]
set_event(&self, device: Device, event: Event) -> Result5121 pub unsafe fn set_event(&self, device: Device, event: Event) -> Result {
5122 (self.set_event)(device, event)
5123 }
5124 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkResetEvent.html>"]
reset_event(&self, device: Device, event: Event) -> Result5125 pub unsafe fn reset_event(&self, device: Device, event: Event) -> Result {
5126 (self.reset_event)(device, event)
5127 }
5128 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateQueryPool.html>"]
create_query_pool( &self, device: Device, p_create_info: *const QueryPoolCreateInfo, p_allocator: *const AllocationCallbacks, p_query_pool: *mut QueryPool, ) -> Result5129 pub unsafe fn create_query_pool(
5130 &self,
5131 device: Device,
5132 p_create_info: *const QueryPoolCreateInfo,
5133 p_allocator: *const AllocationCallbacks,
5134 p_query_pool: *mut QueryPool,
5135 ) -> Result {
5136 (self.create_query_pool)(device, p_create_info, p_allocator, p_query_pool)
5137 }
5138 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyQueryPool.html>"]
destroy_query_pool( &self, device: Device, query_pool: QueryPool, p_allocator: *const AllocationCallbacks, ) -> c_void5139 pub unsafe fn destroy_query_pool(
5140 &self,
5141 device: Device,
5142 query_pool: QueryPool,
5143 p_allocator: *const AllocationCallbacks,
5144 ) -> c_void {
5145 (self.destroy_query_pool)(device, query_pool, p_allocator)
5146 }
5147 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetQueryPoolResults.html>"]
get_query_pool_results( &self, device: Device, query_pool: QueryPool, first_query: u32, query_count: u32, data_size: usize, p_data: *mut c_void, stride: DeviceSize, flags: QueryResultFlags, ) -> Result5148 pub unsafe fn get_query_pool_results(
5149 &self,
5150 device: Device,
5151 query_pool: QueryPool,
5152 first_query: u32,
5153 query_count: u32,
5154 data_size: usize,
5155 p_data: *mut c_void,
5156 stride: DeviceSize,
5157 flags: QueryResultFlags,
5158 ) -> Result {
5159 (self.get_query_pool_results)(
5160 device,
5161 query_pool,
5162 first_query,
5163 query_count,
5164 data_size,
5165 p_data,
5166 stride,
5167 flags,
5168 )
5169 }
5170 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateBuffer.html>"]
create_buffer( &self, device: Device, p_create_info: *const BufferCreateInfo, p_allocator: *const AllocationCallbacks, p_buffer: *mut Buffer, ) -> Result5171 pub unsafe fn create_buffer(
5172 &self,
5173 device: Device,
5174 p_create_info: *const BufferCreateInfo,
5175 p_allocator: *const AllocationCallbacks,
5176 p_buffer: *mut Buffer,
5177 ) -> Result {
5178 (self.create_buffer)(device, p_create_info, p_allocator, p_buffer)
5179 }
5180 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyBuffer.html>"]
destroy_buffer( &self, device: Device, buffer: Buffer, p_allocator: *const AllocationCallbacks, ) -> c_void5181 pub unsafe fn destroy_buffer(
5182 &self,
5183 device: Device,
5184 buffer: Buffer,
5185 p_allocator: *const AllocationCallbacks,
5186 ) -> c_void {
5187 (self.destroy_buffer)(device, buffer, p_allocator)
5188 }
5189 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateBufferView.html>"]
create_buffer_view( &self, device: Device, p_create_info: *const BufferViewCreateInfo, p_allocator: *const AllocationCallbacks, p_view: *mut BufferView, ) -> Result5190 pub unsafe fn create_buffer_view(
5191 &self,
5192 device: Device,
5193 p_create_info: *const BufferViewCreateInfo,
5194 p_allocator: *const AllocationCallbacks,
5195 p_view: *mut BufferView,
5196 ) -> Result {
5197 (self.create_buffer_view)(device, p_create_info, p_allocator, p_view)
5198 }
5199 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyBufferView.html>"]
destroy_buffer_view( &self, device: Device, buffer_view: BufferView, p_allocator: *const AllocationCallbacks, ) -> c_void5200 pub unsafe fn destroy_buffer_view(
5201 &self,
5202 device: Device,
5203 buffer_view: BufferView,
5204 p_allocator: *const AllocationCallbacks,
5205 ) -> c_void {
5206 (self.destroy_buffer_view)(device, buffer_view, p_allocator)
5207 }
5208 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateImage.html>"]
create_image( &self, device: Device, p_create_info: *const ImageCreateInfo, p_allocator: *const AllocationCallbacks, p_image: *mut Image, ) -> Result5209 pub unsafe fn create_image(
5210 &self,
5211 device: Device,
5212 p_create_info: *const ImageCreateInfo,
5213 p_allocator: *const AllocationCallbacks,
5214 p_image: *mut Image,
5215 ) -> Result {
5216 (self.create_image)(device, p_create_info, p_allocator, p_image)
5217 }
5218 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyImage.html>"]
destroy_image( &self, device: Device, image: Image, p_allocator: *const AllocationCallbacks, ) -> c_void5219 pub unsafe fn destroy_image(
5220 &self,
5221 device: Device,
5222 image: Image,
5223 p_allocator: *const AllocationCallbacks,
5224 ) -> c_void {
5225 (self.destroy_image)(device, image, p_allocator)
5226 }
5227 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetImageSubresourceLayout.html>"]
get_image_subresource_layout( &self, device: Device, image: Image, p_subresource: *const ImageSubresource, p_layout: *mut SubresourceLayout, ) -> c_void5228 pub unsafe fn get_image_subresource_layout(
5229 &self,
5230 device: Device,
5231 image: Image,
5232 p_subresource: *const ImageSubresource,
5233 p_layout: *mut SubresourceLayout,
5234 ) -> c_void {
5235 (self.get_image_subresource_layout)(device, image, p_subresource, p_layout)
5236 }
5237 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateImageView.html>"]
create_image_view( &self, device: Device, p_create_info: *const ImageViewCreateInfo, p_allocator: *const AllocationCallbacks, p_view: *mut ImageView, ) -> Result5238 pub unsafe fn create_image_view(
5239 &self,
5240 device: Device,
5241 p_create_info: *const ImageViewCreateInfo,
5242 p_allocator: *const AllocationCallbacks,
5243 p_view: *mut ImageView,
5244 ) -> Result {
5245 (self.create_image_view)(device, p_create_info, p_allocator, p_view)
5246 }
5247 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyImageView.html>"]
destroy_image_view( &self, device: Device, image_view: ImageView, p_allocator: *const AllocationCallbacks, ) -> c_void5248 pub unsafe fn destroy_image_view(
5249 &self,
5250 device: Device,
5251 image_view: ImageView,
5252 p_allocator: *const AllocationCallbacks,
5253 ) -> c_void {
5254 (self.destroy_image_view)(device, image_view, p_allocator)
5255 }
5256 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateShaderModule.html>"]
create_shader_module( &self, device: Device, p_create_info: *const ShaderModuleCreateInfo, p_allocator: *const AllocationCallbacks, p_shader_module: *mut ShaderModule, ) -> Result5257 pub unsafe fn create_shader_module(
5258 &self,
5259 device: Device,
5260 p_create_info: *const ShaderModuleCreateInfo,
5261 p_allocator: *const AllocationCallbacks,
5262 p_shader_module: *mut ShaderModule,
5263 ) -> Result {
5264 (self.create_shader_module)(device, p_create_info, p_allocator, p_shader_module)
5265 }
5266 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyShaderModule.html>"]
destroy_shader_module( &self, device: Device, shader_module: ShaderModule, p_allocator: *const AllocationCallbacks, ) -> c_void5267 pub unsafe fn destroy_shader_module(
5268 &self,
5269 device: Device,
5270 shader_module: ShaderModule,
5271 p_allocator: *const AllocationCallbacks,
5272 ) -> c_void {
5273 (self.destroy_shader_module)(device, shader_module, p_allocator)
5274 }
5275 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreatePipelineCache.html>"]
create_pipeline_cache( &self, device: Device, p_create_info: *const PipelineCacheCreateInfo, p_allocator: *const AllocationCallbacks, p_pipeline_cache: *mut PipelineCache, ) -> Result5276 pub unsafe fn create_pipeline_cache(
5277 &self,
5278 device: Device,
5279 p_create_info: *const PipelineCacheCreateInfo,
5280 p_allocator: *const AllocationCallbacks,
5281 p_pipeline_cache: *mut PipelineCache,
5282 ) -> Result {
5283 (self.create_pipeline_cache)(device, p_create_info, p_allocator, p_pipeline_cache)
5284 }
5285 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyPipelineCache.html>"]
destroy_pipeline_cache( &self, device: Device, pipeline_cache: PipelineCache, p_allocator: *const AllocationCallbacks, ) -> c_void5286 pub unsafe fn destroy_pipeline_cache(
5287 &self,
5288 device: Device,
5289 pipeline_cache: PipelineCache,
5290 p_allocator: *const AllocationCallbacks,
5291 ) -> c_void {
5292 (self.destroy_pipeline_cache)(device, pipeline_cache, p_allocator)
5293 }
5294 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPipelineCacheData.html>"]
get_pipeline_cache_data( &self, device: Device, pipeline_cache: PipelineCache, p_data_size: *mut usize, p_data: *mut c_void, ) -> Result5295 pub unsafe fn get_pipeline_cache_data(
5296 &self,
5297 device: Device,
5298 pipeline_cache: PipelineCache,
5299 p_data_size: *mut usize,
5300 p_data: *mut c_void,
5301 ) -> Result {
5302 (self.get_pipeline_cache_data)(device, pipeline_cache, p_data_size, p_data)
5303 }
5304 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkMergePipelineCaches.html>"]
merge_pipeline_caches( &self, device: Device, dst_cache: PipelineCache, src_cache_count: u32, p_src_caches: *const PipelineCache, ) -> Result5305 pub unsafe fn merge_pipeline_caches(
5306 &self,
5307 device: Device,
5308 dst_cache: PipelineCache,
5309 src_cache_count: u32,
5310 p_src_caches: *const PipelineCache,
5311 ) -> Result {
5312 (self.merge_pipeline_caches)(device, dst_cache, src_cache_count, p_src_caches)
5313 }
5314 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateGraphicsPipelines.html>"]
create_graphics_pipelines( &self, device: Device, pipeline_cache: PipelineCache, create_info_count: u32, p_create_infos: *const GraphicsPipelineCreateInfo, p_allocator: *const AllocationCallbacks, p_pipelines: *mut Pipeline, ) -> Result5315 pub unsafe fn create_graphics_pipelines(
5316 &self,
5317 device: Device,
5318 pipeline_cache: PipelineCache,
5319 create_info_count: u32,
5320 p_create_infos: *const GraphicsPipelineCreateInfo,
5321 p_allocator: *const AllocationCallbacks,
5322 p_pipelines: *mut Pipeline,
5323 ) -> Result {
5324 (self.create_graphics_pipelines)(
5325 device,
5326 pipeline_cache,
5327 create_info_count,
5328 p_create_infos,
5329 p_allocator,
5330 p_pipelines,
5331 )
5332 }
5333 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateComputePipelines.html>"]
create_compute_pipelines( &self, device: Device, pipeline_cache: PipelineCache, create_info_count: u32, p_create_infos: *const ComputePipelineCreateInfo, p_allocator: *const AllocationCallbacks, p_pipelines: *mut Pipeline, ) -> Result5334 pub unsafe fn create_compute_pipelines(
5335 &self,
5336 device: Device,
5337 pipeline_cache: PipelineCache,
5338 create_info_count: u32,
5339 p_create_infos: *const ComputePipelineCreateInfo,
5340 p_allocator: *const AllocationCallbacks,
5341 p_pipelines: *mut Pipeline,
5342 ) -> Result {
5343 (self.create_compute_pipelines)(
5344 device,
5345 pipeline_cache,
5346 create_info_count,
5347 p_create_infos,
5348 p_allocator,
5349 p_pipelines,
5350 )
5351 }
5352 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyPipeline.html>"]
destroy_pipeline( &self, device: Device, pipeline: Pipeline, p_allocator: *const AllocationCallbacks, ) -> c_void5353 pub unsafe fn destroy_pipeline(
5354 &self,
5355 device: Device,
5356 pipeline: Pipeline,
5357 p_allocator: *const AllocationCallbacks,
5358 ) -> c_void {
5359 (self.destroy_pipeline)(device, pipeline, p_allocator)
5360 }
5361 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreatePipelineLayout.html>"]
create_pipeline_layout( &self, device: Device, p_create_info: *const PipelineLayoutCreateInfo, p_allocator: *const AllocationCallbacks, p_pipeline_layout: *mut PipelineLayout, ) -> Result5362 pub unsafe fn create_pipeline_layout(
5363 &self,
5364 device: Device,
5365 p_create_info: *const PipelineLayoutCreateInfo,
5366 p_allocator: *const AllocationCallbacks,
5367 p_pipeline_layout: *mut PipelineLayout,
5368 ) -> Result {
5369 (self.create_pipeline_layout)(device, p_create_info, p_allocator, p_pipeline_layout)
5370 }
5371 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyPipelineLayout.html>"]
destroy_pipeline_layout( &self, device: Device, pipeline_layout: PipelineLayout, p_allocator: *const AllocationCallbacks, ) -> c_void5372 pub unsafe fn destroy_pipeline_layout(
5373 &self,
5374 device: Device,
5375 pipeline_layout: PipelineLayout,
5376 p_allocator: *const AllocationCallbacks,
5377 ) -> c_void {
5378 (self.destroy_pipeline_layout)(device, pipeline_layout, p_allocator)
5379 }
5380 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateSampler.html>"]
create_sampler( &self, device: Device, p_create_info: *const SamplerCreateInfo, p_allocator: *const AllocationCallbacks, p_sampler: *mut Sampler, ) -> Result5381 pub unsafe fn create_sampler(
5382 &self,
5383 device: Device,
5384 p_create_info: *const SamplerCreateInfo,
5385 p_allocator: *const AllocationCallbacks,
5386 p_sampler: *mut Sampler,
5387 ) -> Result {
5388 (self.create_sampler)(device, p_create_info, p_allocator, p_sampler)
5389 }
5390 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroySampler.html>"]
destroy_sampler( &self, device: Device, sampler: Sampler, p_allocator: *const AllocationCallbacks, ) -> c_void5391 pub unsafe fn destroy_sampler(
5392 &self,
5393 device: Device,
5394 sampler: Sampler,
5395 p_allocator: *const AllocationCallbacks,
5396 ) -> c_void {
5397 (self.destroy_sampler)(device, sampler, p_allocator)
5398 }
5399 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDescriptorSetLayout.html>"]
create_descriptor_set_layout( &self, device: Device, p_create_info: *const DescriptorSetLayoutCreateInfo, p_allocator: *const AllocationCallbacks, p_set_layout: *mut DescriptorSetLayout, ) -> Result5400 pub unsafe fn create_descriptor_set_layout(
5401 &self,
5402 device: Device,
5403 p_create_info: *const DescriptorSetLayoutCreateInfo,
5404 p_allocator: *const AllocationCallbacks,
5405 p_set_layout: *mut DescriptorSetLayout,
5406 ) -> Result {
5407 (self.create_descriptor_set_layout)(device, p_create_info, p_allocator, p_set_layout)
5408 }
5409 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyDescriptorSetLayout.html>"]
destroy_descriptor_set_layout( &self, device: Device, descriptor_set_layout: DescriptorSetLayout, p_allocator: *const AllocationCallbacks, ) -> c_void5410 pub unsafe fn destroy_descriptor_set_layout(
5411 &self,
5412 device: Device,
5413 descriptor_set_layout: DescriptorSetLayout,
5414 p_allocator: *const AllocationCallbacks,
5415 ) -> c_void {
5416 (self.destroy_descriptor_set_layout)(device, descriptor_set_layout, p_allocator)
5417 }
5418 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDescriptorPool.html>"]
create_descriptor_pool( &self, device: Device, p_create_info: *const DescriptorPoolCreateInfo, p_allocator: *const AllocationCallbacks, p_descriptor_pool: *mut DescriptorPool, ) -> Result5419 pub unsafe fn create_descriptor_pool(
5420 &self,
5421 device: Device,
5422 p_create_info: *const DescriptorPoolCreateInfo,
5423 p_allocator: *const AllocationCallbacks,
5424 p_descriptor_pool: *mut DescriptorPool,
5425 ) -> Result {
5426 (self.create_descriptor_pool)(device, p_create_info, p_allocator, p_descriptor_pool)
5427 }
5428 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyDescriptorPool.html>"]
destroy_descriptor_pool( &self, device: Device, descriptor_pool: DescriptorPool, p_allocator: *const AllocationCallbacks, ) -> c_void5429 pub unsafe fn destroy_descriptor_pool(
5430 &self,
5431 device: Device,
5432 descriptor_pool: DescriptorPool,
5433 p_allocator: *const AllocationCallbacks,
5434 ) -> c_void {
5435 (self.destroy_descriptor_pool)(device, descriptor_pool, p_allocator)
5436 }
5437 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkResetDescriptorPool.html>"]
reset_descriptor_pool( &self, device: Device, descriptor_pool: DescriptorPool, flags: DescriptorPoolResetFlags, ) -> Result5438 pub unsafe fn reset_descriptor_pool(
5439 &self,
5440 device: Device,
5441 descriptor_pool: DescriptorPool,
5442 flags: DescriptorPoolResetFlags,
5443 ) -> Result {
5444 (self.reset_descriptor_pool)(device, descriptor_pool, flags)
5445 }
5446 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkAllocateDescriptorSets.html>"]
allocate_descriptor_sets( &self, device: Device, p_allocate_info: *const DescriptorSetAllocateInfo, p_descriptor_sets: *mut DescriptorSet, ) -> Result5447 pub unsafe fn allocate_descriptor_sets(
5448 &self,
5449 device: Device,
5450 p_allocate_info: *const DescriptorSetAllocateInfo,
5451 p_descriptor_sets: *mut DescriptorSet,
5452 ) -> Result {
5453 (self.allocate_descriptor_sets)(device, p_allocate_info, p_descriptor_sets)
5454 }
5455 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkFreeDescriptorSets.html>"]
free_descriptor_sets( &self, device: Device, descriptor_pool: DescriptorPool, descriptor_set_count: u32, p_descriptor_sets: *const DescriptorSet, ) -> Result5456 pub unsafe fn free_descriptor_sets(
5457 &self,
5458 device: Device,
5459 descriptor_pool: DescriptorPool,
5460 descriptor_set_count: u32,
5461 p_descriptor_sets: *const DescriptorSet,
5462 ) -> Result {
5463 (self.free_descriptor_sets)(
5464 device,
5465 descriptor_pool,
5466 descriptor_set_count,
5467 p_descriptor_sets,
5468 )
5469 }
5470 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkUpdateDescriptorSets.html>"]
update_descriptor_sets( &self, device: Device, descriptor_write_count: u32, p_descriptor_writes: *const WriteDescriptorSet, descriptor_copy_count: u32, p_descriptor_copies: *const CopyDescriptorSet, ) -> c_void5471 pub unsafe fn update_descriptor_sets(
5472 &self,
5473 device: Device,
5474 descriptor_write_count: u32,
5475 p_descriptor_writes: *const WriteDescriptorSet,
5476 descriptor_copy_count: u32,
5477 p_descriptor_copies: *const CopyDescriptorSet,
5478 ) -> c_void {
5479 (self.update_descriptor_sets)(
5480 device,
5481 descriptor_write_count,
5482 p_descriptor_writes,
5483 descriptor_copy_count,
5484 p_descriptor_copies,
5485 )
5486 }
5487 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateFramebuffer.html>"]
create_framebuffer( &self, device: Device, p_create_info: *const FramebufferCreateInfo, p_allocator: *const AllocationCallbacks, p_framebuffer: *mut Framebuffer, ) -> Result5488 pub unsafe fn create_framebuffer(
5489 &self,
5490 device: Device,
5491 p_create_info: *const FramebufferCreateInfo,
5492 p_allocator: *const AllocationCallbacks,
5493 p_framebuffer: *mut Framebuffer,
5494 ) -> Result {
5495 (self.create_framebuffer)(device, p_create_info, p_allocator, p_framebuffer)
5496 }
5497 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyFramebuffer.html>"]
destroy_framebuffer( &self, device: Device, framebuffer: Framebuffer, p_allocator: *const AllocationCallbacks, ) -> c_void5498 pub unsafe fn destroy_framebuffer(
5499 &self,
5500 device: Device,
5501 framebuffer: Framebuffer,
5502 p_allocator: *const AllocationCallbacks,
5503 ) -> c_void {
5504 (self.destroy_framebuffer)(device, framebuffer, p_allocator)
5505 }
5506 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateRenderPass.html>"]
create_render_pass( &self, device: Device, p_create_info: *const RenderPassCreateInfo, p_allocator: *const AllocationCallbacks, p_render_pass: *mut RenderPass, ) -> Result5507 pub unsafe fn create_render_pass(
5508 &self,
5509 device: Device,
5510 p_create_info: *const RenderPassCreateInfo,
5511 p_allocator: *const AllocationCallbacks,
5512 p_render_pass: *mut RenderPass,
5513 ) -> Result {
5514 (self.create_render_pass)(device, p_create_info, p_allocator, p_render_pass)
5515 }
5516 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyRenderPass.html>"]
destroy_render_pass( &self, device: Device, render_pass: RenderPass, p_allocator: *const AllocationCallbacks, ) -> c_void5517 pub unsafe fn destroy_render_pass(
5518 &self,
5519 device: Device,
5520 render_pass: RenderPass,
5521 p_allocator: *const AllocationCallbacks,
5522 ) -> c_void {
5523 (self.destroy_render_pass)(device, render_pass, p_allocator)
5524 }
5525 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetRenderAreaGranularity.html>"]
get_render_area_granularity( &self, device: Device, render_pass: RenderPass, p_granularity: *mut Extent2D, ) -> c_void5526 pub unsafe fn get_render_area_granularity(
5527 &self,
5528 device: Device,
5529 render_pass: RenderPass,
5530 p_granularity: *mut Extent2D,
5531 ) -> c_void {
5532 (self.get_render_area_granularity)(device, render_pass, p_granularity)
5533 }
5534 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateCommandPool.html>"]
create_command_pool( &self, device: Device, p_create_info: *const CommandPoolCreateInfo, p_allocator: *const AllocationCallbacks, p_command_pool: *mut CommandPool, ) -> Result5535 pub unsafe fn create_command_pool(
5536 &self,
5537 device: Device,
5538 p_create_info: *const CommandPoolCreateInfo,
5539 p_allocator: *const AllocationCallbacks,
5540 p_command_pool: *mut CommandPool,
5541 ) -> Result {
5542 (self.create_command_pool)(device, p_create_info, p_allocator, p_command_pool)
5543 }
5544 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyCommandPool.html>"]
destroy_command_pool( &self, device: Device, command_pool: CommandPool, p_allocator: *const AllocationCallbacks, ) -> c_void5545 pub unsafe fn destroy_command_pool(
5546 &self,
5547 device: Device,
5548 command_pool: CommandPool,
5549 p_allocator: *const AllocationCallbacks,
5550 ) -> c_void {
5551 (self.destroy_command_pool)(device, command_pool, p_allocator)
5552 }
5553 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkResetCommandPool.html>"]
reset_command_pool( &self, device: Device, command_pool: CommandPool, flags: CommandPoolResetFlags, ) -> Result5554 pub unsafe fn reset_command_pool(
5555 &self,
5556 device: Device,
5557 command_pool: CommandPool,
5558 flags: CommandPoolResetFlags,
5559 ) -> Result {
5560 (self.reset_command_pool)(device, command_pool, flags)
5561 }
5562 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkAllocateCommandBuffers.html>"]
allocate_command_buffers( &self, device: Device, p_allocate_info: *const CommandBufferAllocateInfo, p_command_buffers: *mut CommandBuffer, ) -> Result5563 pub unsafe fn allocate_command_buffers(
5564 &self,
5565 device: Device,
5566 p_allocate_info: *const CommandBufferAllocateInfo,
5567 p_command_buffers: *mut CommandBuffer,
5568 ) -> Result {
5569 (self.allocate_command_buffers)(device, p_allocate_info, p_command_buffers)
5570 }
5571 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkFreeCommandBuffers.html>"]
free_command_buffers( &self, device: Device, command_pool: CommandPool, command_buffer_count: u32, p_command_buffers: *const CommandBuffer, ) -> c_void5572 pub unsafe fn free_command_buffers(
5573 &self,
5574 device: Device,
5575 command_pool: CommandPool,
5576 command_buffer_count: u32,
5577 p_command_buffers: *const CommandBuffer,
5578 ) -> c_void {
5579 (self.free_command_buffers)(
5580 device,
5581 command_pool,
5582 command_buffer_count,
5583 p_command_buffers,
5584 )
5585 }
5586 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBeginCommandBuffer.html>"]
begin_command_buffer( &self, command_buffer: CommandBuffer, p_begin_info: *const CommandBufferBeginInfo, ) -> Result5587 pub unsafe fn begin_command_buffer(
5588 &self,
5589 command_buffer: CommandBuffer,
5590 p_begin_info: *const CommandBufferBeginInfo,
5591 ) -> Result {
5592 (self.begin_command_buffer)(command_buffer, p_begin_info)
5593 }
5594 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEndCommandBuffer.html>"]
end_command_buffer(&self, command_buffer: CommandBuffer) -> Result5595 pub unsafe fn end_command_buffer(&self, command_buffer: CommandBuffer) -> Result {
5596 (self.end_command_buffer)(command_buffer)
5597 }
5598 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkResetCommandBuffer.html>"]
reset_command_buffer( &self, command_buffer: CommandBuffer, flags: CommandBufferResetFlags, ) -> Result5599 pub unsafe fn reset_command_buffer(
5600 &self,
5601 command_buffer: CommandBuffer,
5602 flags: CommandBufferResetFlags,
5603 ) -> Result {
5604 (self.reset_command_buffer)(command_buffer, flags)
5605 }
5606 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBindPipeline.html>"]
cmd_bind_pipeline( &self, command_buffer: CommandBuffer, pipeline_bind_point: PipelineBindPoint, pipeline: Pipeline, ) -> c_void5607 pub unsafe fn cmd_bind_pipeline(
5608 &self,
5609 command_buffer: CommandBuffer,
5610 pipeline_bind_point: PipelineBindPoint,
5611 pipeline: Pipeline,
5612 ) -> c_void {
5613 (self.cmd_bind_pipeline)(command_buffer, pipeline_bind_point, pipeline)
5614 }
5615 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetViewport.html>"]
cmd_set_viewport( &self, command_buffer: CommandBuffer, first_viewport: u32, viewport_count: u32, p_viewports: *const Viewport, ) -> c_void5616 pub unsafe fn cmd_set_viewport(
5617 &self,
5618 command_buffer: CommandBuffer,
5619 first_viewport: u32,
5620 viewport_count: u32,
5621 p_viewports: *const Viewport,
5622 ) -> c_void {
5623 (self.cmd_set_viewport)(command_buffer, first_viewport, viewport_count, p_viewports)
5624 }
5625 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetScissor.html>"]
cmd_set_scissor( &self, command_buffer: CommandBuffer, first_scissor: u32, scissor_count: u32, p_scissors: *const Rect2D, ) -> c_void5626 pub unsafe fn cmd_set_scissor(
5627 &self,
5628 command_buffer: CommandBuffer,
5629 first_scissor: u32,
5630 scissor_count: u32,
5631 p_scissors: *const Rect2D,
5632 ) -> c_void {
5633 (self.cmd_set_scissor)(command_buffer, first_scissor, scissor_count, p_scissors)
5634 }
5635 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetLineWidth.html>"]
cmd_set_line_width( &self, command_buffer: CommandBuffer, line_width: f32, ) -> c_void5636 pub unsafe fn cmd_set_line_width(
5637 &self,
5638 command_buffer: CommandBuffer,
5639 line_width: f32,
5640 ) -> c_void {
5641 (self.cmd_set_line_width)(command_buffer, line_width)
5642 }
5643 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetDepthBias.html>"]
cmd_set_depth_bias( &self, command_buffer: CommandBuffer, depth_bias_constant_factor: f32, depth_bias_clamp: f32, depth_bias_slope_factor: f32, ) -> c_void5644 pub unsafe fn cmd_set_depth_bias(
5645 &self,
5646 command_buffer: CommandBuffer,
5647 depth_bias_constant_factor: f32,
5648 depth_bias_clamp: f32,
5649 depth_bias_slope_factor: f32,
5650 ) -> c_void {
5651 (self.cmd_set_depth_bias)(
5652 command_buffer,
5653 depth_bias_constant_factor,
5654 depth_bias_clamp,
5655 depth_bias_slope_factor,
5656 )
5657 }
5658 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetBlendConstants.html>"]
cmd_set_blend_constants( &self, command_buffer: CommandBuffer, blend_constants: &[f32; 4], ) -> c_void5659 pub unsafe fn cmd_set_blend_constants(
5660 &self,
5661 command_buffer: CommandBuffer,
5662 blend_constants: &[f32; 4],
5663 ) -> c_void {
5664 (self.cmd_set_blend_constants)(command_buffer, blend_constants)
5665 }
5666 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetDepthBounds.html>"]
cmd_set_depth_bounds( &self, command_buffer: CommandBuffer, min_depth_bounds: f32, max_depth_bounds: f32, ) -> c_void5667 pub unsafe fn cmd_set_depth_bounds(
5668 &self,
5669 command_buffer: CommandBuffer,
5670 min_depth_bounds: f32,
5671 max_depth_bounds: f32,
5672 ) -> c_void {
5673 (self.cmd_set_depth_bounds)(command_buffer, min_depth_bounds, max_depth_bounds)
5674 }
5675 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetStencilCompareMask.html>"]
cmd_set_stencil_compare_mask( &self, command_buffer: CommandBuffer, face_mask: StencilFaceFlags, compare_mask: u32, ) -> c_void5676 pub unsafe fn cmd_set_stencil_compare_mask(
5677 &self,
5678 command_buffer: CommandBuffer,
5679 face_mask: StencilFaceFlags,
5680 compare_mask: u32,
5681 ) -> c_void {
5682 (self.cmd_set_stencil_compare_mask)(command_buffer, face_mask, compare_mask)
5683 }
5684 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetStencilWriteMask.html>"]
cmd_set_stencil_write_mask( &self, command_buffer: CommandBuffer, face_mask: StencilFaceFlags, write_mask: u32, ) -> c_void5685 pub unsafe fn cmd_set_stencil_write_mask(
5686 &self,
5687 command_buffer: CommandBuffer,
5688 face_mask: StencilFaceFlags,
5689 write_mask: u32,
5690 ) -> c_void {
5691 (self.cmd_set_stencil_write_mask)(command_buffer, face_mask, write_mask)
5692 }
5693 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetStencilReference.html>"]
cmd_set_stencil_reference( &self, command_buffer: CommandBuffer, face_mask: StencilFaceFlags, reference: u32, ) -> c_void5694 pub unsafe fn cmd_set_stencil_reference(
5695 &self,
5696 command_buffer: CommandBuffer,
5697 face_mask: StencilFaceFlags,
5698 reference: u32,
5699 ) -> c_void {
5700 (self.cmd_set_stencil_reference)(command_buffer, face_mask, reference)
5701 }
5702 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBindDescriptorSets.html>"]
cmd_bind_descriptor_sets( &self, command_buffer: CommandBuffer, pipeline_bind_point: PipelineBindPoint, layout: PipelineLayout, first_set: u32, descriptor_set_count: u32, p_descriptor_sets: *const DescriptorSet, dynamic_offset_count: u32, p_dynamic_offsets: *const u32, ) -> c_void5703 pub unsafe fn cmd_bind_descriptor_sets(
5704 &self,
5705 command_buffer: CommandBuffer,
5706 pipeline_bind_point: PipelineBindPoint,
5707 layout: PipelineLayout,
5708 first_set: u32,
5709 descriptor_set_count: u32,
5710 p_descriptor_sets: *const DescriptorSet,
5711 dynamic_offset_count: u32,
5712 p_dynamic_offsets: *const u32,
5713 ) -> c_void {
5714 (self.cmd_bind_descriptor_sets)(
5715 command_buffer,
5716 pipeline_bind_point,
5717 layout,
5718 first_set,
5719 descriptor_set_count,
5720 p_descriptor_sets,
5721 dynamic_offset_count,
5722 p_dynamic_offsets,
5723 )
5724 }
5725 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBindIndexBuffer.html>"]
cmd_bind_index_buffer( &self, command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, index_type: IndexType, ) -> c_void5726 pub unsafe fn cmd_bind_index_buffer(
5727 &self,
5728 command_buffer: CommandBuffer,
5729 buffer: Buffer,
5730 offset: DeviceSize,
5731 index_type: IndexType,
5732 ) -> c_void {
5733 (self.cmd_bind_index_buffer)(command_buffer, buffer, offset, index_type)
5734 }
5735 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBindVertexBuffers.html>"]
cmd_bind_vertex_buffers( &self, command_buffer: CommandBuffer, first_binding: u32, binding_count: u32, p_buffers: *const Buffer, p_offsets: *const DeviceSize, ) -> c_void5736 pub unsafe fn cmd_bind_vertex_buffers(
5737 &self,
5738 command_buffer: CommandBuffer,
5739 first_binding: u32,
5740 binding_count: u32,
5741 p_buffers: *const Buffer,
5742 p_offsets: *const DeviceSize,
5743 ) -> c_void {
5744 (self.cmd_bind_vertex_buffers)(
5745 command_buffer,
5746 first_binding,
5747 binding_count,
5748 p_buffers,
5749 p_offsets,
5750 )
5751 }
5752 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDraw.html>"]
cmd_draw( &self, command_buffer: CommandBuffer, vertex_count: u32, instance_count: u32, first_vertex: u32, first_instance: u32, ) -> c_void5753 pub unsafe fn cmd_draw(
5754 &self,
5755 command_buffer: CommandBuffer,
5756 vertex_count: u32,
5757 instance_count: u32,
5758 first_vertex: u32,
5759 first_instance: u32,
5760 ) -> c_void {
5761 (self.cmd_draw)(
5762 command_buffer,
5763 vertex_count,
5764 instance_count,
5765 first_vertex,
5766 first_instance,
5767 )
5768 }
5769 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawIndexed.html>"]
cmd_draw_indexed( &self, command_buffer: CommandBuffer, index_count: u32, instance_count: u32, first_index: u32, vertex_offset: i32, first_instance: u32, ) -> c_void5770 pub unsafe fn cmd_draw_indexed(
5771 &self,
5772 command_buffer: CommandBuffer,
5773 index_count: u32,
5774 instance_count: u32,
5775 first_index: u32,
5776 vertex_offset: i32,
5777 first_instance: u32,
5778 ) -> c_void {
5779 (self.cmd_draw_indexed)(
5780 command_buffer,
5781 index_count,
5782 instance_count,
5783 first_index,
5784 vertex_offset,
5785 first_instance,
5786 )
5787 }
5788 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawIndirect.html>"]
cmd_draw_indirect( &self, command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, draw_count: u32, stride: u32, ) -> c_void5789 pub unsafe fn cmd_draw_indirect(
5790 &self,
5791 command_buffer: CommandBuffer,
5792 buffer: Buffer,
5793 offset: DeviceSize,
5794 draw_count: u32,
5795 stride: u32,
5796 ) -> c_void {
5797 (self.cmd_draw_indirect)(command_buffer, buffer, offset, draw_count, stride)
5798 }
5799 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawIndexedIndirect.html>"]
cmd_draw_indexed_indirect( &self, command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, draw_count: u32, stride: u32, ) -> c_void5800 pub unsafe fn cmd_draw_indexed_indirect(
5801 &self,
5802 command_buffer: CommandBuffer,
5803 buffer: Buffer,
5804 offset: DeviceSize,
5805 draw_count: u32,
5806 stride: u32,
5807 ) -> c_void {
5808 (self.cmd_draw_indexed_indirect)(command_buffer, buffer, offset, draw_count, stride)
5809 }
5810 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDispatch.html>"]
cmd_dispatch( &self, command_buffer: CommandBuffer, group_count_x: u32, group_count_y: u32, group_count_z: u32, ) -> c_void5811 pub unsafe fn cmd_dispatch(
5812 &self,
5813 command_buffer: CommandBuffer,
5814 group_count_x: u32,
5815 group_count_y: u32,
5816 group_count_z: u32,
5817 ) -> c_void {
5818 (self.cmd_dispatch)(command_buffer, group_count_x, group_count_y, group_count_z)
5819 }
5820 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDispatchIndirect.html>"]
cmd_dispatch_indirect( &self, command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, ) -> c_void5821 pub unsafe fn cmd_dispatch_indirect(
5822 &self,
5823 command_buffer: CommandBuffer,
5824 buffer: Buffer,
5825 offset: DeviceSize,
5826 ) -> c_void {
5827 (self.cmd_dispatch_indirect)(command_buffer, buffer, offset)
5828 }
5829 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyBuffer.html>"]
cmd_copy_buffer( &self, command_buffer: CommandBuffer, src_buffer: Buffer, dst_buffer: Buffer, region_count: u32, p_regions: *const BufferCopy, ) -> c_void5830 pub unsafe fn cmd_copy_buffer(
5831 &self,
5832 command_buffer: CommandBuffer,
5833 src_buffer: Buffer,
5834 dst_buffer: Buffer,
5835 region_count: u32,
5836 p_regions: *const BufferCopy,
5837 ) -> c_void {
5838 (self.cmd_copy_buffer)(
5839 command_buffer,
5840 src_buffer,
5841 dst_buffer,
5842 region_count,
5843 p_regions,
5844 )
5845 }
5846 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyImage.html>"]
cmd_copy_image( &self, command_buffer: CommandBuffer, src_image: Image, src_image_layout: ImageLayout, dst_image: Image, dst_image_layout: ImageLayout, region_count: u32, p_regions: *const ImageCopy, ) -> c_void5847 pub unsafe fn cmd_copy_image(
5848 &self,
5849 command_buffer: CommandBuffer,
5850 src_image: Image,
5851 src_image_layout: ImageLayout,
5852 dst_image: Image,
5853 dst_image_layout: ImageLayout,
5854 region_count: u32,
5855 p_regions: *const ImageCopy,
5856 ) -> c_void {
5857 (self.cmd_copy_image)(
5858 command_buffer,
5859 src_image,
5860 src_image_layout,
5861 dst_image,
5862 dst_image_layout,
5863 region_count,
5864 p_regions,
5865 )
5866 }
5867 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBlitImage.html>"]
cmd_blit_image( &self, command_buffer: CommandBuffer, src_image: Image, src_image_layout: ImageLayout, dst_image: Image, dst_image_layout: ImageLayout, region_count: u32, p_regions: *const ImageBlit, filter: Filter, ) -> c_void5868 pub unsafe fn cmd_blit_image(
5869 &self,
5870 command_buffer: CommandBuffer,
5871 src_image: Image,
5872 src_image_layout: ImageLayout,
5873 dst_image: Image,
5874 dst_image_layout: ImageLayout,
5875 region_count: u32,
5876 p_regions: *const ImageBlit,
5877 filter: Filter,
5878 ) -> c_void {
5879 (self.cmd_blit_image)(
5880 command_buffer,
5881 src_image,
5882 src_image_layout,
5883 dst_image,
5884 dst_image_layout,
5885 region_count,
5886 p_regions,
5887 filter,
5888 )
5889 }
5890 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyBufferToImage.html>"]
cmd_copy_buffer_to_image( &self, command_buffer: CommandBuffer, src_buffer: Buffer, dst_image: Image, dst_image_layout: ImageLayout, region_count: u32, p_regions: *const BufferImageCopy, ) -> c_void5891 pub unsafe fn cmd_copy_buffer_to_image(
5892 &self,
5893 command_buffer: CommandBuffer,
5894 src_buffer: Buffer,
5895 dst_image: Image,
5896 dst_image_layout: ImageLayout,
5897 region_count: u32,
5898 p_regions: *const BufferImageCopy,
5899 ) -> c_void {
5900 (self.cmd_copy_buffer_to_image)(
5901 command_buffer,
5902 src_buffer,
5903 dst_image,
5904 dst_image_layout,
5905 region_count,
5906 p_regions,
5907 )
5908 }
5909 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyImageToBuffer.html>"]
cmd_copy_image_to_buffer( &self, command_buffer: CommandBuffer, src_image: Image, src_image_layout: ImageLayout, dst_buffer: Buffer, region_count: u32, p_regions: *const BufferImageCopy, ) -> c_void5910 pub unsafe fn cmd_copy_image_to_buffer(
5911 &self,
5912 command_buffer: CommandBuffer,
5913 src_image: Image,
5914 src_image_layout: ImageLayout,
5915 dst_buffer: Buffer,
5916 region_count: u32,
5917 p_regions: *const BufferImageCopy,
5918 ) -> c_void {
5919 (self.cmd_copy_image_to_buffer)(
5920 command_buffer,
5921 src_image,
5922 src_image_layout,
5923 dst_buffer,
5924 region_count,
5925 p_regions,
5926 )
5927 }
5928 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdUpdateBuffer.html>"]
cmd_update_buffer( &self, command_buffer: CommandBuffer, dst_buffer: Buffer, dst_offset: DeviceSize, data_size: DeviceSize, p_data: *const c_void, ) -> c_void5929 pub unsafe fn cmd_update_buffer(
5930 &self,
5931 command_buffer: CommandBuffer,
5932 dst_buffer: Buffer,
5933 dst_offset: DeviceSize,
5934 data_size: DeviceSize,
5935 p_data: *const c_void,
5936 ) -> c_void {
5937 (self.cmd_update_buffer)(command_buffer, dst_buffer, dst_offset, data_size, p_data)
5938 }
5939 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdFillBuffer.html>"]
cmd_fill_buffer( &self, command_buffer: CommandBuffer, dst_buffer: Buffer, dst_offset: DeviceSize, size: DeviceSize, data: u32, ) -> c_void5940 pub unsafe fn cmd_fill_buffer(
5941 &self,
5942 command_buffer: CommandBuffer,
5943 dst_buffer: Buffer,
5944 dst_offset: DeviceSize,
5945 size: DeviceSize,
5946 data: u32,
5947 ) -> c_void {
5948 (self.cmd_fill_buffer)(command_buffer, dst_buffer, dst_offset, size, data)
5949 }
5950 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdClearColorImage.html>"]
cmd_clear_color_image( &self, command_buffer: CommandBuffer, image: Image, image_layout: ImageLayout, p_color: *const ClearColorValue, range_count: u32, p_ranges: *const ImageSubresourceRange, ) -> c_void5951 pub unsafe fn cmd_clear_color_image(
5952 &self,
5953 command_buffer: CommandBuffer,
5954 image: Image,
5955 image_layout: ImageLayout,
5956 p_color: *const ClearColorValue,
5957 range_count: u32,
5958 p_ranges: *const ImageSubresourceRange,
5959 ) -> c_void {
5960 (self.cmd_clear_color_image)(
5961 command_buffer,
5962 image,
5963 image_layout,
5964 p_color,
5965 range_count,
5966 p_ranges,
5967 )
5968 }
5969 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdClearDepthStencilImage.html>"]
cmd_clear_depth_stencil_image( &self, command_buffer: CommandBuffer, image: Image, image_layout: ImageLayout, p_depth_stencil: *const ClearDepthStencilValue, range_count: u32, p_ranges: *const ImageSubresourceRange, ) -> c_void5970 pub unsafe fn cmd_clear_depth_stencil_image(
5971 &self,
5972 command_buffer: CommandBuffer,
5973 image: Image,
5974 image_layout: ImageLayout,
5975 p_depth_stencil: *const ClearDepthStencilValue,
5976 range_count: u32,
5977 p_ranges: *const ImageSubresourceRange,
5978 ) -> c_void {
5979 (self.cmd_clear_depth_stencil_image)(
5980 command_buffer,
5981 image,
5982 image_layout,
5983 p_depth_stencil,
5984 range_count,
5985 p_ranges,
5986 )
5987 }
5988 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdClearAttachments.html>"]
cmd_clear_attachments( &self, command_buffer: CommandBuffer, attachment_count: u32, p_attachments: *const ClearAttachment, rect_count: u32, p_rects: *const ClearRect, ) -> c_void5989 pub unsafe fn cmd_clear_attachments(
5990 &self,
5991 command_buffer: CommandBuffer,
5992 attachment_count: u32,
5993 p_attachments: *const ClearAttachment,
5994 rect_count: u32,
5995 p_rects: *const ClearRect,
5996 ) -> c_void {
5997 (self.cmd_clear_attachments)(
5998 command_buffer,
5999 attachment_count,
6000 p_attachments,
6001 rect_count,
6002 p_rects,
6003 )
6004 }
6005 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdResolveImage.html>"]
cmd_resolve_image( &self, command_buffer: CommandBuffer, src_image: Image, src_image_layout: ImageLayout, dst_image: Image, dst_image_layout: ImageLayout, region_count: u32, p_regions: *const ImageResolve, ) -> c_void6006 pub unsafe fn cmd_resolve_image(
6007 &self,
6008 command_buffer: CommandBuffer,
6009 src_image: Image,
6010 src_image_layout: ImageLayout,
6011 dst_image: Image,
6012 dst_image_layout: ImageLayout,
6013 region_count: u32,
6014 p_regions: *const ImageResolve,
6015 ) -> c_void {
6016 (self.cmd_resolve_image)(
6017 command_buffer,
6018 src_image,
6019 src_image_layout,
6020 dst_image,
6021 dst_image_layout,
6022 region_count,
6023 p_regions,
6024 )
6025 }
6026 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetEvent.html>"]
cmd_set_event( &self, command_buffer: CommandBuffer, event: Event, stage_mask: PipelineStageFlags, ) -> c_void6027 pub unsafe fn cmd_set_event(
6028 &self,
6029 command_buffer: CommandBuffer,
6030 event: Event,
6031 stage_mask: PipelineStageFlags,
6032 ) -> c_void {
6033 (self.cmd_set_event)(command_buffer, event, stage_mask)
6034 }
6035 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdResetEvent.html>"]
cmd_reset_event( &self, command_buffer: CommandBuffer, event: Event, stage_mask: PipelineStageFlags, ) -> c_void6036 pub unsafe fn cmd_reset_event(
6037 &self,
6038 command_buffer: CommandBuffer,
6039 event: Event,
6040 stage_mask: PipelineStageFlags,
6041 ) -> c_void {
6042 (self.cmd_reset_event)(command_buffer, event, stage_mask)
6043 }
6044 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdWaitEvents.html>"]
cmd_wait_events( &self, command_buffer: CommandBuffer, event_count: u32, p_events: *const Event, src_stage_mask: PipelineStageFlags, dst_stage_mask: PipelineStageFlags, memory_barrier_count: u32, p_memory_barriers: *const MemoryBarrier, buffer_memory_barrier_count: u32, p_buffer_memory_barriers: *const BufferMemoryBarrier, image_memory_barrier_count: u32, p_image_memory_barriers: *const ImageMemoryBarrier, ) -> c_void6045 pub unsafe fn cmd_wait_events(
6046 &self,
6047 command_buffer: CommandBuffer,
6048 event_count: u32,
6049 p_events: *const Event,
6050 src_stage_mask: PipelineStageFlags,
6051 dst_stage_mask: PipelineStageFlags,
6052 memory_barrier_count: u32,
6053 p_memory_barriers: *const MemoryBarrier,
6054 buffer_memory_barrier_count: u32,
6055 p_buffer_memory_barriers: *const BufferMemoryBarrier,
6056 image_memory_barrier_count: u32,
6057 p_image_memory_barriers: *const ImageMemoryBarrier,
6058 ) -> c_void {
6059 (self.cmd_wait_events)(
6060 command_buffer,
6061 event_count,
6062 p_events,
6063 src_stage_mask,
6064 dst_stage_mask,
6065 memory_barrier_count,
6066 p_memory_barriers,
6067 buffer_memory_barrier_count,
6068 p_buffer_memory_barriers,
6069 image_memory_barrier_count,
6070 p_image_memory_barriers,
6071 )
6072 }
6073 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdPipelineBarrier.html>"]
cmd_pipeline_barrier( &self, command_buffer: CommandBuffer, src_stage_mask: PipelineStageFlags, dst_stage_mask: PipelineStageFlags, dependency_flags: DependencyFlags, memory_barrier_count: u32, p_memory_barriers: *const MemoryBarrier, buffer_memory_barrier_count: u32, p_buffer_memory_barriers: *const BufferMemoryBarrier, image_memory_barrier_count: u32, p_image_memory_barriers: *const ImageMemoryBarrier, ) -> c_void6074 pub unsafe fn cmd_pipeline_barrier(
6075 &self,
6076 command_buffer: CommandBuffer,
6077 src_stage_mask: PipelineStageFlags,
6078 dst_stage_mask: PipelineStageFlags,
6079 dependency_flags: DependencyFlags,
6080 memory_barrier_count: u32,
6081 p_memory_barriers: *const MemoryBarrier,
6082 buffer_memory_barrier_count: u32,
6083 p_buffer_memory_barriers: *const BufferMemoryBarrier,
6084 image_memory_barrier_count: u32,
6085 p_image_memory_barriers: *const ImageMemoryBarrier,
6086 ) -> c_void {
6087 (self.cmd_pipeline_barrier)(
6088 command_buffer,
6089 src_stage_mask,
6090 dst_stage_mask,
6091 dependency_flags,
6092 memory_barrier_count,
6093 p_memory_barriers,
6094 buffer_memory_barrier_count,
6095 p_buffer_memory_barriers,
6096 image_memory_barrier_count,
6097 p_image_memory_barriers,
6098 )
6099 }
6100 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBeginQuery.html>"]
cmd_begin_query( &self, command_buffer: CommandBuffer, query_pool: QueryPool, query: u32, flags: QueryControlFlags, ) -> c_void6101 pub unsafe fn cmd_begin_query(
6102 &self,
6103 command_buffer: CommandBuffer,
6104 query_pool: QueryPool,
6105 query: u32,
6106 flags: QueryControlFlags,
6107 ) -> c_void {
6108 (self.cmd_begin_query)(command_buffer, query_pool, query, flags)
6109 }
6110 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdEndQuery.html>"]
cmd_end_query( &self, command_buffer: CommandBuffer, query_pool: QueryPool, query: u32, ) -> c_void6111 pub unsafe fn cmd_end_query(
6112 &self,
6113 command_buffer: CommandBuffer,
6114 query_pool: QueryPool,
6115 query: u32,
6116 ) -> c_void {
6117 (self.cmd_end_query)(command_buffer, query_pool, query)
6118 }
6119 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdResetQueryPool.html>"]
cmd_reset_query_pool( &self, command_buffer: CommandBuffer, query_pool: QueryPool, first_query: u32, query_count: u32, ) -> c_void6120 pub unsafe fn cmd_reset_query_pool(
6121 &self,
6122 command_buffer: CommandBuffer,
6123 query_pool: QueryPool,
6124 first_query: u32,
6125 query_count: u32,
6126 ) -> c_void {
6127 (self.cmd_reset_query_pool)(command_buffer, query_pool, first_query, query_count)
6128 }
6129 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdWriteTimestamp.html>"]
cmd_write_timestamp( &self, command_buffer: CommandBuffer, pipeline_stage: PipelineStageFlags, query_pool: QueryPool, query: u32, ) -> c_void6130 pub unsafe fn cmd_write_timestamp(
6131 &self,
6132 command_buffer: CommandBuffer,
6133 pipeline_stage: PipelineStageFlags,
6134 query_pool: QueryPool,
6135 query: u32,
6136 ) -> c_void {
6137 (self.cmd_write_timestamp)(command_buffer, pipeline_stage, query_pool, query)
6138 }
6139 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdCopyQueryPoolResults.html>"]
cmd_copy_query_pool_results( &self, command_buffer: CommandBuffer, query_pool: QueryPool, first_query: u32, query_count: u32, dst_buffer: Buffer, dst_offset: DeviceSize, stride: DeviceSize, flags: QueryResultFlags, ) -> c_void6140 pub unsafe fn cmd_copy_query_pool_results(
6141 &self,
6142 command_buffer: CommandBuffer,
6143 query_pool: QueryPool,
6144 first_query: u32,
6145 query_count: u32,
6146 dst_buffer: Buffer,
6147 dst_offset: DeviceSize,
6148 stride: DeviceSize,
6149 flags: QueryResultFlags,
6150 ) -> c_void {
6151 (self.cmd_copy_query_pool_results)(
6152 command_buffer,
6153 query_pool,
6154 first_query,
6155 query_count,
6156 dst_buffer,
6157 dst_offset,
6158 stride,
6159 flags,
6160 )
6161 }
6162 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdPushConstants.html>"]
cmd_push_constants( &self, command_buffer: CommandBuffer, layout: PipelineLayout, stage_flags: ShaderStageFlags, offset: u32, size: u32, p_values: *const c_void, ) -> c_void6163 pub unsafe fn cmd_push_constants(
6164 &self,
6165 command_buffer: CommandBuffer,
6166 layout: PipelineLayout,
6167 stage_flags: ShaderStageFlags,
6168 offset: u32,
6169 size: u32,
6170 p_values: *const c_void,
6171 ) -> c_void {
6172 (self.cmd_push_constants)(command_buffer, layout, stage_flags, offset, size, p_values)
6173 }
6174 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBeginRenderPass.html>"]
cmd_begin_render_pass( &self, command_buffer: CommandBuffer, p_render_pass_begin: *const RenderPassBeginInfo, contents: SubpassContents, ) -> c_void6175 pub unsafe fn cmd_begin_render_pass(
6176 &self,
6177 command_buffer: CommandBuffer,
6178 p_render_pass_begin: *const RenderPassBeginInfo,
6179 contents: SubpassContents,
6180 ) -> c_void {
6181 (self.cmd_begin_render_pass)(command_buffer, p_render_pass_begin, contents)
6182 }
6183 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdNextSubpass.html>"]
cmd_next_subpass( &self, command_buffer: CommandBuffer, contents: SubpassContents, ) -> c_void6184 pub unsafe fn cmd_next_subpass(
6185 &self,
6186 command_buffer: CommandBuffer,
6187 contents: SubpassContents,
6188 ) -> c_void {
6189 (self.cmd_next_subpass)(command_buffer, contents)
6190 }
6191 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdEndRenderPass.html>"]
cmd_end_render_pass(&self, command_buffer: CommandBuffer) -> c_void6192 pub unsafe fn cmd_end_render_pass(&self, command_buffer: CommandBuffer) -> c_void {
6193 (self.cmd_end_render_pass)(command_buffer)
6194 }
6195 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdExecuteCommands.html>"]
cmd_execute_commands( &self, command_buffer: CommandBuffer, command_buffer_count: u32, p_command_buffers: *const CommandBuffer, ) -> c_void6196 pub unsafe fn cmd_execute_commands(
6197 &self,
6198 command_buffer: CommandBuffer,
6199 command_buffer_count: u32,
6200 p_command_buffers: *const CommandBuffer,
6201 ) -> c_void {
6202 (self.cmd_execute_commands)(command_buffer, command_buffer_count, p_command_buffers)
6203 }
6204 }
6205 #[allow(non_camel_case_types)]
6206 pub type PFN_vkEnumerateInstanceVersion = extern "system" fn(p_api_version: *mut u32) -> Result;
6207 pub struct EntryFnV1_1 {
6208 pub enumerate_instance_version: extern "system" fn(p_api_version: *mut u32) -> Result,
6209 }
6210 unsafe impl Send for EntryFnV1_1 {}
6211 unsafe impl Sync for EntryFnV1_1 {}
6212 impl ::std::clone::Clone for EntryFnV1_1 {
clone(&self) -> Self6213 fn clone(&self) -> Self {
6214 EntryFnV1_1 {
6215 enumerate_instance_version: self.enumerate_instance_version,
6216 }
6217 }
6218 }
6219 impl EntryFnV1_1 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,6220 pub fn load<F>(mut _f: F) -> Self
6221 where
6222 F: FnMut(&::std::ffi::CStr) -> *const c_void,
6223 {
6224 EntryFnV1_1 {
6225 enumerate_instance_version: unsafe {
6226 extern "system" fn enumerate_instance_version(_p_api_version: *mut u32) -> Result {
6227 panic!(concat!(
6228 "Unable to load ",
6229 stringify!(enumerate_instance_version)
6230 ))
6231 }
6232 let raw_name = stringify!(vkEnumerateInstanceVersion);
6233 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6234 let val = _f(&cname);
6235 if val.is_null() {
6236 enumerate_instance_version
6237 } else {
6238 ::std::mem::transmute(val)
6239 }
6240 },
6241 }
6242 }
6243 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumerateInstanceVersion.html>"]
enumerate_instance_version(&self, p_api_version: *mut u32) -> Result6244 pub unsafe fn enumerate_instance_version(&self, p_api_version: *mut u32) -> Result {
6245 (self.enumerate_instance_version)(p_api_version)
6246 }
6247 }
6248 pub struct InstanceFnV1_1 {
6249 pub enumerate_physical_device_groups: extern "system" fn(
6250 instance: Instance,
6251 p_physical_device_group_count: *mut u32,
6252 p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties,
6253 ) -> Result,
6254 pub get_physical_device_features2: extern "system" fn(
6255 physical_device: PhysicalDevice,
6256 p_features: *mut PhysicalDeviceFeatures2,
6257 ) -> c_void,
6258 pub get_physical_device_properties2: extern "system" fn(
6259 physical_device: PhysicalDevice,
6260 p_properties: *mut PhysicalDeviceProperties2,
6261 ) -> c_void,
6262 pub get_physical_device_format_properties2: extern "system" fn(
6263 physical_device: PhysicalDevice,
6264 format: Format,
6265 p_format_properties: *mut FormatProperties2,
6266 ) -> c_void,
6267 pub get_physical_device_image_format_properties2: extern "system" fn(
6268 physical_device: PhysicalDevice,
6269 p_image_format_info: *const PhysicalDeviceImageFormatInfo2,
6270 p_image_format_properties: *mut ImageFormatProperties2,
6271 ) -> Result,
6272 pub get_physical_device_queue_family_properties2: extern "system" fn(
6273 physical_device: PhysicalDevice,
6274 p_queue_family_property_count: *mut u32,
6275 p_queue_family_properties: *mut QueueFamilyProperties2,
6276 ) -> c_void,
6277 pub get_physical_device_memory_properties2: extern "system" fn(
6278 physical_device: PhysicalDevice,
6279 p_memory_properties: *mut PhysicalDeviceMemoryProperties2,
6280 ) -> c_void,
6281 pub get_physical_device_sparse_image_format_properties2: extern "system" fn(
6282 physical_device: PhysicalDevice,
6283 p_format_info: *const PhysicalDeviceSparseImageFormatInfo2,
6284 p_property_count: *mut u32,
6285 p_properties: *mut SparseImageFormatProperties2,
6286 ) -> c_void,
6287 pub get_physical_device_external_buffer_properties: extern "system" fn(
6288 physical_device: PhysicalDevice,
6289 p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo,
6290 p_external_buffer_properties: *mut ExternalBufferProperties,
6291 ) -> c_void,
6292 pub get_physical_device_external_fence_properties: extern "system" fn(
6293 physical_device: PhysicalDevice,
6294 p_external_fence_info: *const PhysicalDeviceExternalFenceInfo,
6295 p_external_fence_properties: *mut ExternalFenceProperties,
6296 ) -> c_void,
6297 pub get_physical_device_external_semaphore_properties: extern "system" fn(
6298 physical_device: PhysicalDevice,
6299 p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo,
6300 p_external_semaphore_properties: *mut ExternalSemaphoreProperties,
6301 ) -> c_void,
6302 }
6303 unsafe impl Send for InstanceFnV1_1 {}
6304 unsafe impl Sync for InstanceFnV1_1 {}
6305 impl ::std::clone::Clone for InstanceFnV1_1 {
clone(&self) -> Self6306 fn clone(&self) -> Self {
6307 InstanceFnV1_1 {
6308 enumerate_physical_device_groups: self.enumerate_physical_device_groups,
6309 get_physical_device_features2: self.get_physical_device_features2,
6310 get_physical_device_properties2: self.get_physical_device_properties2,
6311 get_physical_device_format_properties2: self.get_physical_device_format_properties2,
6312 get_physical_device_image_format_properties2: self
6313 .get_physical_device_image_format_properties2,
6314 get_physical_device_queue_family_properties2: self
6315 .get_physical_device_queue_family_properties2,
6316 get_physical_device_memory_properties2: self.get_physical_device_memory_properties2,
6317 get_physical_device_sparse_image_format_properties2: self
6318 .get_physical_device_sparse_image_format_properties2,
6319 get_physical_device_external_buffer_properties: self
6320 .get_physical_device_external_buffer_properties,
6321 get_physical_device_external_fence_properties: self
6322 .get_physical_device_external_fence_properties,
6323 get_physical_device_external_semaphore_properties: self
6324 .get_physical_device_external_semaphore_properties,
6325 }
6326 }
6327 }
6328 impl InstanceFnV1_1 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,6329 pub fn load<F>(mut _f: F) -> Self
6330 where
6331 F: FnMut(&::std::ffi::CStr) -> *const c_void,
6332 {
6333 InstanceFnV1_1 {
6334 enumerate_physical_device_groups: unsafe {
6335 extern "system" fn enumerate_physical_device_groups(
6336 _instance: Instance,
6337 _p_physical_device_group_count: *mut u32,
6338 _p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties,
6339 ) -> Result {
6340 panic!(concat!(
6341 "Unable to load ",
6342 stringify!(enumerate_physical_device_groups)
6343 ))
6344 }
6345 let raw_name = stringify!(vkEnumeratePhysicalDeviceGroups);
6346 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6347 let val = _f(&cname);
6348 if val.is_null() {
6349 enumerate_physical_device_groups
6350 } else {
6351 ::std::mem::transmute(val)
6352 }
6353 },
6354 get_physical_device_features2: unsafe {
6355 extern "system" fn get_physical_device_features2(
6356 _physical_device: PhysicalDevice,
6357 _p_features: *mut PhysicalDeviceFeatures2,
6358 ) -> c_void {
6359 panic!(concat!(
6360 "Unable to load ",
6361 stringify!(get_physical_device_features2)
6362 ))
6363 }
6364 let raw_name = stringify!(vkGetPhysicalDeviceFeatures2);
6365 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6366 let val = _f(&cname);
6367 if val.is_null() {
6368 get_physical_device_features2
6369 } else {
6370 ::std::mem::transmute(val)
6371 }
6372 },
6373 get_physical_device_properties2: unsafe {
6374 extern "system" fn get_physical_device_properties2(
6375 _physical_device: PhysicalDevice,
6376 _p_properties: *mut PhysicalDeviceProperties2,
6377 ) -> c_void {
6378 panic!(concat!(
6379 "Unable to load ",
6380 stringify!(get_physical_device_properties2)
6381 ))
6382 }
6383 let raw_name = stringify!(vkGetPhysicalDeviceProperties2);
6384 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6385 let val = _f(&cname);
6386 if val.is_null() {
6387 get_physical_device_properties2
6388 } else {
6389 ::std::mem::transmute(val)
6390 }
6391 },
6392 get_physical_device_format_properties2: unsafe {
6393 extern "system" fn get_physical_device_format_properties2(
6394 _physical_device: PhysicalDevice,
6395 _format: Format,
6396 _p_format_properties: *mut FormatProperties2,
6397 ) -> c_void {
6398 panic!(concat!(
6399 "Unable to load ",
6400 stringify!(get_physical_device_format_properties2)
6401 ))
6402 }
6403 let raw_name = stringify!(vkGetPhysicalDeviceFormatProperties2);
6404 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6405 let val = _f(&cname);
6406 if val.is_null() {
6407 get_physical_device_format_properties2
6408 } else {
6409 ::std::mem::transmute(val)
6410 }
6411 },
6412 get_physical_device_image_format_properties2: unsafe {
6413 extern "system" fn get_physical_device_image_format_properties2(
6414 _physical_device: PhysicalDevice,
6415 _p_image_format_info: *const PhysicalDeviceImageFormatInfo2,
6416 _p_image_format_properties: *mut ImageFormatProperties2,
6417 ) -> Result {
6418 panic!(concat!(
6419 "Unable to load ",
6420 stringify!(get_physical_device_image_format_properties2)
6421 ))
6422 }
6423 let raw_name = stringify!(vkGetPhysicalDeviceImageFormatProperties2);
6424 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6425 let val = _f(&cname);
6426 if val.is_null() {
6427 get_physical_device_image_format_properties2
6428 } else {
6429 ::std::mem::transmute(val)
6430 }
6431 },
6432 get_physical_device_queue_family_properties2: unsafe {
6433 extern "system" fn get_physical_device_queue_family_properties2(
6434 _physical_device: PhysicalDevice,
6435 _p_queue_family_property_count: *mut u32,
6436 _p_queue_family_properties: *mut QueueFamilyProperties2,
6437 ) -> c_void {
6438 panic!(concat!(
6439 "Unable to load ",
6440 stringify!(get_physical_device_queue_family_properties2)
6441 ))
6442 }
6443 let raw_name = stringify!(vkGetPhysicalDeviceQueueFamilyProperties2);
6444 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6445 let val = _f(&cname);
6446 if val.is_null() {
6447 get_physical_device_queue_family_properties2
6448 } else {
6449 ::std::mem::transmute(val)
6450 }
6451 },
6452 get_physical_device_memory_properties2: unsafe {
6453 extern "system" fn get_physical_device_memory_properties2(
6454 _physical_device: PhysicalDevice,
6455 _p_memory_properties: *mut PhysicalDeviceMemoryProperties2,
6456 ) -> c_void {
6457 panic!(concat!(
6458 "Unable to load ",
6459 stringify!(get_physical_device_memory_properties2)
6460 ))
6461 }
6462 let raw_name = stringify!(vkGetPhysicalDeviceMemoryProperties2);
6463 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6464 let val = _f(&cname);
6465 if val.is_null() {
6466 get_physical_device_memory_properties2
6467 } else {
6468 ::std::mem::transmute(val)
6469 }
6470 },
6471 get_physical_device_sparse_image_format_properties2: unsafe {
6472 extern "system" fn get_physical_device_sparse_image_format_properties2(
6473 _physical_device: PhysicalDevice,
6474 _p_format_info: *const PhysicalDeviceSparseImageFormatInfo2,
6475 _p_property_count: *mut u32,
6476 _p_properties: *mut SparseImageFormatProperties2,
6477 ) -> c_void {
6478 panic!(concat!(
6479 "Unable to load ",
6480 stringify!(get_physical_device_sparse_image_format_properties2)
6481 ))
6482 }
6483 let raw_name = stringify!(vkGetPhysicalDeviceSparseImageFormatProperties2);
6484 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6485 let val = _f(&cname);
6486 if val.is_null() {
6487 get_physical_device_sparse_image_format_properties2
6488 } else {
6489 ::std::mem::transmute(val)
6490 }
6491 },
6492 get_physical_device_external_buffer_properties: unsafe {
6493 extern "system" fn get_physical_device_external_buffer_properties(
6494 _physical_device: PhysicalDevice,
6495 _p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo,
6496 _p_external_buffer_properties: *mut ExternalBufferProperties,
6497 ) -> c_void {
6498 panic!(concat!(
6499 "Unable to load ",
6500 stringify!(get_physical_device_external_buffer_properties)
6501 ))
6502 }
6503 let raw_name = stringify!(vkGetPhysicalDeviceExternalBufferProperties);
6504 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6505 let val = _f(&cname);
6506 if val.is_null() {
6507 get_physical_device_external_buffer_properties
6508 } else {
6509 ::std::mem::transmute(val)
6510 }
6511 },
6512 get_physical_device_external_fence_properties: unsafe {
6513 extern "system" fn get_physical_device_external_fence_properties(
6514 _physical_device: PhysicalDevice,
6515 _p_external_fence_info: *const PhysicalDeviceExternalFenceInfo,
6516 _p_external_fence_properties: *mut ExternalFenceProperties,
6517 ) -> c_void {
6518 panic!(concat!(
6519 "Unable to load ",
6520 stringify!(get_physical_device_external_fence_properties)
6521 ))
6522 }
6523 let raw_name = stringify!(vkGetPhysicalDeviceExternalFenceProperties);
6524 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6525 let val = _f(&cname);
6526 if val.is_null() {
6527 get_physical_device_external_fence_properties
6528 } else {
6529 ::std::mem::transmute(val)
6530 }
6531 },
6532 get_physical_device_external_semaphore_properties: unsafe {
6533 extern "system" fn get_physical_device_external_semaphore_properties(
6534 _physical_device: PhysicalDevice,
6535 _p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo,
6536 _p_external_semaphore_properties: *mut ExternalSemaphoreProperties,
6537 ) -> c_void {
6538 panic!(concat!(
6539 "Unable to load ",
6540 stringify!(get_physical_device_external_semaphore_properties)
6541 ))
6542 }
6543 let raw_name = stringify!(vkGetPhysicalDeviceExternalSemaphoreProperties);
6544 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6545 let val = _f(&cname);
6546 if val.is_null() {
6547 get_physical_device_external_semaphore_properties
6548 } else {
6549 ::std::mem::transmute(val)
6550 }
6551 },
6552 }
6553 }
6554 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkEnumeratePhysicalDeviceGroups.html>"]
enumerate_physical_device_groups( &self, instance: Instance, p_physical_device_group_count: *mut u32, p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties, ) -> Result6555 pub unsafe fn enumerate_physical_device_groups(
6556 &self,
6557 instance: Instance,
6558 p_physical_device_group_count: *mut u32,
6559 p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties,
6560 ) -> Result {
6561 (self.enumerate_physical_device_groups)(
6562 instance,
6563 p_physical_device_group_count,
6564 p_physical_device_group_properties,
6565 )
6566 }
6567 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFeatures2.html>"]
get_physical_device_features2( &self, physical_device: PhysicalDevice, p_features: *mut PhysicalDeviceFeatures2, ) -> c_void6568 pub unsafe fn get_physical_device_features2(
6569 &self,
6570 physical_device: PhysicalDevice,
6571 p_features: *mut PhysicalDeviceFeatures2,
6572 ) -> c_void {
6573 (self.get_physical_device_features2)(physical_device, p_features)
6574 }
6575 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceProperties2.html>"]
get_physical_device_properties2( &self, physical_device: PhysicalDevice, p_properties: *mut PhysicalDeviceProperties2, ) -> c_void6576 pub unsafe fn get_physical_device_properties2(
6577 &self,
6578 physical_device: PhysicalDevice,
6579 p_properties: *mut PhysicalDeviceProperties2,
6580 ) -> c_void {
6581 (self.get_physical_device_properties2)(physical_device, p_properties)
6582 }
6583 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceFormatProperties2.html>"]
get_physical_device_format_properties2( &self, physical_device: PhysicalDevice, format: Format, p_format_properties: *mut FormatProperties2, ) -> c_void6584 pub unsafe fn get_physical_device_format_properties2(
6585 &self,
6586 physical_device: PhysicalDevice,
6587 format: Format,
6588 p_format_properties: *mut FormatProperties2,
6589 ) -> c_void {
6590 (self.get_physical_device_format_properties2)(physical_device, format, p_format_properties)
6591 }
6592 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceImageFormatProperties2.html>"]
get_physical_device_image_format_properties2( &self, physical_device: PhysicalDevice, p_image_format_info: *const PhysicalDeviceImageFormatInfo2, p_image_format_properties: *mut ImageFormatProperties2, ) -> Result6593 pub unsafe fn get_physical_device_image_format_properties2(
6594 &self,
6595 physical_device: PhysicalDevice,
6596 p_image_format_info: *const PhysicalDeviceImageFormatInfo2,
6597 p_image_format_properties: *mut ImageFormatProperties2,
6598 ) -> Result {
6599 (self.get_physical_device_image_format_properties2)(
6600 physical_device,
6601 p_image_format_info,
6602 p_image_format_properties,
6603 )
6604 }
6605 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceQueueFamilyProperties2.html>"]
get_physical_device_queue_family_properties2( &self, physical_device: PhysicalDevice, p_queue_family_property_count: *mut u32, p_queue_family_properties: *mut QueueFamilyProperties2, ) -> c_void6606 pub unsafe fn get_physical_device_queue_family_properties2(
6607 &self,
6608 physical_device: PhysicalDevice,
6609 p_queue_family_property_count: *mut u32,
6610 p_queue_family_properties: *mut QueueFamilyProperties2,
6611 ) -> c_void {
6612 (self.get_physical_device_queue_family_properties2)(
6613 physical_device,
6614 p_queue_family_property_count,
6615 p_queue_family_properties,
6616 )
6617 }
6618 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceMemoryProperties2.html>"]
get_physical_device_memory_properties2( &self, physical_device: PhysicalDevice, p_memory_properties: *mut PhysicalDeviceMemoryProperties2, ) -> c_void6619 pub unsafe fn get_physical_device_memory_properties2(
6620 &self,
6621 physical_device: PhysicalDevice,
6622 p_memory_properties: *mut PhysicalDeviceMemoryProperties2,
6623 ) -> c_void {
6624 (self.get_physical_device_memory_properties2)(physical_device, p_memory_properties)
6625 }
6626 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSparseImageFormatProperties2.html>"]
get_physical_device_sparse_image_format_properties2( &self, physical_device: PhysicalDevice, p_format_info: *const PhysicalDeviceSparseImageFormatInfo2, p_property_count: *mut u32, p_properties: *mut SparseImageFormatProperties2, ) -> c_void6627 pub unsafe fn get_physical_device_sparse_image_format_properties2(
6628 &self,
6629 physical_device: PhysicalDevice,
6630 p_format_info: *const PhysicalDeviceSparseImageFormatInfo2,
6631 p_property_count: *mut u32,
6632 p_properties: *mut SparseImageFormatProperties2,
6633 ) -> c_void {
6634 (self.get_physical_device_sparse_image_format_properties2)(
6635 physical_device,
6636 p_format_info,
6637 p_property_count,
6638 p_properties,
6639 )
6640 }
6641 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceExternalBufferProperties.html>"]
get_physical_device_external_buffer_properties( &self, physical_device: PhysicalDevice, p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo, p_external_buffer_properties: *mut ExternalBufferProperties, ) -> c_void6642 pub unsafe fn get_physical_device_external_buffer_properties(
6643 &self,
6644 physical_device: PhysicalDevice,
6645 p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo,
6646 p_external_buffer_properties: *mut ExternalBufferProperties,
6647 ) -> c_void {
6648 (self.get_physical_device_external_buffer_properties)(
6649 physical_device,
6650 p_external_buffer_info,
6651 p_external_buffer_properties,
6652 )
6653 }
6654 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceExternalFenceProperties.html>"]
get_physical_device_external_fence_properties( &self, physical_device: PhysicalDevice, p_external_fence_info: *const PhysicalDeviceExternalFenceInfo, p_external_fence_properties: *mut ExternalFenceProperties, ) -> c_void6655 pub unsafe fn get_physical_device_external_fence_properties(
6656 &self,
6657 physical_device: PhysicalDevice,
6658 p_external_fence_info: *const PhysicalDeviceExternalFenceInfo,
6659 p_external_fence_properties: *mut ExternalFenceProperties,
6660 ) -> c_void {
6661 (self.get_physical_device_external_fence_properties)(
6662 physical_device,
6663 p_external_fence_info,
6664 p_external_fence_properties,
6665 )
6666 }
6667 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceExternalSemaphoreProperties.html>"]
get_physical_device_external_semaphore_properties( &self, physical_device: PhysicalDevice, p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo, p_external_semaphore_properties: *mut ExternalSemaphoreProperties, ) -> c_void6668 pub unsafe fn get_physical_device_external_semaphore_properties(
6669 &self,
6670 physical_device: PhysicalDevice,
6671 p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo,
6672 p_external_semaphore_properties: *mut ExternalSemaphoreProperties,
6673 ) -> c_void {
6674 (self.get_physical_device_external_semaphore_properties)(
6675 physical_device,
6676 p_external_semaphore_info,
6677 p_external_semaphore_properties,
6678 )
6679 }
6680 }
6681 #[allow(non_camel_case_types)]
6682 pub type PFN_vkGetDeviceQueue2 = extern "system" fn(
6683 device: Device,
6684 bind_info_count: u32,
6685 p_bind_infos: *const BindBufferMemoryInfo,
6686 ) -> Result;
6687 pub struct DeviceFnV1_1 {
6688 pub bind_buffer_memory2: extern "system" fn(
6689 device: Device,
6690 bind_info_count: u32,
6691 p_bind_infos: *const BindBufferMemoryInfo,
6692 ) -> Result,
6693 pub bind_image_memory2: extern "system" fn(
6694 device: Device,
6695 bind_info_count: u32,
6696 p_bind_infos: *const BindImageMemoryInfo,
6697 ) -> Result,
6698 pub get_device_group_peer_memory_features: extern "system" fn(
6699 device: Device,
6700 heap_index: u32,
6701 local_device_index: u32,
6702 remote_device_index: u32,
6703 p_peer_memory_features: *mut PeerMemoryFeatureFlags,
6704 ) -> c_void,
6705 pub cmd_set_device_mask:
6706 extern "system" fn(command_buffer: CommandBuffer, device_mask: u32) -> c_void,
6707 pub cmd_dispatch_base: extern "system" fn(
6708 command_buffer: CommandBuffer,
6709 base_group_x: u32,
6710 base_group_y: u32,
6711 base_group_z: u32,
6712 group_count_x: u32,
6713 group_count_y: u32,
6714 group_count_z: u32,
6715 ) -> c_void,
6716 pub get_image_memory_requirements2: extern "system" fn(
6717 device: Device,
6718 p_info: *const ImageMemoryRequirementsInfo2,
6719 p_memory_requirements: *mut MemoryRequirements2,
6720 ) -> c_void,
6721 pub get_buffer_memory_requirements2: extern "system" fn(
6722 device: Device,
6723 p_info: *const BufferMemoryRequirementsInfo2,
6724 p_memory_requirements: *mut MemoryRequirements2,
6725 ) -> c_void,
6726 pub get_image_sparse_memory_requirements2: extern "system" fn(
6727 device: Device,
6728 p_info: *const ImageSparseMemoryRequirementsInfo2,
6729 p_sparse_memory_requirement_count: *mut u32,
6730 p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2,
6731 ) -> c_void,
6732 pub trim_command_pool: extern "system" fn(
6733 device: Device,
6734 command_pool: CommandPool,
6735 flags: CommandPoolTrimFlags,
6736 ) -> c_void,
6737 pub get_device_queue2: extern "system" fn(
6738 device: Device,
6739 p_queue_info: *const DeviceQueueInfo2,
6740 p_queue: *mut Queue,
6741 ) -> c_void,
6742 pub create_sampler_ycbcr_conversion: extern "system" fn(
6743 device: Device,
6744 p_create_info: *const SamplerYcbcrConversionCreateInfo,
6745 p_allocator: *const AllocationCallbacks,
6746 p_ycbcr_conversion: *mut SamplerYcbcrConversion,
6747 ) -> Result,
6748 pub destroy_sampler_ycbcr_conversion: extern "system" fn(
6749 device: Device,
6750 ycbcr_conversion: SamplerYcbcrConversion,
6751 p_allocator: *const AllocationCallbacks,
6752 ) -> c_void,
6753 pub create_descriptor_update_template: extern "system" fn(
6754 device: Device,
6755 p_create_info: *const DescriptorUpdateTemplateCreateInfo,
6756 p_allocator: *const AllocationCallbacks,
6757 p_descriptor_update_template: *mut DescriptorUpdateTemplate,
6758 ) -> Result,
6759 pub destroy_descriptor_update_template: extern "system" fn(
6760 device: Device,
6761 descriptor_update_template: DescriptorUpdateTemplate,
6762 p_allocator: *const AllocationCallbacks,
6763 ) -> c_void,
6764 pub update_descriptor_set_with_template: extern "system" fn(
6765 device: Device,
6766 descriptor_set: DescriptorSet,
6767 descriptor_update_template: DescriptorUpdateTemplate,
6768 p_data: *const c_void,
6769 ) -> c_void,
6770 pub get_descriptor_set_layout_support: extern "system" fn(
6771 device: Device,
6772 p_create_info: *const DescriptorSetLayoutCreateInfo,
6773 p_support: *mut DescriptorSetLayoutSupport,
6774 ) -> c_void,
6775 }
6776 unsafe impl Send for DeviceFnV1_1 {}
6777 unsafe impl Sync for DeviceFnV1_1 {}
6778 impl ::std::clone::Clone for DeviceFnV1_1 {
clone(&self) -> Self6779 fn clone(&self) -> Self {
6780 DeviceFnV1_1 {
6781 bind_buffer_memory2: self.bind_buffer_memory2,
6782 bind_image_memory2: self.bind_image_memory2,
6783 get_device_group_peer_memory_features: self.get_device_group_peer_memory_features,
6784 cmd_set_device_mask: self.cmd_set_device_mask,
6785 cmd_dispatch_base: self.cmd_dispatch_base,
6786 get_image_memory_requirements2: self.get_image_memory_requirements2,
6787 get_buffer_memory_requirements2: self.get_buffer_memory_requirements2,
6788 get_image_sparse_memory_requirements2: self.get_image_sparse_memory_requirements2,
6789 trim_command_pool: self.trim_command_pool,
6790 get_device_queue2: self.get_device_queue2,
6791 create_sampler_ycbcr_conversion: self.create_sampler_ycbcr_conversion,
6792 destroy_sampler_ycbcr_conversion: self.destroy_sampler_ycbcr_conversion,
6793 create_descriptor_update_template: self.create_descriptor_update_template,
6794 destroy_descriptor_update_template: self.destroy_descriptor_update_template,
6795 update_descriptor_set_with_template: self.update_descriptor_set_with_template,
6796 get_descriptor_set_layout_support: self.get_descriptor_set_layout_support,
6797 }
6798 }
6799 }
6800 impl DeviceFnV1_1 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,6801 pub fn load<F>(mut _f: F) -> Self
6802 where
6803 F: FnMut(&::std::ffi::CStr) -> *const c_void,
6804 {
6805 DeviceFnV1_1 {
6806 bind_buffer_memory2: unsafe {
6807 extern "system" fn bind_buffer_memory2(
6808 _device: Device,
6809 _bind_info_count: u32,
6810 _p_bind_infos: *const BindBufferMemoryInfo,
6811 ) -> Result {
6812 panic!(concat!("Unable to load ", stringify!(bind_buffer_memory2)))
6813 }
6814 let raw_name = stringify!(vkBindBufferMemory2);
6815 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6816 let val = _f(&cname);
6817 if val.is_null() {
6818 bind_buffer_memory2
6819 } else {
6820 ::std::mem::transmute(val)
6821 }
6822 },
6823 bind_image_memory2: unsafe {
6824 extern "system" fn bind_image_memory2(
6825 _device: Device,
6826 _bind_info_count: u32,
6827 _p_bind_infos: *const BindImageMemoryInfo,
6828 ) -> Result {
6829 panic!(concat!("Unable to load ", stringify!(bind_image_memory2)))
6830 }
6831 let raw_name = stringify!(vkBindImageMemory2);
6832 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6833 let val = _f(&cname);
6834 if val.is_null() {
6835 bind_image_memory2
6836 } else {
6837 ::std::mem::transmute(val)
6838 }
6839 },
6840 get_device_group_peer_memory_features: unsafe {
6841 extern "system" fn get_device_group_peer_memory_features(
6842 _device: Device,
6843 _heap_index: u32,
6844 _local_device_index: u32,
6845 _remote_device_index: u32,
6846 _p_peer_memory_features: *mut PeerMemoryFeatureFlags,
6847 ) -> c_void {
6848 panic!(concat!(
6849 "Unable to load ",
6850 stringify!(get_device_group_peer_memory_features)
6851 ))
6852 }
6853 let raw_name = stringify!(vkGetDeviceGroupPeerMemoryFeatures);
6854 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6855 let val = _f(&cname);
6856 if val.is_null() {
6857 get_device_group_peer_memory_features
6858 } else {
6859 ::std::mem::transmute(val)
6860 }
6861 },
6862 cmd_set_device_mask: unsafe {
6863 extern "system" fn cmd_set_device_mask(
6864 _command_buffer: CommandBuffer,
6865 _device_mask: u32,
6866 ) -> c_void {
6867 panic!(concat!("Unable to load ", stringify!(cmd_set_device_mask)))
6868 }
6869 let raw_name = stringify!(vkCmdSetDeviceMask);
6870 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6871 let val = _f(&cname);
6872 if val.is_null() {
6873 cmd_set_device_mask
6874 } else {
6875 ::std::mem::transmute(val)
6876 }
6877 },
6878 cmd_dispatch_base: unsafe {
6879 extern "system" fn cmd_dispatch_base(
6880 _command_buffer: CommandBuffer,
6881 _base_group_x: u32,
6882 _base_group_y: u32,
6883 _base_group_z: u32,
6884 _group_count_x: u32,
6885 _group_count_y: u32,
6886 _group_count_z: u32,
6887 ) -> c_void {
6888 panic!(concat!("Unable to load ", stringify!(cmd_dispatch_base)))
6889 }
6890 let raw_name = stringify!(vkCmdDispatchBase);
6891 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6892 let val = _f(&cname);
6893 if val.is_null() {
6894 cmd_dispatch_base
6895 } else {
6896 ::std::mem::transmute(val)
6897 }
6898 },
6899 get_image_memory_requirements2: unsafe {
6900 extern "system" fn get_image_memory_requirements2(
6901 _device: Device,
6902 _p_info: *const ImageMemoryRequirementsInfo2,
6903 _p_memory_requirements: *mut MemoryRequirements2,
6904 ) -> c_void {
6905 panic!(concat!(
6906 "Unable to load ",
6907 stringify!(get_image_memory_requirements2)
6908 ))
6909 }
6910 let raw_name = stringify!(vkGetImageMemoryRequirements2);
6911 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6912 let val = _f(&cname);
6913 if val.is_null() {
6914 get_image_memory_requirements2
6915 } else {
6916 ::std::mem::transmute(val)
6917 }
6918 },
6919 get_buffer_memory_requirements2: unsafe {
6920 extern "system" fn get_buffer_memory_requirements2(
6921 _device: Device,
6922 _p_info: *const BufferMemoryRequirementsInfo2,
6923 _p_memory_requirements: *mut MemoryRequirements2,
6924 ) -> c_void {
6925 panic!(concat!(
6926 "Unable to load ",
6927 stringify!(get_buffer_memory_requirements2)
6928 ))
6929 }
6930 let raw_name = stringify!(vkGetBufferMemoryRequirements2);
6931 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6932 let val = _f(&cname);
6933 if val.is_null() {
6934 get_buffer_memory_requirements2
6935 } else {
6936 ::std::mem::transmute(val)
6937 }
6938 },
6939 get_image_sparse_memory_requirements2: unsafe {
6940 extern "system" fn get_image_sparse_memory_requirements2(
6941 _device: Device,
6942 _p_info: *const ImageSparseMemoryRequirementsInfo2,
6943 _p_sparse_memory_requirement_count: *mut u32,
6944 _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2,
6945 ) -> c_void {
6946 panic!(concat!(
6947 "Unable to load ",
6948 stringify!(get_image_sparse_memory_requirements2)
6949 ))
6950 }
6951 let raw_name = stringify!(vkGetImageSparseMemoryRequirements2);
6952 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6953 let val = _f(&cname);
6954 if val.is_null() {
6955 get_image_sparse_memory_requirements2
6956 } else {
6957 ::std::mem::transmute(val)
6958 }
6959 },
6960 trim_command_pool: unsafe {
6961 extern "system" fn trim_command_pool(
6962 _device: Device,
6963 _command_pool: CommandPool,
6964 _flags: CommandPoolTrimFlags,
6965 ) -> c_void {
6966 panic!(concat!("Unable to load ", stringify!(trim_command_pool)))
6967 }
6968 let raw_name = stringify!(vkTrimCommandPool);
6969 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6970 let val = _f(&cname);
6971 if val.is_null() {
6972 trim_command_pool
6973 } else {
6974 ::std::mem::transmute(val)
6975 }
6976 },
6977 get_device_queue2: unsafe {
6978 extern "system" fn get_device_queue2(
6979 _device: Device,
6980 _p_queue_info: *const DeviceQueueInfo2,
6981 _p_queue: *mut Queue,
6982 ) -> c_void {
6983 panic!(concat!("Unable to load ", stringify!(get_device_queue2)))
6984 }
6985 let raw_name = stringify!(vkGetDeviceQueue2);
6986 let cname = ::std::ffi::CString::new(raw_name).unwrap();
6987 let val = _f(&cname);
6988 if val.is_null() {
6989 get_device_queue2
6990 } else {
6991 ::std::mem::transmute(val)
6992 }
6993 },
6994 create_sampler_ycbcr_conversion: unsafe {
6995 extern "system" fn create_sampler_ycbcr_conversion(
6996 _device: Device,
6997 _p_create_info: *const SamplerYcbcrConversionCreateInfo,
6998 _p_allocator: *const AllocationCallbacks,
6999 _p_ycbcr_conversion: *mut SamplerYcbcrConversion,
7000 ) -> Result {
7001 panic!(concat!(
7002 "Unable to load ",
7003 stringify!(create_sampler_ycbcr_conversion)
7004 ))
7005 }
7006 let raw_name = stringify!(vkCreateSamplerYcbcrConversion);
7007 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7008 let val = _f(&cname);
7009 if val.is_null() {
7010 create_sampler_ycbcr_conversion
7011 } else {
7012 ::std::mem::transmute(val)
7013 }
7014 },
7015 destroy_sampler_ycbcr_conversion: unsafe {
7016 extern "system" fn destroy_sampler_ycbcr_conversion(
7017 _device: Device,
7018 _ycbcr_conversion: SamplerYcbcrConversion,
7019 _p_allocator: *const AllocationCallbacks,
7020 ) -> c_void {
7021 panic!(concat!(
7022 "Unable to load ",
7023 stringify!(destroy_sampler_ycbcr_conversion)
7024 ))
7025 }
7026 let raw_name = stringify!(vkDestroySamplerYcbcrConversion);
7027 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7028 let val = _f(&cname);
7029 if val.is_null() {
7030 destroy_sampler_ycbcr_conversion
7031 } else {
7032 ::std::mem::transmute(val)
7033 }
7034 },
7035 create_descriptor_update_template: unsafe {
7036 extern "system" fn create_descriptor_update_template(
7037 _device: Device,
7038 _p_create_info: *const DescriptorUpdateTemplateCreateInfo,
7039 _p_allocator: *const AllocationCallbacks,
7040 _p_descriptor_update_template: *mut DescriptorUpdateTemplate,
7041 ) -> Result {
7042 panic!(concat!(
7043 "Unable to load ",
7044 stringify!(create_descriptor_update_template)
7045 ))
7046 }
7047 let raw_name = stringify!(vkCreateDescriptorUpdateTemplate);
7048 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7049 let val = _f(&cname);
7050 if val.is_null() {
7051 create_descriptor_update_template
7052 } else {
7053 ::std::mem::transmute(val)
7054 }
7055 },
7056 destroy_descriptor_update_template: unsafe {
7057 extern "system" fn destroy_descriptor_update_template(
7058 _device: Device,
7059 _descriptor_update_template: DescriptorUpdateTemplate,
7060 _p_allocator: *const AllocationCallbacks,
7061 ) -> c_void {
7062 panic!(concat!(
7063 "Unable to load ",
7064 stringify!(destroy_descriptor_update_template)
7065 ))
7066 }
7067 let raw_name = stringify!(vkDestroyDescriptorUpdateTemplate);
7068 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7069 let val = _f(&cname);
7070 if val.is_null() {
7071 destroy_descriptor_update_template
7072 } else {
7073 ::std::mem::transmute(val)
7074 }
7075 },
7076 update_descriptor_set_with_template: unsafe {
7077 extern "system" fn update_descriptor_set_with_template(
7078 _device: Device,
7079 _descriptor_set: DescriptorSet,
7080 _descriptor_update_template: DescriptorUpdateTemplate,
7081 _p_data: *const c_void,
7082 ) -> c_void {
7083 panic!(concat!(
7084 "Unable to load ",
7085 stringify!(update_descriptor_set_with_template)
7086 ))
7087 }
7088 let raw_name = stringify!(vkUpdateDescriptorSetWithTemplate);
7089 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7090 let val = _f(&cname);
7091 if val.is_null() {
7092 update_descriptor_set_with_template
7093 } else {
7094 ::std::mem::transmute(val)
7095 }
7096 },
7097 get_descriptor_set_layout_support: unsafe {
7098 extern "system" fn get_descriptor_set_layout_support(
7099 _device: Device,
7100 _p_create_info: *const DescriptorSetLayoutCreateInfo,
7101 _p_support: *mut DescriptorSetLayoutSupport,
7102 ) -> c_void {
7103 panic!(concat!(
7104 "Unable to load ",
7105 stringify!(get_descriptor_set_layout_support)
7106 ))
7107 }
7108 let raw_name = stringify!(vkGetDescriptorSetLayoutSupport);
7109 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7110 let val = _f(&cname);
7111 if val.is_null() {
7112 get_descriptor_set_layout_support
7113 } else {
7114 ::std::mem::transmute(val)
7115 }
7116 },
7117 }
7118 }
7119 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBindBufferMemory2.html>"]
bind_buffer_memory2( &self, device: Device, bind_info_count: u32, p_bind_infos: *const BindBufferMemoryInfo, ) -> Result7120 pub unsafe fn bind_buffer_memory2(
7121 &self,
7122 device: Device,
7123 bind_info_count: u32,
7124 p_bind_infos: *const BindBufferMemoryInfo,
7125 ) -> Result {
7126 (self.bind_buffer_memory2)(device, bind_info_count, p_bind_infos)
7127 }
7128 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkBindImageMemory2.html>"]
bind_image_memory2( &self, device: Device, bind_info_count: u32, p_bind_infos: *const BindImageMemoryInfo, ) -> Result7129 pub unsafe fn bind_image_memory2(
7130 &self,
7131 device: Device,
7132 bind_info_count: u32,
7133 p_bind_infos: *const BindImageMemoryInfo,
7134 ) -> Result {
7135 (self.bind_image_memory2)(device, bind_info_count, p_bind_infos)
7136 }
7137 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceGroupPeerMemoryFeatures.html>"]
get_device_group_peer_memory_features( &self, device: Device, heap_index: u32, local_device_index: u32, remote_device_index: u32, p_peer_memory_features: *mut PeerMemoryFeatureFlags, ) -> c_void7138 pub unsafe fn get_device_group_peer_memory_features(
7139 &self,
7140 device: Device,
7141 heap_index: u32,
7142 local_device_index: u32,
7143 remote_device_index: u32,
7144 p_peer_memory_features: *mut PeerMemoryFeatureFlags,
7145 ) -> c_void {
7146 (self.get_device_group_peer_memory_features)(
7147 device,
7148 heap_index,
7149 local_device_index,
7150 remote_device_index,
7151 p_peer_memory_features,
7152 )
7153 }
7154 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdSetDeviceMask.html>"]
cmd_set_device_mask( &self, command_buffer: CommandBuffer, device_mask: u32, ) -> c_void7155 pub unsafe fn cmd_set_device_mask(
7156 &self,
7157 command_buffer: CommandBuffer,
7158 device_mask: u32,
7159 ) -> c_void {
7160 (self.cmd_set_device_mask)(command_buffer, device_mask)
7161 }
7162 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDispatchBase.html>"]
cmd_dispatch_base( &self, command_buffer: CommandBuffer, base_group_x: u32, base_group_y: u32, base_group_z: u32, group_count_x: u32, group_count_y: u32, group_count_z: u32, ) -> c_void7163 pub unsafe fn cmd_dispatch_base(
7164 &self,
7165 command_buffer: CommandBuffer,
7166 base_group_x: u32,
7167 base_group_y: u32,
7168 base_group_z: u32,
7169 group_count_x: u32,
7170 group_count_y: u32,
7171 group_count_z: u32,
7172 ) -> c_void {
7173 (self.cmd_dispatch_base)(
7174 command_buffer,
7175 base_group_x,
7176 base_group_y,
7177 base_group_z,
7178 group_count_x,
7179 group_count_y,
7180 group_count_z,
7181 )
7182 }
7183 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetImageMemoryRequirements2.html>"]
get_image_memory_requirements2( &self, device: Device, p_info: *const ImageMemoryRequirementsInfo2, p_memory_requirements: *mut MemoryRequirements2, ) -> c_void7184 pub unsafe fn get_image_memory_requirements2(
7185 &self,
7186 device: Device,
7187 p_info: *const ImageMemoryRequirementsInfo2,
7188 p_memory_requirements: *mut MemoryRequirements2,
7189 ) -> c_void {
7190 (self.get_image_memory_requirements2)(device, p_info, p_memory_requirements)
7191 }
7192 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetBufferMemoryRequirements2.html>"]
get_buffer_memory_requirements2( &self, device: Device, p_info: *const BufferMemoryRequirementsInfo2, p_memory_requirements: *mut MemoryRequirements2, ) -> c_void7193 pub unsafe fn get_buffer_memory_requirements2(
7194 &self,
7195 device: Device,
7196 p_info: *const BufferMemoryRequirementsInfo2,
7197 p_memory_requirements: *mut MemoryRequirements2,
7198 ) -> c_void {
7199 (self.get_buffer_memory_requirements2)(device, p_info, p_memory_requirements)
7200 }
7201 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetImageSparseMemoryRequirements2.html>"]
get_image_sparse_memory_requirements2( &self, device: Device, p_info: *const ImageSparseMemoryRequirementsInfo2, p_sparse_memory_requirement_count: *mut u32, p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2, ) -> c_void7202 pub unsafe fn get_image_sparse_memory_requirements2(
7203 &self,
7204 device: Device,
7205 p_info: *const ImageSparseMemoryRequirementsInfo2,
7206 p_sparse_memory_requirement_count: *mut u32,
7207 p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2,
7208 ) -> c_void {
7209 (self.get_image_sparse_memory_requirements2)(
7210 device,
7211 p_info,
7212 p_sparse_memory_requirement_count,
7213 p_sparse_memory_requirements,
7214 )
7215 }
7216 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkTrimCommandPool.html>"]
trim_command_pool( &self, device: Device, command_pool: CommandPool, flags: CommandPoolTrimFlags, ) -> c_void7217 pub unsafe fn trim_command_pool(
7218 &self,
7219 device: Device,
7220 command_pool: CommandPool,
7221 flags: CommandPoolTrimFlags,
7222 ) -> c_void {
7223 (self.trim_command_pool)(device, command_pool, flags)
7224 }
7225 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceQueue2.html>"]
get_device_queue2( &self, device: Device, p_queue_info: *const DeviceQueueInfo2, p_queue: *mut Queue, ) -> c_void7226 pub unsafe fn get_device_queue2(
7227 &self,
7228 device: Device,
7229 p_queue_info: *const DeviceQueueInfo2,
7230 p_queue: *mut Queue,
7231 ) -> c_void {
7232 (self.get_device_queue2)(device, p_queue_info, p_queue)
7233 }
7234 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateSamplerYcbcrConversion.html>"]
create_sampler_ycbcr_conversion( &self, device: Device, p_create_info: *const SamplerYcbcrConversionCreateInfo, p_allocator: *const AllocationCallbacks, p_ycbcr_conversion: *mut SamplerYcbcrConversion, ) -> Result7235 pub unsafe fn create_sampler_ycbcr_conversion(
7236 &self,
7237 device: Device,
7238 p_create_info: *const SamplerYcbcrConversionCreateInfo,
7239 p_allocator: *const AllocationCallbacks,
7240 p_ycbcr_conversion: *mut SamplerYcbcrConversion,
7241 ) -> Result {
7242 (self.create_sampler_ycbcr_conversion)(
7243 device,
7244 p_create_info,
7245 p_allocator,
7246 p_ycbcr_conversion,
7247 )
7248 }
7249 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroySamplerYcbcrConversion.html>"]
destroy_sampler_ycbcr_conversion( &self, device: Device, ycbcr_conversion: SamplerYcbcrConversion, p_allocator: *const AllocationCallbacks, ) -> c_void7250 pub unsafe fn destroy_sampler_ycbcr_conversion(
7251 &self,
7252 device: Device,
7253 ycbcr_conversion: SamplerYcbcrConversion,
7254 p_allocator: *const AllocationCallbacks,
7255 ) -> c_void {
7256 (self.destroy_sampler_ycbcr_conversion)(device, ycbcr_conversion, p_allocator)
7257 }
7258 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateDescriptorUpdateTemplate.html>"]
create_descriptor_update_template( &self, device: Device, p_create_info: *const DescriptorUpdateTemplateCreateInfo, p_allocator: *const AllocationCallbacks, p_descriptor_update_template: *mut DescriptorUpdateTemplate, ) -> Result7259 pub unsafe fn create_descriptor_update_template(
7260 &self,
7261 device: Device,
7262 p_create_info: *const DescriptorUpdateTemplateCreateInfo,
7263 p_allocator: *const AllocationCallbacks,
7264 p_descriptor_update_template: *mut DescriptorUpdateTemplate,
7265 ) -> Result {
7266 (self.create_descriptor_update_template)(
7267 device,
7268 p_create_info,
7269 p_allocator,
7270 p_descriptor_update_template,
7271 )
7272 }
7273 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkDestroyDescriptorUpdateTemplate.html>"]
destroy_descriptor_update_template( &self, device: Device, descriptor_update_template: DescriptorUpdateTemplate, p_allocator: *const AllocationCallbacks, ) -> c_void7274 pub unsafe fn destroy_descriptor_update_template(
7275 &self,
7276 device: Device,
7277 descriptor_update_template: DescriptorUpdateTemplate,
7278 p_allocator: *const AllocationCallbacks,
7279 ) -> c_void {
7280 (self.destroy_descriptor_update_template)(device, descriptor_update_template, p_allocator)
7281 }
7282 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkUpdateDescriptorSetWithTemplate.html>"]
update_descriptor_set_with_template( &self, device: Device, descriptor_set: DescriptorSet, descriptor_update_template: DescriptorUpdateTemplate, p_data: *const c_void, ) -> c_void7283 pub unsafe fn update_descriptor_set_with_template(
7284 &self,
7285 device: Device,
7286 descriptor_set: DescriptorSet,
7287 descriptor_update_template: DescriptorUpdateTemplate,
7288 p_data: *const c_void,
7289 ) -> c_void {
7290 (self.update_descriptor_set_with_template)(
7291 device,
7292 descriptor_set,
7293 descriptor_update_template,
7294 p_data,
7295 )
7296 }
7297 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDescriptorSetLayoutSupport.html>"]
get_descriptor_set_layout_support( &self, device: Device, p_create_info: *const DescriptorSetLayoutCreateInfo, p_support: *mut DescriptorSetLayoutSupport, ) -> c_void7298 pub unsafe fn get_descriptor_set_layout_support(
7299 &self,
7300 device: Device,
7301 p_create_info: *const DescriptorSetLayoutCreateInfo,
7302 p_support: *mut DescriptorSetLayoutSupport,
7303 ) -> c_void {
7304 (self.get_descriptor_set_layout_support)(device, p_create_info, p_support)
7305 }
7306 }
7307 pub struct EntryFnV1_2 {}
7308 unsafe impl Send for EntryFnV1_2 {}
7309 unsafe impl Sync for EntryFnV1_2 {}
7310 impl ::std::clone::Clone for EntryFnV1_2 {
clone(&self) -> Self7311 fn clone(&self) -> Self {
7312 EntryFnV1_2 {}
7313 }
7314 }
7315 impl EntryFnV1_2 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,7316 pub fn load<F>(mut _f: F) -> Self
7317 where
7318 F: FnMut(&::std::ffi::CStr) -> *const c_void,
7319 {
7320 EntryFnV1_2 {}
7321 }
7322 }
7323 pub struct InstanceFnV1_2 {}
7324 unsafe impl Send for InstanceFnV1_2 {}
7325 unsafe impl Sync for InstanceFnV1_2 {}
7326 impl ::std::clone::Clone for InstanceFnV1_2 {
clone(&self) -> Self7327 fn clone(&self) -> Self {
7328 InstanceFnV1_2 {}
7329 }
7330 }
7331 impl InstanceFnV1_2 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,7332 pub fn load<F>(mut _f: F) -> Self
7333 where
7334 F: FnMut(&::std::ffi::CStr) -> *const c_void,
7335 {
7336 InstanceFnV1_2 {}
7337 }
7338 }
7339 pub struct DeviceFnV1_2 {
7340 pub cmd_draw_indirect_count: extern "system" fn(
7341 command_buffer: CommandBuffer,
7342 buffer: Buffer,
7343 offset: DeviceSize,
7344 count_buffer: Buffer,
7345 count_buffer_offset: DeviceSize,
7346 max_draw_count: u32,
7347 stride: u32,
7348 ) -> c_void,
7349 pub cmd_draw_indexed_indirect_count: extern "system" fn(
7350 command_buffer: CommandBuffer,
7351 buffer: Buffer,
7352 offset: DeviceSize,
7353 count_buffer: Buffer,
7354 count_buffer_offset: DeviceSize,
7355 max_draw_count: u32,
7356 stride: u32,
7357 ) -> c_void,
7358 pub create_render_pass2: extern "system" fn(
7359 device: Device,
7360 p_create_info: *const RenderPassCreateInfo2,
7361 p_allocator: *const AllocationCallbacks,
7362 p_render_pass: *mut RenderPass,
7363 ) -> Result,
7364 pub cmd_begin_render_pass2: extern "system" fn(
7365 command_buffer: CommandBuffer,
7366 p_render_pass_begin: *const RenderPassBeginInfo,
7367 p_subpass_begin_info: *const SubpassBeginInfo,
7368 ) -> c_void,
7369 pub cmd_next_subpass2: extern "system" fn(
7370 command_buffer: CommandBuffer,
7371 p_subpass_begin_info: *const SubpassBeginInfo,
7372 p_subpass_end_info: *const SubpassEndInfo,
7373 ) -> c_void,
7374 pub cmd_end_render_pass2: extern "system" fn(
7375 command_buffer: CommandBuffer,
7376 p_subpass_end_info: *const SubpassEndInfo,
7377 ) -> c_void,
7378 pub reset_query_pool: extern "system" fn(
7379 device: Device,
7380 query_pool: QueryPool,
7381 first_query: u32,
7382 query_count: u32,
7383 ) -> c_void,
7384 pub get_semaphore_counter_value:
7385 extern "system" fn(device: Device, semaphore: Semaphore, p_value: *mut u64) -> Result,
7386 pub wait_semaphores: extern "system" fn(
7387 device: Device,
7388 p_wait_info: *const SemaphoreWaitInfo,
7389 timeout: u64,
7390 ) -> Result,
7391 pub signal_semaphore:
7392 extern "system" fn(device: Device, p_signal_info: *const SemaphoreSignalInfo) -> Result,
7393 pub get_buffer_device_address:
7394 extern "system" fn(device: Device, p_info: *const BufferDeviceAddressInfo) -> DeviceAddress,
7395 pub get_buffer_opaque_capture_address:
7396 extern "system" fn(device: Device, p_info: *const BufferDeviceAddressInfo) -> u64,
7397 pub get_device_memory_opaque_capture_address: extern "system" fn(
7398 device: Device,
7399 p_info: *const DeviceMemoryOpaqueCaptureAddressInfo,
7400 ) -> u64,
7401 }
7402 unsafe impl Send for DeviceFnV1_2 {}
7403 unsafe impl Sync for DeviceFnV1_2 {}
7404 impl ::std::clone::Clone for DeviceFnV1_2 {
clone(&self) -> Self7405 fn clone(&self) -> Self {
7406 DeviceFnV1_2 {
7407 cmd_draw_indirect_count: self.cmd_draw_indirect_count,
7408 cmd_draw_indexed_indirect_count: self.cmd_draw_indexed_indirect_count,
7409 create_render_pass2: self.create_render_pass2,
7410 cmd_begin_render_pass2: self.cmd_begin_render_pass2,
7411 cmd_next_subpass2: self.cmd_next_subpass2,
7412 cmd_end_render_pass2: self.cmd_end_render_pass2,
7413 reset_query_pool: self.reset_query_pool,
7414 get_semaphore_counter_value: self.get_semaphore_counter_value,
7415 wait_semaphores: self.wait_semaphores,
7416 signal_semaphore: self.signal_semaphore,
7417 get_buffer_device_address: self.get_buffer_device_address,
7418 get_buffer_opaque_capture_address: self.get_buffer_opaque_capture_address,
7419 get_device_memory_opaque_capture_address: self.get_device_memory_opaque_capture_address,
7420 }
7421 }
7422 }
7423 impl DeviceFnV1_2 {
load<F>(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void,7424 pub fn load<F>(mut _f: F) -> Self
7425 where
7426 F: FnMut(&::std::ffi::CStr) -> *const c_void,
7427 {
7428 DeviceFnV1_2 {
7429 cmd_draw_indirect_count: unsafe {
7430 extern "system" fn cmd_draw_indirect_count(
7431 _command_buffer: CommandBuffer,
7432 _buffer: Buffer,
7433 _offset: DeviceSize,
7434 _count_buffer: Buffer,
7435 _count_buffer_offset: DeviceSize,
7436 _max_draw_count: u32,
7437 _stride: u32,
7438 ) -> c_void {
7439 panic!(concat!(
7440 "Unable to load ",
7441 stringify!(cmd_draw_indirect_count)
7442 ))
7443 }
7444 let raw_name = stringify!(vkCmdDrawIndirectCount);
7445 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7446 let val = _f(&cname);
7447 if val.is_null() {
7448 cmd_draw_indirect_count
7449 } else {
7450 ::std::mem::transmute(val)
7451 }
7452 },
7453 cmd_draw_indexed_indirect_count: unsafe {
7454 extern "system" fn cmd_draw_indexed_indirect_count(
7455 _command_buffer: CommandBuffer,
7456 _buffer: Buffer,
7457 _offset: DeviceSize,
7458 _count_buffer: Buffer,
7459 _count_buffer_offset: DeviceSize,
7460 _max_draw_count: u32,
7461 _stride: u32,
7462 ) -> c_void {
7463 panic!(concat!(
7464 "Unable to load ",
7465 stringify!(cmd_draw_indexed_indirect_count)
7466 ))
7467 }
7468 let raw_name = stringify!(vkCmdDrawIndexedIndirectCount);
7469 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7470 let val = _f(&cname);
7471 if val.is_null() {
7472 cmd_draw_indexed_indirect_count
7473 } else {
7474 ::std::mem::transmute(val)
7475 }
7476 },
7477 create_render_pass2: unsafe {
7478 extern "system" fn create_render_pass2(
7479 _device: Device,
7480 _p_create_info: *const RenderPassCreateInfo2,
7481 _p_allocator: *const AllocationCallbacks,
7482 _p_render_pass: *mut RenderPass,
7483 ) -> Result {
7484 panic!(concat!("Unable to load ", stringify!(create_render_pass2)))
7485 }
7486 let raw_name = stringify!(vkCreateRenderPass2);
7487 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7488 let val = _f(&cname);
7489 if val.is_null() {
7490 create_render_pass2
7491 } else {
7492 ::std::mem::transmute(val)
7493 }
7494 },
7495 cmd_begin_render_pass2: unsafe {
7496 extern "system" fn cmd_begin_render_pass2(
7497 _command_buffer: CommandBuffer,
7498 _p_render_pass_begin: *const RenderPassBeginInfo,
7499 _p_subpass_begin_info: *const SubpassBeginInfo,
7500 ) -> c_void {
7501 panic!(concat!(
7502 "Unable to load ",
7503 stringify!(cmd_begin_render_pass2)
7504 ))
7505 }
7506 let raw_name = stringify!(vkCmdBeginRenderPass2);
7507 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7508 let val = _f(&cname);
7509 if val.is_null() {
7510 cmd_begin_render_pass2
7511 } else {
7512 ::std::mem::transmute(val)
7513 }
7514 },
7515 cmd_next_subpass2: unsafe {
7516 extern "system" fn cmd_next_subpass2(
7517 _command_buffer: CommandBuffer,
7518 _p_subpass_begin_info: *const SubpassBeginInfo,
7519 _p_subpass_end_info: *const SubpassEndInfo,
7520 ) -> c_void {
7521 panic!(concat!("Unable to load ", stringify!(cmd_next_subpass2)))
7522 }
7523 let raw_name = stringify!(vkCmdNextSubpass2);
7524 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7525 let val = _f(&cname);
7526 if val.is_null() {
7527 cmd_next_subpass2
7528 } else {
7529 ::std::mem::transmute(val)
7530 }
7531 },
7532 cmd_end_render_pass2: unsafe {
7533 extern "system" fn cmd_end_render_pass2(
7534 _command_buffer: CommandBuffer,
7535 _p_subpass_end_info: *const SubpassEndInfo,
7536 ) -> c_void {
7537 panic!(concat!("Unable to load ", stringify!(cmd_end_render_pass2)))
7538 }
7539 let raw_name = stringify!(vkCmdEndRenderPass2);
7540 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7541 let val = _f(&cname);
7542 if val.is_null() {
7543 cmd_end_render_pass2
7544 } else {
7545 ::std::mem::transmute(val)
7546 }
7547 },
7548 reset_query_pool: unsafe {
7549 extern "system" fn reset_query_pool(
7550 _device: Device,
7551 _query_pool: QueryPool,
7552 _first_query: u32,
7553 _query_count: u32,
7554 ) -> c_void {
7555 panic!(concat!("Unable to load ", stringify!(reset_query_pool)))
7556 }
7557 let raw_name = stringify!(vkResetQueryPool);
7558 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7559 let val = _f(&cname);
7560 if val.is_null() {
7561 reset_query_pool
7562 } else {
7563 ::std::mem::transmute(val)
7564 }
7565 },
7566 get_semaphore_counter_value: unsafe {
7567 extern "system" fn get_semaphore_counter_value(
7568 _device: Device,
7569 _semaphore: Semaphore,
7570 _p_value: *mut u64,
7571 ) -> Result {
7572 panic!(concat!(
7573 "Unable to load ",
7574 stringify!(get_semaphore_counter_value)
7575 ))
7576 }
7577 let raw_name = stringify!(vkGetSemaphoreCounterValue);
7578 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7579 let val = _f(&cname);
7580 if val.is_null() {
7581 get_semaphore_counter_value
7582 } else {
7583 ::std::mem::transmute(val)
7584 }
7585 },
7586 wait_semaphores: unsafe {
7587 extern "system" fn wait_semaphores(
7588 _device: Device,
7589 _p_wait_info: *const SemaphoreWaitInfo,
7590 _timeout: u64,
7591 ) -> Result {
7592 panic!(concat!("Unable to load ", stringify!(wait_semaphores)))
7593 }
7594 let raw_name = stringify!(vkWaitSemaphores);
7595 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7596 let val = _f(&cname);
7597 if val.is_null() {
7598 wait_semaphores
7599 } else {
7600 ::std::mem::transmute(val)
7601 }
7602 },
7603 signal_semaphore: unsafe {
7604 extern "system" fn signal_semaphore(
7605 _device: Device,
7606 _p_signal_info: *const SemaphoreSignalInfo,
7607 ) -> Result {
7608 panic!(concat!("Unable to load ", stringify!(signal_semaphore)))
7609 }
7610 let raw_name = stringify!(vkSignalSemaphore);
7611 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7612 let val = _f(&cname);
7613 if val.is_null() {
7614 signal_semaphore
7615 } else {
7616 ::std::mem::transmute(val)
7617 }
7618 },
7619 get_buffer_device_address: unsafe {
7620 extern "system" fn get_buffer_device_address(
7621 _device: Device,
7622 _p_info: *const BufferDeviceAddressInfo,
7623 ) -> DeviceAddress {
7624 panic!(concat!(
7625 "Unable to load ",
7626 stringify!(get_buffer_device_address)
7627 ))
7628 }
7629 let raw_name = stringify!(vkGetBufferDeviceAddress);
7630 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7631 let val = _f(&cname);
7632 if val.is_null() {
7633 get_buffer_device_address
7634 } else {
7635 ::std::mem::transmute(val)
7636 }
7637 },
7638 get_buffer_opaque_capture_address: unsafe {
7639 extern "system" fn get_buffer_opaque_capture_address(
7640 _device: Device,
7641 _p_info: *const BufferDeviceAddressInfo,
7642 ) -> u64 {
7643 panic!(concat!(
7644 "Unable to load ",
7645 stringify!(get_buffer_opaque_capture_address)
7646 ))
7647 }
7648 let raw_name = stringify!(vkGetBufferOpaqueCaptureAddress);
7649 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7650 let val = _f(&cname);
7651 if val.is_null() {
7652 get_buffer_opaque_capture_address
7653 } else {
7654 ::std::mem::transmute(val)
7655 }
7656 },
7657 get_device_memory_opaque_capture_address: unsafe {
7658 extern "system" fn get_device_memory_opaque_capture_address(
7659 _device: Device,
7660 _p_info: *const DeviceMemoryOpaqueCaptureAddressInfo,
7661 ) -> u64 {
7662 panic!(concat!(
7663 "Unable to load ",
7664 stringify!(get_device_memory_opaque_capture_address)
7665 ))
7666 }
7667 let raw_name = stringify!(vkGetDeviceMemoryOpaqueCaptureAddress);
7668 let cname = ::std::ffi::CString::new(raw_name).unwrap();
7669 let val = _f(&cname);
7670 if val.is_null() {
7671 get_device_memory_opaque_capture_address
7672 } else {
7673 ::std::mem::transmute(val)
7674 }
7675 },
7676 }
7677 }
7678 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawIndirectCount.html>"]
cmd_draw_indirect_count( &self, command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, count_buffer: Buffer, count_buffer_offset: DeviceSize, max_draw_count: u32, stride: u32, ) -> c_void7679 pub unsafe fn cmd_draw_indirect_count(
7680 &self,
7681 command_buffer: CommandBuffer,
7682 buffer: Buffer,
7683 offset: DeviceSize,
7684 count_buffer: Buffer,
7685 count_buffer_offset: DeviceSize,
7686 max_draw_count: u32,
7687 stride: u32,
7688 ) -> c_void {
7689 (self.cmd_draw_indirect_count)(
7690 command_buffer,
7691 buffer,
7692 offset,
7693 count_buffer,
7694 count_buffer_offset,
7695 max_draw_count,
7696 stride,
7697 )
7698 }
7699 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdDrawIndexedIndirectCount.html>"]
cmd_draw_indexed_indirect_count( &self, command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, count_buffer: Buffer, count_buffer_offset: DeviceSize, max_draw_count: u32, stride: u32, ) -> c_void7700 pub unsafe fn cmd_draw_indexed_indirect_count(
7701 &self,
7702 command_buffer: CommandBuffer,
7703 buffer: Buffer,
7704 offset: DeviceSize,
7705 count_buffer: Buffer,
7706 count_buffer_offset: DeviceSize,
7707 max_draw_count: u32,
7708 stride: u32,
7709 ) -> c_void {
7710 (self.cmd_draw_indexed_indirect_count)(
7711 command_buffer,
7712 buffer,
7713 offset,
7714 count_buffer,
7715 count_buffer_offset,
7716 max_draw_count,
7717 stride,
7718 )
7719 }
7720 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateRenderPass2.html>"]
create_render_pass2( &self, device: Device, p_create_info: *const RenderPassCreateInfo2, p_allocator: *const AllocationCallbacks, p_render_pass: *mut RenderPass, ) -> Result7721 pub unsafe fn create_render_pass2(
7722 &self,
7723 device: Device,
7724 p_create_info: *const RenderPassCreateInfo2,
7725 p_allocator: *const AllocationCallbacks,
7726 p_render_pass: *mut RenderPass,
7727 ) -> Result {
7728 (self.create_render_pass2)(device, p_create_info, p_allocator, p_render_pass)
7729 }
7730 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdBeginRenderPass2.html>"]
cmd_begin_render_pass2( &self, command_buffer: CommandBuffer, p_render_pass_begin: *const RenderPassBeginInfo, p_subpass_begin_info: *const SubpassBeginInfo, ) -> c_void7731 pub unsafe fn cmd_begin_render_pass2(
7732 &self,
7733 command_buffer: CommandBuffer,
7734 p_render_pass_begin: *const RenderPassBeginInfo,
7735 p_subpass_begin_info: *const SubpassBeginInfo,
7736 ) -> c_void {
7737 (self.cmd_begin_render_pass2)(command_buffer, p_render_pass_begin, p_subpass_begin_info)
7738 }
7739 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdNextSubpass2.html>"]
cmd_next_subpass2( &self, command_buffer: CommandBuffer, p_subpass_begin_info: *const SubpassBeginInfo, p_subpass_end_info: *const SubpassEndInfo, ) -> c_void7740 pub unsafe fn cmd_next_subpass2(
7741 &self,
7742 command_buffer: CommandBuffer,
7743 p_subpass_begin_info: *const SubpassBeginInfo,
7744 p_subpass_end_info: *const SubpassEndInfo,
7745 ) -> c_void {
7746 (self.cmd_next_subpass2)(command_buffer, p_subpass_begin_info, p_subpass_end_info)
7747 }
7748 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCmdEndRenderPass2.html>"]
cmd_end_render_pass2( &self, command_buffer: CommandBuffer, p_subpass_end_info: *const SubpassEndInfo, ) -> c_void7749 pub unsafe fn cmd_end_render_pass2(
7750 &self,
7751 command_buffer: CommandBuffer,
7752 p_subpass_end_info: *const SubpassEndInfo,
7753 ) -> c_void {
7754 (self.cmd_end_render_pass2)(command_buffer, p_subpass_end_info)
7755 }
7756 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkResetQueryPool.html>"]
reset_query_pool( &self, device: Device, query_pool: QueryPool, first_query: u32, query_count: u32, ) -> c_void7757 pub unsafe fn reset_query_pool(
7758 &self,
7759 device: Device,
7760 query_pool: QueryPool,
7761 first_query: u32,
7762 query_count: u32,
7763 ) -> c_void {
7764 (self.reset_query_pool)(device, query_pool, first_query, query_count)
7765 }
7766 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetSemaphoreCounterValue.html>"]
get_semaphore_counter_value( &self, device: Device, semaphore: Semaphore, p_value: *mut u64, ) -> Result7767 pub unsafe fn get_semaphore_counter_value(
7768 &self,
7769 device: Device,
7770 semaphore: Semaphore,
7771 p_value: *mut u64,
7772 ) -> Result {
7773 (self.get_semaphore_counter_value)(device, semaphore, p_value)
7774 }
7775 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkWaitSemaphores.html>"]
wait_semaphores( &self, device: Device, p_wait_info: *const SemaphoreWaitInfo, timeout: u64, ) -> Result7776 pub unsafe fn wait_semaphores(
7777 &self,
7778 device: Device,
7779 p_wait_info: *const SemaphoreWaitInfo,
7780 timeout: u64,
7781 ) -> Result {
7782 (self.wait_semaphores)(device, p_wait_info, timeout)
7783 }
7784 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkSignalSemaphore.html>"]
signal_semaphore( &self, device: Device, p_signal_info: *const SemaphoreSignalInfo, ) -> Result7785 pub unsafe fn signal_semaphore(
7786 &self,
7787 device: Device,
7788 p_signal_info: *const SemaphoreSignalInfo,
7789 ) -> Result {
7790 (self.signal_semaphore)(device, p_signal_info)
7791 }
7792 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetBufferDeviceAddress.html>"]
get_buffer_device_address( &self, device: Device, p_info: *const BufferDeviceAddressInfo, ) -> DeviceAddress7793 pub unsafe fn get_buffer_device_address(
7794 &self,
7795 device: Device,
7796 p_info: *const BufferDeviceAddressInfo,
7797 ) -> DeviceAddress {
7798 (self.get_buffer_device_address)(device, p_info)
7799 }
7800 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetBufferOpaqueCaptureAddress.html>"]
get_buffer_opaque_capture_address( &self, device: Device, p_info: *const BufferDeviceAddressInfo, ) -> u647801 pub unsafe fn get_buffer_opaque_capture_address(
7802 &self,
7803 device: Device,
7804 p_info: *const BufferDeviceAddressInfo,
7805 ) -> u64 {
7806 (self.get_buffer_opaque_capture_address)(device, p_info)
7807 }
7808 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetDeviceMemoryOpaqueCaptureAddress.html>"]
get_device_memory_opaque_capture_address( &self, device: Device, p_info: *const DeviceMemoryOpaqueCaptureAddressInfo, ) -> u647809 pub unsafe fn get_device_memory_opaque_capture_address(
7810 &self,
7811 device: Device,
7812 p_info: *const DeviceMemoryOpaqueCaptureAddressInfo,
7813 ) -> u64 {
7814 (self.get_device_memory_opaque_capture_address)(device, p_info)
7815 }
7816 }
7817 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSampleMask.html>"]
7818 pub type SampleMask = u32;
7819 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBool32.html>"]
7820 pub type Bool32 = u32;
7821 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFlags.html>"]
7822 pub type Flags = u32;
7823 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceSize.html>"]
7824 pub type DeviceSize = u64;
7825 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceAddress.html>"]
7826 pub type DeviceAddress = u64;
7827 #[repr(transparent)]
7828 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7829 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryPoolCreateFlags.html>"]
7830 pub struct QueryPoolCreateFlags(Flags);
7831 vk_bitflags_wrapped!(QueryPoolCreateFlags, 0b0, Flags);
7832 #[repr(transparent)]
7833 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7834 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineLayoutCreateFlags.html>"]
7835 pub struct PipelineLayoutCreateFlags(Flags);
7836 vk_bitflags_wrapped!(PipelineLayoutCreateFlags, 0b0, Flags);
7837 #[repr(transparent)]
7838 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7839 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDepthStencilStateCreateFlags.html>"]
7840 pub struct PipelineDepthStencilStateCreateFlags(Flags);
7841 vk_bitflags_wrapped!(PipelineDepthStencilStateCreateFlags, 0b0, Flags);
7842 #[repr(transparent)]
7843 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7844 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDynamicStateCreateFlags.html>"]
7845 pub struct PipelineDynamicStateCreateFlags(Flags);
7846 vk_bitflags_wrapped!(PipelineDynamicStateCreateFlags, 0b0, Flags);
7847 #[repr(transparent)]
7848 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7849 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendStateCreateFlags.html>"]
7850 pub struct PipelineColorBlendStateCreateFlags(Flags);
7851 vk_bitflags_wrapped!(PipelineColorBlendStateCreateFlags, 0b0, Flags);
7852 #[repr(transparent)]
7853 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7854 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineMultisampleStateCreateFlags.html>"]
7855 pub struct PipelineMultisampleStateCreateFlags(Flags);
7856 vk_bitflags_wrapped!(PipelineMultisampleStateCreateFlags, 0b0, Flags);
7857 #[repr(transparent)]
7858 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7859 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateCreateFlags.html>"]
7860 pub struct PipelineRasterizationStateCreateFlags(Flags);
7861 vk_bitflags_wrapped!(PipelineRasterizationStateCreateFlags, 0b0, Flags);
7862 #[repr(transparent)]
7863 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7864 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportStateCreateFlags.html>"]
7865 pub struct PipelineViewportStateCreateFlags(Flags);
7866 vk_bitflags_wrapped!(PipelineViewportStateCreateFlags, 0b0, Flags);
7867 #[repr(transparent)]
7868 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7869 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineTessellationStateCreateFlags.html>"]
7870 pub struct PipelineTessellationStateCreateFlags(Flags);
7871 vk_bitflags_wrapped!(PipelineTessellationStateCreateFlags, 0b0, Flags);
7872 #[repr(transparent)]
7873 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7874 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineInputAssemblyStateCreateFlags.html>"]
7875 pub struct PipelineInputAssemblyStateCreateFlags(Flags);
7876 vk_bitflags_wrapped!(PipelineInputAssemblyStateCreateFlags, 0b0, Flags);
7877 #[repr(transparent)]
7878 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7879 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineVertexInputStateCreateFlags.html>"]
7880 pub struct PipelineVertexInputStateCreateFlags(Flags);
7881 vk_bitflags_wrapped!(PipelineVertexInputStateCreateFlags, 0b0, Flags);
7882 #[repr(transparent)]
7883 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7884 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferViewCreateFlags.html>"]
7885 pub struct BufferViewCreateFlags(Flags);
7886 vk_bitflags_wrapped!(BufferViewCreateFlags, 0b0, Flags);
7887 #[repr(transparent)]
7888 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7889 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstanceCreateFlags.html>"]
7890 pub struct InstanceCreateFlags(Flags);
7891 vk_bitflags_wrapped!(InstanceCreateFlags, 0b0, Flags);
7892 #[repr(transparent)]
7893 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7894 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceCreateFlags.html>"]
7895 pub struct DeviceCreateFlags(Flags);
7896 vk_bitflags_wrapped!(DeviceCreateFlags, 0b0, Flags);
7897 #[repr(transparent)]
7898 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7899 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkEventCreateFlags.html>"]
7900 pub struct EventCreateFlags(Flags);
7901 vk_bitflags_wrapped!(EventCreateFlags, 0b0, Flags);
7902 #[repr(transparent)]
7903 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7904 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryMapFlags.html>"]
7905 pub struct MemoryMapFlags(Flags);
7906 vk_bitflags_wrapped!(MemoryMapFlags, 0b0, Flags);
7907 #[repr(transparent)]
7908 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7909 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolResetFlags.html>"]
7910 pub struct DescriptorPoolResetFlags(Flags);
7911 vk_bitflags_wrapped!(DescriptorPoolResetFlags, 0b0, Flags);
7912 #[repr(transparent)]
7913 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7914 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorUpdateTemplateCreateFlags.html>"]
7915 pub struct DescriptorUpdateTemplateCreateFlags(Flags);
7916 vk_bitflags_wrapped!(DescriptorUpdateTemplateCreateFlags, 0b0, Flags);
7917 #[repr(transparent)]
7918 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7919 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayModeCreateFlagsKHR.html>"]
7920 pub struct DisplayModeCreateFlagsKHR(Flags);
7921 vk_bitflags_wrapped!(DisplayModeCreateFlagsKHR, 0b0, Flags);
7922 #[repr(transparent)]
7923 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7924 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplaySurfaceCreateFlagsKHR.html>"]
7925 pub struct DisplaySurfaceCreateFlagsKHR(Flags);
7926 vk_bitflags_wrapped!(DisplaySurfaceCreateFlagsKHR, 0b0, Flags);
7927 #[repr(transparent)]
7928 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7929 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAndroidSurfaceCreateFlagsKHR.html>"]
7930 pub struct AndroidSurfaceCreateFlagsKHR(Flags);
7931 vk_bitflags_wrapped!(AndroidSurfaceCreateFlagsKHR, 0b0, Flags);
7932 #[repr(transparent)]
7933 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7934 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkViSurfaceCreateFlagsNN.html>"]
7935 pub struct ViSurfaceCreateFlagsNN(Flags);
7936 vk_bitflags_wrapped!(ViSurfaceCreateFlagsNN, 0b0, Flags);
7937 #[repr(transparent)]
7938 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7939 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWaylandSurfaceCreateFlagsKHR.html>"]
7940 pub struct WaylandSurfaceCreateFlagsKHR(Flags);
7941 vk_bitflags_wrapped!(WaylandSurfaceCreateFlagsKHR, 0b0, Flags);
7942 #[repr(transparent)]
7943 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7944 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWin32SurfaceCreateFlagsKHR.html>"]
7945 pub struct Win32SurfaceCreateFlagsKHR(Flags);
7946 vk_bitflags_wrapped!(Win32SurfaceCreateFlagsKHR, 0b0, Flags);
7947 #[repr(transparent)]
7948 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7949 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkXlibSurfaceCreateFlagsKHR.html>"]
7950 pub struct XlibSurfaceCreateFlagsKHR(Flags);
7951 vk_bitflags_wrapped!(XlibSurfaceCreateFlagsKHR, 0b0, Flags);
7952 #[repr(transparent)]
7953 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7954 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkXcbSurfaceCreateFlagsKHR.html>"]
7955 pub struct XcbSurfaceCreateFlagsKHR(Flags);
7956 vk_bitflags_wrapped!(XcbSurfaceCreateFlagsKHR, 0b0, Flags);
7957 #[repr(transparent)]
7958 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7959 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkIOSSurfaceCreateFlagsMVK.html>"]
7960 pub struct IOSSurfaceCreateFlagsMVK(Flags);
7961 vk_bitflags_wrapped!(IOSSurfaceCreateFlagsMVK, 0b0, Flags);
7962 #[repr(transparent)]
7963 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7964 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMacOSSurfaceCreateFlagsMVK.html>"]
7965 pub struct MacOSSurfaceCreateFlagsMVK(Flags);
7966 vk_bitflags_wrapped!(MacOSSurfaceCreateFlagsMVK, 0b0, Flags);
7967 #[repr(transparent)]
7968 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7969 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMetalSurfaceCreateFlagsEXT.html>"]
7970 pub struct MetalSurfaceCreateFlagsEXT(Flags);
7971 vk_bitflags_wrapped!(MetalSurfaceCreateFlagsEXT, 0b0, Flags);
7972 #[repr(transparent)]
7973 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7974 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImagePipeSurfaceCreateFlagsFUCHSIA.html>"]
7975 pub struct ImagePipeSurfaceCreateFlagsFUCHSIA(Flags);
7976 vk_bitflags_wrapped!(ImagePipeSurfaceCreateFlagsFUCHSIA, 0b0, Flags);
7977 #[repr(transparent)]
7978 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7979 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkStreamDescriptorSurfaceCreateFlagsGGP.html>"]
7980 pub struct StreamDescriptorSurfaceCreateFlagsGGP(Flags);
7981 vk_bitflags_wrapped!(StreamDescriptorSurfaceCreateFlagsGGP, 0b0, Flags);
7982 #[repr(transparent)]
7983 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7984 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkHeadlessSurfaceCreateFlagsEXT.html>"]
7985 pub struct HeadlessSurfaceCreateFlagsEXT(Flags);
7986 vk_bitflags_wrapped!(HeadlessSurfaceCreateFlagsEXT, 0b0, Flags);
7987 #[repr(transparent)]
7988 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7989 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandPoolTrimFlags.html>"]
7990 pub struct CommandPoolTrimFlags(Flags);
7991 vk_bitflags_wrapped!(CommandPoolTrimFlags, 0b0, Flags);
7992 #[repr(transparent)]
7993 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7994 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportSwizzleStateCreateFlagsNV.html>"]
7995 pub struct PipelineViewportSwizzleStateCreateFlagsNV(Flags);
7996 vk_bitflags_wrapped!(PipelineViewportSwizzleStateCreateFlagsNV, 0b0, Flags);
7997 #[repr(transparent)]
7998 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
7999 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDiscardRectangleStateCreateFlagsEXT.html>"]
8000 pub struct PipelineDiscardRectangleStateCreateFlagsEXT(Flags);
8001 vk_bitflags_wrapped!(PipelineDiscardRectangleStateCreateFlagsEXT, 0b0, Flags);
8002 #[repr(transparent)]
8003 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8004 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageToColorStateCreateFlagsNV.html>"]
8005 pub struct PipelineCoverageToColorStateCreateFlagsNV(Flags);
8006 vk_bitflags_wrapped!(PipelineCoverageToColorStateCreateFlagsNV, 0b0, Flags);
8007 #[repr(transparent)]
8008 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8009 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageModulationStateCreateFlagsNV.html>"]
8010 pub struct PipelineCoverageModulationStateCreateFlagsNV(Flags);
8011 vk_bitflags_wrapped!(PipelineCoverageModulationStateCreateFlagsNV, 0b0, Flags);
8012 #[repr(transparent)]
8013 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8014 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageReductionStateCreateFlagsNV.html>"]
8015 pub struct PipelineCoverageReductionStateCreateFlagsNV(Flags);
8016 vk_bitflags_wrapped!(PipelineCoverageReductionStateCreateFlagsNV, 0b0, Flags);
8017 #[repr(transparent)]
8018 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8019 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationCacheCreateFlagsEXT.html>"]
8020 pub struct ValidationCacheCreateFlagsEXT(Flags);
8021 vk_bitflags_wrapped!(ValidationCacheCreateFlagsEXT, 0b0, Flags);
8022 #[repr(transparent)]
8023 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8024 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerCreateFlagsEXT.html>"]
8025 pub struct DebugUtilsMessengerCreateFlagsEXT(Flags);
8026 vk_bitflags_wrapped!(DebugUtilsMessengerCreateFlagsEXT, 0b0, Flags);
8027 #[repr(transparent)]
8028 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8029 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerCallbackDataFlagsEXT.html>"]
8030 pub struct DebugUtilsMessengerCallbackDataFlagsEXT(Flags);
8031 vk_bitflags_wrapped!(DebugUtilsMessengerCallbackDataFlagsEXT, 0b0, Flags);
8032 #[repr(transparent)]
8033 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8034 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationConservativeStateCreateFlagsEXT.html>"]
8035 pub struct PipelineRasterizationConservativeStateCreateFlagsEXT(Flags);
8036 vk_bitflags_wrapped!(
8037 PipelineRasterizationConservativeStateCreateFlagsEXT,
8038 0b0,
8039 Flags
8040 );
8041 #[repr(transparent)]
8042 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8043 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateStreamCreateFlagsEXT.html>"]
8044 pub struct PipelineRasterizationStateStreamCreateFlagsEXT(Flags);
8045 vk_bitflags_wrapped!(PipelineRasterizationStateStreamCreateFlagsEXT, 0b0, Flags);
8046 #[repr(transparent)]
8047 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
8048 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationDepthClipStateCreateFlagsEXT.html>"]
8049 pub struct PipelineRasterizationDepthClipStateCreateFlagsEXT(Flags);
8050 vk_bitflags_wrapped!(
8051 PipelineRasterizationDepthClipStateCreateFlagsEXT,
8052 0b0,
8053 Flags
8054 );
8055 define_handle!(
8056 Instance,
8057 INSTANCE,
8058 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstance.html>"
8059 );
8060 define_handle ! ( PhysicalDevice , PHYSICAL_DEVICE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDevice.html>" ) ;
8061 define_handle!(
8062 Device,
8063 DEVICE,
8064 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDevice.html>"
8065 );
8066 define_handle!(
8067 Queue,
8068 QUEUE,
8069 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueue.html>"
8070 );
8071 define_handle ! ( CommandBuffer , COMMAND_BUFFER , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandBuffer.html>" ) ;
8072 handle_nondispatchable ! ( DeviceMemory , DEVICE_MEMORY , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemory.html>" ) ;
8073 handle_nondispatchable ! ( CommandPool , COMMAND_POOL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandPool.html>" ) ;
8074 handle_nondispatchable!(
8075 Buffer,
8076 BUFFER,
8077 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBuffer.html>"
8078 );
8079 handle_nondispatchable!(
8080 BufferView,
8081 BUFFER_VIEW,
8082 doc =
8083 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferView.html>"
8084 );
8085 handle_nondispatchable!(
8086 Image,
8087 IMAGE,
8088 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImage.html>"
8089 );
8090 handle_nondispatchable!(
8091 ImageView,
8092 IMAGE_VIEW,
8093 doc =
8094 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageView.html>"
8095 );
8096 handle_nondispatchable ! ( ShaderModule , SHADER_MODULE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderModule.html>" ) ;
8097 handle_nondispatchable!(
8098 Pipeline,
8099 PIPELINE,
8100 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipeline.html>"
8101 );
8102 handle_nondispatchable ! ( PipelineLayout , PIPELINE_LAYOUT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineLayout.html>" ) ;
8103 handle_nondispatchable!(
8104 Sampler,
8105 SAMPLER,
8106 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSampler.html>"
8107 );
8108 handle_nondispatchable ! ( DescriptorSet , DESCRIPTOR_SET , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSet.html>" ) ;
8109 handle_nondispatchable ! ( DescriptorSetLayout , DESCRIPTOR_SET_LAYOUT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayout.html>" ) ;
8110 handle_nondispatchable ! ( DescriptorPool , DESCRIPTOR_POOL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPool.html>" ) ;
8111 handle_nondispatchable!(
8112 Fence,
8113 FENCE,
8114 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFence.html>"
8115 );
8116 handle_nondispatchable!(
8117 Semaphore,
8118 SEMAPHORE,
8119 doc =
8120 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSemaphore.html>"
8121 );
8122 handle_nondispatchable!(
8123 Event,
8124 EVENT,
8125 doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkEvent.html>"
8126 );
8127 handle_nondispatchable!(
8128 QueryPool,
8129 QUERY_POOL,
8130 doc =
8131 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryPool.html>"
8132 );
8133 handle_nondispatchable ! ( Framebuffer , FRAMEBUFFER , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFramebuffer.html>" ) ;
8134 handle_nondispatchable!(
8135 RenderPass,
8136 RENDER_PASS,
8137 doc =
8138 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRenderPass.html>"
8139 );
8140 handle_nondispatchable ! ( PipelineCache , PIPELINE_CACHE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCache.html>" ) ;
8141 handle_nondispatchable ! ( IndirectCommandsLayoutNV , INDIRECT_COMMANDS_LAYOUT_NV , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkIndirectCommandsLayoutNV.html>" ) ;
8142 handle_nondispatchable ! ( DescriptorUpdateTemplate , DESCRIPTOR_UPDATE_TEMPLATE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorUpdateTemplate.html>" ) ;
8143 handle_nondispatchable ! ( SamplerYcbcrConversion , SAMPLER_YCBCR_CONVERSION , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerYcbcrConversion.html>" ) ;
8144 handle_nondispatchable ! ( ValidationCacheEXT , VALIDATION_CACHE_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationCacheEXT.html>" ) ;
8145 handle_nondispatchable ! ( AccelerationStructureKHR , ACCELERATION_STRUCTURE_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureKHR.html>" ) ;
8146 handle_nondispatchable ! ( PerformanceConfigurationINTEL , PERFORMANCE_CONFIGURATION_INTEL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceConfigurationINTEL.html>" ) ;
8147 handle_nondispatchable ! ( DeferredOperationKHR , DEFERRED_OPERATION_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeferredOperationKHR.html>" ) ;
8148 handle_nondispatchable!(
8149 DisplayKHR,
8150 DISPLAY_KHR,
8151 doc =
8152 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayKHR.html>"
8153 );
8154 handle_nondispatchable ! ( DisplayModeKHR , DISPLAY_MODE_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayModeKHR.html>" ) ;
8155 handle_nondispatchable!(
8156 SurfaceKHR,
8157 SURFACE_KHR,
8158 doc =
8159 "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSurfaceKHR.html>"
8160 );
8161 handle_nondispatchable ! ( SwapchainKHR , SWAPCHAIN_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSwapchainKHR.html>" ) ;
8162 handle_nondispatchable ! ( DebugReportCallbackEXT , DEBUG_REPORT_CALLBACK_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugReportCallbackEXT.html>" ) ;
8163 handle_nondispatchable ! ( DebugUtilsMessengerEXT , DEBUG_UTILS_MESSENGER_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerEXT.html>" ) ;
8164 #[allow(non_camel_case_types)]
8165 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkInternalAllocationNotification.html>"]
8166 pub type PFN_vkInternalAllocationNotification = Option<
8167 unsafe extern "system" fn(
8168 p_user_data: *mut c_void,
8169 size: usize,
8170 allocation_type: InternalAllocationType,
8171 allocation_scope: SystemAllocationScope,
8172 ) -> c_void,
8173 >;
8174 #[allow(non_camel_case_types)]
8175 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkInternalFreeNotification.html>"]
8176 pub type PFN_vkInternalFreeNotification = Option<
8177 unsafe extern "system" fn(
8178 p_user_data: *mut c_void,
8179 size: usize,
8180 allocation_type: InternalAllocationType,
8181 allocation_scope: SystemAllocationScope,
8182 ) -> c_void,
8183 >;
8184 #[allow(non_camel_case_types)]
8185 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkReallocationFunction.html>"]
8186 pub type PFN_vkReallocationFunction = Option<
8187 unsafe extern "system" fn(
8188 p_user_data: *mut c_void,
8189 p_original: *mut c_void,
8190 size: usize,
8191 alignment: usize,
8192 allocation_scope: SystemAllocationScope,
8193 ) -> *mut c_void,
8194 >;
8195 #[allow(non_camel_case_types)]
8196 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkAllocationFunction.html>"]
8197 pub type PFN_vkAllocationFunction = Option<
8198 unsafe extern "system" fn(
8199 p_user_data: *mut c_void,
8200 size: usize,
8201 alignment: usize,
8202 allocation_scope: SystemAllocationScope,
8203 ) -> *mut c_void,
8204 >;
8205 #[allow(non_camel_case_types)]
8206 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkFreeFunction.html>"]
8207 pub type PFN_vkFreeFunction =
8208 Option<unsafe extern "system" fn(p_user_data: *mut c_void, p_memory: *mut c_void) -> c_void>;
8209 #[allow(non_camel_case_types)]
8210 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkVoidFunction.html>"]
8211 pub type PFN_vkVoidFunction = Option<unsafe extern "system" fn() -> c_void>;
8212 #[allow(non_camel_case_types)]
8213 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDebugReportCallbackEXT.html>"]
8214 pub type PFN_vkDebugReportCallbackEXT = Option<
8215 unsafe extern "system" fn(
8216 flags: DebugReportFlagsEXT,
8217 object_type: DebugReportObjectTypeEXT,
8218 object: u64,
8219 location: usize,
8220 message_code: i32,
8221 p_layer_prefix: *const c_char,
8222 p_message: *const c_char,
8223 p_user_data: *mut c_void,
8224 ) -> Bool32,
8225 >;
8226 #[allow(non_camel_case_types)]
8227 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDebugUtilsMessengerCallbackEXT.html>"]
8228 pub type PFN_vkDebugUtilsMessengerCallbackEXT = Option<
8229 unsafe extern "system" fn(
8230 message_severity: DebugUtilsMessageSeverityFlagsEXT,
8231 message_types: DebugUtilsMessageTypeFlagsEXT,
8232 p_callback_data: *const DebugUtilsMessengerCallbackDataEXT,
8233 p_user_data: *mut c_void,
8234 ) -> Bool32,
8235 >;
8236 #[repr(C)]
8237 #[derive(Copy, Clone, Debug)]
8238 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBaseOutStructure.html>"]
8239 pub struct BaseOutStructure {
8240 pub s_type: StructureType,
8241 pub p_next: *mut BaseOutStructure,
8242 }
8243 impl ::std::default::Default for BaseOutStructure {
default() -> BaseOutStructure8244 fn default() -> BaseOutStructure {
8245 BaseOutStructure {
8246 s_type: unsafe { ::std::mem::zeroed() },
8247 p_next: ::std::ptr::null_mut(),
8248 }
8249 }
8250 }
8251 #[repr(C)]
8252 #[derive(Copy, Clone, Debug)]
8253 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBaseInStructure.html>"]
8254 pub struct BaseInStructure {
8255 pub s_type: StructureType,
8256 pub p_next: *const BaseInStructure,
8257 }
8258 impl ::std::default::Default for BaseInStructure {
default() -> BaseInStructure8259 fn default() -> BaseInStructure {
8260 BaseInStructure {
8261 s_type: unsafe { ::std::mem::zeroed() },
8262 p_next: ::std::ptr::null(),
8263 }
8264 }
8265 }
8266 #[repr(C)]
8267 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
8268 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkOffset2D.html>"]
8269 pub struct Offset2D {
8270 pub x: i32,
8271 pub y: i32,
8272 }
8273 impl Offset2D {
builder<'a>() -> Offset2DBuilder<'a>8274 pub fn builder<'a>() -> Offset2DBuilder<'a> {
8275 Offset2DBuilder {
8276 inner: Offset2D::default(),
8277 marker: ::std::marker::PhantomData,
8278 }
8279 }
8280 }
8281 #[repr(transparent)]
8282 pub struct Offset2DBuilder<'a> {
8283 inner: Offset2D,
8284 marker: ::std::marker::PhantomData<&'a ()>,
8285 }
8286 impl<'a> ::std::ops::Deref for Offset2DBuilder<'a> {
8287 type Target = Offset2D;
deref(&self) -> &Self::Target8288 fn deref(&self) -> &Self::Target {
8289 &self.inner
8290 }
8291 }
8292 impl<'a> ::std::ops::DerefMut for Offset2DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8293 fn deref_mut(&mut self) -> &mut Self::Target {
8294 &mut self.inner
8295 }
8296 }
8297 impl<'a> Offset2DBuilder<'a> {
x(mut self, x: i32) -> Offset2DBuilder<'a>8298 pub fn x(mut self, x: i32) -> Offset2DBuilder<'a> {
8299 self.inner.x = x;
8300 self
8301 }
y(mut self, y: i32) -> Offset2DBuilder<'a>8302 pub fn y(mut self, y: i32) -> Offset2DBuilder<'a> {
8303 self.inner.y = y;
8304 self
8305 }
8306 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8307 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8308 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Offset2D8309 pub fn build(self) -> Offset2D {
8310 self.inner
8311 }
8312 }
8313 #[repr(C)]
8314 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
8315 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkOffset3D.html>"]
8316 pub struct Offset3D {
8317 pub x: i32,
8318 pub y: i32,
8319 pub z: i32,
8320 }
8321 impl Offset3D {
builder<'a>() -> Offset3DBuilder<'a>8322 pub fn builder<'a>() -> Offset3DBuilder<'a> {
8323 Offset3DBuilder {
8324 inner: Offset3D::default(),
8325 marker: ::std::marker::PhantomData,
8326 }
8327 }
8328 }
8329 #[repr(transparent)]
8330 pub struct Offset3DBuilder<'a> {
8331 inner: Offset3D,
8332 marker: ::std::marker::PhantomData<&'a ()>,
8333 }
8334 impl<'a> ::std::ops::Deref for Offset3DBuilder<'a> {
8335 type Target = Offset3D;
deref(&self) -> &Self::Target8336 fn deref(&self) -> &Self::Target {
8337 &self.inner
8338 }
8339 }
8340 impl<'a> ::std::ops::DerefMut for Offset3DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8341 fn deref_mut(&mut self) -> &mut Self::Target {
8342 &mut self.inner
8343 }
8344 }
8345 impl<'a> Offset3DBuilder<'a> {
x(mut self, x: i32) -> Offset3DBuilder<'a>8346 pub fn x(mut self, x: i32) -> Offset3DBuilder<'a> {
8347 self.inner.x = x;
8348 self
8349 }
y(mut self, y: i32) -> Offset3DBuilder<'a>8350 pub fn y(mut self, y: i32) -> Offset3DBuilder<'a> {
8351 self.inner.y = y;
8352 self
8353 }
z(mut self, z: i32) -> Offset3DBuilder<'a>8354 pub fn z(mut self, z: i32) -> Offset3DBuilder<'a> {
8355 self.inner.z = z;
8356 self
8357 }
8358 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8359 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8360 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Offset3D8361 pub fn build(self) -> Offset3D {
8362 self.inner
8363 }
8364 }
8365 #[repr(C)]
8366 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
8367 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtent2D.html>"]
8368 pub struct Extent2D {
8369 pub width: u32,
8370 pub height: u32,
8371 }
8372 impl Extent2D {
builder<'a>() -> Extent2DBuilder<'a>8373 pub fn builder<'a>() -> Extent2DBuilder<'a> {
8374 Extent2DBuilder {
8375 inner: Extent2D::default(),
8376 marker: ::std::marker::PhantomData,
8377 }
8378 }
8379 }
8380 #[repr(transparent)]
8381 pub struct Extent2DBuilder<'a> {
8382 inner: Extent2D,
8383 marker: ::std::marker::PhantomData<&'a ()>,
8384 }
8385 impl<'a> ::std::ops::Deref for Extent2DBuilder<'a> {
8386 type Target = Extent2D;
deref(&self) -> &Self::Target8387 fn deref(&self) -> &Self::Target {
8388 &self.inner
8389 }
8390 }
8391 impl<'a> ::std::ops::DerefMut for Extent2DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8392 fn deref_mut(&mut self) -> &mut Self::Target {
8393 &mut self.inner
8394 }
8395 }
8396 impl<'a> Extent2DBuilder<'a> {
width(mut self, width: u32) -> Extent2DBuilder<'a>8397 pub fn width(mut self, width: u32) -> Extent2DBuilder<'a> {
8398 self.inner.width = width;
8399 self
8400 }
height(mut self, height: u32) -> Extent2DBuilder<'a>8401 pub fn height(mut self, height: u32) -> Extent2DBuilder<'a> {
8402 self.inner.height = height;
8403 self
8404 }
8405 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8406 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8407 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Extent2D8408 pub fn build(self) -> Extent2D {
8409 self.inner
8410 }
8411 }
8412 #[repr(C)]
8413 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
8414 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtent3D.html>"]
8415 pub struct Extent3D {
8416 pub width: u32,
8417 pub height: u32,
8418 pub depth: u32,
8419 }
8420 impl Extent3D {
builder<'a>() -> Extent3DBuilder<'a>8421 pub fn builder<'a>() -> Extent3DBuilder<'a> {
8422 Extent3DBuilder {
8423 inner: Extent3D::default(),
8424 marker: ::std::marker::PhantomData,
8425 }
8426 }
8427 }
8428 #[repr(transparent)]
8429 pub struct Extent3DBuilder<'a> {
8430 inner: Extent3D,
8431 marker: ::std::marker::PhantomData<&'a ()>,
8432 }
8433 impl<'a> ::std::ops::Deref for Extent3DBuilder<'a> {
8434 type Target = Extent3D;
deref(&self) -> &Self::Target8435 fn deref(&self) -> &Self::Target {
8436 &self.inner
8437 }
8438 }
8439 impl<'a> ::std::ops::DerefMut for Extent3DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8440 fn deref_mut(&mut self) -> &mut Self::Target {
8441 &mut self.inner
8442 }
8443 }
8444 impl<'a> Extent3DBuilder<'a> {
width(mut self, width: u32) -> Extent3DBuilder<'a>8445 pub fn width(mut self, width: u32) -> Extent3DBuilder<'a> {
8446 self.inner.width = width;
8447 self
8448 }
height(mut self, height: u32) -> Extent3DBuilder<'a>8449 pub fn height(mut self, height: u32) -> Extent3DBuilder<'a> {
8450 self.inner.height = height;
8451 self
8452 }
depth(mut self, depth: u32) -> Extent3DBuilder<'a>8453 pub fn depth(mut self, depth: u32) -> Extent3DBuilder<'a> {
8454 self.inner.depth = depth;
8455 self
8456 }
8457 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8458 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8459 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Extent3D8460 pub fn build(self) -> Extent3D {
8461 self.inner
8462 }
8463 }
8464 #[repr(C)]
8465 #[derive(Copy, Clone, Default, Debug)]
8466 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkViewport.html>"]
8467 pub struct Viewport {
8468 pub x: f32,
8469 pub y: f32,
8470 pub width: f32,
8471 pub height: f32,
8472 pub min_depth: f32,
8473 pub max_depth: f32,
8474 }
8475 impl Viewport {
builder<'a>() -> ViewportBuilder<'a>8476 pub fn builder<'a>() -> ViewportBuilder<'a> {
8477 ViewportBuilder {
8478 inner: Viewport::default(),
8479 marker: ::std::marker::PhantomData,
8480 }
8481 }
8482 }
8483 #[repr(transparent)]
8484 pub struct ViewportBuilder<'a> {
8485 inner: Viewport,
8486 marker: ::std::marker::PhantomData<&'a ()>,
8487 }
8488 impl<'a> ::std::ops::Deref for ViewportBuilder<'a> {
8489 type Target = Viewport;
deref(&self) -> &Self::Target8490 fn deref(&self) -> &Self::Target {
8491 &self.inner
8492 }
8493 }
8494 impl<'a> ::std::ops::DerefMut for ViewportBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8495 fn deref_mut(&mut self) -> &mut Self::Target {
8496 &mut self.inner
8497 }
8498 }
8499 impl<'a> ViewportBuilder<'a> {
x(mut self, x: f32) -> ViewportBuilder<'a>8500 pub fn x(mut self, x: f32) -> ViewportBuilder<'a> {
8501 self.inner.x = x;
8502 self
8503 }
y(mut self, y: f32) -> ViewportBuilder<'a>8504 pub fn y(mut self, y: f32) -> ViewportBuilder<'a> {
8505 self.inner.y = y;
8506 self
8507 }
width(mut self, width: f32) -> ViewportBuilder<'a>8508 pub fn width(mut self, width: f32) -> ViewportBuilder<'a> {
8509 self.inner.width = width;
8510 self
8511 }
height(mut self, height: f32) -> ViewportBuilder<'a>8512 pub fn height(mut self, height: f32) -> ViewportBuilder<'a> {
8513 self.inner.height = height;
8514 self
8515 }
min_depth(mut self, min_depth: f32) -> ViewportBuilder<'a>8516 pub fn min_depth(mut self, min_depth: f32) -> ViewportBuilder<'a> {
8517 self.inner.min_depth = min_depth;
8518 self
8519 }
max_depth(mut self, max_depth: f32) -> ViewportBuilder<'a>8520 pub fn max_depth(mut self, max_depth: f32) -> ViewportBuilder<'a> {
8521 self.inner.max_depth = max_depth;
8522 self
8523 }
8524 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8525 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8526 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Viewport8527 pub fn build(self) -> Viewport {
8528 self.inner
8529 }
8530 }
8531 #[repr(C)]
8532 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
8533 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRect2D.html>"]
8534 pub struct Rect2D {
8535 pub offset: Offset2D,
8536 pub extent: Extent2D,
8537 }
8538 impl Rect2D {
builder<'a>() -> Rect2DBuilder<'a>8539 pub fn builder<'a>() -> Rect2DBuilder<'a> {
8540 Rect2DBuilder {
8541 inner: Rect2D::default(),
8542 marker: ::std::marker::PhantomData,
8543 }
8544 }
8545 }
8546 #[repr(transparent)]
8547 pub struct Rect2DBuilder<'a> {
8548 inner: Rect2D,
8549 marker: ::std::marker::PhantomData<&'a ()>,
8550 }
8551 impl<'a> ::std::ops::Deref for Rect2DBuilder<'a> {
8552 type Target = Rect2D;
deref(&self) -> &Self::Target8553 fn deref(&self) -> &Self::Target {
8554 &self.inner
8555 }
8556 }
8557 impl<'a> ::std::ops::DerefMut for Rect2DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8558 fn deref_mut(&mut self) -> &mut Self::Target {
8559 &mut self.inner
8560 }
8561 }
8562 impl<'a> Rect2DBuilder<'a> {
offset(mut self, offset: Offset2D) -> Rect2DBuilder<'a>8563 pub fn offset(mut self, offset: Offset2D) -> Rect2DBuilder<'a> {
8564 self.inner.offset = offset;
8565 self
8566 }
extent(mut self, extent: Extent2D) -> Rect2DBuilder<'a>8567 pub fn extent(mut self, extent: Extent2D) -> Rect2DBuilder<'a> {
8568 self.inner.extent = extent;
8569 self
8570 }
8571 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8572 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8573 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Rect2D8574 pub fn build(self) -> Rect2D {
8575 self.inner
8576 }
8577 }
8578 #[repr(C)]
8579 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
8580 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkClearRect.html>"]
8581 pub struct ClearRect {
8582 pub rect: Rect2D,
8583 pub base_array_layer: u32,
8584 pub layer_count: u32,
8585 }
8586 impl ClearRect {
builder<'a>() -> ClearRectBuilder<'a>8587 pub fn builder<'a>() -> ClearRectBuilder<'a> {
8588 ClearRectBuilder {
8589 inner: ClearRect::default(),
8590 marker: ::std::marker::PhantomData,
8591 }
8592 }
8593 }
8594 #[repr(transparent)]
8595 pub struct ClearRectBuilder<'a> {
8596 inner: ClearRect,
8597 marker: ::std::marker::PhantomData<&'a ()>,
8598 }
8599 impl<'a> ::std::ops::Deref for ClearRectBuilder<'a> {
8600 type Target = ClearRect;
deref(&self) -> &Self::Target8601 fn deref(&self) -> &Self::Target {
8602 &self.inner
8603 }
8604 }
8605 impl<'a> ::std::ops::DerefMut for ClearRectBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8606 fn deref_mut(&mut self) -> &mut Self::Target {
8607 &mut self.inner
8608 }
8609 }
8610 impl<'a> ClearRectBuilder<'a> {
rect(mut self, rect: Rect2D) -> ClearRectBuilder<'a>8611 pub fn rect(mut self, rect: Rect2D) -> ClearRectBuilder<'a> {
8612 self.inner.rect = rect;
8613 self
8614 }
base_array_layer(mut self, base_array_layer: u32) -> ClearRectBuilder<'a>8615 pub fn base_array_layer(mut self, base_array_layer: u32) -> ClearRectBuilder<'a> {
8616 self.inner.base_array_layer = base_array_layer;
8617 self
8618 }
layer_count(mut self, layer_count: u32) -> ClearRectBuilder<'a>8619 pub fn layer_count(mut self, layer_count: u32) -> ClearRectBuilder<'a> {
8620 self.inner.layer_count = layer_count;
8621 self
8622 }
8623 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8624 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8625 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ClearRect8626 pub fn build(self) -> ClearRect {
8627 self.inner
8628 }
8629 }
8630 #[repr(C)]
8631 #[derive(Copy, Clone, Default, Debug)]
8632 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComponentMapping.html>"]
8633 pub struct ComponentMapping {
8634 pub r: ComponentSwizzle,
8635 pub g: ComponentSwizzle,
8636 pub b: ComponentSwizzle,
8637 pub a: ComponentSwizzle,
8638 }
8639 impl ComponentMapping {
builder<'a>() -> ComponentMappingBuilder<'a>8640 pub fn builder<'a>() -> ComponentMappingBuilder<'a> {
8641 ComponentMappingBuilder {
8642 inner: ComponentMapping::default(),
8643 marker: ::std::marker::PhantomData,
8644 }
8645 }
8646 }
8647 #[repr(transparent)]
8648 pub struct ComponentMappingBuilder<'a> {
8649 inner: ComponentMapping,
8650 marker: ::std::marker::PhantomData<&'a ()>,
8651 }
8652 impl<'a> ::std::ops::Deref for ComponentMappingBuilder<'a> {
8653 type Target = ComponentMapping;
deref(&self) -> &Self::Target8654 fn deref(&self) -> &Self::Target {
8655 &self.inner
8656 }
8657 }
8658 impl<'a> ::std::ops::DerefMut for ComponentMappingBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8659 fn deref_mut(&mut self) -> &mut Self::Target {
8660 &mut self.inner
8661 }
8662 }
8663 impl<'a> ComponentMappingBuilder<'a> {
r(mut self, r: ComponentSwizzle) -> ComponentMappingBuilder<'a>8664 pub fn r(mut self, r: ComponentSwizzle) -> ComponentMappingBuilder<'a> {
8665 self.inner.r = r;
8666 self
8667 }
g(mut self, g: ComponentSwizzle) -> ComponentMappingBuilder<'a>8668 pub fn g(mut self, g: ComponentSwizzle) -> ComponentMappingBuilder<'a> {
8669 self.inner.g = g;
8670 self
8671 }
b(mut self, b: ComponentSwizzle) -> ComponentMappingBuilder<'a>8672 pub fn b(mut self, b: ComponentSwizzle) -> ComponentMappingBuilder<'a> {
8673 self.inner.b = b;
8674 self
8675 }
a(mut self, a: ComponentSwizzle) -> ComponentMappingBuilder<'a>8676 pub fn a(mut self, a: ComponentSwizzle) -> ComponentMappingBuilder<'a> {
8677 self.inner.a = a;
8678 self
8679 }
8680 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8681 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8682 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ComponentMapping8683 pub fn build(self) -> ComponentMapping {
8684 self.inner
8685 }
8686 }
8687 #[repr(C)]
8688 #[derive(Copy, Clone)]
8689 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceProperties.html>"]
8690 pub struct PhysicalDeviceProperties {
8691 pub api_version: u32,
8692 pub driver_version: u32,
8693 pub vendor_id: u32,
8694 pub device_id: u32,
8695 pub device_type: PhysicalDeviceType,
8696 pub device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE],
8697 pub pipeline_cache_uuid: [u8; UUID_SIZE],
8698 pub limits: PhysicalDeviceLimits,
8699 pub sparse_properties: PhysicalDeviceSparseProperties,
8700 }
8701 impl fmt::Debug for PhysicalDeviceProperties {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result8702 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
8703 fmt.debug_struct("PhysicalDeviceProperties")
8704 .field("api_version", &self.api_version)
8705 .field("driver_version", &self.driver_version)
8706 .field("vendor_id", &self.vendor_id)
8707 .field("device_id", &self.device_id)
8708 .field("device_type", &self.device_type)
8709 .field("device_name", &unsafe {
8710 ::std::ffi::CStr::from_ptr(self.device_name.as_ptr() as *const c_char)
8711 })
8712 .field("pipeline_cache_uuid", &self.pipeline_cache_uuid)
8713 .field("limits", &self.limits)
8714 .field("sparse_properties", &self.sparse_properties)
8715 .finish()
8716 }
8717 }
8718 impl ::std::default::Default for PhysicalDeviceProperties {
default() -> PhysicalDeviceProperties8719 fn default() -> PhysicalDeviceProperties {
8720 PhysicalDeviceProperties {
8721 api_version: u32::default(),
8722 driver_version: u32::default(),
8723 vendor_id: u32::default(),
8724 device_id: u32::default(),
8725 device_type: PhysicalDeviceType::default(),
8726 device_name: unsafe { ::std::mem::zeroed() },
8727 pipeline_cache_uuid: unsafe { ::std::mem::zeroed() },
8728 limits: PhysicalDeviceLimits::default(),
8729 sparse_properties: PhysicalDeviceSparseProperties::default(),
8730 }
8731 }
8732 }
8733 impl PhysicalDeviceProperties {
builder<'a>() -> PhysicalDevicePropertiesBuilder<'a>8734 pub fn builder<'a>() -> PhysicalDevicePropertiesBuilder<'a> {
8735 PhysicalDevicePropertiesBuilder {
8736 inner: PhysicalDeviceProperties::default(),
8737 marker: ::std::marker::PhantomData,
8738 }
8739 }
8740 }
8741 #[repr(transparent)]
8742 pub struct PhysicalDevicePropertiesBuilder<'a> {
8743 inner: PhysicalDeviceProperties,
8744 marker: ::std::marker::PhantomData<&'a ()>,
8745 }
8746 impl<'a> ::std::ops::Deref for PhysicalDevicePropertiesBuilder<'a> {
8747 type Target = PhysicalDeviceProperties;
deref(&self) -> &Self::Target8748 fn deref(&self) -> &Self::Target {
8749 &self.inner
8750 }
8751 }
8752 impl<'a> ::std::ops::DerefMut for PhysicalDevicePropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8753 fn deref_mut(&mut self) -> &mut Self::Target {
8754 &mut self.inner
8755 }
8756 }
8757 impl<'a> PhysicalDevicePropertiesBuilder<'a> {
api_version(mut self, api_version: u32) -> PhysicalDevicePropertiesBuilder<'a>8758 pub fn api_version(mut self, api_version: u32) -> PhysicalDevicePropertiesBuilder<'a> {
8759 self.inner.api_version = api_version;
8760 self
8761 }
driver_version(mut self, driver_version: u32) -> PhysicalDevicePropertiesBuilder<'a>8762 pub fn driver_version(mut self, driver_version: u32) -> PhysicalDevicePropertiesBuilder<'a> {
8763 self.inner.driver_version = driver_version;
8764 self
8765 }
vendor_id(mut self, vendor_id: u32) -> PhysicalDevicePropertiesBuilder<'a>8766 pub fn vendor_id(mut self, vendor_id: u32) -> PhysicalDevicePropertiesBuilder<'a> {
8767 self.inner.vendor_id = vendor_id;
8768 self
8769 }
device_id(mut self, device_id: u32) -> PhysicalDevicePropertiesBuilder<'a>8770 pub fn device_id(mut self, device_id: u32) -> PhysicalDevicePropertiesBuilder<'a> {
8771 self.inner.device_id = device_id;
8772 self
8773 }
device_type( mut self, device_type: PhysicalDeviceType, ) -> PhysicalDevicePropertiesBuilder<'a>8774 pub fn device_type(
8775 mut self,
8776 device_type: PhysicalDeviceType,
8777 ) -> PhysicalDevicePropertiesBuilder<'a> {
8778 self.inner.device_type = device_type;
8779 self
8780 }
device_name( mut self, device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE], ) -> PhysicalDevicePropertiesBuilder<'a>8781 pub fn device_name(
8782 mut self,
8783 device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE],
8784 ) -> PhysicalDevicePropertiesBuilder<'a> {
8785 self.inner.device_name = device_name;
8786 self
8787 }
pipeline_cache_uuid( mut self, pipeline_cache_uuid: [u8; UUID_SIZE], ) -> PhysicalDevicePropertiesBuilder<'a>8788 pub fn pipeline_cache_uuid(
8789 mut self,
8790 pipeline_cache_uuid: [u8; UUID_SIZE],
8791 ) -> PhysicalDevicePropertiesBuilder<'a> {
8792 self.inner.pipeline_cache_uuid = pipeline_cache_uuid;
8793 self
8794 }
limits(mut self, limits: PhysicalDeviceLimits) -> PhysicalDevicePropertiesBuilder<'a>8795 pub fn limits(mut self, limits: PhysicalDeviceLimits) -> PhysicalDevicePropertiesBuilder<'a> {
8796 self.inner.limits = limits;
8797 self
8798 }
sparse_properties( mut self, sparse_properties: PhysicalDeviceSparseProperties, ) -> PhysicalDevicePropertiesBuilder<'a>8799 pub fn sparse_properties(
8800 mut self,
8801 sparse_properties: PhysicalDeviceSparseProperties,
8802 ) -> PhysicalDevicePropertiesBuilder<'a> {
8803 self.inner.sparse_properties = sparse_properties;
8804 self
8805 }
8806 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8807 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8808 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PhysicalDeviceProperties8809 pub fn build(self) -> PhysicalDeviceProperties {
8810 self.inner
8811 }
8812 }
8813 #[repr(C)]
8814 #[derive(Copy, Clone)]
8815 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtensionProperties.html>"]
8816 pub struct ExtensionProperties {
8817 pub extension_name: [c_char; MAX_EXTENSION_NAME_SIZE],
8818 pub spec_version: u32,
8819 }
8820 impl fmt::Debug for ExtensionProperties {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result8821 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
8822 fmt.debug_struct("ExtensionProperties")
8823 .field("extension_name", &unsafe {
8824 ::std::ffi::CStr::from_ptr(self.extension_name.as_ptr() as *const c_char)
8825 })
8826 .field("spec_version", &self.spec_version)
8827 .finish()
8828 }
8829 }
8830 impl ::std::default::Default for ExtensionProperties {
default() -> ExtensionProperties8831 fn default() -> ExtensionProperties {
8832 ExtensionProperties {
8833 extension_name: unsafe { ::std::mem::zeroed() },
8834 spec_version: u32::default(),
8835 }
8836 }
8837 }
8838 impl ExtensionProperties {
builder<'a>() -> ExtensionPropertiesBuilder<'a>8839 pub fn builder<'a>() -> ExtensionPropertiesBuilder<'a> {
8840 ExtensionPropertiesBuilder {
8841 inner: ExtensionProperties::default(),
8842 marker: ::std::marker::PhantomData,
8843 }
8844 }
8845 }
8846 #[repr(transparent)]
8847 pub struct ExtensionPropertiesBuilder<'a> {
8848 inner: ExtensionProperties,
8849 marker: ::std::marker::PhantomData<&'a ()>,
8850 }
8851 impl<'a> ::std::ops::Deref for ExtensionPropertiesBuilder<'a> {
8852 type Target = ExtensionProperties;
deref(&self) -> &Self::Target8853 fn deref(&self) -> &Self::Target {
8854 &self.inner
8855 }
8856 }
8857 impl<'a> ::std::ops::DerefMut for ExtensionPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8858 fn deref_mut(&mut self) -> &mut Self::Target {
8859 &mut self.inner
8860 }
8861 }
8862 impl<'a> ExtensionPropertiesBuilder<'a> {
extension_name( mut self, extension_name: [c_char; MAX_EXTENSION_NAME_SIZE], ) -> ExtensionPropertiesBuilder<'a>8863 pub fn extension_name(
8864 mut self,
8865 extension_name: [c_char; MAX_EXTENSION_NAME_SIZE],
8866 ) -> ExtensionPropertiesBuilder<'a> {
8867 self.inner.extension_name = extension_name;
8868 self
8869 }
spec_version(mut self, spec_version: u32) -> ExtensionPropertiesBuilder<'a>8870 pub fn spec_version(mut self, spec_version: u32) -> ExtensionPropertiesBuilder<'a> {
8871 self.inner.spec_version = spec_version;
8872 self
8873 }
8874 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8875 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8876 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ExtensionProperties8877 pub fn build(self) -> ExtensionProperties {
8878 self.inner
8879 }
8880 }
8881 #[repr(C)]
8882 #[derive(Copy, Clone)]
8883 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkLayerProperties.html>"]
8884 pub struct LayerProperties {
8885 pub layer_name: [c_char; MAX_EXTENSION_NAME_SIZE],
8886 pub spec_version: u32,
8887 pub implementation_version: u32,
8888 pub description: [c_char; MAX_DESCRIPTION_SIZE],
8889 }
8890 impl fmt::Debug for LayerProperties {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result8891 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
8892 fmt.debug_struct("LayerProperties")
8893 .field("layer_name", &unsafe {
8894 ::std::ffi::CStr::from_ptr(self.layer_name.as_ptr() as *const c_char)
8895 })
8896 .field("spec_version", &self.spec_version)
8897 .field("implementation_version", &self.implementation_version)
8898 .field("description", &unsafe {
8899 ::std::ffi::CStr::from_ptr(self.description.as_ptr() as *const c_char)
8900 })
8901 .finish()
8902 }
8903 }
8904 impl ::std::default::Default for LayerProperties {
default() -> LayerProperties8905 fn default() -> LayerProperties {
8906 LayerProperties {
8907 layer_name: unsafe { ::std::mem::zeroed() },
8908 spec_version: u32::default(),
8909 implementation_version: u32::default(),
8910 description: unsafe { ::std::mem::zeroed() },
8911 }
8912 }
8913 }
8914 impl LayerProperties {
builder<'a>() -> LayerPropertiesBuilder<'a>8915 pub fn builder<'a>() -> LayerPropertiesBuilder<'a> {
8916 LayerPropertiesBuilder {
8917 inner: LayerProperties::default(),
8918 marker: ::std::marker::PhantomData,
8919 }
8920 }
8921 }
8922 #[repr(transparent)]
8923 pub struct LayerPropertiesBuilder<'a> {
8924 inner: LayerProperties,
8925 marker: ::std::marker::PhantomData<&'a ()>,
8926 }
8927 impl<'a> ::std::ops::Deref for LayerPropertiesBuilder<'a> {
8928 type Target = LayerProperties;
deref(&self) -> &Self::Target8929 fn deref(&self) -> &Self::Target {
8930 &self.inner
8931 }
8932 }
8933 impl<'a> ::std::ops::DerefMut for LayerPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target8934 fn deref_mut(&mut self) -> &mut Self::Target {
8935 &mut self.inner
8936 }
8937 }
8938 impl<'a> LayerPropertiesBuilder<'a> {
layer_name( mut self, layer_name: [c_char; MAX_EXTENSION_NAME_SIZE], ) -> LayerPropertiesBuilder<'a>8939 pub fn layer_name(
8940 mut self,
8941 layer_name: [c_char; MAX_EXTENSION_NAME_SIZE],
8942 ) -> LayerPropertiesBuilder<'a> {
8943 self.inner.layer_name = layer_name;
8944 self
8945 }
spec_version(mut self, spec_version: u32) -> LayerPropertiesBuilder<'a>8946 pub fn spec_version(mut self, spec_version: u32) -> LayerPropertiesBuilder<'a> {
8947 self.inner.spec_version = spec_version;
8948 self
8949 }
implementation_version( mut self, implementation_version: u32, ) -> LayerPropertiesBuilder<'a>8950 pub fn implementation_version(
8951 mut self,
8952 implementation_version: u32,
8953 ) -> LayerPropertiesBuilder<'a> {
8954 self.inner.implementation_version = implementation_version;
8955 self
8956 }
description( mut self, description: [c_char; MAX_DESCRIPTION_SIZE], ) -> LayerPropertiesBuilder<'a>8957 pub fn description(
8958 mut self,
8959 description: [c_char; MAX_DESCRIPTION_SIZE],
8960 ) -> LayerPropertiesBuilder<'a> {
8961 self.inner.description = description;
8962 self
8963 }
8964 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
8965 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
8966 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> LayerProperties8967 pub fn build(self) -> LayerProperties {
8968 self.inner
8969 }
8970 }
8971 #[repr(C)]
8972 #[derive(Copy, Clone, Debug)]
8973 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkApplicationInfo.html>"]
8974 pub struct ApplicationInfo {
8975 pub s_type: StructureType,
8976 pub p_next: *const c_void,
8977 pub p_application_name: *const c_char,
8978 pub application_version: u32,
8979 pub p_engine_name: *const c_char,
8980 pub engine_version: u32,
8981 pub api_version: u32,
8982 }
8983 impl ::std::default::Default for ApplicationInfo {
default() -> ApplicationInfo8984 fn default() -> ApplicationInfo {
8985 ApplicationInfo {
8986 s_type: StructureType::APPLICATION_INFO,
8987 p_next: ::std::ptr::null(),
8988 p_application_name: ::std::ptr::null(),
8989 application_version: u32::default(),
8990 p_engine_name: ::std::ptr::null(),
8991 engine_version: u32::default(),
8992 api_version: u32::default(),
8993 }
8994 }
8995 }
8996 impl ApplicationInfo {
builder<'a>() -> ApplicationInfoBuilder<'a>8997 pub fn builder<'a>() -> ApplicationInfoBuilder<'a> {
8998 ApplicationInfoBuilder {
8999 inner: ApplicationInfo::default(),
9000 marker: ::std::marker::PhantomData,
9001 }
9002 }
9003 }
9004 #[repr(transparent)]
9005 pub struct ApplicationInfoBuilder<'a> {
9006 inner: ApplicationInfo,
9007 marker: ::std::marker::PhantomData<&'a ()>,
9008 }
9009 pub unsafe trait ExtendsApplicationInfo {}
9010 impl<'a> ::std::ops::Deref for ApplicationInfoBuilder<'a> {
9011 type Target = ApplicationInfo;
deref(&self) -> &Self::Target9012 fn deref(&self) -> &Self::Target {
9013 &self.inner
9014 }
9015 }
9016 impl<'a> ::std::ops::DerefMut for ApplicationInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9017 fn deref_mut(&mut self) -> &mut Self::Target {
9018 &mut self.inner
9019 }
9020 }
9021 impl<'a> ApplicationInfoBuilder<'a> {
application_name( mut self, application_name: &'a ::std::ffi::CStr, ) -> ApplicationInfoBuilder<'a>9022 pub fn application_name(
9023 mut self,
9024 application_name: &'a ::std::ffi::CStr,
9025 ) -> ApplicationInfoBuilder<'a> {
9026 self.inner.p_application_name = application_name.as_ptr();
9027 self
9028 }
application_version(mut self, application_version: u32) -> ApplicationInfoBuilder<'a>9029 pub fn application_version(mut self, application_version: u32) -> ApplicationInfoBuilder<'a> {
9030 self.inner.application_version = application_version;
9031 self
9032 }
engine_name(mut self, engine_name: &'a ::std::ffi::CStr) -> ApplicationInfoBuilder<'a>9033 pub fn engine_name(mut self, engine_name: &'a ::std::ffi::CStr) -> ApplicationInfoBuilder<'a> {
9034 self.inner.p_engine_name = engine_name.as_ptr();
9035 self
9036 }
engine_version(mut self, engine_version: u32) -> ApplicationInfoBuilder<'a>9037 pub fn engine_version(mut self, engine_version: u32) -> ApplicationInfoBuilder<'a> {
9038 self.inner.engine_version = engine_version;
9039 self
9040 }
api_version(mut self, api_version: u32) -> ApplicationInfoBuilder<'a>9041 pub fn api_version(mut self, api_version: u32) -> ApplicationInfoBuilder<'a> {
9042 self.inner.api_version = api_version;
9043 self
9044 }
9045 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
9046 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
9047 #[doc = r" valid extension structs can be pushed into the chain."]
9048 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
9049 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsApplicationInfo>( mut self, next: &'a mut T, ) -> ApplicationInfoBuilder<'a>9050 pub fn push_next<T: ExtendsApplicationInfo>(
9051 mut self,
9052 next: &'a mut T,
9053 ) -> ApplicationInfoBuilder<'a> {
9054 unsafe {
9055 let next_ptr = next as *mut T as *mut BaseOutStructure;
9056 let last_next = ptr_chain_iter(next).last().unwrap();
9057 (*last_next).p_next = self.inner.p_next as _;
9058 self.inner.p_next = next_ptr as _;
9059 }
9060 self
9061 }
9062 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9063 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9064 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ApplicationInfo9065 pub fn build(self) -> ApplicationInfo {
9066 self.inner
9067 }
9068 }
9069 #[repr(C)]
9070 #[derive(Copy, Clone)]
9071 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAllocationCallbacks.html>"]
9072 pub struct AllocationCallbacks {
9073 pub p_user_data: *mut c_void,
9074 pub pfn_allocation: PFN_vkAllocationFunction,
9075 pub pfn_reallocation: PFN_vkReallocationFunction,
9076 pub pfn_free: PFN_vkFreeFunction,
9077 pub pfn_internal_allocation: PFN_vkInternalAllocationNotification,
9078 pub pfn_internal_free: PFN_vkInternalFreeNotification,
9079 }
9080 impl fmt::Debug for AllocationCallbacks {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result9081 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
9082 fmt.debug_struct("AllocationCallbacks")
9083 .field("p_user_data", &self.p_user_data)
9084 .field(
9085 "pfn_allocation",
9086 &(self.pfn_allocation.map(|x| x as *const ())),
9087 )
9088 .field(
9089 "pfn_reallocation",
9090 &(self.pfn_reallocation.map(|x| x as *const ())),
9091 )
9092 .field("pfn_free", &(self.pfn_free.map(|x| x as *const ())))
9093 .field(
9094 "pfn_internal_allocation",
9095 &(self.pfn_internal_allocation.map(|x| x as *const ())),
9096 )
9097 .field(
9098 "pfn_internal_free",
9099 &(self.pfn_internal_free.map(|x| x as *const ())),
9100 )
9101 .finish()
9102 }
9103 }
9104 impl ::std::default::Default for AllocationCallbacks {
default() -> AllocationCallbacks9105 fn default() -> AllocationCallbacks {
9106 AllocationCallbacks {
9107 p_user_data: ::std::ptr::null_mut(),
9108 pfn_allocation: PFN_vkAllocationFunction::default(),
9109 pfn_reallocation: PFN_vkReallocationFunction::default(),
9110 pfn_free: PFN_vkFreeFunction::default(),
9111 pfn_internal_allocation: PFN_vkInternalAllocationNotification::default(),
9112 pfn_internal_free: PFN_vkInternalFreeNotification::default(),
9113 }
9114 }
9115 }
9116 impl AllocationCallbacks {
builder<'a>() -> AllocationCallbacksBuilder<'a>9117 pub fn builder<'a>() -> AllocationCallbacksBuilder<'a> {
9118 AllocationCallbacksBuilder {
9119 inner: AllocationCallbacks::default(),
9120 marker: ::std::marker::PhantomData,
9121 }
9122 }
9123 }
9124 #[repr(transparent)]
9125 pub struct AllocationCallbacksBuilder<'a> {
9126 inner: AllocationCallbacks,
9127 marker: ::std::marker::PhantomData<&'a ()>,
9128 }
9129 impl<'a> ::std::ops::Deref for AllocationCallbacksBuilder<'a> {
9130 type Target = AllocationCallbacks;
deref(&self) -> &Self::Target9131 fn deref(&self) -> &Self::Target {
9132 &self.inner
9133 }
9134 }
9135 impl<'a> ::std::ops::DerefMut for AllocationCallbacksBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9136 fn deref_mut(&mut self) -> &mut Self::Target {
9137 &mut self.inner
9138 }
9139 }
9140 impl<'a> AllocationCallbacksBuilder<'a> {
user_data(mut self, user_data: *mut c_void) -> AllocationCallbacksBuilder<'a>9141 pub fn user_data(mut self, user_data: *mut c_void) -> AllocationCallbacksBuilder<'a> {
9142 self.inner.p_user_data = user_data;
9143 self
9144 }
pfn_allocation( mut self, pfn_allocation: PFN_vkAllocationFunction, ) -> AllocationCallbacksBuilder<'a>9145 pub fn pfn_allocation(
9146 mut self,
9147 pfn_allocation: PFN_vkAllocationFunction,
9148 ) -> AllocationCallbacksBuilder<'a> {
9149 self.inner.pfn_allocation = pfn_allocation;
9150 self
9151 }
pfn_reallocation( mut self, pfn_reallocation: PFN_vkReallocationFunction, ) -> AllocationCallbacksBuilder<'a>9152 pub fn pfn_reallocation(
9153 mut self,
9154 pfn_reallocation: PFN_vkReallocationFunction,
9155 ) -> AllocationCallbacksBuilder<'a> {
9156 self.inner.pfn_reallocation = pfn_reallocation;
9157 self
9158 }
pfn_free(mut self, pfn_free: PFN_vkFreeFunction) -> AllocationCallbacksBuilder<'a>9159 pub fn pfn_free(mut self, pfn_free: PFN_vkFreeFunction) -> AllocationCallbacksBuilder<'a> {
9160 self.inner.pfn_free = pfn_free;
9161 self
9162 }
pfn_internal_allocation( mut self, pfn_internal_allocation: PFN_vkInternalAllocationNotification, ) -> AllocationCallbacksBuilder<'a>9163 pub fn pfn_internal_allocation(
9164 mut self,
9165 pfn_internal_allocation: PFN_vkInternalAllocationNotification,
9166 ) -> AllocationCallbacksBuilder<'a> {
9167 self.inner.pfn_internal_allocation = pfn_internal_allocation;
9168 self
9169 }
pfn_internal_free( mut self, pfn_internal_free: PFN_vkInternalFreeNotification, ) -> AllocationCallbacksBuilder<'a>9170 pub fn pfn_internal_free(
9171 mut self,
9172 pfn_internal_free: PFN_vkInternalFreeNotification,
9173 ) -> AllocationCallbacksBuilder<'a> {
9174 self.inner.pfn_internal_free = pfn_internal_free;
9175 self
9176 }
9177 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9178 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9179 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> AllocationCallbacks9180 pub fn build(self) -> AllocationCallbacks {
9181 self.inner
9182 }
9183 }
9184 #[repr(C)]
9185 #[derive(Copy, Clone, Debug)]
9186 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceQueueCreateInfo.html>"]
9187 pub struct DeviceQueueCreateInfo {
9188 pub s_type: StructureType,
9189 pub p_next: *const c_void,
9190 pub flags: DeviceQueueCreateFlags,
9191 pub queue_family_index: u32,
9192 pub queue_count: u32,
9193 pub p_queue_priorities: *const f32,
9194 }
9195 impl ::std::default::Default for DeviceQueueCreateInfo {
default() -> DeviceQueueCreateInfo9196 fn default() -> DeviceQueueCreateInfo {
9197 DeviceQueueCreateInfo {
9198 s_type: StructureType::DEVICE_QUEUE_CREATE_INFO,
9199 p_next: ::std::ptr::null(),
9200 flags: DeviceQueueCreateFlags::default(),
9201 queue_family_index: u32::default(),
9202 queue_count: u32::default(),
9203 p_queue_priorities: ::std::ptr::null(),
9204 }
9205 }
9206 }
9207 impl DeviceQueueCreateInfo {
builder<'a>() -> DeviceQueueCreateInfoBuilder<'a>9208 pub fn builder<'a>() -> DeviceQueueCreateInfoBuilder<'a> {
9209 DeviceQueueCreateInfoBuilder {
9210 inner: DeviceQueueCreateInfo::default(),
9211 marker: ::std::marker::PhantomData,
9212 }
9213 }
9214 }
9215 #[repr(transparent)]
9216 pub struct DeviceQueueCreateInfoBuilder<'a> {
9217 inner: DeviceQueueCreateInfo,
9218 marker: ::std::marker::PhantomData<&'a ()>,
9219 }
9220 pub unsafe trait ExtendsDeviceQueueCreateInfo {}
9221 impl<'a> ::std::ops::Deref for DeviceQueueCreateInfoBuilder<'a> {
9222 type Target = DeviceQueueCreateInfo;
deref(&self) -> &Self::Target9223 fn deref(&self) -> &Self::Target {
9224 &self.inner
9225 }
9226 }
9227 impl<'a> ::std::ops::DerefMut for DeviceQueueCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9228 fn deref_mut(&mut self) -> &mut Self::Target {
9229 &mut self.inner
9230 }
9231 }
9232 impl<'a> DeviceQueueCreateInfoBuilder<'a> {
flags(mut self, flags: DeviceQueueCreateFlags) -> DeviceQueueCreateInfoBuilder<'a>9233 pub fn flags(mut self, flags: DeviceQueueCreateFlags) -> DeviceQueueCreateInfoBuilder<'a> {
9234 self.inner.flags = flags;
9235 self
9236 }
queue_family_index( mut self, queue_family_index: u32, ) -> DeviceQueueCreateInfoBuilder<'a>9237 pub fn queue_family_index(
9238 mut self,
9239 queue_family_index: u32,
9240 ) -> DeviceQueueCreateInfoBuilder<'a> {
9241 self.inner.queue_family_index = queue_family_index;
9242 self
9243 }
queue_priorities( mut self, queue_priorities: &'a [f32], ) -> DeviceQueueCreateInfoBuilder<'a>9244 pub fn queue_priorities(
9245 mut self,
9246 queue_priorities: &'a [f32],
9247 ) -> DeviceQueueCreateInfoBuilder<'a> {
9248 self.inner.queue_count = queue_priorities.len() as _;
9249 self.inner.p_queue_priorities = queue_priorities.as_ptr();
9250 self
9251 }
9252 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
9253 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
9254 #[doc = r" valid extension structs can be pushed into the chain."]
9255 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
9256 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDeviceQueueCreateInfo>( mut self, next: &'a mut T, ) -> DeviceQueueCreateInfoBuilder<'a>9257 pub fn push_next<T: ExtendsDeviceQueueCreateInfo>(
9258 mut self,
9259 next: &'a mut T,
9260 ) -> DeviceQueueCreateInfoBuilder<'a> {
9261 unsafe {
9262 let next_ptr = next as *mut T as *mut BaseOutStructure;
9263 let last_next = ptr_chain_iter(next).last().unwrap();
9264 (*last_next).p_next = self.inner.p_next as _;
9265 self.inner.p_next = next_ptr as _;
9266 }
9267 self
9268 }
9269 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9270 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9271 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DeviceQueueCreateInfo9272 pub fn build(self) -> DeviceQueueCreateInfo {
9273 self.inner
9274 }
9275 }
9276 #[repr(C)]
9277 #[derive(Copy, Clone, Debug)]
9278 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceCreateInfo.html>"]
9279 pub struct DeviceCreateInfo {
9280 pub s_type: StructureType,
9281 pub p_next: *const c_void,
9282 pub flags: DeviceCreateFlags,
9283 pub queue_create_info_count: u32,
9284 pub p_queue_create_infos: *const DeviceQueueCreateInfo,
9285 pub enabled_layer_count: u32,
9286 pub pp_enabled_layer_names: *const *const c_char,
9287 pub enabled_extension_count: u32,
9288 pub pp_enabled_extension_names: *const *const c_char,
9289 pub p_enabled_features: *const PhysicalDeviceFeatures,
9290 }
9291 impl ::std::default::Default for DeviceCreateInfo {
default() -> DeviceCreateInfo9292 fn default() -> DeviceCreateInfo {
9293 DeviceCreateInfo {
9294 s_type: StructureType::DEVICE_CREATE_INFO,
9295 p_next: ::std::ptr::null(),
9296 flags: DeviceCreateFlags::default(),
9297 queue_create_info_count: u32::default(),
9298 p_queue_create_infos: ::std::ptr::null(),
9299 enabled_layer_count: u32::default(),
9300 pp_enabled_layer_names: ::std::ptr::null(),
9301 enabled_extension_count: u32::default(),
9302 pp_enabled_extension_names: ::std::ptr::null(),
9303 p_enabled_features: ::std::ptr::null(),
9304 }
9305 }
9306 }
9307 impl DeviceCreateInfo {
builder<'a>() -> DeviceCreateInfoBuilder<'a>9308 pub fn builder<'a>() -> DeviceCreateInfoBuilder<'a> {
9309 DeviceCreateInfoBuilder {
9310 inner: DeviceCreateInfo::default(),
9311 marker: ::std::marker::PhantomData,
9312 }
9313 }
9314 }
9315 #[repr(transparent)]
9316 pub struct DeviceCreateInfoBuilder<'a> {
9317 inner: DeviceCreateInfo,
9318 marker: ::std::marker::PhantomData<&'a ()>,
9319 }
9320 pub unsafe trait ExtendsDeviceCreateInfo {}
9321 impl<'a> ::std::ops::Deref for DeviceCreateInfoBuilder<'a> {
9322 type Target = DeviceCreateInfo;
deref(&self) -> &Self::Target9323 fn deref(&self) -> &Self::Target {
9324 &self.inner
9325 }
9326 }
9327 impl<'a> ::std::ops::DerefMut for DeviceCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9328 fn deref_mut(&mut self) -> &mut Self::Target {
9329 &mut self.inner
9330 }
9331 }
9332 impl<'a> DeviceCreateInfoBuilder<'a> {
flags(mut self, flags: DeviceCreateFlags) -> DeviceCreateInfoBuilder<'a>9333 pub fn flags(mut self, flags: DeviceCreateFlags) -> DeviceCreateInfoBuilder<'a> {
9334 self.inner.flags = flags;
9335 self
9336 }
queue_create_infos( mut self, queue_create_infos: &'a [DeviceQueueCreateInfo], ) -> DeviceCreateInfoBuilder<'a>9337 pub fn queue_create_infos(
9338 mut self,
9339 queue_create_infos: &'a [DeviceQueueCreateInfo],
9340 ) -> DeviceCreateInfoBuilder<'a> {
9341 self.inner.queue_create_info_count = queue_create_infos.len() as _;
9342 self.inner.p_queue_create_infos = queue_create_infos.as_ptr();
9343 self
9344 }
enabled_layer_names( mut self, enabled_layer_names: &'a [*const c_char], ) -> DeviceCreateInfoBuilder<'a>9345 pub fn enabled_layer_names(
9346 mut self,
9347 enabled_layer_names: &'a [*const c_char],
9348 ) -> DeviceCreateInfoBuilder<'a> {
9349 self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr();
9350 self.inner.enabled_layer_count = enabled_layer_names.len() as _;
9351 self
9352 }
enabled_extension_names( mut self, enabled_extension_names: &'a [*const c_char], ) -> DeviceCreateInfoBuilder<'a>9353 pub fn enabled_extension_names(
9354 mut self,
9355 enabled_extension_names: &'a [*const c_char],
9356 ) -> DeviceCreateInfoBuilder<'a> {
9357 self.inner.pp_enabled_extension_names = enabled_extension_names.as_ptr();
9358 self.inner.enabled_extension_count = enabled_extension_names.len() as _;
9359 self
9360 }
enabled_features( mut self, enabled_features: &'a PhysicalDeviceFeatures, ) -> DeviceCreateInfoBuilder<'a>9361 pub fn enabled_features(
9362 mut self,
9363 enabled_features: &'a PhysicalDeviceFeatures,
9364 ) -> DeviceCreateInfoBuilder<'a> {
9365 self.inner.p_enabled_features = enabled_features;
9366 self
9367 }
9368 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
9369 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
9370 #[doc = r" valid extension structs can be pushed into the chain."]
9371 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
9372 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDeviceCreateInfo>( mut self, next: &'a mut T, ) -> DeviceCreateInfoBuilder<'a>9373 pub fn push_next<T: ExtendsDeviceCreateInfo>(
9374 mut self,
9375 next: &'a mut T,
9376 ) -> DeviceCreateInfoBuilder<'a> {
9377 unsafe {
9378 let next_ptr = next as *mut T as *mut BaseOutStructure;
9379 let last_next = ptr_chain_iter(next).last().unwrap();
9380 (*last_next).p_next = self.inner.p_next as _;
9381 self.inner.p_next = next_ptr as _;
9382 }
9383 self
9384 }
9385 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9386 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9387 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DeviceCreateInfo9388 pub fn build(self) -> DeviceCreateInfo {
9389 self.inner
9390 }
9391 }
9392 #[repr(C)]
9393 #[derive(Copy, Clone, Debug)]
9394 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstanceCreateInfo.html>"]
9395 pub struct InstanceCreateInfo {
9396 pub s_type: StructureType,
9397 pub p_next: *const c_void,
9398 pub flags: InstanceCreateFlags,
9399 pub p_application_info: *const ApplicationInfo,
9400 pub enabled_layer_count: u32,
9401 pub pp_enabled_layer_names: *const *const c_char,
9402 pub enabled_extension_count: u32,
9403 pub pp_enabled_extension_names: *const *const c_char,
9404 }
9405 impl ::std::default::Default for InstanceCreateInfo {
default() -> InstanceCreateInfo9406 fn default() -> InstanceCreateInfo {
9407 InstanceCreateInfo {
9408 s_type: StructureType::INSTANCE_CREATE_INFO,
9409 p_next: ::std::ptr::null(),
9410 flags: InstanceCreateFlags::default(),
9411 p_application_info: ::std::ptr::null(),
9412 enabled_layer_count: u32::default(),
9413 pp_enabled_layer_names: ::std::ptr::null(),
9414 enabled_extension_count: u32::default(),
9415 pp_enabled_extension_names: ::std::ptr::null(),
9416 }
9417 }
9418 }
9419 impl InstanceCreateInfo {
builder<'a>() -> InstanceCreateInfoBuilder<'a>9420 pub fn builder<'a>() -> InstanceCreateInfoBuilder<'a> {
9421 InstanceCreateInfoBuilder {
9422 inner: InstanceCreateInfo::default(),
9423 marker: ::std::marker::PhantomData,
9424 }
9425 }
9426 }
9427 #[repr(transparent)]
9428 pub struct InstanceCreateInfoBuilder<'a> {
9429 inner: InstanceCreateInfo,
9430 marker: ::std::marker::PhantomData<&'a ()>,
9431 }
9432 pub unsafe trait ExtendsInstanceCreateInfo {}
9433 impl<'a> ::std::ops::Deref for InstanceCreateInfoBuilder<'a> {
9434 type Target = InstanceCreateInfo;
deref(&self) -> &Self::Target9435 fn deref(&self) -> &Self::Target {
9436 &self.inner
9437 }
9438 }
9439 impl<'a> ::std::ops::DerefMut for InstanceCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9440 fn deref_mut(&mut self) -> &mut Self::Target {
9441 &mut self.inner
9442 }
9443 }
9444 impl<'a> InstanceCreateInfoBuilder<'a> {
flags(mut self, flags: InstanceCreateFlags) -> InstanceCreateInfoBuilder<'a>9445 pub fn flags(mut self, flags: InstanceCreateFlags) -> InstanceCreateInfoBuilder<'a> {
9446 self.inner.flags = flags;
9447 self
9448 }
application_info( mut self, application_info: &'a ApplicationInfo, ) -> InstanceCreateInfoBuilder<'a>9449 pub fn application_info(
9450 mut self,
9451 application_info: &'a ApplicationInfo,
9452 ) -> InstanceCreateInfoBuilder<'a> {
9453 self.inner.p_application_info = application_info;
9454 self
9455 }
enabled_layer_names( mut self, enabled_layer_names: &'a [*const c_char], ) -> InstanceCreateInfoBuilder<'a>9456 pub fn enabled_layer_names(
9457 mut self,
9458 enabled_layer_names: &'a [*const c_char],
9459 ) -> InstanceCreateInfoBuilder<'a> {
9460 self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr();
9461 self.inner.enabled_layer_count = enabled_layer_names.len() as _;
9462 self
9463 }
enabled_extension_names( mut self, enabled_extension_names: &'a [*const c_char], ) -> InstanceCreateInfoBuilder<'a>9464 pub fn enabled_extension_names(
9465 mut self,
9466 enabled_extension_names: &'a [*const c_char],
9467 ) -> InstanceCreateInfoBuilder<'a> {
9468 self.inner.pp_enabled_extension_names = enabled_extension_names.as_ptr();
9469 self.inner.enabled_extension_count = enabled_extension_names.len() as _;
9470 self
9471 }
9472 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
9473 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
9474 #[doc = r" valid extension structs can be pushed into the chain."]
9475 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
9476 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsInstanceCreateInfo>( mut self, next: &'a mut T, ) -> InstanceCreateInfoBuilder<'a>9477 pub fn push_next<T: ExtendsInstanceCreateInfo>(
9478 mut self,
9479 next: &'a mut T,
9480 ) -> InstanceCreateInfoBuilder<'a> {
9481 unsafe {
9482 let next_ptr = next as *mut T as *mut BaseOutStructure;
9483 let last_next = ptr_chain_iter(next).last().unwrap();
9484 (*last_next).p_next = self.inner.p_next as _;
9485 self.inner.p_next = next_ptr as _;
9486 }
9487 self
9488 }
9489 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9490 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9491 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> InstanceCreateInfo9492 pub fn build(self) -> InstanceCreateInfo {
9493 self.inner
9494 }
9495 }
9496 #[repr(C)]
9497 #[derive(Copy, Clone, Default, Debug)]
9498 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueueFamilyProperties.html>"]
9499 pub struct QueueFamilyProperties {
9500 pub queue_flags: QueueFlags,
9501 pub queue_count: u32,
9502 pub timestamp_valid_bits: u32,
9503 pub min_image_transfer_granularity: Extent3D,
9504 }
9505 impl QueueFamilyProperties {
builder<'a>() -> QueueFamilyPropertiesBuilder<'a>9506 pub fn builder<'a>() -> QueueFamilyPropertiesBuilder<'a> {
9507 QueueFamilyPropertiesBuilder {
9508 inner: QueueFamilyProperties::default(),
9509 marker: ::std::marker::PhantomData,
9510 }
9511 }
9512 }
9513 #[repr(transparent)]
9514 pub struct QueueFamilyPropertiesBuilder<'a> {
9515 inner: QueueFamilyProperties,
9516 marker: ::std::marker::PhantomData<&'a ()>,
9517 }
9518 impl<'a> ::std::ops::Deref for QueueFamilyPropertiesBuilder<'a> {
9519 type Target = QueueFamilyProperties;
deref(&self) -> &Self::Target9520 fn deref(&self) -> &Self::Target {
9521 &self.inner
9522 }
9523 }
9524 impl<'a> ::std::ops::DerefMut for QueueFamilyPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9525 fn deref_mut(&mut self) -> &mut Self::Target {
9526 &mut self.inner
9527 }
9528 }
9529 impl<'a> QueueFamilyPropertiesBuilder<'a> {
queue_flags(mut self, queue_flags: QueueFlags) -> QueueFamilyPropertiesBuilder<'a>9530 pub fn queue_flags(mut self, queue_flags: QueueFlags) -> QueueFamilyPropertiesBuilder<'a> {
9531 self.inner.queue_flags = queue_flags;
9532 self
9533 }
queue_count(mut self, queue_count: u32) -> QueueFamilyPropertiesBuilder<'a>9534 pub fn queue_count(mut self, queue_count: u32) -> QueueFamilyPropertiesBuilder<'a> {
9535 self.inner.queue_count = queue_count;
9536 self
9537 }
timestamp_valid_bits( mut self, timestamp_valid_bits: u32, ) -> QueueFamilyPropertiesBuilder<'a>9538 pub fn timestamp_valid_bits(
9539 mut self,
9540 timestamp_valid_bits: u32,
9541 ) -> QueueFamilyPropertiesBuilder<'a> {
9542 self.inner.timestamp_valid_bits = timestamp_valid_bits;
9543 self
9544 }
min_image_transfer_granularity( mut self, min_image_transfer_granularity: Extent3D, ) -> QueueFamilyPropertiesBuilder<'a>9545 pub fn min_image_transfer_granularity(
9546 mut self,
9547 min_image_transfer_granularity: Extent3D,
9548 ) -> QueueFamilyPropertiesBuilder<'a> {
9549 self.inner.min_image_transfer_granularity = min_image_transfer_granularity;
9550 self
9551 }
9552 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9553 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9554 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> QueueFamilyProperties9555 pub fn build(self) -> QueueFamilyProperties {
9556 self.inner
9557 }
9558 }
9559 #[repr(C)]
9560 #[derive(Copy, Clone, Debug)]
9561 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceMemoryProperties.html>"]
9562 pub struct PhysicalDeviceMemoryProperties {
9563 pub memory_type_count: u32,
9564 pub memory_types: [MemoryType; MAX_MEMORY_TYPES],
9565 pub memory_heap_count: u32,
9566 pub memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS],
9567 }
9568 impl ::std::default::Default for PhysicalDeviceMemoryProperties {
default() -> PhysicalDeviceMemoryProperties9569 fn default() -> PhysicalDeviceMemoryProperties {
9570 PhysicalDeviceMemoryProperties {
9571 memory_type_count: u32::default(),
9572 memory_types: unsafe { ::std::mem::zeroed() },
9573 memory_heap_count: u32::default(),
9574 memory_heaps: unsafe { ::std::mem::zeroed() },
9575 }
9576 }
9577 }
9578 impl PhysicalDeviceMemoryProperties {
builder<'a>() -> PhysicalDeviceMemoryPropertiesBuilder<'a>9579 pub fn builder<'a>() -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
9580 PhysicalDeviceMemoryPropertiesBuilder {
9581 inner: PhysicalDeviceMemoryProperties::default(),
9582 marker: ::std::marker::PhantomData,
9583 }
9584 }
9585 }
9586 #[repr(transparent)]
9587 pub struct PhysicalDeviceMemoryPropertiesBuilder<'a> {
9588 inner: PhysicalDeviceMemoryProperties,
9589 marker: ::std::marker::PhantomData<&'a ()>,
9590 }
9591 impl<'a> ::std::ops::Deref for PhysicalDeviceMemoryPropertiesBuilder<'a> {
9592 type Target = PhysicalDeviceMemoryProperties;
deref(&self) -> &Self::Target9593 fn deref(&self) -> &Self::Target {
9594 &self.inner
9595 }
9596 }
9597 impl<'a> ::std::ops::DerefMut for PhysicalDeviceMemoryPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9598 fn deref_mut(&mut self) -> &mut Self::Target {
9599 &mut self.inner
9600 }
9601 }
9602 impl<'a> PhysicalDeviceMemoryPropertiesBuilder<'a> {
memory_type_count( mut self, memory_type_count: u32, ) -> PhysicalDeviceMemoryPropertiesBuilder<'a>9603 pub fn memory_type_count(
9604 mut self,
9605 memory_type_count: u32,
9606 ) -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
9607 self.inner.memory_type_count = memory_type_count;
9608 self
9609 }
memory_types( mut self, memory_types: [MemoryType; MAX_MEMORY_TYPES], ) -> PhysicalDeviceMemoryPropertiesBuilder<'a>9610 pub fn memory_types(
9611 mut self,
9612 memory_types: [MemoryType; MAX_MEMORY_TYPES],
9613 ) -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
9614 self.inner.memory_types = memory_types;
9615 self
9616 }
memory_heap_count( mut self, memory_heap_count: u32, ) -> PhysicalDeviceMemoryPropertiesBuilder<'a>9617 pub fn memory_heap_count(
9618 mut self,
9619 memory_heap_count: u32,
9620 ) -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
9621 self.inner.memory_heap_count = memory_heap_count;
9622 self
9623 }
memory_heaps( mut self, memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS], ) -> PhysicalDeviceMemoryPropertiesBuilder<'a>9624 pub fn memory_heaps(
9625 mut self,
9626 memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS],
9627 ) -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
9628 self.inner.memory_heaps = memory_heaps;
9629 self
9630 }
9631 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9632 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9633 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PhysicalDeviceMemoryProperties9634 pub fn build(self) -> PhysicalDeviceMemoryProperties {
9635 self.inner
9636 }
9637 }
9638 #[repr(C)]
9639 #[derive(Copy, Clone, Debug)]
9640 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryAllocateInfo.html>"]
9641 pub struct MemoryAllocateInfo {
9642 pub s_type: StructureType,
9643 pub p_next: *const c_void,
9644 pub allocation_size: DeviceSize,
9645 pub memory_type_index: u32,
9646 }
9647 impl ::std::default::Default for MemoryAllocateInfo {
default() -> MemoryAllocateInfo9648 fn default() -> MemoryAllocateInfo {
9649 MemoryAllocateInfo {
9650 s_type: StructureType::MEMORY_ALLOCATE_INFO,
9651 p_next: ::std::ptr::null(),
9652 allocation_size: DeviceSize::default(),
9653 memory_type_index: u32::default(),
9654 }
9655 }
9656 }
9657 impl MemoryAllocateInfo {
builder<'a>() -> MemoryAllocateInfoBuilder<'a>9658 pub fn builder<'a>() -> MemoryAllocateInfoBuilder<'a> {
9659 MemoryAllocateInfoBuilder {
9660 inner: MemoryAllocateInfo::default(),
9661 marker: ::std::marker::PhantomData,
9662 }
9663 }
9664 }
9665 #[repr(transparent)]
9666 pub struct MemoryAllocateInfoBuilder<'a> {
9667 inner: MemoryAllocateInfo,
9668 marker: ::std::marker::PhantomData<&'a ()>,
9669 }
9670 pub unsafe trait ExtendsMemoryAllocateInfo {}
9671 impl<'a> ::std::ops::Deref for MemoryAllocateInfoBuilder<'a> {
9672 type Target = MemoryAllocateInfo;
deref(&self) -> &Self::Target9673 fn deref(&self) -> &Self::Target {
9674 &self.inner
9675 }
9676 }
9677 impl<'a> ::std::ops::DerefMut for MemoryAllocateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9678 fn deref_mut(&mut self) -> &mut Self::Target {
9679 &mut self.inner
9680 }
9681 }
9682 impl<'a> MemoryAllocateInfoBuilder<'a> {
allocation_size(mut self, allocation_size: DeviceSize) -> MemoryAllocateInfoBuilder<'a>9683 pub fn allocation_size(mut self, allocation_size: DeviceSize) -> MemoryAllocateInfoBuilder<'a> {
9684 self.inner.allocation_size = allocation_size;
9685 self
9686 }
memory_type_index(mut self, memory_type_index: u32) -> MemoryAllocateInfoBuilder<'a>9687 pub fn memory_type_index(mut self, memory_type_index: u32) -> MemoryAllocateInfoBuilder<'a> {
9688 self.inner.memory_type_index = memory_type_index;
9689 self
9690 }
9691 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
9692 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
9693 #[doc = r" valid extension structs can be pushed into the chain."]
9694 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
9695 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsMemoryAllocateInfo>( mut self, next: &'a mut T, ) -> MemoryAllocateInfoBuilder<'a>9696 pub fn push_next<T: ExtendsMemoryAllocateInfo>(
9697 mut self,
9698 next: &'a mut T,
9699 ) -> MemoryAllocateInfoBuilder<'a> {
9700 unsafe {
9701 let next_ptr = next as *mut T as *mut BaseOutStructure;
9702 let last_next = ptr_chain_iter(next).last().unwrap();
9703 (*last_next).p_next = self.inner.p_next as _;
9704 self.inner.p_next = next_ptr as _;
9705 }
9706 self
9707 }
9708 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9709 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9710 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryAllocateInfo9711 pub fn build(self) -> MemoryAllocateInfo {
9712 self.inner
9713 }
9714 }
9715 #[repr(C)]
9716 #[derive(Copy, Clone, Default, Debug)]
9717 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryRequirements.html>"]
9718 pub struct MemoryRequirements {
9719 pub size: DeviceSize,
9720 pub alignment: DeviceSize,
9721 pub memory_type_bits: u32,
9722 }
9723 impl MemoryRequirements {
builder<'a>() -> MemoryRequirementsBuilder<'a>9724 pub fn builder<'a>() -> MemoryRequirementsBuilder<'a> {
9725 MemoryRequirementsBuilder {
9726 inner: MemoryRequirements::default(),
9727 marker: ::std::marker::PhantomData,
9728 }
9729 }
9730 }
9731 #[repr(transparent)]
9732 pub struct MemoryRequirementsBuilder<'a> {
9733 inner: MemoryRequirements,
9734 marker: ::std::marker::PhantomData<&'a ()>,
9735 }
9736 impl<'a> ::std::ops::Deref for MemoryRequirementsBuilder<'a> {
9737 type Target = MemoryRequirements;
deref(&self) -> &Self::Target9738 fn deref(&self) -> &Self::Target {
9739 &self.inner
9740 }
9741 }
9742 impl<'a> ::std::ops::DerefMut for MemoryRequirementsBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9743 fn deref_mut(&mut self) -> &mut Self::Target {
9744 &mut self.inner
9745 }
9746 }
9747 impl<'a> MemoryRequirementsBuilder<'a> {
size(mut self, size: DeviceSize) -> MemoryRequirementsBuilder<'a>9748 pub fn size(mut self, size: DeviceSize) -> MemoryRequirementsBuilder<'a> {
9749 self.inner.size = size;
9750 self
9751 }
alignment(mut self, alignment: DeviceSize) -> MemoryRequirementsBuilder<'a>9752 pub fn alignment(mut self, alignment: DeviceSize) -> MemoryRequirementsBuilder<'a> {
9753 self.inner.alignment = alignment;
9754 self
9755 }
memory_type_bits(mut self, memory_type_bits: u32) -> MemoryRequirementsBuilder<'a>9756 pub fn memory_type_bits(mut self, memory_type_bits: u32) -> MemoryRequirementsBuilder<'a> {
9757 self.inner.memory_type_bits = memory_type_bits;
9758 self
9759 }
9760 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9761 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9762 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryRequirements9763 pub fn build(self) -> MemoryRequirements {
9764 self.inner
9765 }
9766 }
9767 #[repr(C)]
9768 #[derive(Copy, Clone, Default, Debug)]
9769 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageFormatProperties.html>"]
9770 pub struct SparseImageFormatProperties {
9771 pub aspect_mask: ImageAspectFlags,
9772 pub image_granularity: Extent3D,
9773 pub flags: SparseImageFormatFlags,
9774 }
9775 impl SparseImageFormatProperties {
builder<'a>() -> SparseImageFormatPropertiesBuilder<'a>9776 pub fn builder<'a>() -> SparseImageFormatPropertiesBuilder<'a> {
9777 SparseImageFormatPropertiesBuilder {
9778 inner: SparseImageFormatProperties::default(),
9779 marker: ::std::marker::PhantomData,
9780 }
9781 }
9782 }
9783 #[repr(transparent)]
9784 pub struct SparseImageFormatPropertiesBuilder<'a> {
9785 inner: SparseImageFormatProperties,
9786 marker: ::std::marker::PhantomData<&'a ()>,
9787 }
9788 impl<'a> ::std::ops::Deref for SparseImageFormatPropertiesBuilder<'a> {
9789 type Target = SparseImageFormatProperties;
deref(&self) -> &Self::Target9790 fn deref(&self) -> &Self::Target {
9791 &self.inner
9792 }
9793 }
9794 impl<'a> ::std::ops::DerefMut for SparseImageFormatPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9795 fn deref_mut(&mut self) -> &mut Self::Target {
9796 &mut self.inner
9797 }
9798 }
9799 impl<'a> SparseImageFormatPropertiesBuilder<'a> {
aspect_mask( mut self, aspect_mask: ImageAspectFlags, ) -> SparseImageFormatPropertiesBuilder<'a>9800 pub fn aspect_mask(
9801 mut self,
9802 aspect_mask: ImageAspectFlags,
9803 ) -> SparseImageFormatPropertiesBuilder<'a> {
9804 self.inner.aspect_mask = aspect_mask;
9805 self
9806 }
image_granularity( mut self, image_granularity: Extent3D, ) -> SparseImageFormatPropertiesBuilder<'a>9807 pub fn image_granularity(
9808 mut self,
9809 image_granularity: Extent3D,
9810 ) -> SparseImageFormatPropertiesBuilder<'a> {
9811 self.inner.image_granularity = image_granularity;
9812 self
9813 }
flags( mut self, flags: SparseImageFormatFlags, ) -> SparseImageFormatPropertiesBuilder<'a>9814 pub fn flags(
9815 mut self,
9816 flags: SparseImageFormatFlags,
9817 ) -> SparseImageFormatPropertiesBuilder<'a> {
9818 self.inner.flags = flags;
9819 self
9820 }
9821 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9822 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9823 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageFormatProperties9824 pub fn build(self) -> SparseImageFormatProperties {
9825 self.inner
9826 }
9827 }
9828 #[repr(C)]
9829 #[derive(Copy, Clone, Default, Debug)]
9830 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryRequirements.html>"]
9831 pub struct SparseImageMemoryRequirements {
9832 pub format_properties: SparseImageFormatProperties,
9833 pub image_mip_tail_first_lod: u32,
9834 pub image_mip_tail_size: DeviceSize,
9835 pub image_mip_tail_offset: DeviceSize,
9836 pub image_mip_tail_stride: DeviceSize,
9837 }
9838 impl SparseImageMemoryRequirements {
builder<'a>() -> SparseImageMemoryRequirementsBuilder<'a>9839 pub fn builder<'a>() -> SparseImageMemoryRequirementsBuilder<'a> {
9840 SparseImageMemoryRequirementsBuilder {
9841 inner: SparseImageMemoryRequirements::default(),
9842 marker: ::std::marker::PhantomData,
9843 }
9844 }
9845 }
9846 #[repr(transparent)]
9847 pub struct SparseImageMemoryRequirementsBuilder<'a> {
9848 inner: SparseImageMemoryRequirements,
9849 marker: ::std::marker::PhantomData<&'a ()>,
9850 }
9851 impl<'a> ::std::ops::Deref for SparseImageMemoryRequirementsBuilder<'a> {
9852 type Target = SparseImageMemoryRequirements;
deref(&self) -> &Self::Target9853 fn deref(&self) -> &Self::Target {
9854 &self.inner
9855 }
9856 }
9857 impl<'a> ::std::ops::DerefMut for SparseImageMemoryRequirementsBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9858 fn deref_mut(&mut self) -> &mut Self::Target {
9859 &mut self.inner
9860 }
9861 }
9862 impl<'a> SparseImageMemoryRequirementsBuilder<'a> {
format_properties( mut self, format_properties: SparseImageFormatProperties, ) -> SparseImageMemoryRequirementsBuilder<'a>9863 pub fn format_properties(
9864 mut self,
9865 format_properties: SparseImageFormatProperties,
9866 ) -> SparseImageMemoryRequirementsBuilder<'a> {
9867 self.inner.format_properties = format_properties;
9868 self
9869 }
image_mip_tail_first_lod( mut self, image_mip_tail_first_lod: u32, ) -> SparseImageMemoryRequirementsBuilder<'a>9870 pub fn image_mip_tail_first_lod(
9871 mut self,
9872 image_mip_tail_first_lod: u32,
9873 ) -> SparseImageMemoryRequirementsBuilder<'a> {
9874 self.inner.image_mip_tail_first_lod = image_mip_tail_first_lod;
9875 self
9876 }
image_mip_tail_size( mut self, image_mip_tail_size: DeviceSize, ) -> SparseImageMemoryRequirementsBuilder<'a>9877 pub fn image_mip_tail_size(
9878 mut self,
9879 image_mip_tail_size: DeviceSize,
9880 ) -> SparseImageMemoryRequirementsBuilder<'a> {
9881 self.inner.image_mip_tail_size = image_mip_tail_size;
9882 self
9883 }
image_mip_tail_offset( mut self, image_mip_tail_offset: DeviceSize, ) -> SparseImageMemoryRequirementsBuilder<'a>9884 pub fn image_mip_tail_offset(
9885 mut self,
9886 image_mip_tail_offset: DeviceSize,
9887 ) -> SparseImageMemoryRequirementsBuilder<'a> {
9888 self.inner.image_mip_tail_offset = image_mip_tail_offset;
9889 self
9890 }
image_mip_tail_stride( mut self, image_mip_tail_stride: DeviceSize, ) -> SparseImageMemoryRequirementsBuilder<'a>9891 pub fn image_mip_tail_stride(
9892 mut self,
9893 image_mip_tail_stride: DeviceSize,
9894 ) -> SparseImageMemoryRequirementsBuilder<'a> {
9895 self.inner.image_mip_tail_stride = image_mip_tail_stride;
9896 self
9897 }
9898 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9899 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9900 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageMemoryRequirements9901 pub fn build(self) -> SparseImageMemoryRequirements {
9902 self.inner
9903 }
9904 }
9905 #[repr(C)]
9906 #[derive(Copy, Clone, Default, Debug)]
9907 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryType.html>"]
9908 pub struct MemoryType {
9909 pub property_flags: MemoryPropertyFlags,
9910 pub heap_index: u32,
9911 }
9912 impl MemoryType {
builder<'a>() -> MemoryTypeBuilder<'a>9913 pub fn builder<'a>() -> MemoryTypeBuilder<'a> {
9914 MemoryTypeBuilder {
9915 inner: MemoryType::default(),
9916 marker: ::std::marker::PhantomData,
9917 }
9918 }
9919 }
9920 #[repr(transparent)]
9921 pub struct MemoryTypeBuilder<'a> {
9922 inner: MemoryType,
9923 marker: ::std::marker::PhantomData<&'a ()>,
9924 }
9925 impl<'a> ::std::ops::Deref for MemoryTypeBuilder<'a> {
9926 type Target = MemoryType;
deref(&self) -> &Self::Target9927 fn deref(&self) -> &Self::Target {
9928 &self.inner
9929 }
9930 }
9931 impl<'a> ::std::ops::DerefMut for MemoryTypeBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9932 fn deref_mut(&mut self) -> &mut Self::Target {
9933 &mut self.inner
9934 }
9935 }
9936 impl<'a> MemoryTypeBuilder<'a> {
property_flags(mut self, property_flags: MemoryPropertyFlags) -> MemoryTypeBuilder<'a>9937 pub fn property_flags(mut self, property_flags: MemoryPropertyFlags) -> MemoryTypeBuilder<'a> {
9938 self.inner.property_flags = property_flags;
9939 self
9940 }
heap_index(mut self, heap_index: u32) -> MemoryTypeBuilder<'a>9941 pub fn heap_index(mut self, heap_index: u32) -> MemoryTypeBuilder<'a> {
9942 self.inner.heap_index = heap_index;
9943 self
9944 }
9945 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9946 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9947 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryType9948 pub fn build(self) -> MemoryType {
9949 self.inner
9950 }
9951 }
9952 #[repr(C)]
9953 #[derive(Copy, Clone, Default, Debug)]
9954 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryHeap.html>"]
9955 pub struct MemoryHeap {
9956 pub size: DeviceSize,
9957 pub flags: MemoryHeapFlags,
9958 }
9959 impl MemoryHeap {
builder<'a>() -> MemoryHeapBuilder<'a>9960 pub fn builder<'a>() -> MemoryHeapBuilder<'a> {
9961 MemoryHeapBuilder {
9962 inner: MemoryHeap::default(),
9963 marker: ::std::marker::PhantomData,
9964 }
9965 }
9966 }
9967 #[repr(transparent)]
9968 pub struct MemoryHeapBuilder<'a> {
9969 inner: MemoryHeap,
9970 marker: ::std::marker::PhantomData<&'a ()>,
9971 }
9972 impl<'a> ::std::ops::Deref for MemoryHeapBuilder<'a> {
9973 type Target = MemoryHeap;
deref(&self) -> &Self::Target9974 fn deref(&self) -> &Self::Target {
9975 &self.inner
9976 }
9977 }
9978 impl<'a> ::std::ops::DerefMut for MemoryHeapBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target9979 fn deref_mut(&mut self) -> &mut Self::Target {
9980 &mut self.inner
9981 }
9982 }
9983 impl<'a> MemoryHeapBuilder<'a> {
size(mut self, size: DeviceSize) -> MemoryHeapBuilder<'a>9984 pub fn size(mut self, size: DeviceSize) -> MemoryHeapBuilder<'a> {
9985 self.inner.size = size;
9986 self
9987 }
flags(mut self, flags: MemoryHeapFlags) -> MemoryHeapBuilder<'a>9988 pub fn flags(mut self, flags: MemoryHeapFlags) -> MemoryHeapBuilder<'a> {
9989 self.inner.flags = flags;
9990 self
9991 }
9992 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
9993 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
9994 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryHeap9995 pub fn build(self) -> MemoryHeap {
9996 self.inner
9997 }
9998 }
9999 #[repr(C)]
10000 #[derive(Copy, Clone, Debug)]
10001 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMappedMemoryRange.html>"]
10002 pub struct MappedMemoryRange {
10003 pub s_type: StructureType,
10004 pub p_next: *const c_void,
10005 pub memory: DeviceMemory,
10006 pub offset: DeviceSize,
10007 pub size: DeviceSize,
10008 }
10009 impl ::std::default::Default for MappedMemoryRange {
default() -> MappedMemoryRange10010 fn default() -> MappedMemoryRange {
10011 MappedMemoryRange {
10012 s_type: StructureType::MAPPED_MEMORY_RANGE,
10013 p_next: ::std::ptr::null(),
10014 memory: DeviceMemory::default(),
10015 offset: DeviceSize::default(),
10016 size: DeviceSize::default(),
10017 }
10018 }
10019 }
10020 impl MappedMemoryRange {
builder<'a>() -> MappedMemoryRangeBuilder<'a>10021 pub fn builder<'a>() -> MappedMemoryRangeBuilder<'a> {
10022 MappedMemoryRangeBuilder {
10023 inner: MappedMemoryRange::default(),
10024 marker: ::std::marker::PhantomData,
10025 }
10026 }
10027 }
10028 #[repr(transparent)]
10029 pub struct MappedMemoryRangeBuilder<'a> {
10030 inner: MappedMemoryRange,
10031 marker: ::std::marker::PhantomData<&'a ()>,
10032 }
10033 pub unsafe trait ExtendsMappedMemoryRange {}
10034 impl<'a> ::std::ops::Deref for MappedMemoryRangeBuilder<'a> {
10035 type Target = MappedMemoryRange;
deref(&self) -> &Self::Target10036 fn deref(&self) -> &Self::Target {
10037 &self.inner
10038 }
10039 }
10040 impl<'a> ::std::ops::DerefMut for MappedMemoryRangeBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10041 fn deref_mut(&mut self) -> &mut Self::Target {
10042 &mut self.inner
10043 }
10044 }
10045 impl<'a> MappedMemoryRangeBuilder<'a> {
memory(mut self, memory: DeviceMemory) -> MappedMemoryRangeBuilder<'a>10046 pub fn memory(mut self, memory: DeviceMemory) -> MappedMemoryRangeBuilder<'a> {
10047 self.inner.memory = memory;
10048 self
10049 }
offset(mut self, offset: DeviceSize) -> MappedMemoryRangeBuilder<'a>10050 pub fn offset(mut self, offset: DeviceSize) -> MappedMemoryRangeBuilder<'a> {
10051 self.inner.offset = offset;
10052 self
10053 }
size(mut self, size: DeviceSize) -> MappedMemoryRangeBuilder<'a>10054 pub fn size(mut self, size: DeviceSize) -> MappedMemoryRangeBuilder<'a> {
10055 self.inner.size = size;
10056 self
10057 }
10058 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
10059 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
10060 #[doc = r" valid extension structs can be pushed into the chain."]
10061 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
10062 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsMappedMemoryRange>( mut self, next: &'a mut T, ) -> MappedMemoryRangeBuilder<'a>10063 pub fn push_next<T: ExtendsMappedMemoryRange>(
10064 mut self,
10065 next: &'a mut T,
10066 ) -> MappedMemoryRangeBuilder<'a> {
10067 unsafe {
10068 let next_ptr = next as *mut T as *mut BaseOutStructure;
10069 let last_next = ptr_chain_iter(next).last().unwrap();
10070 (*last_next).p_next = self.inner.p_next as _;
10071 self.inner.p_next = next_ptr as _;
10072 }
10073 self
10074 }
10075 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10076 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10077 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MappedMemoryRange10078 pub fn build(self) -> MappedMemoryRange {
10079 self.inner
10080 }
10081 }
10082 #[repr(C)]
10083 #[derive(Copy, Clone, Default, Debug)]
10084 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFormatProperties.html>"]
10085 pub struct FormatProperties {
10086 pub linear_tiling_features: FormatFeatureFlags,
10087 pub optimal_tiling_features: FormatFeatureFlags,
10088 pub buffer_features: FormatFeatureFlags,
10089 }
10090 impl FormatProperties {
builder<'a>() -> FormatPropertiesBuilder<'a>10091 pub fn builder<'a>() -> FormatPropertiesBuilder<'a> {
10092 FormatPropertiesBuilder {
10093 inner: FormatProperties::default(),
10094 marker: ::std::marker::PhantomData,
10095 }
10096 }
10097 }
10098 #[repr(transparent)]
10099 pub struct FormatPropertiesBuilder<'a> {
10100 inner: FormatProperties,
10101 marker: ::std::marker::PhantomData<&'a ()>,
10102 }
10103 impl<'a> ::std::ops::Deref for FormatPropertiesBuilder<'a> {
10104 type Target = FormatProperties;
deref(&self) -> &Self::Target10105 fn deref(&self) -> &Self::Target {
10106 &self.inner
10107 }
10108 }
10109 impl<'a> ::std::ops::DerefMut for FormatPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10110 fn deref_mut(&mut self) -> &mut Self::Target {
10111 &mut self.inner
10112 }
10113 }
10114 impl<'a> FormatPropertiesBuilder<'a> {
linear_tiling_features( mut self, linear_tiling_features: FormatFeatureFlags, ) -> FormatPropertiesBuilder<'a>10115 pub fn linear_tiling_features(
10116 mut self,
10117 linear_tiling_features: FormatFeatureFlags,
10118 ) -> FormatPropertiesBuilder<'a> {
10119 self.inner.linear_tiling_features = linear_tiling_features;
10120 self
10121 }
optimal_tiling_features( mut self, optimal_tiling_features: FormatFeatureFlags, ) -> FormatPropertiesBuilder<'a>10122 pub fn optimal_tiling_features(
10123 mut self,
10124 optimal_tiling_features: FormatFeatureFlags,
10125 ) -> FormatPropertiesBuilder<'a> {
10126 self.inner.optimal_tiling_features = optimal_tiling_features;
10127 self
10128 }
buffer_features( mut self, buffer_features: FormatFeatureFlags, ) -> FormatPropertiesBuilder<'a>10129 pub fn buffer_features(
10130 mut self,
10131 buffer_features: FormatFeatureFlags,
10132 ) -> FormatPropertiesBuilder<'a> {
10133 self.inner.buffer_features = buffer_features;
10134 self
10135 }
10136 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10137 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10138 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> FormatProperties10139 pub fn build(self) -> FormatProperties {
10140 self.inner
10141 }
10142 }
10143 #[repr(C)]
10144 #[derive(Copy, Clone, Default, Debug)]
10145 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageFormatProperties.html>"]
10146 pub struct ImageFormatProperties {
10147 pub max_extent: Extent3D,
10148 pub max_mip_levels: u32,
10149 pub max_array_layers: u32,
10150 pub sample_counts: SampleCountFlags,
10151 pub max_resource_size: DeviceSize,
10152 }
10153 impl ImageFormatProperties {
builder<'a>() -> ImageFormatPropertiesBuilder<'a>10154 pub fn builder<'a>() -> ImageFormatPropertiesBuilder<'a> {
10155 ImageFormatPropertiesBuilder {
10156 inner: ImageFormatProperties::default(),
10157 marker: ::std::marker::PhantomData,
10158 }
10159 }
10160 }
10161 #[repr(transparent)]
10162 pub struct ImageFormatPropertiesBuilder<'a> {
10163 inner: ImageFormatProperties,
10164 marker: ::std::marker::PhantomData<&'a ()>,
10165 }
10166 impl<'a> ::std::ops::Deref for ImageFormatPropertiesBuilder<'a> {
10167 type Target = ImageFormatProperties;
deref(&self) -> &Self::Target10168 fn deref(&self) -> &Self::Target {
10169 &self.inner
10170 }
10171 }
10172 impl<'a> ::std::ops::DerefMut for ImageFormatPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10173 fn deref_mut(&mut self) -> &mut Self::Target {
10174 &mut self.inner
10175 }
10176 }
10177 impl<'a> ImageFormatPropertiesBuilder<'a> {
max_extent(mut self, max_extent: Extent3D) -> ImageFormatPropertiesBuilder<'a>10178 pub fn max_extent(mut self, max_extent: Extent3D) -> ImageFormatPropertiesBuilder<'a> {
10179 self.inner.max_extent = max_extent;
10180 self
10181 }
max_mip_levels(mut self, max_mip_levels: u32) -> ImageFormatPropertiesBuilder<'a>10182 pub fn max_mip_levels(mut self, max_mip_levels: u32) -> ImageFormatPropertiesBuilder<'a> {
10183 self.inner.max_mip_levels = max_mip_levels;
10184 self
10185 }
max_array_layers(mut self, max_array_layers: u32) -> ImageFormatPropertiesBuilder<'a>10186 pub fn max_array_layers(mut self, max_array_layers: u32) -> ImageFormatPropertiesBuilder<'a> {
10187 self.inner.max_array_layers = max_array_layers;
10188 self
10189 }
sample_counts( mut self, sample_counts: SampleCountFlags, ) -> ImageFormatPropertiesBuilder<'a>10190 pub fn sample_counts(
10191 mut self,
10192 sample_counts: SampleCountFlags,
10193 ) -> ImageFormatPropertiesBuilder<'a> {
10194 self.inner.sample_counts = sample_counts;
10195 self
10196 }
max_resource_size( mut self, max_resource_size: DeviceSize, ) -> ImageFormatPropertiesBuilder<'a>10197 pub fn max_resource_size(
10198 mut self,
10199 max_resource_size: DeviceSize,
10200 ) -> ImageFormatPropertiesBuilder<'a> {
10201 self.inner.max_resource_size = max_resource_size;
10202 self
10203 }
10204 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10205 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10206 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageFormatProperties10207 pub fn build(self) -> ImageFormatProperties {
10208 self.inner
10209 }
10210 }
10211 #[repr(C)]
10212 #[derive(Copy, Clone, Default, Debug)]
10213 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorBufferInfo.html>"]
10214 pub struct DescriptorBufferInfo {
10215 pub buffer: Buffer,
10216 pub offset: DeviceSize,
10217 pub range: DeviceSize,
10218 }
10219 impl DescriptorBufferInfo {
builder<'a>() -> DescriptorBufferInfoBuilder<'a>10220 pub fn builder<'a>() -> DescriptorBufferInfoBuilder<'a> {
10221 DescriptorBufferInfoBuilder {
10222 inner: DescriptorBufferInfo::default(),
10223 marker: ::std::marker::PhantomData,
10224 }
10225 }
10226 }
10227 #[repr(transparent)]
10228 pub struct DescriptorBufferInfoBuilder<'a> {
10229 inner: DescriptorBufferInfo,
10230 marker: ::std::marker::PhantomData<&'a ()>,
10231 }
10232 impl<'a> ::std::ops::Deref for DescriptorBufferInfoBuilder<'a> {
10233 type Target = DescriptorBufferInfo;
deref(&self) -> &Self::Target10234 fn deref(&self) -> &Self::Target {
10235 &self.inner
10236 }
10237 }
10238 impl<'a> ::std::ops::DerefMut for DescriptorBufferInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10239 fn deref_mut(&mut self) -> &mut Self::Target {
10240 &mut self.inner
10241 }
10242 }
10243 impl<'a> DescriptorBufferInfoBuilder<'a> {
buffer(mut self, buffer: Buffer) -> DescriptorBufferInfoBuilder<'a>10244 pub fn buffer(mut self, buffer: Buffer) -> DescriptorBufferInfoBuilder<'a> {
10245 self.inner.buffer = buffer;
10246 self
10247 }
offset(mut self, offset: DeviceSize) -> DescriptorBufferInfoBuilder<'a>10248 pub fn offset(mut self, offset: DeviceSize) -> DescriptorBufferInfoBuilder<'a> {
10249 self.inner.offset = offset;
10250 self
10251 }
range(mut self, range: DeviceSize) -> DescriptorBufferInfoBuilder<'a>10252 pub fn range(mut self, range: DeviceSize) -> DescriptorBufferInfoBuilder<'a> {
10253 self.inner.range = range;
10254 self
10255 }
10256 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10257 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10258 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorBufferInfo10259 pub fn build(self) -> DescriptorBufferInfo {
10260 self.inner
10261 }
10262 }
10263 #[repr(C)]
10264 #[derive(Copy, Clone, Default, Debug)]
10265 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorImageInfo.html>"]
10266 pub struct DescriptorImageInfo {
10267 pub sampler: Sampler,
10268 pub image_view: ImageView,
10269 pub image_layout: ImageLayout,
10270 }
10271 impl DescriptorImageInfo {
builder<'a>() -> DescriptorImageInfoBuilder<'a>10272 pub fn builder<'a>() -> DescriptorImageInfoBuilder<'a> {
10273 DescriptorImageInfoBuilder {
10274 inner: DescriptorImageInfo::default(),
10275 marker: ::std::marker::PhantomData,
10276 }
10277 }
10278 }
10279 #[repr(transparent)]
10280 pub struct DescriptorImageInfoBuilder<'a> {
10281 inner: DescriptorImageInfo,
10282 marker: ::std::marker::PhantomData<&'a ()>,
10283 }
10284 impl<'a> ::std::ops::Deref for DescriptorImageInfoBuilder<'a> {
10285 type Target = DescriptorImageInfo;
deref(&self) -> &Self::Target10286 fn deref(&self) -> &Self::Target {
10287 &self.inner
10288 }
10289 }
10290 impl<'a> ::std::ops::DerefMut for DescriptorImageInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10291 fn deref_mut(&mut self) -> &mut Self::Target {
10292 &mut self.inner
10293 }
10294 }
10295 impl<'a> DescriptorImageInfoBuilder<'a> {
sampler(mut self, sampler: Sampler) -> DescriptorImageInfoBuilder<'a>10296 pub fn sampler(mut self, sampler: Sampler) -> DescriptorImageInfoBuilder<'a> {
10297 self.inner.sampler = sampler;
10298 self
10299 }
image_view(mut self, image_view: ImageView) -> DescriptorImageInfoBuilder<'a>10300 pub fn image_view(mut self, image_view: ImageView) -> DescriptorImageInfoBuilder<'a> {
10301 self.inner.image_view = image_view;
10302 self
10303 }
image_layout(mut self, image_layout: ImageLayout) -> DescriptorImageInfoBuilder<'a>10304 pub fn image_layout(mut self, image_layout: ImageLayout) -> DescriptorImageInfoBuilder<'a> {
10305 self.inner.image_layout = image_layout;
10306 self
10307 }
10308 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10309 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10310 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorImageInfo10311 pub fn build(self) -> DescriptorImageInfo {
10312 self.inner
10313 }
10314 }
10315 #[repr(C)]
10316 #[derive(Copy, Clone, Debug)]
10317 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWriteDescriptorSet.html>"]
10318 pub struct WriteDescriptorSet {
10319 pub s_type: StructureType,
10320 pub p_next: *const c_void,
10321 pub dst_set: DescriptorSet,
10322 pub dst_binding: u32,
10323 pub dst_array_element: u32,
10324 pub descriptor_count: u32,
10325 pub descriptor_type: DescriptorType,
10326 pub p_image_info: *const DescriptorImageInfo,
10327 pub p_buffer_info: *const DescriptorBufferInfo,
10328 pub p_texel_buffer_view: *const BufferView,
10329 }
10330 impl ::std::default::Default for WriteDescriptorSet {
default() -> WriteDescriptorSet10331 fn default() -> WriteDescriptorSet {
10332 WriteDescriptorSet {
10333 s_type: StructureType::WRITE_DESCRIPTOR_SET,
10334 p_next: ::std::ptr::null(),
10335 dst_set: DescriptorSet::default(),
10336 dst_binding: u32::default(),
10337 dst_array_element: u32::default(),
10338 descriptor_count: u32::default(),
10339 descriptor_type: DescriptorType::default(),
10340 p_image_info: ::std::ptr::null(),
10341 p_buffer_info: ::std::ptr::null(),
10342 p_texel_buffer_view: ::std::ptr::null(),
10343 }
10344 }
10345 }
10346 impl WriteDescriptorSet {
builder<'a>() -> WriteDescriptorSetBuilder<'a>10347 pub fn builder<'a>() -> WriteDescriptorSetBuilder<'a> {
10348 WriteDescriptorSetBuilder {
10349 inner: WriteDescriptorSet::default(),
10350 marker: ::std::marker::PhantomData,
10351 }
10352 }
10353 }
10354 #[repr(transparent)]
10355 pub struct WriteDescriptorSetBuilder<'a> {
10356 inner: WriteDescriptorSet,
10357 marker: ::std::marker::PhantomData<&'a ()>,
10358 }
10359 pub unsafe trait ExtendsWriteDescriptorSet {}
10360 impl<'a> ::std::ops::Deref for WriteDescriptorSetBuilder<'a> {
10361 type Target = WriteDescriptorSet;
deref(&self) -> &Self::Target10362 fn deref(&self) -> &Self::Target {
10363 &self.inner
10364 }
10365 }
10366 impl<'a> ::std::ops::DerefMut for WriteDescriptorSetBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10367 fn deref_mut(&mut self) -> &mut Self::Target {
10368 &mut self.inner
10369 }
10370 }
10371 impl<'a> WriteDescriptorSetBuilder<'a> {
dst_set(mut self, dst_set: DescriptorSet) -> WriteDescriptorSetBuilder<'a>10372 pub fn dst_set(mut self, dst_set: DescriptorSet) -> WriteDescriptorSetBuilder<'a> {
10373 self.inner.dst_set = dst_set;
10374 self
10375 }
dst_binding(mut self, dst_binding: u32) -> WriteDescriptorSetBuilder<'a>10376 pub fn dst_binding(mut self, dst_binding: u32) -> WriteDescriptorSetBuilder<'a> {
10377 self.inner.dst_binding = dst_binding;
10378 self
10379 }
dst_array_element(mut self, dst_array_element: u32) -> WriteDescriptorSetBuilder<'a>10380 pub fn dst_array_element(mut self, dst_array_element: u32) -> WriteDescriptorSetBuilder<'a> {
10381 self.inner.dst_array_element = dst_array_element;
10382 self
10383 }
descriptor_type( mut self, descriptor_type: DescriptorType, ) -> WriteDescriptorSetBuilder<'a>10384 pub fn descriptor_type(
10385 mut self,
10386 descriptor_type: DescriptorType,
10387 ) -> WriteDescriptorSetBuilder<'a> {
10388 self.inner.descriptor_type = descriptor_type;
10389 self
10390 }
image_info( mut self, image_info: &'a [DescriptorImageInfo], ) -> WriteDescriptorSetBuilder<'a>10391 pub fn image_info(
10392 mut self,
10393 image_info: &'a [DescriptorImageInfo],
10394 ) -> WriteDescriptorSetBuilder<'a> {
10395 self.inner.descriptor_count = image_info.len() as _;
10396 self.inner.p_image_info = image_info.as_ptr();
10397 self
10398 }
buffer_info( mut self, buffer_info: &'a [DescriptorBufferInfo], ) -> WriteDescriptorSetBuilder<'a>10399 pub fn buffer_info(
10400 mut self,
10401 buffer_info: &'a [DescriptorBufferInfo],
10402 ) -> WriteDescriptorSetBuilder<'a> {
10403 self.inner.descriptor_count = buffer_info.len() as _;
10404 self.inner.p_buffer_info = buffer_info.as_ptr();
10405 self
10406 }
texel_buffer_view( mut self, texel_buffer_view: &'a [BufferView], ) -> WriteDescriptorSetBuilder<'a>10407 pub fn texel_buffer_view(
10408 mut self,
10409 texel_buffer_view: &'a [BufferView],
10410 ) -> WriteDescriptorSetBuilder<'a> {
10411 self.inner.descriptor_count = texel_buffer_view.len() as _;
10412 self.inner.p_texel_buffer_view = texel_buffer_view.as_ptr();
10413 self
10414 }
10415 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
10416 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
10417 #[doc = r" valid extension structs can be pushed into the chain."]
10418 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
10419 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsWriteDescriptorSet>( mut self, next: &'a mut T, ) -> WriteDescriptorSetBuilder<'a>10420 pub fn push_next<T: ExtendsWriteDescriptorSet>(
10421 mut self,
10422 next: &'a mut T,
10423 ) -> WriteDescriptorSetBuilder<'a> {
10424 unsafe {
10425 let next_ptr = next as *mut T as *mut BaseOutStructure;
10426 let last_next = ptr_chain_iter(next).last().unwrap();
10427 (*last_next).p_next = self.inner.p_next as _;
10428 self.inner.p_next = next_ptr as _;
10429 }
10430 self
10431 }
10432 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10433 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10434 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> WriteDescriptorSet10435 pub fn build(self) -> WriteDescriptorSet {
10436 self.inner
10437 }
10438 }
10439 #[repr(C)]
10440 #[derive(Copy, Clone, Debug)]
10441 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCopyDescriptorSet.html>"]
10442 pub struct CopyDescriptorSet {
10443 pub s_type: StructureType,
10444 pub p_next: *const c_void,
10445 pub src_set: DescriptorSet,
10446 pub src_binding: u32,
10447 pub src_array_element: u32,
10448 pub dst_set: DescriptorSet,
10449 pub dst_binding: u32,
10450 pub dst_array_element: u32,
10451 pub descriptor_count: u32,
10452 }
10453 impl ::std::default::Default for CopyDescriptorSet {
default() -> CopyDescriptorSet10454 fn default() -> CopyDescriptorSet {
10455 CopyDescriptorSet {
10456 s_type: StructureType::COPY_DESCRIPTOR_SET,
10457 p_next: ::std::ptr::null(),
10458 src_set: DescriptorSet::default(),
10459 src_binding: u32::default(),
10460 src_array_element: u32::default(),
10461 dst_set: DescriptorSet::default(),
10462 dst_binding: u32::default(),
10463 dst_array_element: u32::default(),
10464 descriptor_count: u32::default(),
10465 }
10466 }
10467 }
10468 impl CopyDescriptorSet {
builder<'a>() -> CopyDescriptorSetBuilder<'a>10469 pub fn builder<'a>() -> CopyDescriptorSetBuilder<'a> {
10470 CopyDescriptorSetBuilder {
10471 inner: CopyDescriptorSet::default(),
10472 marker: ::std::marker::PhantomData,
10473 }
10474 }
10475 }
10476 #[repr(transparent)]
10477 pub struct CopyDescriptorSetBuilder<'a> {
10478 inner: CopyDescriptorSet,
10479 marker: ::std::marker::PhantomData<&'a ()>,
10480 }
10481 pub unsafe trait ExtendsCopyDescriptorSet {}
10482 impl<'a> ::std::ops::Deref for CopyDescriptorSetBuilder<'a> {
10483 type Target = CopyDescriptorSet;
deref(&self) -> &Self::Target10484 fn deref(&self) -> &Self::Target {
10485 &self.inner
10486 }
10487 }
10488 impl<'a> ::std::ops::DerefMut for CopyDescriptorSetBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10489 fn deref_mut(&mut self) -> &mut Self::Target {
10490 &mut self.inner
10491 }
10492 }
10493 impl<'a> CopyDescriptorSetBuilder<'a> {
src_set(mut self, src_set: DescriptorSet) -> CopyDescriptorSetBuilder<'a>10494 pub fn src_set(mut self, src_set: DescriptorSet) -> CopyDescriptorSetBuilder<'a> {
10495 self.inner.src_set = src_set;
10496 self
10497 }
src_binding(mut self, src_binding: u32) -> CopyDescriptorSetBuilder<'a>10498 pub fn src_binding(mut self, src_binding: u32) -> CopyDescriptorSetBuilder<'a> {
10499 self.inner.src_binding = src_binding;
10500 self
10501 }
src_array_element(mut self, src_array_element: u32) -> CopyDescriptorSetBuilder<'a>10502 pub fn src_array_element(mut self, src_array_element: u32) -> CopyDescriptorSetBuilder<'a> {
10503 self.inner.src_array_element = src_array_element;
10504 self
10505 }
dst_set(mut self, dst_set: DescriptorSet) -> CopyDescriptorSetBuilder<'a>10506 pub fn dst_set(mut self, dst_set: DescriptorSet) -> CopyDescriptorSetBuilder<'a> {
10507 self.inner.dst_set = dst_set;
10508 self
10509 }
dst_binding(mut self, dst_binding: u32) -> CopyDescriptorSetBuilder<'a>10510 pub fn dst_binding(mut self, dst_binding: u32) -> CopyDescriptorSetBuilder<'a> {
10511 self.inner.dst_binding = dst_binding;
10512 self
10513 }
dst_array_element(mut self, dst_array_element: u32) -> CopyDescriptorSetBuilder<'a>10514 pub fn dst_array_element(mut self, dst_array_element: u32) -> CopyDescriptorSetBuilder<'a> {
10515 self.inner.dst_array_element = dst_array_element;
10516 self
10517 }
descriptor_count(mut self, descriptor_count: u32) -> CopyDescriptorSetBuilder<'a>10518 pub fn descriptor_count(mut self, descriptor_count: u32) -> CopyDescriptorSetBuilder<'a> {
10519 self.inner.descriptor_count = descriptor_count;
10520 self
10521 }
10522 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
10523 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
10524 #[doc = r" valid extension structs can be pushed into the chain."]
10525 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
10526 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsCopyDescriptorSet>( mut self, next: &'a mut T, ) -> CopyDescriptorSetBuilder<'a>10527 pub fn push_next<T: ExtendsCopyDescriptorSet>(
10528 mut self,
10529 next: &'a mut T,
10530 ) -> CopyDescriptorSetBuilder<'a> {
10531 unsafe {
10532 let next_ptr = next as *mut T as *mut BaseOutStructure;
10533 let last_next = ptr_chain_iter(next).last().unwrap();
10534 (*last_next).p_next = self.inner.p_next as _;
10535 self.inner.p_next = next_ptr as _;
10536 }
10537 self
10538 }
10539 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10540 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10541 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> CopyDescriptorSet10542 pub fn build(self) -> CopyDescriptorSet {
10543 self.inner
10544 }
10545 }
10546 #[repr(C)]
10547 #[derive(Copy, Clone, Debug)]
10548 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferCreateInfo.html>"]
10549 pub struct BufferCreateInfo {
10550 pub s_type: StructureType,
10551 pub p_next: *const c_void,
10552 pub flags: BufferCreateFlags,
10553 pub size: DeviceSize,
10554 pub usage: BufferUsageFlags,
10555 pub sharing_mode: SharingMode,
10556 pub queue_family_index_count: u32,
10557 pub p_queue_family_indices: *const u32,
10558 }
10559 impl ::std::default::Default for BufferCreateInfo {
default() -> BufferCreateInfo10560 fn default() -> BufferCreateInfo {
10561 BufferCreateInfo {
10562 s_type: StructureType::BUFFER_CREATE_INFO,
10563 p_next: ::std::ptr::null(),
10564 flags: BufferCreateFlags::default(),
10565 size: DeviceSize::default(),
10566 usage: BufferUsageFlags::default(),
10567 sharing_mode: SharingMode::default(),
10568 queue_family_index_count: u32::default(),
10569 p_queue_family_indices: ::std::ptr::null(),
10570 }
10571 }
10572 }
10573 impl BufferCreateInfo {
builder<'a>() -> BufferCreateInfoBuilder<'a>10574 pub fn builder<'a>() -> BufferCreateInfoBuilder<'a> {
10575 BufferCreateInfoBuilder {
10576 inner: BufferCreateInfo::default(),
10577 marker: ::std::marker::PhantomData,
10578 }
10579 }
10580 }
10581 #[repr(transparent)]
10582 pub struct BufferCreateInfoBuilder<'a> {
10583 inner: BufferCreateInfo,
10584 marker: ::std::marker::PhantomData<&'a ()>,
10585 }
10586 pub unsafe trait ExtendsBufferCreateInfo {}
10587 impl<'a> ::std::ops::Deref for BufferCreateInfoBuilder<'a> {
10588 type Target = BufferCreateInfo;
deref(&self) -> &Self::Target10589 fn deref(&self) -> &Self::Target {
10590 &self.inner
10591 }
10592 }
10593 impl<'a> ::std::ops::DerefMut for BufferCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10594 fn deref_mut(&mut self) -> &mut Self::Target {
10595 &mut self.inner
10596 }
10597 }
10598 impl<'a> BufferCreateInfoBuilder<'a> {
flags(mut self, flags: BufferCreateFlags) -> BufferCreateInfoBuilder<'a>10599 pub fn flags(mut self, flags: BufferCreateFlags) -> BufferCreateInfoBuilder<'a> {
10600 self.inner.flags = flags;
10601 self
10602 }
size(mut self, size: DeviceSize) -> BufferCreateInfoBuilder<'a>10603 pub fn size(mut self, size: DeviceSize) -> BufferCreateInfoBuilder<'a> {
10604 self.inner.size = size;
10605 self
10606 }
usage(mut self, usage: BufferUsageFlags) -> BufferCreateInfoBuilder<'a>10607 pub fn usage(mut self, usage: BufferUsageFlags) -> BufferCreateInfoBuilder<'a> {
10608 self.inner.usage = usage;
10609 self
10610 }
sharing_mode(mut self, sharing_mode: SharingMode) -> BufferCreateInfoBuilder<'a>10611 pub fn sharing_mode(mut self, sharing_mode: SharingMode) -> BufferCreateInfoBuilder<'a> {
10612 self.inner.sharing_mode = sharing_mode;
10613 self
10614 }
queue_family_indices( mut self, queue_family_indices: &'a [u32], ) -> BufferCreateInfoBuilder<'a>10615 pub fn queue_family_indices(
10616 mut self,
10617 queue_family_indices: &'a [u32],
10618 ) -> BufferCreateInfoBuilder<'a> {
10619 self.inner.queue_family_index_count = queue_family_indices.len() as _;
10620 self.inner.p_queue_family_indices = queue_family_indices.as_ptr();
10621 self
10622 }
10623 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
10624 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
10625 #[doc = r" valid extension structs can be pushed into the chain."]
10626 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
10627 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsBufferCreateInfo>( mut self, next: &'a mut T, ) -> BufferCreateInfoBuilder<'a>10628 pub fn push_next<T: ExtendsBufferCreateInfo>(
10629 mut self,
10630 next: &'a mut T,
10631 ) -> BufferCreateInfoBuilder<'a> {
10632 unsafe {
10633 let next_ptr = next as *mut T as *mut BaseOutStructure;
10634 let last_next = ptr_chain_iter(next).last().unwrap();
10635 (*last_next).p_next = self.inner.p_next as _;
10636 self.inner.p_next = next_ptr as _;
10637 }
10638 self
10639 }
10640 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10641 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10642 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferCreateInfo10643 pub fn build(self) -> BufferCreateInfo {
10644 self.inner
10645 }
10646 }
10647 #[repr(C)]
10648 #[derive(Copy, Clone, Debug)]
10649 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferViewCreateInfo.html>"]
10650 pub struct BufferViewCreateInfo {
10651 pub s_type: StructureType,
10652 pub p_next: *const c_void,
10653 pub flags: BufferViewCreateFlags,
10654 pub buffer: Buffer,
10655 pub format: Format,
10656 pub offset: DeviceSize,
10657 pub range: DeviceSize,
10658 }
10659 impl ::std::default::Default for BufferViewCreateInfo {
default() -> BufferViewCreateInfo10660 fn default() -> BufferViewCreateInfo {
10661 BufferViewCreateInfo {
10662 s_type: StructureType::BUFFER_VIEW_CREATE_INFO,
10663 p_next: ::std::ptr::null(),
10664 flags: BufferViewCreateFlags::default(),
10665 buffer: Buffer::default(),
10666 format: Format::default(),
10667 offset: DeviceSize::default(),
10668 range: DeviceSize::default(),
10669 }
10670 }
10671 }
10672 impl BufferViewCreateInfo {
builder<'a>() -> BufferViewCreateInfoBuilder<'a>10673 pub fn builder<'a>() -> BufferViewCreateInfoBuilder<'a> {
10674 BufferViewCreateInfoBuilder {
10675 inner: BufferViewCreateInfo::default(),
10676 marker: ::std::marker::PhantomData,
10677 }
10678 }
10679 }
10680 #[repr(transparent)]
10681 pub struct BufferViewCreateInfoBuilder<'a> {
10682 inner: BufferViewCreateInfo,
10683 marker: ::std::marker::PhantomData<&'a ()>,
10684 }
10685 pub unsafe trait ExtendsBufferViewCreateInfo {}
10686 impl<'a> ::std::ops::Deref for BufferViewCreateInfoBuilder<'a> {
10687 type Target = BufferViewCreateInfo;
deref(&self) -> &Self::Target10688 fn deref(&self) -> &Self::Target {
10689 &self.inner
10690 }
10691 }
10692 impl<'a> ::std::ops::DerefMut for BufferViewCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10693 fn deref_mut(&mut self) -> &mut Self::Target {
10694 &mut self.inner
10695 }
10696 }
10697 impl<'a> BufferViewCreateInfoBuilder<'a> {
flags(mut self, flags: BufferViewCreateFlags) -> BufferViewCreateInfoBuilder<'a>10698 pub fn flags(mut self, flags: BufferViewCreateFlags) -> BufferViewCreateInfoBuilder<'a> {
10699 self.inner.flags = flags;
10700 self
10701 }
buffer(mut self, buffer: Buffer) -> BufferViewCreateInfoBuilder<'a>10702 pub fn buffer(mut self, buffer: Buffer) -> BufferViewCreateInfoBuilder<'a> {
10703 self.inner.buffer = buffer;
10704 self
10705 }
format(mut self, format: Format) -> BufferViewCreateInfoBuilder<'a>10706 pub fn format(mut self, format: Format) -> BufferViewCreateInfoBuilder<'a> {
10707 self.inner.format = format;
10708 self
10709 }
offset(mut self, offset: DeviceSize) -> BufferViewCreateInfoBuilder<'a>10710 pub fn offset(mut self, offset: DeviceSize) -> BufferViewCreateInfoBuilder<'a> {
10711 self.inner.offset = offset;
10712 self
10713 }
range(mut self, range: DeviceSize) -> BufferViewCreateInfoBuilder<'a>10714 pub fn range(mut self, range: DeviceSize) -> BufferViewCreateInfoBuilder<'a> {
10715 self.inner.range = range;
10716 self
10717 }
10718 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
10719 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
10720 #[doc = r" valid extension structs can be pushed into the chain."]
10721 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
10722 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsBufferViewCreateInfo>( mut self, next: &'a mut T, ) -> BufferViewCreateInfoBuilder<'a>10723 pub fn push_next<T: ExtendsBufferViewCreateInfo>(
10724 mut self,
10725 next: &'a mut T,
10726 ) -> BufferViewCreateInfoBuilder<'a> {
10727 unsafe {
10728 let next_ptr = next as *mut T as *mut BaseOutStructure;
10729 let last_next = ptr_chain_iter(next).last().unwrap();
10730 (*last_next).p_next = self.inner.p_next as _;
10731 self.inner.p_next = next_ptr as _;
10732 }
10733 self
10734 }
10735 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10736 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10737 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferViewCreateInfo10738 pub fn build(self) -> BufferViewCreateInfo {
10739 self.inner
10740 }
10741 }
10742 #[repr(C)]
10743 #[derive(Copy, Clone, Default, Debug)]
10744 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresource.html>"]
10745 pub struct ImageSubresource {
10746 pub aspect_mask: ImageAspectFlags,
10747 pub mip_level: u32,
10748 pub array_layer: u32,
10749 }
10750 impl ImageSubresource {
builder<'a>() -> ImageSubresourceBuilder<'a>10751 pub fn builder<'a>() -> ImageSubresourceBuilder<'a> {
10752 ImageSubresourceBuilder {
10753 inner: ImageSubresource::default(),
10754 marker: ::std::marker::PhantomData,
10755 }
10756 }
10757 }
10758 #[repr(transparent)]
10759 pub struct ImageSubresourceBuilder<'a> {
10760 inner: ImageSubresource,
10761 marker: ::std::marker::PhantomData<&'a ()>,
10762 }
10763 impl<'a> ::std::ops::Deref for ImageSubresourceBuilder<'a> {
10764 type Target = ImageSubresource;
deref(&self) -> &Self::Target10765 fn deref(&self) -> &Self::Target {
10766 &self.inner
10767 }
10768 }
10769 impl<'a> ::std::ops::DerefMut for ImageSubresourceBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10770 fn deref_mut(&mut self) -> &mut Self::Target {
10771 &mut self.inner
10772 }
10773 }
10774 impl<'a> ImageSubresourceBuilder<'a> {
aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> ImageSubresourceBuilder<'a>10775 pub fn aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> ImageSubresourceBuilder<'a> {
10776 self.inner.aspect_mask = aspect_mask;
10777 self
10778 }
mip_level(mut self, mip_level: u32) -> ImageSubresourceBuilder<'a>10779 pub fn mip_level(mut self, mip_level: u32) -> ImageSubresourceBuilder<'a> {
10780 self.inner.mip_level = mip_level;
10781 self
10782 }
array_layer(mut self, array_layer: u32) -> ImageSubresourceBuilder<'a>10783 pub fn array_layer(mut self, array_layer: u32) -> ImageSubresourceBuilder<'a> {
10784 self.inner.array_layer = array_layer;
10785 self
10786 }
10787 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10788 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10789 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageSubresource10790 pub fn build(self) -> ImageSubresource {
10791 self.inner
10792 }
10793 }
10794 #[repr(C)]
10795 #[derive(Copy, Clone, Default, Debug)]
10796 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresourceLayers.html>"]
10797 pub struct ImageSubresourceLayers {
10798 pub aspect_mask: ImageAspectFlags,
10799 pub mip_level: u32,
10800 pub base_array_layer: u32,
10801 pub layer_count: u32,
10802 }
10803 impl ImageSubresourceLayers {
builder<'a>() -> ImageSubresourceLayersBuilder<'a>10804 pub fn builder<'a>() -> ImageSubresourceLayersBuilder<'a> {
10805 ImageSubresourceLayersBuilder {
10806 inner: ImageSubresourceLayers::default(),
10807 marker: ::std::marker::PhantomData,
10808 }
10809 }
10810 }
10811 #[repr(transparent)]
10812 pub struct ImageSubresourceLayersBuilder<'a> {
10813 inner: ImageSubresourceLayers,
10814 marker: ::std::marker::PhantomData<&'a ()>,
10815 }
10816 impl<'a> ::std::ops::Deref for ImageSubresourceLayersBuilder<'a> {
10817 type Target = ImageSubresourceLayers;
deref(&self) -> &Self::Target10818 fn deref(&self) -> &Self::Target {
10819 &self.inner
10820 }
10821 }
10822 impl<'a> ::std::ops::DerefMut for ImageSubresourceLayersBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10823 fn deref_mut(&mut self) -> &mut Self::Target {
10824 &mut self.inner
10825 }
10826 }
10827 impl<'a> ImageSubresourceLayersBuilder<'a> {
aspect_mask( mut self, aspect_mask: ImageAspectFlags, ) -> ImageSubresourceLayersBuilder<'a>10828 pub fn aspect_mask(
10829 mut self,
10830 aspect_mask: ImageAspectFlags,
10831 ) -> ImageSubresourceLayersBuilder<'a> {
10832 self.inner.aspect_mask = aspect_mask;
10833 self
10834 }
mip_level(mut self, mip_level: u32) -> ImageSubresourceLayersBuilder<'a>10835 pub fn mip_level(mut self, mip_level: u32) -> ImageSubresourceLayersBuilder<'a> {
10836 self.inner.mip_level = mip_level;
10837 self
10838 }
base_array_layer(mut self, base_array_layer: u32) -> ImageSubresourceLayersBuilder<'a>10839 pub fn base_array_layer(mut self, base_array_layer: u32) -> ImageSubresourceLayersBuilder<'a> {
10840 self.inner.base_array_layer = base_array_layer;
10841 self
10842 }
layer_count(mut self, layer_count: u32) -> ImageSubresourceLayersBuilder<'a>10843 pub fn layer_count(mut self, layer_count: u32) -> ImageSubresourceLayersBuilder<'a> {
10844 self.inner.layer_count = layer_count;
10845 self
10846 }
10847 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10848 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10849 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageSubresourceLayers10850 pub fn build(self) -> ImageSubresourceLayers {
10851 self.inner
10852 }
10853 }
10854 #[repr(C)]
10855 #[derive(Copy, Clone, Default, Debug)]
10856 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresourceRange.html>"]
10857 pub struct ImageSubresourceRange {
10858 pub aspect_mask: ImageAspectFlags,
10859 pub base_mip_level: u32,
10860 pub level_count: u32,
10861 pub base_array_layer: u32,
10862 pub layer_count: u32,
10863 }
10864 impl ImageSubresourceRange {
builder<'a>() -> ImageSubresourceRangeBuilder<'a>10865 pub fn builder<'a>() -> ImageSubresourceRangeBuilder<'a> {
10866 ImageSubresourceRangeBuilder {
10867 inner: ImageSubresourceRange::default(),
10868 marker: ::std::marker::PhantomData,
10869 }
10870 }
10871 }
10872 #[repr(transparent)]
10873 pub struct ImageSubresourceRangeBuilder<'a> {
10874 inner: ImageSubresourceRange,
10875 marker: ::std::marker::PhantomData<&'a ()>,
10876 }
10877 impl<'a> ::std::ops::Deref for ImageSubresourceRangeBuilder<'a> {
10878 type Target = ImageSubresourceRange;
deref(&self) -> &Self::Target10879 fn deref(&self) -> &Self::Target {
10880 &self.inner
10881 }
10882 }
10883 impl<'a> ::std::ops::DerefMut for ImageSubresourceRangeBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10884 fn deref_mut(&mut self) -> &mut Self::Target {
10885 &mut self.inner
10886 }
10887 }
10888 impl<'a> ImageSubresourceRangeBuilder<'a> {
aspect_mask( mut self, aspect_mask: ImageAspectFlags, ) -> ImageSubresourceRangeBuilder<'a>10889 pub fn aspect_mask(
10890 mut self,
10891 aspect_mask: ImageAspectFlags,
10892 ) -> ImageSubresourceRangeBuilder<'a> {
10893 self.inner.aspect_mask = aspect_mask;
10894 self
10895 }
base_mip_level(mut self, base_mip_level: u32) -> ImageSubresourceRangeBuilder<'a>10896 pub fn base_mip_level(mut self, base_mip_level: u32) -> ImageSubresourceRangeBuilder<'a> {
10897 self.inner.base_mip_level = base_mip_level;
10898 self
10899 }
level_count(mut self, level_count: u32) -> ImageSubresourceRangeBuilder<'a>10900 pub fn level_count(mut self, level_count: u32) -> ImageSubresourceRangeBuilder<'a> {
10901 self.inner.level_count = level_count;
10902 self
10903 }
base_array_layer(mut self, base_array_layer: u32) -> ImageSubresourceRangeBuilder<'a>10904 pub fn base_array_layer(mut self, base_array_layer: u32) -> ImageSubresourceRangeBuilder<'a> {
10905 self.inner.base_array_layer = base_array_layer;
10906 self
10907 }
layer_count(mut self, layer_count: u32) -> ImageSubresourceRangeBuilder<'a>10908 pub fn layer_count(mut self, layer_count: u32) -> ImageSubresourceRangeBuilder<'a> {
10909 self.inner.layer_count = layer_count;
10910 self
10911 }
10912 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10913 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10914 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageSubresourceRange10915 pub fn build(self) -> ImageSubresourceRange {
10916 self.inner
10917 }
10918 }
10919 #[repr(C)]
10920 #[derive(Copy, Clone, Debug)]
10921 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryBarrier.html>"]
10922 pub struct MemoryBarrier {
10923 pub s_type: StructureType,
10924 pub p_next: *const c_void,
10925 pub src_access_mask: AccessFlags,
10926 pub dst_access_mask: AccessFlags,
10927 }
10928 impl ::std::default::Default for MemoryBarrier {
default() -> MemoryBarrier10929 fn default() -> MemoryBarrier {
10930 MemoryBarrier {
10931 s_type: StructureType::MEMORY_BARRIER,
10932 p_next: ::std::ptr::null(),
10933 src_access_mask: AccessFlags::default(),
10934 dst_access_mask: AccessFlags::default(),
10935 }
10936 }
10937 }
10938 impl MemoryBarrier {
builder<'a>() -> MemoryBarrierBuilder<'a>10939 pub fn builder<'a>() -> MemoryBarrierBuilder<'a> {
10940 MemoryBarrierBuilder {
10941 inner: MemoryBarrier::default(),
10942 marker: ::std::marker::PhantomData,
10943 }
10944 }
10945 }
10946 #[repr(transparent)]
10947 pub struct MemoryBarrierBuilder<'a> {
10948 inner: MemoryBarrier,
10949 marker: ::std::marker::PhantomData<&'a ()>,
10950 }
10951 pub unsafe trait ExtendsMemoryBarrier {}
10952 impl<'a> ::std::ops::Deref for MemoryBarrierBuilder<'a> {
10953 type Target = MemoryBarrier;
deref(&self) -> &Self::Target10954 fn deref(&self) -> &Self::Target {
10955 &self.inner
10956 }
10957 }
10958 impl<'a> ::std::ops::DerefMut for MemoryBarrierBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target10959 fn deref_mut(&mut self) -> &mut Self::Target {
10960 &mut self.inner
10961 }
10962 }
10963 impl<'a> MemoryBarrierBuilder<'a> {
src_access_mask(mut self, src_access_mask: AccessFlags) -> MemoryBarrierBuilder<'a>10964 pub fn src_access_mask(mut self, src_access_mask: AccessFlags) -> MemoryBarrierBuilder<'a> {
10965 self.inner.src_access_mask = src_access_mask;
10966 self
10967 }
dst_access_mask(mut self, dst_access_mask: AccessFlags) -> MemoryBarrierBuilder<'a>10968 pub fn dst_access_mask(mut self, dst_access_mask: AccessFlags) -> MemoryBarrierBuilder<'a> {
10969 self.inner.dst_access_mask = dst_access_mask;
10970 self
10971 }
10972 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
10973 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
10974 #[doc = r" valid extension structs can be pushed into the chain."]
10975 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
10976 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsMemoryBarrier>( mut self, next: &'a mut T, ) -> MemoryBarrierBuilder<'a>10977 pub fn push_next<T: ExtendsMemoryBarrier>(
10978 mut self,
10979 next: &'a mut T,
10980 ) -> MemoryBarrierBuilder<'a> {
10981 unsafe {
10982 let next_ptr = next as *mut T as *mut BaseOutStructure;
10983 let last_next = ptr_chain_iter(next).last().unwrap();
10984 (*last_next).p_next = self.inner.p_next as _;
10985 self.inner.p_next = next_ptr as _;
10986 }
10987 self
10988 }
10989 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
10990 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
10991 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryBarrier10992 pub fn build(self) -> MemoryBarrier {
10993 self.inner
10994 }
10995 }
10996 #[repr(C)]
10997 #[derive(Copy, Clone, Debug)]
10998 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferMemoryBarrier.html>"]
10999 pub struct BufferMemoryBarrier {
11000 pub s_type: StructureType,
11001 pub p_next: *const c_void,
11002 pub src_access_mask: AccessFlags,
11003 pub dst_access_mask: AccessFlags,
11004 pub src_queue_family_index: u32,
11005 pub dst_queue_family_index: u32,
11006 pub buffer: Buffer,
11007 pub offset: DeviceSize,
11008 pub size: DeviceSize,
11009 }
11010 impl ::std::default::Default for BufferMemoryBarrier {
default() -> BufferMemoryBarrier11011 fn default() -> BufferMemoryBarrier {
11012 BufferMemoryBarrier {
11013 s_type: StructureType::BUFFER_MEMORY_BARRIER,
11014 p_next: ::std::ptr::null(),
11015 src_access_mask: AccessFlags::default(),
11016 dst_access_mask: AccessFlags::default(),
11017 src_queue_family_index: u32::default(),
11018 dst_queue_family_index: u32::default(),
11019 buffer: Buffer::default(),
11020 offset: DeviceSize::default(),
11021 size: DeviceSize::default(),
11022 }
11023 }
11024 }
11025 impl BufferMemoryBarrier {
builder<'a>() -> BufferMemoryBarrierBuilder<'a>11026 pub fn builder<'a>() -> BufferMemoryBarrierBuilder<'a> {
11027 BufferMemoryBarrierBuilder {
11028 inner: BufferMemoryBarrier::default(),
11029 marker: ::std::marker::PhantomData,
11030 }
11031 }
11032 }
11033 #[repr(transparent)]
11034 pub struct BufferMemoryBarrierBuilder<'a> {
11035 inner: BufferMemoryBarrier,
11036 marker: ::std::marker::PhantomData<&'a ()>,
11037 }
11038 pub unsafe trait ExtendsBufferMemoryBarrier {}
11039 impl<'a> ::std::ops::Deref for BufferMemoryBarrierBuilder<'a> {
11040 type Target = BufferMemoryBarrier;
deref(&self) -> &Self::Target11041 fn deref(&self) -> &Self::Target {
11042 &self.inner
11043 }
11044 }
11045 impl<'a> ::std::ops::DerefMut for BufferMemoryBarrierBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11046 fn deref_mut(&mut self) -> &mut Self::Target {
11047 &mut self.inner
11048 }
11049 }
11050 impl<'a> BufferMemoryBarrierBuilder<'a> {
src_access_mask( mut self, src_access_mask: AccessFlags, ) -> BufferMemoryBarrierBuilder<'a>11051 pub fn src_access_mask(
11052 mut self,
11053 src_access_mask: AccessFlags,
11054 ) -> BufferMemoryBarrierBuilder<'a> {
11055 self.inner.src_access_mask = src_access_mask;
11056 self
11057 }
dst_access_mask( mut self, dst_access_mask: AccessFlags, ) -> BufferMemoryBarrierBuilder<'a>11058 pub fn dst_access_mask(
11059 mut self,
11060 dst_access_mask: AccessFlags,
11061 ) -> BufferMemoryBarrierBuilder<'a> {
11062 self.inner.dst_access_mask = dst_access_mask;
11063 self
11064 }
src_queue_family_index( mut self, src_queue_family_index: u32, ) -> BufferMemoryBarrierBuilder<'a>11065 pub fn src_queue_family_index(
11066 mut self,
11067 src_queue_family_index: u32,
11068 ) -> BufferMemoryBarrierBuilder<'a> {
11069 self.inner.src_queue_family_index = src_queue_family_index;
11070 self
11071 }
dst_queue_family_index( mut self, dst_queue_family_index: u32, ) -> BufferMemoryBarrierBuilder<'a>11072 pub fn dst_queue_family_index(
11073 mut self,
11074 dst_queue_family_index: u32,
11075 ) -> BufferMemoryBarrierBuilder<'a> {
11076 self.inner.dst_queue_family_index = dst_queue_family_index;
11077 self
11078 }
buffer(mut self, buffer: Buffer) -> BufferMemoryBarrierBuilder<'a>11079 pub fn buffer(mut self, buffer: Buffer) -> BufferMemoryBarrierBuilder<'a> {
11080 self.inner.buffer = buffer;
11081 self
11082 }
offset(mut self, offset: DeviceSize) -> BufferMemoryBarrierBuilder<'a>11083 pub fn offset(mut self, offset: DeviceSize) -> BufferMemoryBarrierBuilder<'a> {
11084 self.inner.offset = offset;
11085 self
11086 }
size(mut self, size: DeviceSize) -> BufferMemoryBarrierBuilder<'a>11087 pub fn size(mut self, size: DeviceSize) -> BufferMemoryBarrierBuilder<'a> {
11088 self.inner.size = size;
11089 self
11090 }
11091 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
11092 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
11093 #[doc = r" valid extension structs can be pushed into the chain."]
11094 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
11095 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsBufferMemoryBarrier>( mut self, next: &'a mut T, ) -> BufferMemoryBarrierBuilder<'a>11096 pub fn push_next<T: ExtendsBufferMemoryBarrier>(
11097 mut self,
11098 next: &'a mut T,
11099 ) -> BufferMemoryBarrierBuilder<'a> {
11100 unsafe {
11101 let next_ptr = next as *mut T as *mut BaseOutStructure;
11102 let last_next = ptr_chain_iter(next).last().unwrap();
11103 (*last_next).p_next = self.inner.p_next as _;
11104 self.inner.p_next = next_ptr as _;
11105 }
11106 self
11107 }
11108 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11109 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11110 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferMemoryBarrier11111 pub fn build(self) -> BufferMemoryBarrier {
11112 self.inner
11113 }
11114 }
11115 #[repr(C)]
11116 #[derive(Copy, Clone, Debug)]
11117 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageMemoryBarrier.html>"]
11118 pub struct ImageMemoryBarrier {
11119 pub s_type: StructureType,
11120 pub p_next: *const c_void,
11121 pub src_access_mask: AccessFlags,
11122 pub dst_access_mask: AccessFlags,
11123 pub old_layout: ImageLayout,
11124 pub new_layout: ImageLayout,
11125 pub src_queue_family_index: u32,
11126 pub dst_queue_family_index: u32,
11127 pub image: Image,
11128 pub subresource_range: ImageSubresourceRange,
11129 }
11130 impl ::std::default::Default for ImageMemoryBarrier {
default() -> ImageMemoryBarrier11131 fn default() -> ImageMemoryBarrier {
11132 ImageMemoryBarrier {
11133 s_type: StructureType::IMAGE_MEMORY_BARRIER,
11134 p_next: ::std::ptr::null(),
11135 src_access_mask: AccessFlags::default(),
11136 dst_access_mask: AccessFlags::default(),
11137 old_layout: ImageLayout::default(),
11138 new_layout: ImageLayout::default(),
11139 src_queue_family_index: u32::default(),
11140 dst_queue_family_index: u32::default(),
11141 image: Image::default(),
11142 subresource_range: ImageSubresourceRange::default(),
11143 }
11144 }
11145 }
11146 impl ImageMemoryBarrier {
builder<'a>() -> ImageMemoryBarrierBuilder<'a>11147 pub fn builder<'a>() -> ImageMemoryBarrierBuilder<'a> {
11148 ImageMemoryBarrierBuilder {
11149 inner: ImageMemoryBarrier::default(),
11150 marker: ::std::marker::PhantomData,
11151 }
11152 }
11153 }
11154 #[repr(transparent)]
11155 pub struct ImageMemoryBarrierBuilder<'a> {
11156 inner: ImageMemoryBarrier,
11157 marker: ::std::marker::PhantomData<&'a ()>,
11158 }
11159 pub unsafe trait ExtendsImageMemoryBarrier {}
11160 impl<'a> ::std::ops::Deref for ImageMemoryBarrierBuilder<'a> {
11161 type Target = ImageMemoryBarrier;
deref(&self) -> &Self::Target11162 fn deref(&self) -> &Self::Target {
11163 &self.inner
11164 }
11165 }
11166 impl<'a> ::std::ops::DerefMut for ImageMemoryBarrierBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11167 fn deref_mut(&mut self) -> &mut Self::Target {
11168 &mut self.inner
11169 }
11170 }
11171 impl<'a> ImageMemoryBarrierBuilder<'a> {
src_access_mask( mut self, src_access_mask: AccessFlags, ) -> ImageMemoryBarrierBuilder<'a>11172 pub fn src_access_mask(
11173 mut self,
11174 src_access_mask: AccessFlags,
11175 ) -> ImageMemoryBarrierBuilder<'a> {
11176 self.inner.src_access_mask = src_access_mask;
11177 self
11178 }
dst_access_mask( mut self, dst_access_mask: AccessFlags, ) -> ImageMemoryBarrierBuilder<'a>11179 pub fn dst_access_mask(
11180 mut self,
11181 dst_access_mask: AccessFlags,
11182 ) -> ImageMemoryBarrierBuilder<'a> {
11183 self.inner.dst_access_mask = dst_access_mask;
11184 self
11185 }
old_layout(mut self, old_layout: ImageLayout) -> ImageMemoryBarrierBuilder<'a>11186 pub fn old_layout(mut self, old_layout: ImageLayout) -> ImageMemoryBarrierBuilder<'a> {
11187 self.inner.old_layout = old_layout;
11188 self
11189 }
new_layout(mut self, new_layout: ImageLayout) -> ImageMemoryBarrierBuilder<'a>11190 pub fn new_layout(mut self, new_layout: ImageLayout) -> ImageMemoryBarrierBuilder<'a> {
11191 self.inner.new_layout = new_layout;
11192 self
11193 }
src_queue_family_index( mut self, src_queue_family_index: u32, ) -> ImageMemoryBarrierBuilder<'a>11194 pub fn src_queue_family_index(
11195 mut self,
11196 src_queue_family_index: u32,
11197 ) -> ImageMemoryBarrierBuilder<'a> {
11198 self.inner.src_queue_family_index = src_queue_family_index;
11199 self
11200 }
dst_queue_family_index( mut self, dst_queue_family_index: u32, ) -> ImageMemoryBarrierBuilder<'a>11201 pub fn dst_queue_family_index(
11202 mut self,
11203 dst_queue_family_index: u32,
11204 ) -> ImageMemoryBarrierBuilder<'a> {
11205 self.inner.dst_queue_family_index = dst_queue_family_index;
11206 self
11207 }
image(mut self, image: Image) -> ImageMemoryBarrierBuilder<'a>11208 pub fn image(mut self, image: Image) -> ImageMemoryBarrierBuilder<'a> {
11209 self.inner.image = image;
11210 self
11211 }
subresource_range( mut self, subresource_range: ImageSubresourceRange, ) -> ImageMemoryBarrierBuilder<'a>11212 pub fn subresource_range(
11213 mut self,
11214 subresource_range: ImageSubresourceRange,
11215 ) -> ImageMemoryBarrierBuilder<'a> {
11216 self.inner.subresource_range = subresource_range;
11217 self
11218 }
11219 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
11220 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
11221 #[doc = r" valid extension structs can be pushed into the chain."]
11222 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
11223 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsImageMemoryBarrier>( mut self, next: &'a mut T, ) -> ImageMemoryBarrierBuilder<'a>11224 pub fn push_next<T: ExtendsImageMemoryBarrier>(
11225 mut self,
11226 next: &'a mut T,
11227 ) -> ImageMemoryBarrierBuilder<'a> {
11228 unsafe {
11229 let next_ptr = next as *mut T as *mut BaseOutStructure;
11230 let last_next = ptr_chain_iter(next).last().unwrap();
11231 (*last_next).p_next = self.inner.p_next as _;
11232 self.inner.p_next = next_ptr as _;
11233 }
11234 self
11235 }
11236 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11237 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11238 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageMemoryBarrier11239 pub fn build(self) -> ImageMemoryBarrier {
11240 self.inner
11241 }
11242 }
11243 #[repr(C)]
11244 #[derive(Copy, Clone, Debug)]
11245 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageCreateInfo.html>"]
11246 pub struct ImageCreateInfo {
11247 pub s_type: StructureType,
11248 pub p_next: *const c_void,
11249 pub flags: ImageCreateFlags,
11250 pub image_type: ImageType,
11251 pub format: Format,
11252 pub extent: Extent3D,
11253 pub mip_levels: u32,
11254 pub array_layers: u32,
11255 pub samples: SampleCountFlags,
11256 pub tiling: ImageTiling,
11257 pub usage: ImageUsageFlags,
11258 pub sharing_mode: SharingMode,
11259 pub queue_family_index_count: u32,
11260 pub p_queue_family_indices: *const u32,
11261 pub initial_layout: ImageLayout,
11262 }
11263 impl ::std::default::Default for ImageCreateInfo {
default() -> ImageCreateInfo11264 fn default() -> ImageCreateInfo {
11265 ImageCreateInfo {
11266 s_type: StructureType::IMAGE_CREATE_INFO,
11267 p_next: ::std::ptr::null(),
11268 flags: ImageCreateFlags::default(),
11269 image_type: ImageType::default(),
11270 format: Format::default(),
11271 extent: Extent3D::default(),
11272 mip_levels: u32::default(),
11273 array_layers: u32::default(),
11274 samples: SampleCountFlags::default(),
11275 tiling: ImageTiling::default(),
11276 usage: ImageUsageFlags::default(),
11277 sharing_mode: SharingMode::default(),
11278 queue_family_index_count: u32::default(),
11279 p_queue_family_indices: ::std::ptr::null(),
11280 initial_layout: ImageLayout::default(),
11281 }
11282 }
11283 }
11284 impl ImageCreateInfo {
builder<'a>() -> ImageCreateInfoBuilder<'a>11285 pub fn builder<'a>() -> ImageCreateInfoBuilder<'a> {
11286 ImageCreateInfoBuilder {
11287 inner: ImageCreateInfo::default(),
11288 marker: ::std::marker::PhantomData,
11289 }
11290 }
11291 }
11292 #[repr(transparent)]
11293 pub struct ImageCreateInfoBuilder<'a> {
11294 inner: ImageCreateInfo,
11295 marker: ::std::marker::PhantomData<&'a ()>,
11296 }
11297 pub unsafe trait ExtendsImageCreateInfo {}
11298 impl<'a> ::std::ops::Deref for ImageCreateInfoBuilder<'a> {
11299 type Target = ImageCreateInfo;
deref(&self) -> &Self::Target11300 fn deref(&self) -> &Self::Target {
11301 &self.inner
11302 }
11303 }
11304 impl<'a> ::std::ops::DerefMut for ImageCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11305 fn deref_mut(&mut self) -> &mut Self::Target {
11306 &mut self.inner
11307 }
11308 }
11309 impl<'a> ImageCreateInfoBuilder<'a> {
flags(mut self, flags: ImageCreateFlags) -> ImageCreateInfoBuilder<'a>11310 pub fn flags(mut self, flags: ImageCreateFlags) -> ImageCreateInfoBuilder<'a> {
11311 self.inner.flags = flags;
11312 self
11313 }
image_type(mut self, image_type: ImageType) -> ImageCreateInfoBuilder<'a>11314 pub fn image_type(mut self, image_type: ImageType) -> ImageCreateInfoBuilder<'a> {
11315 self.inner.image_type = image_type;
11316 self
11317 }
format(mut self, format: Format) -> ImageCreateInfoBuilder<'a>11318 pub fn format(mut self, format: Format) -> ImageCreateInfoBuilder<'a> {
11319 self.inner.format = format;
11320 self
11321 }
extent(mut self, extent: Extent3D) -> ImageCreateInfoBuilder<'a>11322 pub fn extent(mut self, extent: Extent3D) -> ImageCreateInfoBuilder<'a> {
11323 self.inner.extent = extent;
11324 self
11325 }
mip_levels(mut self, mip_levels: u32) -> ImageCreateInfoBuilder<'a>11326 pub fn mip_levels(mut self, mip_levels: u32) -> ImageCreateInfoBuilder<'a> {
11327 self.inner.mip_levels = mip_levels;
11328 self
11329 }
array_layers(mut self, array_layers: u32) -> ImageCreateInfoBuilder<'a>11330 pub fn array_layers(mut self, array_layers: u32) -> ImageCreateInfoBuilder<'a> {
11331 self.inner.array_layers = array_layers;
11332 self
11333 }
samples(mut self, samples: SampleCountFlags) -> ImageCreateInfoBuilder<'a>11334 pub fn samples(mut self, samples: SampleCountFlags) -> ImageCreateInfoBuilder<'a> {
11335 self.inner.samples = samples;
11336 self
11337 }
tiling(mut self, tiling: ImageTiling) -> ImageCreateInfoBuilder<'a>11338 pub fn tiling(mut self, tiling: ImageTiling) -> ImageCreateInfoBuilder<'a> {
11339 self.inner.tiling = tiling;
11340 self
11341 }
usage(mut self, usage: ImageUsageFlags) -> ImageCreateInfoBuilder<'a>11342 pub fn usage(mut self, usage: ImageUsageFlags) -> ImageCreateInfoBuilder<'a> {
11343 self.inner.usage = usage;
11344 self
11345 }
sharing_mode(mut self, sharing_mode: SharingMode) -> ImageCreateInfoBuilder<'a>11346 pub fn sharing_mode(mut self, sharing_mode: SharingMode) -> ImageCreateInfoBuilder<'a> {
11347 self.inner.sharing_mode = sharing_mode;
11348 self
11349 }
queue_family_indices( mut self, queue_family_indices: &'a [u32], ) -> ImageCreateInfoBuilder<'a>11350 pub fn queue_family_indices(
11351 mut self,
11352 queue_family_indices: &'a [u32],
11353 ) -> ImageCreateInfoBuilder<'a> {
11354 self.inner.queue_family_index_count = queue_family_indices.len() as _;
11355 self.inner.p_queue_family_indices = queue_family_indices.as_ptr();
11356 self
11357 }
initial_layout(mut self, initial_layout: ImageLayout) -> ImageCreateInfoBuilder<'a>11358 pub fn initial_layout(mut self, initial_layout: ImageLayout) -> ImageCreateInfoBuilder<'a> {
11359 self.inner.initial_layout = initial_layout;
11360 self
11361 }
11362 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
11363 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
11364 #[doc = r" valid extension structs can be pushed into the chain."]
11365 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
11366 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsImageCreateInfo>( mut self, next: &'a mut T, ) -> ImageCreateInfoBuilder<'a>11367 pub fn push_next<T: ExtendsImageCreateInfo>(
11368 mut self,
11369 next: &'a mut T,
11370 ) -> ImageCreateInfoBuilder<'a> {
11371 unsafe {
11372 let next_ptr = next as *mut T as *mut BaseOutStructure;
11373 let last_next = ptr_chain_iter(next).last().unwrap();
11374 (*last_next).p_next = self.inner.p_next as _;
11375 self.inner.p_next = next_ptr as _;
11376 }
11377 self
11378 }
11379 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11380 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11381 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageCreateInfo11382 pub fn build(self) -> ImageCreateInfo {
11383 self.inner
11384 }
11385 }
11386 #[repr(C)]
11387 #[derive(Copy, Clone, Default, Debug)]
11388 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSubresourceLayout.html>"]
11389 pub struct SubresourceLayout {
11390 pub offset: DeviceSize,
11391 pub size: DeviceSize,
11392 pub row_pitch: DeviceSize,
11393 pub array_pitch: DeviceSize,
11394 pub depth_pitch: DeviceSize,
11395 }
11396 impl SubresourceLayout {
builder<'a>() -> SubresourceLayoutBuilder<'a>11397 pub fn builder<'a>() -> SubresourceLayoutBuilder<'a> {
11398 SubresourceLayoutBuilder {
11399 inner: SubresourceLayout::default(),
11400 marker: ::std::marker::PhantomData,
11401 }
11402 }
11403 }
11404 #[repr(transparent)]
11405 pub struct SubresourceLayoutBuilder<'a> {
11406 inner: SubresourceLayout,
11407 marker: ::std::marker::PhantomData<&'a ()>,
11408 }
11409 impl<'a> ::std::ops::Deref for SubresourceLayoutBuilder<'a> {
11410 type Target = SubresourceLayout;
deref(&self) -> &Self::Target11411 fn deref(&self) -> &Self::Target {
11412 &self.inner
11413 }
11414 }
11415 impl<'a> ::std::ops::DerefMut for SubresourceLayoutBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11416 fn deref_mut(&mut self) -> &mut Self::Target {
11417 &mut self.inner
11418 }
11419 }
11420 impl<'a> SubresourceLayoutBuilder<'a> {
offset(mut self, offset: DeviceSize) -> SubresourceLayoutBuilder<'a>11421 pub fn offset(mut self, offset: DeviceSize) -> SubresourceLayoutBuilder<'a> {
11422 self.inner.offset = offset;
11423 self
11424 }
size(mut self, size: DeviceSize) -> SubresourceLayoutBuilder<'a>11425 pub fn size(mut self, size: DeviceSize) -> SubresourceLayoutBuilder<'a> {
11426 self.inner.size = size;
11427 self
11428 }
row_pitch(mut self, row_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a>11429 pub fn row_pitch(mut self, row_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a> {
11430 self.inner.row_pitch = row_pitch;
11431 self
11432 }
array_pitch(mut self, array_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a>11433 pub fn array_pitch(mut self, array_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a> {
11434 self.inner.array_pitch = array_pitch;
11435 self
11436 }
depth_pitch(mut self, depth_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a>11437 pub fn depth_pitch(mut self, depth_pitch: DeviceSize) -> SubresourceLayoutBuilder<'a> {
11438 self.inner.depth_pitch = depth_pitch;
11439 self
11440 }
11441 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11442 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11443 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SubresourceLayout11444 pub fn build(self) -> SubresourceLayout {
11445 self.inner
11446 }
11447 }
11448 #[repr(C)]
11449 #[derive(Copy, Clone, Debug)]
11450 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageViewCreateInfo.html>"]
11451 pub struct ImageViewCreateInfo {
11452 pub s_type: StructureType,
11453 pub p_next: *const c_void,
11454 pub flags: ImageViewCreateFlags,
11455 pub image: Image,
11456 pub view_type: ImageViewType,
11457 pub format: Format,
11458 pub components: ComponentMapping,
11459 pub subresource_range: ImageSubresourceRange,
11460 }
11461 impl ::std::default::Default for ImageViewCreateInfo {
default() -> ImageViewCreateInfo11462 fn default() -> ImageViewCreateInfo {
11463 ImageViewCreateInfo {
11464 s_type: StructureType::IMAGE_VIEW_CREATE_INFO,
11465 p_next: ::std::ptr::null(),
11466 flags: ImageViewCreateFlags::default(),
11467 image: Image::default(),
11468 view_type: ImageViewType::default(),
11469 format: Format::default(),
11470 components: ComponentMapping::default(),
11471 subresource_range: ImageSubresourceRange::default(),
11472 }
11473 }
11474 }
11475 impl ImageViewCreateInfo {
builder<'a>() -> ImageViewCreateInfoBuilder<'a>11476 pub fn builder<'a>() -> ImageViewCreateInfoBuilder<'a> {
11477 ImageViewCreateInfoBuilder {
11478 inner: ImageViewCreateInfo::default(),
11479 marker: ::std::marker::PhantomData,
11480 }
11481 }
11482 }
11483 #[repr(transparent)]
11484 pub struct ImageViewCreateInfoBuilder<'a> {
11485 inner: ImageViewCreateInfo,
11486 marker: ::std::marker::PhantomData<&'a ()>,
11487 }
11488 pub unsafe trait ExtendsImageViewCreateInfo {}
11489 impl<'a> ::std::ops::Deref for ImageViewCreateInfoBuilder<'a> {
11490 type Target = ImageViewCreateInfo;
deref(&self) -> &Self::Target11491 fn deref(&self) -> &Self::Target {
11492 &self.inner
11493 }
11494 }
11495 impl<'a> ::std::ops::DerefMut for ImageViewCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11496 fn deref_mut(&mut self) -> &mut Self::Target {
11497 &mut self.inner
11498 }
11499 }
11500 impl<'a> ImageViewCreateInfoBuilder<'a> {
flags(mut self, flags: ImageViewCreateFlags) -> ImageViewCreateInfoBuilder<'a>11501 pub fn flags(mut self, flags: ImageViewCreateFlags) -> ImageViewCreateInfoBuilder<'a> {
11502 self.inner.flags = flags;
11503 self
11504 }
image(mut self, image: Image) -> ImageViewCreateInfoBuilder<'a>11505 pub fn image(mut self, image: Image) -> ImageViewCreateInfoBuilder<'a> {
11506 self.inner.image = image;
11507 self
11508 }
view_type(mut self, view_type: ImageViewType) -> ImageViewCreateInfoBuilder<'a>11509 pub fn view_type(mut self, view_type: ImageViewType) -> ImageViewCreateInfoBuilder<'a> {
11510 self.inner.view_type = view_type;
11511 self
11512 }
format(mut self, format: Format) -> ImageViewCreateInfoBuilder<'a>11513 pub fn format(mut self, format: Format) -> ImageViewCreateInfoBuilder<'a> {
11514 self.inner.format = format;
11515 self
11516 }
components(mut self, components: ComponentMapping) -> ImageViewCreateInfoBuilder<'a>11517 pub fn components(mut self, components: ComponentMapping) -> ImageViewCreateInfoBuilder<'a> {
11518 self.inner.components = components;
11519 self
11520 }
subresource_range( mut self, subresource_range: ImageSubresourceRange, ) -> ImageViewCreateInfoBuilder<'a>11521 pub fn subresource_range(
11522 mut self,
11523 subresource_range: ImageSubresourceRange,
11524 ) -> ImageViewCreateInfoBuilder<'a> {
11525 self.inner.subresource_range = subresource_range;
11526 self
11527 }
11528 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
11529 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
11530 #[doc = r" valid extension structs can be pushed into the chain."]
11531 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
11532 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsImageViewCreateInfo>( mut self, next: &'a mut T, ) -> ImageViewCreateInfoBuilder<'a>11533 pub fn push_next<T: ExtendsImageViewCreateInfo>(
11534 mut self,
11535 next: &'a mut T,
11536 ) -> ImageViewCreateInfoBuilder<'a> {
11537 unsafe {
11538 let next_ptr = next as *mut T as *mut BaseOutStructure;
11539 let last_next = ptr_chain_iter(next).last().unwrap();
11540 (*last_next).p_next = self.inner.p_next as _;
11541 self.inner.p_next = next_ptr as _;
11542 }
11543 self
11544 }
11545 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11546 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11547 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageViewCreateInfo11548 pub fn build(self) -> ImageViewCreateInfo {
11549 self.inner
11550 }
11551 }
11552 #[repr(C)]
11553 #[derive(Copy, Clone, Default, Debug)]
11554 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferCopy.html>"]
11555 pub struct BufferCopy {
11556 pub src_offset: DeviceSize,
11557 pub dst_offset: DeviceSize,
11558 pub size: DeviceSize,
11559 }
11560 impl BufferCopy {
builder<'a>() -> BufferCopyBuilder<'a>11561 pub fn builder<'a>() -> BufferCopyBuilder<'a> {
11562 BufferCopyBuilder {
11563 inner: BufferCopy::default(),
11564 marker: ::std::marker::PhantomData,
11565 }
11566 }
11567 }
11568 #[repr(transparent)]
11569 pub struct BufferCopyBuilder<'a> {
11570 inner: BufferCopy,
11571 marker: ::std::marker::PhantomData<&'a ()>,
11572 }
11573 impl<'a> ::std::ops::Deref for BufferCopyBuilder<'a> {
11574 type Target = BufferCopy;
deref(&self) -> &Self::Target11575 fn deref(&self) -> &Self::Target {
11576 &self.inner
11577 }
11578 }
11579 impl<'a> ::std::ops::DerefMut for BufferCopyBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11580 fn deref_mut(&mut self) -> &mut Self::Target {
11581 &mut self.inner
11582 }
11583 }
11584 impl<'a> BufferCopyBuilder<'a> {
src_offset(mut self, src_offset: DeviceSize) -> BufferCopyBuilder<'a>11585 pub fn src_offset(mut self, src_offset: DeviceSize) -> BufferCopyBuilder<'a> {
11586 self.inner.src_offset = src_offset;
11587 self
11588 }
dst_offset(mut self, dst_offset: DeviceSize) -> BufferCopyBuilder<'a>11589 pub fn dst_offset(mut self, dst_offset: DeviceSize) -> BufferCopyBuilder<'a> {
11590 self.inner.dst_offset = dst_offset;
11591 self
11592 }
size(mut self, size: DeviceSize) -> BufferCopyBuilder<'a>11593 pub fn size(mut self, size: DeviceSize) -> BufferCopyBuilder<'a> {
11594 self.inner.size = size;
11595 self
11596 }
11597 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11598 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11599 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferCopy11600 pub fn build(self) -> BufferCopy {
11601 self.inner
11602 }
11603 }
11604 #[repr(C)]
11605 #[derive(Copy, Clone, Default, Debug)]
11606 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseMemoryBind.html>"]
11607 pub struct SparseMemoryBind {
11608 pub resource_offset: DeviceSize,
11609 pub size: DeviceSize,
11610 pub memory: DeviceMemory,
11611 pub memory_offset: DeviceSize,
11612 pub flags: SparseMemoryBindFlags,
11613 }
11614 impl SparseMemoryBind {
builder<'a>() -> SparseMemoryBindBuilder<'a>11615 pub fn builder<'a>() -> SparseMemoryBindBuilder<'a> {
11616 SparseMemoryBindBuilder {
11617 inner: SparseMemoryBind::default(),
11618 marker: ::std::marker::PhantomData,
11619 }
11620 }
11621 }
11622 #[repr(transparent)]
11623 pub struct SparseMemoryBindBuilder<'a> {
11624 inner: SparseMemoryBind,
11625 marker: ::std::marker::PhantomData<&'a ()>,
11626 }
11627 impl<'a> ::std::ops::Deref for SparseMemoryBindBuilder<'a> {
11628 type Target = SparseMemoryBind;
deref(&self) -> &Self::Target11629 fn deref(&self) -> &Self::Target {
11630 &self.inner
11631 }
11632 }
11633 impl<'a> ::std::ops::DerefMut for SparseMemoryBindBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11634 fn deref_mut(&mut self) -> &mut Self::Target {
11635 &mut self.inner
11636 }
11637 }
11638 impl<'a> SparseMemoryBindBuilder<'a> {
resource_offset(mut self, resource_offset: DeviceSize) -> SparseMemoryBindBuilder<'a>11639 pub fn resource_offset(mut self, resource_offset: DeviceSize) -> SparseMemoryBindBuilder<'a> {
11640 self.inner.resource_offset = resource_offset;
11641 self
11642 }
size(mut self, size: DeviceSize) -> SparseMemoryBindBuilder<'a>11643 pub fn size(mut self, size: DeviceSize) -> SparseMemoryBindBuilder<'a> {
11644 self.inner.size = size;
11645 self
11646 }
memory(mut self, memory: DeviceMemory) -> SparseMemoryBindBuilder<'a>11647 pub fn memory(mut self, memory: DeviceMemory) -> SparseMemoryBindBuilder<'a> {
11648 self.inner.memory = memory;
11649 self
11650 }
memory_offset(mut self, memory_offset: DeviceSize) -> SparseMemoryBindBuilder<'a>11651 pub fn memory_offset(mut self, memory_offset: DeviceSize) -> SparseMemoryBindBuilder<'a> {
11652 self.inner.memory_offset = memory_offset;
11653 self
11654 }
flags(mut self, flags: SparseMemoryBindFlags) -> SparseMemoryBindBuilder<'a>11655 pub fn flags(mut self, flags: SparseMemoryBindFlags) -> SparseMemoryBindBuilder<'a> {
11656 self.inner.flags = flags;
11657 self
11658 }
11659 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11660 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11661 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseMemoryBind11662 pub fn build(self) -> SparseMemoryBind {
11663 self.inner
11664 }
11665 }
11666 #[repr(C)]
11667 #[derive(Copy, Clone, Default, Debug)]
11668 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryBind.html>"]
11669 pub struct SparseImageMemoryBind {
11670 pub subresource: ImageSubresource,
11671 pub offset: Offset3D,
11672 pub extent: Extent3D,
11673 pub memory: DeviceMemory,
11674 pub memory_offset: DeviceSize,
11675 pub flags: SparseMemoryBindFlags,
11676 }
11677 impl SparseImageMemoryBind {
builder<'a>() -> SparseImageMemoryBindBuilder<'a>11678 pub fn builder<'a>() -> SparseImageMemoryBindBuilder<'a> {
11679 SparseImageMemoryBindBuilder {
11680 inner: SparseImageMemoryBind::default(),
11681 marker: ::std::marker::PhantomData,
11682 }
11683 }
11684 }
11685 #[repr(transparent)]
11686 pub struct SparseImageMemoryBindBuilder<'a> {
11687 inner: SparseImageMemoryBind,
11688 marker: ::std::marker::PhantomData<&'a ()>,
11689 }
11690 impl<'a> ::std::ops::Deref for SparseImageMemoryBindBuilder<'a> {
11691 type Target = SparseImageMemoryBind;
deref(&self) -> &Self::Target11692 fn deref(&self) -> &Self::Target {
11693 &self.inner
11694 }
11695 }
11696 impl<'a> ::std::ops::DerefMut for SparseImageMemoryBindBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11697 fn deref_mut(&mut self) -> &mut Self::Target {
11698 &mut self.inner
11699 }
11700 }
11701 impl<'a> SparseImageMemoryBindBuilder<'a> {
subresource( mut self, subresource: ImageSubresource, ) -> SparseImageMemoryBindBuilder<'a>11702 pub fn subresource(
11703 mut self,
11704 subresource: ImageSubresource,
11705 ) -> SparseImageMemoryBindBuilder<'a> {
11706 self.inner.subresource = subresource;
11707 self
11708 }
offset(mut self, offset: Offset3D) -> SparseImageMemoryBindBuilder<'a>11709 pub fn offset(mut self, offset: Offset3D) -> SparseImageMemoryBindBuilder<'a> {
11710 self.inner.offset = offset;
11711 self
11712 }
extent(mut self, extent: Extent3D) -> SparseImageMemoryBindBuilder<'a>11713 pub fn extent(mut self, extent: Extent3D) -> SparseImageMemoryBindBuilder<'a> {
11714 self.inner.extent = extent;
11715 self
11716 }
memory(mut self, memory: DeviceMemory) -> SparseImageMemoryBindBuilder<'a>11717 pub fn memory(mut self, memory: DeviceMemory) -> SparseImageMemoryBindBuilder<'a> {
11718 self.inner.memory = memory;
11719 self
11720 }
memory_offset(mut self, memory_offset: DeviceSize) -> SparseImageMemoryBindBuilder<'a>11721 pub fn memory_offset(mut self, memory_offset: DeviceSize) -> SparseImageMemoryBindBuilder<'a> {
11722 self.inner.memory_offset = memory_offset;
11723 self
11724 }
flags(mut self, flags: SparseMemoryBindFlags) -> SparseImageMemoryBindBuilder<'a>11725 pub fn flags(mut self, flags: SparseMemoryBindFlags) -> SparseImageMemoryBindBuilder<'a> {
11726 self.inner.flags = flags;
11727 self
11728 }
11729 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11730 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11731 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageMemoryBind11732 pub fn build(self) -> SparseImageMemoryBind {
11733 self.inner
11734 }
11735 }
11736 #[repr(C)]
11737 #[derive(Copy, Clone, Debug)]
11738 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseBufferMemoryBindInfo.html>"]
11739 pub struct SparseBufferMemoryBindInfo {
11740 pub buffer: Buffer,
11741 pub bind_count: u32,
11742 pub p_binds: *const SparseMemoryBind,
11743 }
11744 impl ::std::default::Default for SparseBufferMemoryBindInfo {
default() -> SparseBufferMemoryBindInfo11745 fn default() -> SparseBufferMemoryBindInfo {
11746 SparseBufferMemoryBindInfo {
11747 buffer: Buffer::default(),
11748 bind_count: u32::default(),
11749 p_binds: ::std::ptr::null(),
11750 }
11751 }
11752 }
11753 impl SparseBufferMemoryBindInfo {
builder<'a>() -> SparseBufferMemoryBindInfoBuilder<'a>11754 pub fn builder<'a>() -> SparseBufferMemoryBindInfoBuilder<'a> {
11755 SparseBufferMemoryBindInfoBuilder {
11756 inner: SparseBufferMemoryBindInfo::default(),
11757 marker: ::std::marker::PhantomData,
11758 }
11759 }
11760 }
11761 #[repr(transparent)]
11762 pub struct SparseBufferMemoryBindInfoBuilder<'a> {
11763 inner: SparseBufferMemoryBindInfo,
11764 marker: ::std::marker::PhantomData<&'a ()>,
11765 }
11766 impl<'a> ::std::ops::Deref for SparseBufferMemoryBindInfoBuilder<'a> {
11767 type Target = SparseBufferMemoryBindInfo;
deref(&self) -> &Self::Target11768 fn deref(&self) -> &Self::Target {
11769 &self.inner
11770 }
11771 }
11772 impl<'a> ::std::ops::DerefMut for SparseBufferMemoryBindInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11773 fn deref_mut(&mut self) -> &mut Self::Target {
11774 &mut self.inner
11775 }
11776 }
11777 impl<'a> SparseBufferMemoryBindInfoBuilder<'a> {
buffer(mut self, buffer: Buffer) -> SparseBufferMemoryBindInfoBuilder<'a>11778 pub fn buffer(mut self, buffer: Buffer) -> SparseBufferMemoryBindInfoBuilder<'a> {
11779 self.inner.buffer = buffer;
11780 self
11781 }
binds(mut self, binds: &'a [SparseMemoryBind]) -> SparseBufferMemoryBindInfoBuilder<'a>11782 pub fn binds(mut self, binds: &'a [SparseMemoryBind]) -> SparseBufferMemoryBindInfoBuilder<'a> {
11783 self.inner.bind_count = binds.len() as _;
11784 self.inner.p_binds = binds.as_ptr();
11785 self
11786 }
11787 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11788 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11789 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseBufferMemoryBindInfo11790 pub fn build(self) -> SparseBufferMemoryBindInfo {
11791 self.inner
11792 }
11793 }
11794 #[repr(C)]
11795 #[derive(Copy, Clone, Debug)]
11796 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageOpaqueMemoryBindInfo.html>"]
11797 pub struct SparseImageOpaqueMemoryBindInfo {
11798 pub image: Image,
11799 pub bind_count: u32,
11800 pub p_binds: *const SparseMemoryBind,
11801 }
11802 impl ::std::default::Default for SparseImageOpaqueMemoryBindInfo {
default() -> SparseImageOpaqueMemoryBindInfo11803 fn default() -> SparseImageOpaqueMemoryBindInfo {
11804 SparseImageOpaqueMemoryBindInfo {
11805 image: Image::default(),
11806 bind_count: u32::default(),
11807 p_binds: ::std::ptr::null(),
11808 }
11809 }
11810 }
11811 impl SparseImageOpaqueMemoryBindInfo {
builder<'a>() -> SparseImageOpaqueMemoryBindInfoBuilder<'a>11812 pub fn builder<'a>() -> SparseImageOpaqueMemoryBindInfoBuilder<'a> {
11813 SparseImageOpaqueMemoryBindInfoBuilder {
11814 inner: SparseImageOpaqueMemoryBindInfo::default(),
11815 marker: ::std::marker::PhantomData,
11816 }
11817 }
11818 }
11819 #[repr(transparent)]
11820 pub struct SparseImageOpaqueMemoryBindInfoBuilder<'a> {
11821 inner: SparseImageOpaqueMemoryBindInfo,
11822 marker: ::std::marker::PhantomData<&'a ()>,
11823 }
11824 impl<'a> ::std::ops::Deref for SparseImageOpaqueMemoryBindInfoBuilder<'a> {
11825 type Target = SparseImageOpaqueMemoryBindInfo;
deref(&self) -> &Self::Target11826 fn deref(&self) -> &Self::Target {
11827 &self.inner
11828 }
11829 }
11830 impl<'a> ::std::ops::DerefMut for SparseImageOpaqueMemoryBindInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11831 fn deref_mut(&mut self) -> &mut Self::Target {
11832 &mut self.inner
11833 }
11834 }
11835 impl<'a> SparseImageOpaqueMemoryBindInfoBuilder<'a> {
image(mut self, image: Image) -> SparseImageOpaqueMemoryBindInfoBuilder<'a>11836 pub fn image(mut self, image: Image) -> SparseImageOpaqueMemoryBindInfoBuilder<'a> {
11837 self.inner.image = image;
11838 self
11839 }
binds( mut self, binds: &'a [SparseMemoryBind], ) -> SparseImageOpaqueMemoryBindInfoBuilder<'a>11840 pub fn binds(
11841 mut self,
11842 binds: &'a [SparseMemoryBind],
11843 ) -> SparseImageOpaqueMemoryBindInfoBuilder<'a> {
11844 self.inner.bind_count = binds.len() as _;
11845 self.inner.p_binds = binds.as_ptr();
11846 self
11847 }
11848 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11849 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11850 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageOpaqueMemoryBindInfo11851 pub fn build(self) -> SparseImageOpaqueMemoryBindInfo {
11852 self.inner
11853 }
11854 }
11855 #[repr(C)]
11856 #[derive(Copy, Clone, Debug)]
11857 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryBindInfo.html>"]
11858 pub struct SparseImageMemoryBindInfo {
11859 pub image: Image,
11860 pub bind_count: u32,
11861 pub p_binds: *const SparseImageMemoryBind,
11862 }
11863 impl ::std::default::Default for SparseImageMemoryBindInfo {
default() -> SparseImageMemoryBindInfo11864 fn default() -> SparseImageMemoryBindInfo {
11865 SparseImageMemoryBindInfo {
11866 image: Image::default(),
11867 bind_count: u32::default(),
11868 p_binds: ::std::ptr::null(),
11869 }
11870 }
11871 }
11872 impl SparseImageMemoryBindInfo {
builder<'a>() -> SparseImageMemoryBindInfoBuilder<'a>11873 pub fn builder<'a>() -> SparseImageMemoryBindInfoBuilder<'a> {
11874 SparseImageMemoryBindInfoBuilder {
11875 inner: SparseImageMemoryBindInfo::default(),
11876 marker: ::std::marker::PhantomData,
11877 }
11878 }
11879 }
11880 #[repr(transparent)]
11881 pub struct SparseImageMemoryBindInfoBuilder<'a> {
11882 inner: SparseImageMemoryBindInfo,
11883 marker: ::std::marker::PhantomData<&'a ()>,
11884 }
11885 impl<'a> ::std::ops::Deref for SparseImageMemoryBindInfoBuilder<'a> {
11886 type Target = SparseImageMemoryBindInfo;
deref(&self) -> &Self::Target11887 fn deref(&self) -> &Self::Target {
11888 &self.inner
11889 }
11890 }
11891 impl<'a> ::std::ops::DerefMut for SparseImageMemoryBindInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11892 fn deref_mut(&mut self) -> &mut Self::Target {
11893 &mut self.inner
11894 }
11895 }
11896 impl<'a> SparseImageMemoryBindInfoBuilder<'a> {
image(mut self, image: Image) -> SparseImageMemoryBindInfoBuilder<'a>11897 pub fn image(mut self, image: Image) -> SparseImageMemoryBindInfoBuilder<'a> {
11898 self.inner.image = image;
11899 self
11900 }
binds( mut self, binds: &'a [SparseImageMemoryBind], ) -> SparseImageMemoryBindInfoBuilder<'a>11901 pub fn binds(
11902 mut self,
11903 binds: &'a [SparseImageMemoryBind],
11904 ) -> SparseImageMemoryBindInfoBuilder<'a> {
11905 self.inner.bind_count = binds.len() as _;
11906 self.inner.p_binds = binds.as_ptr();
11907 self
11908 }
11909 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
11910 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
11911 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageMemoryBindInfo11912 pub fn build(self) -> SparseImageMemoryBindInfo {
11913 self.inner
11914 }
11915 }
11916 #[repr(C)]
11917 #[derive(Copy, Clone, Debug)]
11918 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBindSparseInfo.html>"]
11919 pub struct BindSparseInfo {
11920 pub s_type: StructureType,
11921 pub p_next: *const c_void,
11922 pub wait_semaphore_count: u32,
11923 pub p_wait_semaphores: *const Semaphore,
11924 pub buffer_bind_count: u32,
11925 pub p_buffer_binds: *const SparseBufferMemoryBindInfo,
11926 pub image_opaque_bind_count: u32,
11927 pub p_image_opaque_binds: *const SparseImageOpaqueMemoryBindInfo,
11928 pub image_bind_count: u32,
11929 pub p_image_binds: *const SparseImageMemoryBindInfo,
11930 pub signal_semaphore_count: u32,
11931 pub p_signal_semaphores: *const Semaphore,
11932 }
11933 impl ::std::default::Default for BindSparseInfo {
default() -> BindSparseInfo11934 fn default() -> BindSparseInfo {
11935 BindSparseInfo {
11936 s_type: StructureType::BIND_SPARSE_INFO,
11937 p_next: ::std::ptr::null(),
11938 wait_semaphore_count: u32::default(),
11939 p_wait_semaphores: ::std::ptr::null(),
11940 buffer_bind_count: u32::default(),
11941 p_buffer_binds: ::std::ptr::null(),
11942 image_opaque_bind_count: u32::default(),
11943 p_image_opaque_binds: ::std::ptr::null(),
11944 image_bind_count: u32::default(),
11945 p_image_binds: ::std::ptr::null(),
11946 signal_semaphore_count: u32::default(),
11947 p_signal_semaphores: ::std::ptr::null(),
11948 }
11949 }
11950 }
11951 impl BindSparseInfo {
builder<'a>() -> BindSparseInfoBuilder<'a>11952 pub fn builder<'a>() -> BindSparseInfoBuilder<'a> {
11953 BindSparseInfoBuilder {
11954 inner: BindSparseInfo::default(),
11955 marker: ::std::marker::PhantomData,
11956 }
11957 }
11958 }
11959 #[repr(transparent)]
11960 pub struct BindSparseInfoBuilder<'a> {
11961 inner: BindSparseInfo,
11962 marker: ::std::marker::PhantomData<&'a ()>,
11963 }
11964 pub unsafe trait ExtendsBindSparseInfo {}
11965 impl<'a> ::std::ops::Deref for BindSparseInfoBuilder<'a> {
11966 type Target = BindSparseInfo;
deref(&self) -> &Self::Target11967 fn deref(&self) -> &Self::Target {
11968 &self.inner
11969 }
11970 }
11971 impl<'a> ::std::ops::DerefMut for BindSparseInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target11972 fn deref_mut(&mut self) -> &mut Self::Target {
11973 &mut self.inner
11974 }
11975 }
11976 impl<'a> BindSparseInfoBuilder<'a> {
wait_semaphores( mut self, wait_semaphores: &'a [Semaphore], ) -> BindSparseInfoBuilder<'a>11977 pub fn wait_semaphores(
11978 mut self,
11979 wait_semaphores: &'a [Semaphore],
11980 ) -> BindSparseInfoBuilder<'a> {
11981 self.inner.wait_semaphore_count = wait_semaphores.len() as _;
11982 self.inner.p_wait_semaphores = wait_semaphores.as_ptr();
11983 self
11984 }
buffer_binds( mut self, buffer_binds: &'a [SparseBufferMemoryBindInfo], ) -> BindSparseInfoBuilder<'a>11985 pub fn buffer_binds(
11986 mut self,
11987 buffer_binds: &'a [SparseBufferMemoryBindInfo],
11988 ) -> BindSparseInfoBuilder<'a> {
11989 self.inner.buffer_bind_count = buffer_binds.len() as _;
11990 self.inner.p_buffer_binds = buffer_binds.as_ptr();
11991 self
11992 }
image_opaque_binds( mut self, image_opaque_binds: &'a [SparseImageOpaqueMemoryBindInfo], ) -> BindSparseInfoBuilder<'a>11993 pub fn image_opaque_binds(
11994 mut self,
11995 image_opaque_binds: &'a [SparseImageOpaqueMemoryBindInfo],
11996 ) -> BindSparseInfoBuilder<'a> {
11997 self.inner.image_opaque_bind_count = image_opaque_binds.len() as _;
11998 self.inner.p_image_opaque_binds = image_opaque_binds.as_ptr();
11999 self
12000 }
image_binds( mut self, image_binds: &'a [SparseImageMemoryBindInfo], ) -> BindSparseInfoBuilder<'a>12001 pub fn image_binds(
12002 mut self,
12003 image_binds: &'a [SparseImageMemoryBindInfo],
12004 ) -> BindSparseInfoBuilder<'a> {
12005 self.inner.image_bind_count = image_binds.len() as _;
12006 self.inner.p_image_binds = image_binds.as_ptr();
12007 self
12008 }
signal_semaphores( mut self, signal_semaphores: &'a [Semaphore], ) -> BindSparseInfoBuilder<'a>12009 pub fn signal_semaphores(
12010 mut self,
12011 signal_semaphores: &'a [Semaphore],
12012 ) -> BindSparseInfoBuilder<'a> {
12013 self.inner.signal_semaphore_count = signal_semaphores.len() as _;
12014 self.inner.p_signal_semaphores = signal_semaphores.as_ptr();
12015 self
12016 }
12017 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
12018 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
12019 #[doc = r" valid extension structs can be pushed into the chain."]
12020 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
12021 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsBindSparseInfo>( mut self, next: &'a mut T, ) -> BindSparseInfoBuilder<'a>12022 pub fn push_next<T: ExtendsBindSparseInfo>(
12023 mut self,
12024 next: &'a mut T,
12025 ) -> BindSparseInfoBuilder<'a> {
12026 unsafe {
12027 let next_ptr = next as *mut T as *mut BaseOutStructure;
12028 let last_next = ptr_chain_iter(next).last().unwrap();
12029 (*last_next).p_next = self.inner.p_next as _;
12030 self.inner.p_next = next_ptr as _;
12031 }
12032 self
12033 }
12034 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12035 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12036 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BindSparseInfo12037 pub fn build(self) -> BindSparseInfo {
12038 self.inner
12039 }
12040 }
12041 #[repr(C)]
12042 #[derive(Copy, Clone, Default, Debug)]
12043 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageCopy.html>"]
12044 pub struct ImageCopy {
12045 pub src_subresource: ImageSubresourceLayers,
12046 pub src_offset: Offset3D,
12047 pub dst_subresource: ImageSubresourceLayers,
12048 pub dst_offset: Offset3D,
12049 pub extent: Extent3D,
12050 }
12051 impl ImageCopy {
builder<'a>() -> ImageCopyBuilder<'a>12052 pub fn builder<'a>() -> ImageCopyBuilder<'a> {
12053 ImageCopyBuilder {
12054 inner: ImageCopy::default(),
12055 marker: ::std::marker::PhantomData,
12056 }
12057 }
12058 }
12059 #[repr(transparent)]
12060 pub struct ImageCopyBuilder<'a> {
12061 inner: ImageCopy,
12062 marker: ::std::marker::PhantomData<&'a ()>,
12063 }
12064 impl<'a> ::std::ops::Deref for ImageCopyBuilder<'a> {
12065 type Target = ImageCopy;
deref(&self) -> &Self::Target12066 fn deref(&self) -> &Self::Target {
12067 &self.inner
12068 }
12069 }
12070 impl<'a> ::std::ops::DerefMut for ImageCopyBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12071 fn deref_mut(&mut self) -> &mut Self::Target {
12072 &mut self.inner
12073 }
12074 }
12075 impl<'a> ImageCopyBuilder<'a> {
src_subresource( mut self, src_subresource: ImageSubresourceLayers, ) -> ImageCopyBuilder<'a>12076 pub fn src_subresource(
12077 mut self,
12078 src_subresource: ImageSubresourceLayers,
12079 ) -> ImageCopyBuilder<'a> {
12080 self.inner.src_subresource = src_subresource;
12081 self
12082 }
src_offset(mut self, src_offset: Offset3D) -> ImageCopyBuilder<'a>12083 pub fn src_offset(mut self, src_offset: Offset3D) -> ImageCopyBuilder<'a> {
12084 self.inner.src_offset = src_offset;
12085 self
12086 }
dst_subresource( mut self, dst_subresource: ImageSubresourceLayers, ) -> ImageCopyBuilder<'a>12087 pub fn dst_subresource(
12088 mut self,
12089 dst_subresource: ImageSubresourceLayers,
12090 ) -> ImageCopyBuilder<'a> {
12091 self.inner.dst_subresource = dst_subresource;
12092 self
12093 }
dst_offset(mut self, dst_offset: Offset3D) -> ImageCopyBuilder<'a>12094 pub fn dst_offset(mut self, dst_offset: Offset3D) -> ImageCopyBuilder<'a> {
12095 self.inner.dst_offset = dst_offset;
12096 self
12097 }
extent(mut self, extent: Extent3D) -> ImageCopyBuilder<'a>12098 pub fn extent(mut self, extent: Extent3D) -> ImageCopyBuilder<'a> {
12099 self.inner.extent = extent;
12100 self
12101 }
12102 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12103 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12104 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageCopy12105 pub fn build(self) -> ImageCopy {
12106 self.inner
12107 }
12108 }
12109 #[repr(C)]
12110 #[derive(Copy, Clone, Debug)]
12111 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageBlit.html>"]
12112 pub struct ImageBlit {
12113 pub src_subresource: ImageSubresourceLayers,
12114 pub src_offsets: [Offset3D; 2],
12115 pub dst_subresource: ImageSubresourceLayers,
12116 pub dst_offsets: [Offset3D; 2],
12117 }
12118 impl ::std::default::Default for ImageBlit {
default() -> ImageBlit12119 fn default() -> ImageBlit {
12120 ImageBlit {
12121 src_subresource: ImageSubresourceLayers::default(),
12122 src_offsets: unsafe { ::std::mem::zeroed() },
12123 dst_subresource: ImageSubresourceLayers::default(),
12124 dst_offsets: unsafe { ::std::mem::zeroed() },
12125 }
12126 }
12127 }
12128 impl ImageBlit {
builder<'a>() -> ImageBlitBuilder<'a>12129 pub fn builder<'a>() -> ImageBlitBuilder<'a> {
12130 ImageBlitBuilder {
12131 inner: ImageBlit::default(),
12132 marker: ::std::marker::PhantomData,
12133 }
12134 }
12135 }
12136 #[repr(transparent)]
12137 pub struct ImageBlitBuilder<'a> {
12138 inner: ImageBlit,
12139 marker: ::std::marker::PhantomData<&'a ()>,
12140 }
12141 impl<'a> ::std::ops::Deref for ImageBlitBuilder<'a> {
12142 type Target = ImageBlit;
deref(&self) -> &Self::Target12143 fn deref(&self) -> &Self::Target {
12144 &self.inner
12145 }
12146 }
12147 impl<'a> ::std::ops::DerefMut for ImageBlitBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12148 fn deref_mut(&mut self) -> &mut Self::Target {
12149 &mut self.inner
12150 }
12151 }
12152 impl<'a> ImageBlitBuilder<'a> {
src_subresource( mut self, src_subresource: ImageSubresourceLayers, ) -> ImageBlitBuilder<'a>12153 pub fn src_subresource(
12154 mut self,
12155 src_subresource: ImageSubresourceLayers,
12156 ) -> ImageBlitBuilder<'a> {
12157 self.inner.src_subresource = src_subresource;
12158 self
12159 }
src_offsets(mut self, src_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a>12160 pub fn src_offsets(mut self, src_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a> {
12161 self.inner.src_offsets = src_offsets;
12162 self
12163 }
dst_subresource( mut self, dst_subresource: ImageSubresourceLayers, ) -> ImageBlitBuilder<'a>12164 pub fn dst_subresource(
12165 mut self,
12166 dst_subresource: ImageSubresourceLayers,
12167 ) -> ImageBlitBuilder<'a> {
12168 self.inner.dst_subresource = dst_subresource;
12169 self
12170 }
dst_offsets(mut self, dst_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a>12171 pub fn dst_offsets(mut self, dst_offsets: [Offset3D; 2]) -> ImageBlitBuilder<'a> {
12172 self.inner.dst_offsets = dst_offsets;
12173 self
12174 }
12175 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12176 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12177 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageBlit12178 pub fn build(self) -> ImageBlit {
12179 self.inner
12180 }
12181 }
12182 #[repr(C)]
12183 #[derive(Copy, Clone, Default, Debug)]
12184 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferImageCopy.html>"]
12185 pub struct BufferImageCopy {
12186 pub buffer_offset: DeviceSize,
12187 pub buffer_row_length: u32,
12188 pub buffer_image_height: u32,
12189 pub image_subresource: ImageSubresourceLayers,
12190 pub image_offset: Offset3D,
12191 pub image_extent: Extent3D,
12192 }
12193 impl BufferImageCopy {
builder<'a>() -> BufferImageCopyBuilder<'a>12194 pub fn builder<'a>() -> BufferImageCopyBuilder<'a> {
12195 BufferImageCopyBuilder {
12196 inner: BufferImageCopy::default(),
12197 marker: ::std::marker::PhantomData,
12198 }
12199 }
12200 }
12201 #[repr(transparent)]
12202 pub struct BufferImageCopyBuilder<'a> {
12203 inner: BufferImageCopy,
12204 marker: ::std::marker::PhantomData<&'a ()>,
12205 }
12206 impl<'a> ::std::ops::Deref for BufferImageCopyBuilder<'a> {
12207 type Target = BufferImageCopy;
deref(&self) -> &Self::Target12208 fn deref(&self) -> &Self::Target {
12209 &self.inner
12210 }
12211 }
12212 impl<'a> ::std::ops::DerefMut for BufferImageCopyBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12213 fn deref_mut(&mut self) -> &mut Self::Target {
12214 &mut self.inner
12215 }
12216 }
12217 impl<'a> BufferImageCopyBuilder<'a> {
buffer_offset(mut self, buffer_offset: DeviceSize) -> BufferImageCopyBuilder<'a>12218 pub fn buffer_offset(mut self, buffer_offset: DeviceSize) -> BufferImageCopyBuilder<'a> {
12219 self.inner.buffer_offset = buffer_offset;
12220 self
12221 }
buffer_row_length(mut self, buffer_row_length: u32) -> BufferImageCopyBuilder<'a>12222 pub fn buffer_row_length(mut self, buffer_row_length: u32) -> BufferImageCopyBuilder<'a> {
12223 self.inner.buffer_row_length = buffer_row_length;
12224 self
12225 }
buffer_image_height(mut self, buffer_image_height: u32) -> BufferImageCopyBuilder<'a>12226 pub fn buffer_image_height(mut self, buffer_image_height: u32) -> BufferImageCopyBuilder<'a> {
12227 self.inner.buffer_image_height = buffer_image_height;
12228 self
12229 }
image_subresource( mut self, image_subresource: ImageSubresourceLayers, ) -> BufferImageCopyBuilder<'a>12230 pub fn image_subresource(
12231 mut self,
12232 image_subresource: ImageSubresourceLayers,
12233 ) -> BufferImageCopyBuilder<'a> {
12234 self.inner.image_subresource = image_subresource;
12235 self
12236 }
image_offset(mut self, image_offset: Offset3D) -> BufferImageCopyBuilder<'a>12237 pub fn image_offset(mut self, image_offset: Offset3D) -> BufferImageCopyBuilder<'a> {
12238 self.inner.image_offset = image_offset;
12239 self
12240 }
image_extent(mut self, image_extent: Extent3D) -> BufferImageCopyBuilder<'a>12241 pub fn image_extent(mut self, image_extent: Extent3D) -> BufferImageCopyBuilder<'a> {
12242 self.inner.image_extent = image_extent;
12243 self
12244 }
12245 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12246 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12247 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferImageCopy12248 pub fn build(self) -> BufferImageCopy {
12249 self.inner
12250 }
12251 }
12252 #[repr(C)]
12253 #[derive(Copy, Clone, Default, Debug)]
12254 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageResolve.html>"]
12255 pub struct ImageResolve {
12256 pub src_subresource: ImageSubresourceLayers,
12257 pub src_offset: Offset3D,
12258 pub dst_subresource: ImageSubresourceLayers,
12259 pub dst_offset: Offset3D,
12260 pub extent: Extent3D,
12261 }
12262 impl ImageResolve {
builder<'a>() -> ImageResolveBuilder<'a>12263 pub fn builder<'a>() -> ImageResolveBuilder<'a> {
12264 ImageResolveBuilder {
12265 inner: ImageResolve::default(),
12266 marker: ::std::marker::PhantomData,
12267 }
12268 }
12269 }
12270 #[repr(transparent)]
12271 pub struct ImageResolveBuilder<'a> {
12272 inner: ImageResolve,
12273 marker: ::std::marker::PhantomData<&'a ()>,
12274 }
12275 impl<'a> ::std::ops::Deref for ImageResolveBuilder<'a> {
12276 type Target = ImageResolve;
deref(&self) -> &Self::Target12277 fn deref(&self) -> &Self::Target {
12278 &self.inner
12279 }
12280 }
12281 impl<'a> ::std::ops::DerefMut for ImageResolveBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12282 fn deref_mut(&mut self) -> &mut Self::Target {
12283 &mut self.inner
12284 }
12285 }
12286 impl<'a> ImageResolveBuilder<'a> {
src_subresource( mut self, src_subresource: ImageSubresourceLayers, ) -> ImageResolveBuilder<'a>12287 pub fn src_subresource(
12288 mut self,
12289 src_subresource: ImageSubresourceLayers,
12290 ) -> ImageResolveBuilder<'a> {
12291 self.inner.src_subresource = src_subresource;
12292 self
12293 }
src_offset(mut self, src_offset: Offset3D) -> ImageResolveBuilder<'a>12294 pub fn src_offset(mut self, src_offset: Offset3D) -> ImageResolveBuilder<'a> {
12295 self.inner.src_offset = src_offset;
12296 self
12297 }
dst_subresource( mut self, dst_subresource: ImageSubresourceLayers, ) -> ImageResolveBuilder<'a>12298 pub fn dst_subresource(
12299 mut self,
12300 dst_subresource: ImageSubresourceLayers,
12301 ) -> ImageResolveBuilder<'a> {
12302 self.inner.dst_subresource = dst_subresource;
12303 self
12304 }
dst_offset(mut self, dst_offset: Offset3D) -> ImageResolveBuilder<'a>12305 pub fn dst_offset(mut self, dst_offset: Offset3D) -> ImageResolveBuilder<'a> {
12306 self.inner.dst_offset = dst_offset;
12307 self
12308 }
extent(mut self, extent: Extent3D) -> ImageResolveBuilder<'a>12309 pub fn extent(mut self, extent: Extent3D) -> ImageResolveBuilder<'a> {
12310 self.inner.extent = extent;
12311 self
12312 }
12313 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12314 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12315 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageResolve12316 pub fn build(self) -> ImageResolve {
12317 self.inner
12318 }
12319 }
12320 #[repr(C)]
12321 #[derive(Copy, Clone, Debug)]
12322 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderModuleCreateInfo.html>"]
12323 pub struct ShaderModuleCreateInfo {
12324 pub s_type: StructureType,
12325 pub p_next: *const c_void,
12326 pub flags: ShaderModuleCreateFlags,
12327 pub code_size: usize,
12328 pub p_code: *const u32,
12329 }
12330 impl ::std::default::Default for ShaderModuleCreateInfo {
default() -> ShaderModuleCreateInfo12331 fn default() -> ShaderModuleCreateInfo {
12332 ShaderModuleCreateInfo {
12333 s_type: StructureType::SHADER_MODULE_CREATE_INFO,
12334 p_next: ::std::ptr::null(),
12335 flags: ShaderModuleCreateFlags::default(),
12336 code_size: usize::default(),
12337 p_code: ::std::ptr::null(),
12338 }
12339 }
12340 }
12341 impl ShaderModuleCreateInfo {
builder<'a>() -> ShaderModuleCreateInfoBuilder<'a>12342 pub fn builder<'a>() -> ShaderModuleCreateInfoBuilder<'a> {
12343 ShaderModuleCreateInfoBuilder {
12344 inner: ShaderModuleCreateInfo::default(),
12345 marker: ::std::marker::PhantomData,
12346 }
12347 }
12348 }
12349 #[repr(transparent)]
12350 pub struct ShaderModuleCreateInfoBuilder<'a> {
12351 inner: ShaderModuleCreateInfo,
12352 marker: ::std::marker::PhantomData<&'a ()>,
12353 }
12354 pub unsafe trait ExtendsShaderModuleCreateInfo {}
12355 impl<'a> ::std::ops::Deref for ShaderModuleCreateInfoBuilder<'a> {
12356 type Target = ShaderModuleCreateInfo;
deref(&self) -> &Self::Target12357 fn deref(&self) -> &Self::Target {
12358 &self.inner
12359 }
12360 }
12361 impl<'a> ::std::ops::DerefMut for ShaderModuleCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12362 fn deref_mut(&mut self) -> &mut Self::Target {
12363 &mut self.inner
12364 }
12365 }
12366 impl<'a> ShaderModuleCreateInfoBuilder<'a> {
flags(mut self, flags: ShaderModuleCreateFlags) -> ShaderModuleCreateInfoBuilder<'a>12367 pub fn flags(mut self, flags: ShaderModuleCreateFlags) -> ShaderModuleCreateInfoBuilder<'a> {
12368 self.inner.flags = flags;
12369 self
12370 }
code(mut self, code: &'a [u32]) -> ShaderModuleCreateInfoBuilder<'a>12371 pub fn code(mut self, code: &'a [u32]) -> ShaderModuleCreateInfoBuilder<'a> {
12372 self.inner.code_size = code.len() * 4;
12373 self.inner.p_code = code.as_ptr() as *const u32;
12374 self
12375 }
12376 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
12377 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
12378 #[doc = r" valid extension structs can be pushed into the chain."]
12379 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
12380 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsShaderModuleCreateInfo>( mut self, next: &'a mut T, ) -> ShaderModuleCreateInfoBuilder<'a>12381 pub fn push_next<T: ExtendsShaderModuleCreateInfo>(
12382 mut self,
12383 next: &'a mut T,
12384 ) -> ShaderModuleCreateInfoBuilder<'a> {
12385 unsafe {
12386 let next_ptr = next as *mut T as *mut BaseOutStructure;
12387 let last_next = ptr_chain_iter(next).last().unwrap();
12388 (*last_next).p_next = self.inner.p_next as _;
12389 self.inner.p_next = next_ptr as _;
12390 }
12391 self
12392 }
12393 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12394 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12395 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ShaderModuleCreateInfo12396 pub fn build(self) -> ShaderModuleCreateInfo {
12397 self.inner
12398 }
12399 }
12400 #[repr(C)]
12401 #[derive(Copy, Clone, Debug)]
12402 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayoutBinding.html>"]
12403 pub struct DescriptorSetLayoutBinding {
12404 pub binding: u32,
12405 pub descriptor_type: DescriptorType,
12406 pub descriptor_count: u32,
12407 pub stage_flags: ShaderStageFlags,
12408 pub p_immutable_samplers: *const Sampler,
12409 }
12410 impl ::std::default::Default for DescriptorSetLayoutBinding {
default() -> DescriptorSetLayoutBinding12411 fn default() -> DescriptorSetLayoutBinding {
12412 DescriptorSetLayoutBinding {
12413 binding: u32::default(),
12414 descriptor_type: DescriptorType::default(),
12415 descriptor_count: u32::default(),
12416 stage_flags: ShaderStageFlags::default(),
12417 p_immutable_samplers: ::std::ptr::null(),
12418 }
12419 }
12420 }
12421 impl DescriptorSetLayoutBinding {
builder<'a>() -> DescriptorSetLayoutBindingBuilder<'a>12422 pub fn builder<'a>() -> DescriptorSetLayoutBindingBuilder<'a> {
12423 DescriptorSetLayoutBindingBuilder {
12424 inner: DescriptorSetLayoutBinding::default(),
12425 marker: ::std::marker::PhantomData,
12426 }
12427 }
12428 }
12429 #[repr(transparent)]
12430 pub struct DescriptorSetLayoutBindingBuilder<'a> {
12431 inner: DescriptorSetLayoutBinding,
12432 marker: ::std::marker::PhantomData<&'a ()>,
12433 }
12434 impl<'a> ::std::ops::Deref for DescriptorSetLayoutBindingBuilder<'a> {
12435 type Target = DescriptorSetLayoutBinding;
deref(&self) -> &Self::Target12436 fn deref(&self) -> &Self::Target {
12437 &self.inner
12438 }
12439 }
12440 impl<'a> ::std::ops::DerefMut for DescriptorSetLayoutBindingBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12441 fn deref_mut(&mut self) -> &mut Self::Target {
12442 &mut self.inner
12443 }
12444 }
12445 impl<'a> DescriptorSetLayoutBindingBuilder<'a> {
binding(mut self, binding: u32) -> DescriptorSetLayoutBindingBuilder<'a>12446 pub fn binding(mut self, binding: u32) -> DescriptorSetLayoutBindingBuilder<'a> {
12447 self.inner.binding = binding;
12448 self
12449 }
descriptor_type( mut self, descriptor_type: DescriptorType, ) -> DescriptorSetLayoutBindingBuilder<'a>12450 pub fn descriptor_type(
12451 mut self,
12452 descriptor_type: DescriptorType,
12453 ) -> DescriptorSetLayoutBindingBuilder<'a> {
12454 self.inner.descriptor_type = descriptor_type;
12455 self
12456 }
descriptor_count( mut self, descriptor_count: u32, ) -> DescriptorSetLayoutBindingBuilder<'a>12457 pub fn descriptor_count(
12458 mut self,
12459 descriptor_count: u32,
12460 ) -> DescriptorSetLayoutBindingBuilder<'a> {
12461 self.inner.descriptor_count = descriptor_count;
12462 self
12463 }
stage_flags( mut self, stage_flags: ShaderStageFlags, ) -> DescriptorSetLayoutBindingBuilder<'a>12464 pub fn stage_flags(
12465 mut self,
12466 stage_flags: ShaderStageFlags,
12467 ) -> DescriptorSetLayoutBindingBuilder<'a> {
12468 self.inner.stage_flags = stage_flags;
12469 self
12470 }
immutable_samplers( mut self, immutable_samplers: &'a [Sampler], ) -> DescriptorSetLayoutBindingBuilder<'a>12471 pub fn immutable_samplers(
12472 mut self,
12473 immutable_samplers: &'a [Sampler],
12474 ) -> DescriptorSetLayoutBindingBuilder<'a> {
12475 self.inner.descriptor_count = immutable_samplers.len() as _;
12476 self.inner.p_immutable_samplers = immutable_samplers.as_ptr();
12477 self
12478 }
12479 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12480 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12481 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorSetLayoutBinding12482 pub fn build(self) -> DescriptorSetLayoutBinding {
12483 self.inner
12484 }
12485 }
12486 #[repr(C)]
12487 #[derive(Copy, Clone, Debug)]
12488 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayoutCreateInfo.html>"]
12489 pub struct DescriptorSetLayoutCreateInfo {
12490 pub s_type: StructureType,
12491 pub p_next: *const c_void,
12492 pub flags: DescriptorSetLayoutCreateFlags,
12493 pub binding_count: u32,
12494 pub p_bindings: *const DescriptorSetLayoutBinding,
12495 }
12496 impl ::std::default::Default for DescriptorSetLayoutCreateInfo {
default() -> DescriptorSetLayoutCreateInfo12497 fn default() -> DescriptorSetLayoutCreateInfo {
12498 DescriptorSetLayoutCreateInfo {
12499 s_type: StructureType::DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
12500 p_next: ::std::ptr::null(),
12501 flags: DescriptorSetLayoutCreateFlags::default(),
12502 binding_count: u32::default(),
12503 p_bindings: ::std::ptr::null(),
12504 }
12505 }
12506 }
12507 impl DescriptorSetLayoutCreateInfo {
builder<'a>() -> DescriptorSetLayoutCreateInfoBuilder<'a>12508 pub fn builder<'a>() -> DescriptorSetLayoutCreateInfoBuilder<'a> {
12509 DescriptorSetLayoutCreateInfoBuilder {
12510 inner: DescriptorSetLayoutCreateInfo::default(),
12511 marker: ::std::marker::PhantomData,
12512 }
12513 }
12514 }
12515 #[repr(transparent)]
12516 pub struct DescriptorSetLayoutCreateInfoBuilder<'a> {
12517 inner: DescriptorSetLayoutCreateInfo,
12518 marker: ::std::marker::PhantomData<&'a ()>,
12519 }
12520 pub unsafe trait ExtendsDescriptorSetLayoutCreateInfo {}
12521 impl<'a> ::std::ops::Deref for DescriptorSetLayoutCreateInfoBuilder<'a> {
12522 type Target = DescriptorSetLayoutCreateInfo;
deref(&self) -> &Self::Target12523 fn deref(&self) -> &Self::Target {
12524 &self.inner
12525 }
12526 }
12527 impl<'a> ::std::ops::DerefMut for DescriptorSetLayoutCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12528 fn deref_mut(&mut self) -> &mut Self::Target {
12529 &mut self.inner
12530 }
12531 }
12532 impl<'a> DescriptorSetLayoutCreateInfoBuilder<'a> {
flags( mut self, flags: DescriptorSetLayoutCreateFlags, ) -> DescriptorSetLayoutCreateInfoBuilder<'a>12533 pub fn flags(
12534 mut self,
12535 flags: DescriptorSetLayoutCreateFlags,
12536 ) -> DescriptorSetLayoutCreateInfoBuilder<'a> {
12537 self.inner.flags = flags;
12538 self
12539 }
bindings( mut self, bindings: &'a [DescriptorSetLayoutBinding], ) -> DescriptorSetLayoutCreateInfoBuilder<'a>12540 pub fn bindings(
12541 mut self,
12542 bindings: &'a [DescriptorSetLayoutBinding],
12543 ) -> DescriptorSetLayoutCreateInfoBuilder<'a> {
12544 self.inner.binding_count = bindings.len() as _;
12545 self.inner.p_bindings = bindings.as_ptr();
12546 self
12547 }
12548 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
12549 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
12550 #[doc = r" valid extension structs can be pushed into the chain."]
12551 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
12552 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDescriptorSetLayoutCreateInfo>( mut self, next: &'a mut T, ) -> DescriptorSetLayoutCreateInfoBuilder<'a>12553 pub fn push_next<T: ExtendsDescriptorSetLayoutCreateInfo>(
12554 mut self,
12555 next: &'a mut T,
12556 ) -> DescriptorSetLayoutCreateInfoBuilder<'a> {
12557 unsafe {
12558 let next_ptr = next as *mut T as *mut BaseOutStructure;
12559 let last_next = ptr_chain_iter(next).last().unwrap();
12560 (*last_next).p_next = self.inner.p_next as _;
12561 self.inner.p_next = next_ptr as _;
12562 }
12563 self
12564 }
12565 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12566 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12567 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorSetLayoutCreateInfo12568 pub fn build(self) -> DescriptorSetLayoutCreateInfo {
12569 self.inner
12570 }
12571 }
12572 #[repr(C)]
12573 #[derive(Copy, Clone, Default, Debug)]
12574 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolSize.html>"]
12575 pub struct DescriptorPoolSize {
12576 pub ty: DescriptorType,
12577 pub descriptor_count: u32,
12578 }
12579 impl DescriptorPoolSize {
builder<'a>() -> DescriptorPoolSizeBuilder<'a>12580 pub fn builder<'a>() -> DescriptorPoolSizeBuilder<'a> {
12581 DescriptorPoolSizeBuilder {
12582 inner: DescriptorPoolSize::default(),
12583 marker: ::std::marker::PhantomData,
12584 }
12585 }
12586 }
12587 #[repr(transparent)]
12588 pub struct DescriptorPoolSizeBuilder<'a> {
12589 inner: DescriptorPoolSize,
12590 marker: ::std::marker::PhantomData<&'a ()>,
12591 }
12592 impl<'a> ::std::ops::Deref for DescriptorPoolSizeBuilder<'a> {
12593 type Target = DescriptorPoolSize;
deref(&self) -> &Self::Target12594 fn deref(&self) -> &Self::Target {
12595 &self.inner
12596 }
12597 }
12598 impl<'a> ::std::ops::DerefMut for DescriptorPoolSizeBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12599 fn deref_mut(&mut self) -> &mut Self::Target {
12600 &mut self.inner
12601 }
12602 }
12603 impl<'a> DescriptorPoolSizeBuilder<'a> {
ty(mut self, ty: DescriptorType) -> DescriptorPoolSizeBuilder<'a>12604 pub fn ty(mut self, ty: DescriptorType) -> DescriptorPoolSizeBuilder<'a> {
12605 self.inner.ty = ty;
12606 self
12607 }
descriptor_count(mut self, descriptor_count: u32) -> DescriptorPoolSizeBuilder<'a>12608 pub fn descriptor_count(mut self, descriptor_count: u32) -> DescriptorPoolSizeBuilder<'a> {
12609 self.inner.descriptor_count = descriptor_count;
12610 self
12611 }
12612 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12613 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12614 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorPoolSize12615 pub fn build(self) -> DescriptorPoolSize {
12616 self.inner
12617 }
12618 }
12619 #[repr(C)]
12620 #[derive(Copy, Clone, Debug)]
12621 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolCreateInfo.html>"]
12622 pub struct DescriptorPoolCreateInfo {
12623 pub s_type: StructureType,
12624 pub p_next: *const c_void,
12625 pub flags: DescriptorPoolCreateFlags,
12626 pub max_sets: u32,
12627 pub pool_size_count: u32,
12628 pub p_pool_sizes: *const DescriptorPoolSize,
12629 }
12630 impl ::std::default::Default for DescriptorPoolCreateInfo {
default() -> DescriptorPoolCreateInfo12631 fn default() -> DescriptorPoolCreateInfo {
12632 DescriptorPoolCreateInfo {
12633 s_type: StructureType::DESCRIPTOR_POOL_CREATE_INFO,
12634 p_next: ::std::ptr::null(),
12635 flags: DescriptorPoolCreateFlags::default(),
12636 max_sets: u32::default(),
12637 pool_size_count: u32::default(),
12638 p_pool_sizes: ::std::ptr::null(),
12639 }
12640 }
12641 }
12642 impl DescriptorPoolCreateInfo {
builder<'a>() -> DescriptorPoolCreateInfoBuilder<'a>12643 pub fn builder<'a>() -> DescriptorPoolCreateInfoBuilder<'a> {
12644 DescriptorPoolCreateInfoBuilder {
12645 inner: DescriptorPoolCreateInfo::default(),
12646 marker: ::std::marker::PhantomData,
12647 }
12648 }
12649 }
12650 #[repr(transparent)]
12651 pub struct DescriptorPoolCreateInfoBuilder<'a> {
12652 inner: DescriptorPoolCreateInfo,
12653 marker: ::std::marker::PhantomData<&'a ()>,
12654 }
12655 pub unsafe trait ExtendsDescriptorPoolCreateInfo {}
12656 impl<'a> ::std::ops::Deref for DescriptorPoolCreateInfoBuilder<'a> {
12657 type Target = DescriptorPoolCreateInfo;
deref(&self) -> &Self::Target12658 fn deref(&self) -> &Self::Target {
12659 &self.inner
12660 }
12661 }
12662 impl<'a> ::std::ops::DerefMut for DescriptorPoolCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12663 fn deref_mut(&mut self) -> &mut Self::Target {
12664 &mut self.inner
12665 }
12666 }
12667 impl<'a> DescriptorPoolCreateInfoBuilder<'a> {
flags( mut self, flags: DescriptorPoolCreateFlags, ) -> DescriptorPoolCreateInfoBuilder<'a>12668 pub fn flags(
12669 mut self,
12670 flags: DescriptorPoolCreateFlags,
12671 ) -> DescriptorPoolCreateInfoBuilder<'a> {
12672 self.inner.flags = flags;
12673 self
12674 }
max_sets(mut self, max_sets: u32) -> DescriptorPoolCreateInfoBuilder<'a>12675 pub fn max_sets(mut self, max_sets: u32) -> DescriptorPoolCreateInfoBuilder<'a> {
12676 self.inner.max_sets = max_sets;
12677 self
12678 }
pool_sizes( mut self, pool_sizes: &'a [DescriptorPoolSize], ) -> DescriptorPoolCreateInfoBuilder<'a>12679 pub fn pool_sizes(
12680 mut self,
12681 pool_sizes: &'a [DescriptorPoolSize],
12682 ) -> DescriptorPoolCreateInfoBuilder<'a> {
12683 self.inner.pool_size_count = pool_sizes.len() as _;
12684 self.inner.p_pool_sizes = pool_sizes.as_ptr();
12685 self
12686 }
12687 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
12688 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
12689 #[doc = r" valid extension structs can be pushed into the chain."]
12690 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
12691 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDescriptorPoolCreateInfo>( mut self, next: &'a mut T, ) -> DescriptorPoolCreateInfoBuilder<'a>12692 pub fn push_next<T: ExtendsDescriptorPoolCreateInfo>(
12693 mut self,
12694 next: &'a mut T,
12695 ) -> DescriptorPoolCreateInfoBuilder<'a> {
12696 unsafe {
12697 let next_ptr = next as *mut T as *mut BaseOutStructure;
12698 let last_next = ptr_chain_iter(next).last().unwrap();
12699 (*last_next).p_next = self.inner.p_next as _;
12700 self.inner.p_next = next_ptr as _;
12701 }
12702 self
12703 }
12704 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12705 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12706 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorPoolCreateInfo12707 pub fn build(self) -> DescriptorPoolCreateInfo {
12708 self.inner
12709 }
12710 }
12711 #[repr(C)]
12712 #[derive(Copy, Clone, Debug)]
12713 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetAllocateInfo.html>"]
12714 pub struct DescriptorSetAllocateInfo {
12715 pub s_type: StructureType,
12716 pub p_next: *const c_void,
12717 pub descriptor_pool: DescriptorPool,
12718 pub descriptor_set_count: u32,
12719 pub p_set_layouts: *const DescriptorSetLayout,
12720 }
12721 impl ::std::default::Default for DescriptorSetAllocateInfo {
default() -> DescriptorSetAllocateInfo12722 fn default() -> DescriptorSetAllocateInfo {
12723 DescriptorSetAllocateInfo {
12724 s_type: StructureType::DESCRIPTOR_SET_ALLOCATE_INFO,
12725 p_next: ::std::ptr::null(),
12726 descriptor_pool: DescriptorPool::default(),
12727 descriptor_set_count: u32::default(),
12728 p_set_layouts: ::std::ptr::null(),
12729 }
12730 }
12731 }
12732 impl DescriptorSetAllocateInfo {
builder<'a>() -> DescriptorSetAllocateInfoBuilder<'a>12733 pub fn builder<'a>() -> DescriptorSetAllocateInfoBuilder<'a> {
12734 DescriptorSetAllocateInfoBuilder {
12735 inner: DescriptorSetAllocateInfo::default(),
12736 marker: ::std::marker::PhantomData,
12737 }
12738 }
12739 }
12740 #[repr(transparent)]
12741 pub struct DescriptorSetAllocateInfoBuilder<'a> {
12742 inner: DescriptorSetAllocateInfo,
12743 marker: ::std::marker::PhantomData<&'a ()>,
12744 }
12745 pub unsafe trait ExtendsDescriptorSetAllocateInfo {}
12746 impl<'a> ::std::ops::Deref for DescriptorSetAllocateInfoBuilder<'a> {
12747 type Target = DescriptorSetAllocateInfo;
deref(&self) -> &Self::Target12748 fn deref(&self) -> &Self::Target {
12749 &self.inner
12750 }
12751 }
12752 impl<'a> ::std::ops::DerefMut for DescriptorSetAllocateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12753 fn deref_mut(&mut self) -> &mut Self::Target {
12754 &mut self.inner
12755 }
12756 }
12757 impl<'a> DescriptorSetAllocateInfoBuilder<'a> {
descriptor_pool( mut self, descriptor_pool: DescriptorPool, ) -> DescriptorSetAllocateInfoBuilder<'a>12758 pub fn descriptor_pool(
12759 mut self,
12760 descriptor_pool: DescriptorPool,
12761 ) -> DescriptorSetAllocateInfoBuilder<'a> {
12762 self.inner.descriptor_pool = descriptor_pool;
12763 self
12764 }
set_layouts( mut self, set_layouts: &'a [DescriptorSetLayout], ) -> DescriptorSetAllocateInfoBuilder<'a>12765 pub fn set_layouts(
12766 mut self,
12767 set_layouts: &'a [DescriptorSetLayout],
12768 ) -> DescriptorSetAllocateInfoBuilder<'a> {
12769 self.inner.descriptor_set_count = set_layouts.len() as _;
12770 self.inner.p_set_layouts = set_layouts.as_ptr();
12771 self
12772 }
12773 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
12774 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
12775 #[doc = r" valid extension structs can be pushed into the chain."]
12776 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
12777 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDescriptorSetAllocateInfo>( mut self, next: &'a mut T, ) -> DescriptorSetAllocateInfoBuilder<'a>12778 pub fn push_next<T: ExtendsDescriptorSetAllocateInfo>(
12779 mut self,
12780 next: &'a mut T,
12781 ) -> DescriptorSetAllocateInfoBuilder<'a> {
12782 unsafe {
12783 let next_ptr = next as *mut T as *mut BaseOutStructure;
12784 let last_next = ptr_chain_iter(next).last().unwrap();
12785 (*last_next).p_next = self.inner.p_next as _;
12786 self.inner.p_next = next_ptr as _;
12787 }
12788 self
12789 }
12790 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12791 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12792 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorSetAllocateInfo12793 pub fn build(self) -> DescriptorSetAllocateInfo {
12794 self.inner
12795 }
12796 }
12797 #[repr(C)]
12798 #[derive(Copy, Clone, Default, Debug)]
12799 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSpecializationMapEntry.html>"]
12800 pub struct SpecializationMapEntry {
12801 pub constant_id: u32,
12802 pub offset: u32,
12803 pub size: usize,
12804 }
12805 impl SpecializationMapEntry {
builder<'a>() -> SpecializationMapEntryBuilder<'a>12806 pub fn builder<'a>() -> SpecializationMapEntryBuilder<'a> {
12807 SpecializationMapEntryBuilder {
12808 inner: SpecializationMapEntry::default(),
12809 marker: ::std::marker::PhantomData,
12810 }
12811 }
12812 }
12813 #[repr(transparent)]
12814 pub struct SpecializationMapEntryBuilder<'a> {
12815 inner: SpecializationMapEntry,
12816 marker: ::std::marker::PhantomData<&'a ()>,
12817 }
12818 impl<'a> ::std::ops::Deref for SpecializationMapEntryBuilder<'a> {
12819 type Target = SpecializationMapEntry;
deref(&self) -> &Self::Target12820 fn deref(&self) -> &Self::Target {
12821 &self.inner
12822 }
12823 }
12824 impl<'a> ::std::ops::DerefMut for SpecializationMapEntryBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12825 fn deref_mut(&mut self) -> &mut Self::Target {
12826 &mut self.inner
12827 }
12828 }
12829 impl<'a> SpecializationMapEntryBuilder<'a> {
constant_id(mut self, constant_id: u32) -> SpecializationMapEntryBuilder<'a>12830 pub fn constant_id(mut self, constant_id: u32) -> SpecializationMapEntryBuilder<'a> {
12831 self.inner.constant_id = constant_id;
12832 self
12833 }
offset(mut self, offset: u32) -> SpecializationMapEntryBuilder<'a>12834 pub fn offset(mut self, offset: u32) -> SpecializationMapEntryBuilder<'a> {
12835 self.inner.offset = offset;
12836 self
12837 }
size(mut self, size: usize) -> SpecializationMapEntryBuilder<'a>12838 pub fn size(mut self, size: usize) -> SpecializationMapEntryBuilder<'a> {
12839 self.inner.size = size;
12840 self
12841 }
12842 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12843 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12844 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SpecializationMapEntry12845 pub fn build(self) -> SpecializationMapEntry {
12846 self.inner
12847 }
12848 }
12849 #[repr(C)]
12850 #[derive(Copy, Clone, Debug)]
12851 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSpecializationInfo.html>"]
12852 pub struct SpecializationInfo {
12853 pub map_entry_count: u32,
12854 pub p_map_entries: *const SpecializationMapEntry,
12855 pub data_size: usize,
12856 pub p_data: *const c_void,
12857 }
12858 impl ::std::default::Default for SpecializationInfo {
default() -> SpecializationInfo12859 fn default() -> SpecializationInfo {
12860 SpecializationInfo {
12861 map_entry_count: u32::default(),
12862 p_map_entries: ::std::ptr::null(),
12863 data_size: usize::default(),
12864 p_data: ::std::ptr::null(),
12865 }
12866 }
12867 }
12868 impl SpecializationInfo {
builder<'a>() -> SpecializationInfoBuilder<'a>12869 pub fn builder<'a>() -> SpecializationInfoBuilder<'a> {
12870 SpecializationInfoBuilder {
12871 inner: SpecializationInfo::default(),
12872 marker: ::std::marker::PhantomData,
12873 }
12874 }
12875 }
12876 #[repr(transparent)]
12877 pub struct SpecializationInfoBuilder<'a> {
12878 inner: SpecializationInfo,
12879 marker: ::std::marker::PhantomData<&'a ()>,
12880 }
12881 impl<'a> ::std::ops::Deref for SpecializationInfoBuilder<'a> {
12882 type Target = SpecializationInfo;
deref(&self) -> &Self::Target12883 fn deref(&self) -> &Self::Target {
12884 &self.inner
12885 }
12886 }
12887 impl<'a> ::std::ops::DerefMut for SpecializationInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12888 fn deref_mut(&mut self) -> &mut Self::Target {
12889 &mut self.inner
12890 }
12891 }
12892 impl<'a> SpecializationInfoBuilder<'a> {
map_entries( mut self, map_entries: &'a [SpecializationMapEntry], ) -> SpecializationInfoBuilder<'a>12893 pub fn map_entries(
12894 mut self,
12895 map_entries: &'a [SpecializationMapEntry],
12896 ) -> SpecializationInfoBuilder<'a> {
12897 self.inner.map_entry_count = map_entries.len() as _;
12898 self.inner.p_map_entries = map_entries.as_ptr();
12899 self
12900 }
data(mut self, data: &'a [u8]) -> SpecializationInfoBuilder<'a>12901 pub fn data(mut self, data: &'a [u8]) -> SpecializationInfoBuilder<'a> {
12902 self.inner.data_size = data.len() as _;
12903 self.inner.p_data = data.as_ptr() as *const c_void;
12904 self
12905 }
12906 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
12907 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
12908 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SpecializationInfo12909 pub fn build(self) -> SpecializationInfo {
12910 self.inner
12911 }
12912 }
12913 #[repr(C)]
12914 #[derive(Copy, Clone, Debug)]
12915 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineShaderStageCreateInfo.html>"]
12916 pub struct PipelineShaderStageCreateInfo {
12917 pub s_type: StructureType,
12918 pub p_next: *const c_void,
12919 pub flags: PipelineShaderStageCreateFlags,
12920 pub stage: ShaderStageFlags,
12921 pub module: ShaderModule,
12922 pub p_name: *const c_char,
12923 pub p_specialization_info: *const SpecializationInfo,
12924 }
12925 impl ::std::default::Default for PipelineShaderStageCreateInfo {
default() -> PipelineShaderStageCreateInfo12926 fn default() -> PipelineShaderStageCreateInfo {
12927 PipelineShaderStageCreateInfo {
12928 s_type: StructureType::PIPELINE_SHADER_STAGE_CREATE_INFO,
12929 p_next: ::std::ptr::null(),
12930 flags: PipelineShaderStageCreateFlags::default(),
12931 stage: ShaderStageFlags::default(),
12932 module: ShaderModule::default(),
12933 p_name: ::std::ptr::null(),
12934 p_specialization_info: ::std::ptr::null(),
12935 }
12936 }
12937 }
12938 impl PipelineShaderStageCreateInfo {
builder<'a>() -> PipelineShaderStageCreateInfoBuilder<'a>12939 pub fn builder<'a>() -> PipelineShaderStageCreateInfoBuilder<'a> {
12940 PipelineShaderStageCreateInfoBuilder {
12941 inner: PipelineShaderStageCreateInfo::default(),
12942 marker: ::std::marker::PhantomData,
12943 }
12944 }
12945 }
12946 #[repr(transparent)]
12947 pub struct PipelineShaderStageCreateInfoBuilder<'a> {
12948 inner: PipelineShaderStageCreateInfo,
12949 marker: ::std::marker::PhantomData<&'a ()>,
12950 }
12951 pub unsafe trait ExtendsPipelineShaderStageCreateInfo {}
12952 impl<'a> ::std::ops::Deref for PipelineShaderStageCreateInfoBuilder<'a> {
12953 type Target = PipelineShaderStageCreateInfo;
deref(&self) -> &Self::Target12954 fn deref(&self) -> &Self::Target {
12955 &self.inner
12956 }
12957 }
12958 impl<'a> ::std::ops::DerefMut for PipelineShaderStageCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target12959 fn deref_mut(&mut self) -> &mut Self::Target {
12960 &mut self.inner
12961 }
12962 }
12963 impl<'a> PipelineShaderStageCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineShaderStageCreateFlags, ) -> PipelineShaderStageCreateInfoBuilder<'a>12964 pub fn flags(
12965 mut self,
12966 flags: PipelineShaderStageCreateFlags,
12967 ) -> PipelineShaderStageCreateInfoBuilder<'a> {
12968 self.inner.flags = flags;
12969 self
12970 }
stage(mut self, stage: ShaderStageFlags) -> PipelineShaderStageCreateInfoBuilder<'a>12971 pub fn stage(mut self, stage: ShaderStageFlags) -> PipelineShaderStageCreateInfoBuilder<'a> {
12972 self.inner.stage = stage;
12973 self
12974 }
module(mut self, module: ShaderModule) -> PipelineShaderStageCreateInfoBuilder<'a>12975 pub fn module(mut self, module: ShaderModule) -> PipelineShaderStageCreateInfoBuilder<'a> {
12976 self.inner.module = module;
12977 self
12978 }
name(mut self, name: &'a ::std::ffi::CStr) -> PipelineShaderStageCreateInfoBuilder<'a>12979 pub fn name(mut self, name: &'a ::std::ffi::CStr) -> PipelineShaderStageCreateInfoBuilder<'a> {
12980 self.inner.p_name = name.as_ptr();
12981 self
12982 }
specialization_info( mut self, specialization_info: &'a SpecializationInfo, ) -> PipelineShaderStageCreateInfoBuilder<'a>12983 pub fn specialization_info(
12984 mut self,
12985 specialization_info: &'a SpecializationInfo,
12986 ) -> PipelineShaderStageCreateInfoBuilder<'a> {
12987 self.inner.p_specialization_info = specialization_info;
12988 self
12989 }
12990 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
12991 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
12992 #[doc = r" valid extension structs can be pushed into the chain."]
12993 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
12994 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineShaderStageCreateInfo>( mut self, next: &'a mut T, ) -> PipelineShaderStageCreateInfoBuilder<'a>12995 pub fn push_next<T: ExtendsPipelineShaderStageCreateInfo>(
12996 mut self,
12997 next: &'a mut T,
12998 ) -> PipelineShaderStageCreateInfoBuilder<'a> {
12999 unsafe {
13000 let next_ptr = next as *mut T as *mut BaseOutStructure;
13001 let last_next = ptr_chain_iter(next).last().unwrap();
13002 (*last_next).p_next = self.inner.p_next as _;
13003 self.inner.p_next = next_ptr as _;
13004 }
13005 self
13006 }
13007 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13008 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13009 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineShaderStageCreateInfo13010 pub fn build(self) -> PipelineShaderStageCreateInfo {
13011 self.inner
13012 }
13013 }
13014 #[repr(C)]
13015 #[derive(Copy, Clone, Debug)]
13016 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComputePipelineCreateInfo.html>"]
13017 pub struct ComputePipelineCreateInfo {
13018 pub s_type: StructureType,
13019 pub p_next: *const c_void,
13020 pub flags: PipelineCreateFlags,
13021 pub stage: PipelineShaderStageCreateInfo,
13022 pub layout: PipelineLayout,
13023 pub base_pipeline_handle: Pipeline,
13024 pub base_pipeline_index: i32,
13025 }
13026 impl ::std::default::Default for ComputePipelineCreateInfo {
default() -> ComputePipelineCreateInfo13027 fn default() -> ComputePipelineCreateInfo {
13028 ComputePipelineCreateInfo {
13029 s_type: StructureType::COMPUTE_PIPELINE_CREATE_INFO,
13030 p_next: ::std::ptr::null(),
13031 flags: PipelineCreateFlags::default(),
13032 stage: PipelineShaderStageCreateInfo::default(),
13033 layout: PipelineLayout::default(),
13034 base_pipeline_handle: Pipeline::default(),
13035 base_pipeline_index: i32::default(),
13036 }
13037 }
13038 }
13039 impl ComputePipelineCreateInfo {
builder<'a>() -> ComputePipelineCreateInfoBuilder<'a>13040 pub fn builder<'a>() -> ComputePipelineCreateInfoBuilder<'a> {
13041 ComputePipelineCreateInfoBuilder {
13042 inner: ComputePipelineCreateInfo::default(),
13043 marker: ::std::marker::PhantomData,
13044 }
13045 }
13046 }
13047 #[repr(transparent)]
13048 pub struct ComputePipelineCreateInfoBuilder<'a> {
13049 inner: ComputePipelineCreateInfo,
13050 marker: ::std::marker::PhantomData<&'a ()>,
13051 }
13052 pub unsafe trait ExtendsComputePipelineCreateInfo {}
13053 impl<'a> ::std::ops::Deref for ComputePipelineCreateInfoBuilder<'a> {
13054 type Target = ComputePipelineCreateInfo;
deref(&self) -> &Self::Target13055 fn deref(&self) -> &Self::Target {
13056 &self.inner
13057 }
13058 }
13059 impl<'a> ::std::ops::DerefMut for ComputePipelineCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13060 fn deref_mut(&mut self) -> &mut Self::Target {
13061 &mut self.inner
13062 }
13063 }
13064 impl<'a> ComputePipelineCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineCreateFlags) -> ComputePipelineCreateInfoBuilder<'a>13065 pub fn flags(mut self, flags: PipelineCreateFlags) -> ComputePipelineCreateInfoBuilder<'a> {
13066 self.inner.flags = flags;
13067 self
13068 }
stage( mut self, stage: PipelineShaderStageCreateInfo, ) -> ComputePipelineCreateInfoBuilder<'a>13069 pub fn stage(
13070 mut self,
13071 stage: PipelineShaderStageCreateInfo,
13072 ) -> ComputePipelineCreateInfoBuilder<'a> {
13073 self.inner.stage = stage;
13074 self
13075 }
layout(mut self, layout: PipelineLayout) -> ComputePipelineCreateInfoBuilder<'a>13076 pub fn layout(mut self, layout: PipelineLayout) -> ComputePipelineCreateInfoBuilder<'a> {
13077 self.inner.layout = layout;
13078 self
13079 }
base_pipeline_handle( mut self, base_pipeline_handle: Pipeline, ) -> ComputePipelineCreateInfoBuilder<'a>13080 pub fn base_pipeline_handle(
13081 mut self,
13082 base_pipeline_handle: Pipeline,
13083 ) -> ComputePipelineCreateInfoBuilder<'a> {
13084 self.inner.base_pipeline_handle = base_pipeline_handle;
13085 self
13086 }
base_pipeline_index( mut self, base_pipeline_index: i32, ) -> ComputePipelineCreateInfoBuilder<'a>13087 pub fn base_pipeline_index(
13088 mut self,
13089 base_pipeline_index: i32,
13090 ) -> ComputePipelineCreateInfoBuilder<'a> {
13091 self.inner.base_pipeline_index = base_pipeline_index;
13092 self
13093 }
13094 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
13095 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
13096 #[doc = r" valid extension structs can be pushed into the chain."]
13097 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
13098 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsComputePipelineCreateInfo>( mut self, next: &'a mut T, ) -> ComputePipelineCreateInfoBuilder<'a>13099 pub fn push_next<T: ExtendsComputePipelineCreateInfo>(
13100 mut self,
13101 next: &'a mut T,
13102 ) -> ComputePipelineCreateInfoBuilder<'a> {
13103 unsafe {
13104 let next_ptr = next as *mut T as *mut BaseOutStructure;
13105 let last_next = ptr_chain_iter(next).last().unwrap();
13106 (*last_next).p_next = self.inner.p_next as _;
13107 self.inner.p_next = next_ptr as _;
13108 }
13109 self
13110 }
13111 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13112 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13113 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ComputePipelineCreateInfo13114 pub fn build(self) -> ComputePipelineCreateInfo {
13115 self.inner
13116 }
13117 }
13118 #[repr(C)]
13119 #[derive(Copy, Clone, Default, Debug)]
13120 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVertexInputBindingDescription.html>"]
13121 pub struct VertexInputBindingDescription {
13122 pub binding: u32,
13123 pub stride: u32,
13124 pub input_rate: VertexInputRate,
13125 }
13126 impl VertexInputBindingDescription {
builder<'a>() -> VertexInputBindingDescriptionBuilder<'a>13127 pub fn builder<'a>() -> VertexInputBindingDescriptionBuilder<'a> {
13128 VertexInputBindingDescriptionBuilder {
13129 inner: VertexInputBindingDescription::default(),
13130 marker: ::std::marker::PhantomData,
13131 }
13132 }
13133 }
13134 #[repr(transparent)]
13135 pub struct VertexInputBindingDescriptionBuilder<'a> {
13136 inner: VertexInputBindingDescription,
13137 marker: ::std::marker::PhantomData<&'a ()>,
13138 }
13139 impl<'a> ::std::ops::Deref for VertexInputBindingDescriptionBuilder<'a> {
13140 type Target = VertexInputBindingDescription;
deref(&self) -> &Self::Target13141 fn deref(&self) -> &Self::Target {
13142 &self.inner
13143 }
13144 }
13145 impl<'a> ::std::ops::DerefMut for VertexInputBindingDescriptionBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13146 fn deref_mut(&mut self) -> &mut Self::Target {
13147 &mut self.inner
13148 }
13149 }
13150 impl<'a> VertexInputBindingDescriptionBuilder<'a> {
binding(mut self, binding: u32) -> VertexInputBindingDescriptionBuilder<'a>13151 pub fn binding(mut self, binding: u32) -> VertexInputBindingDescriptionBuilder<'a> {
13152 self.inner.binding = binding;
13153 self
13154 }
stride(mut self, stride: u32) -> VertexInputBindingDescriptionBuilder<'a>13155 pub fn stride(mut self, stride: u32) -> VertexInputBindingDescriptionBuilder<'a> {
13156 self.inner.stride = stride;
13157 self
13158 }
input_rate( mut self, input_rate: VertexInputRate, ) -> VertexInputBindingDescriptionBuilder<'a>13159 pub fn input_rate(
13160 mut self,
13161 input_rate: VertexInputRate,
13162 ) -> VertexInputBindingDescriptionBuilder<'a> {
13163 self.inner.input_rate = input_rate;
13164 self
13165 }
13166 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13167 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13168 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> VertexInputBindingDescription13169 pub fn build(self) -> VertexInputBindingDescription {
13170 self.inner
13171 }
13172 }
13173 #[repr(C)]
13174 #[derive(Copy, Clone, Default, Debug)]
13175 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVertexInputAttributeDescription.html>"]
13176 pub struct VertexInputAttributeDescription {
13177 pub location: u32,
13178 pub binding: u32,
13179 pub format: Format,
13180 pub offset: u32,
13181 }
13182 impl VertexInputAttributeDescription {
builder<'a>() -> VertexInputAttributeDescriptionBuilder<'a>13183 pub fn builder<'a>() -> VertexInputAttributeDescriptionBuilder<'a> {
13184 VertexInputAttributeDescriptionBuilder {
13185 inner: VertexInputAttributeDescription::default(),
13186 marker: ::std::marker::PhantomData,
13187 }
13188 }
13189 }
13190 #[repr(transparent)]
13191 pub struct VertexInputAttributeDescriptionBuilder<'a> {
13192 inner: VertexInputAttributeDescription,
13193 marker: ::std::marker::PhantomData<&'a ()>,
13194 }
13195 impl<'a> ::std::ops::Deref for VertexInputAttributeDescriptionBuilder<'a> {
13196 type Target = VertexInputAttributeDescription;
deref(&self) -> &Self::Target13197 fn deref(&self) -> &Self::Target {
13198 &self.inner
13199 }
13200 }
13201 impl<'a> ::std::ops::DerefMut for VertexInputAttributeDescriptionBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13202 fn deref_mut(&mut self) -> &mut Self::Target {
13203 &mut self.inner
13204 }
13205 }
13206 impl<'a> VertexInputAttributeDescriptionBuilder<'a> {
location(mut self, location: u32) -> VertexInputAttributeDescriptionBuilder<'a>13207 pub fn location(mut self, location: u32) -> VertexInputAttributeDescriptionBuilder<'a> {
13208 self.inner.location = location;
13209 self
13210 }
binding(mut self, binding: u32) -> VertexInputAttributeDescriptionBuilder<'a>13211 pub fn binding(mut self, binding: u32) -> VertexInputAttributeDescriptionBuilder<'a> {
13212 self.inner.binding = binding;
13213 self
13214 }
format(mut self, format: Format) -> VertexInputAttributeDescriptionBuilder<'a>13215 pub fn format(mut self, format: Format) -> VertexInputAttributeDescriptionBuilder<'a> {
13216 self.inner.format = format;
13217 self
13218 }
offset(mut self, offset: u32) -> VertexInputAttributeDescriptionBuilder<'a>13219 pub fn offset(mut self, offset: u32) -> VertexInputAttributeDescriptionBuilder<'a> {
13220 self.inner.offset = offset;
13221 self
13222 }
13223 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13224 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13225 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> VertexInputAttributeDescription13226 pub fn build(self) -> VertexInputAttributeDescription {
13227 self.inner
13228 }
13229 }
13230 #[repr(C)]
13231 #[derive(Copy, Clone, Debug)]
13232 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineVertexInputStateCreateInfo.html>"]
13233 pub struct PipelineVertexInputStateCreateInfo {
13234 pub s_type: StructureType,
13235 pub p_next: *const c_void,
13236 pub flags: PipelineVertexInputStateCreateFlags,
13237 pub vertex_binding_description_count: u32,
13238 pub p_vertex_binding_descriptions: *const VertexInputBindingDescription,
13239 pub vertex_attribute_description_count: u32,
13240 pub p_vertex_attribute_descriptions: *const VertexInputAttributeDescription,
13241 }
13242 impl ::std::default::Default for PipelineVertexInputStateCreateInfo {
default() -> PipelineVertexInputStateCreateInfo13243 fn default() -> PipelineVertexInputStateCreateInfo {
13244 PipelineVertexInputStateCreateInfo {
13245 s_type: StructureType::PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
13246 p_next: ::std::ptr::null(),
13247 flags: PipelineVertexInputStateCreateFlags::default(),
13248 vertex_binding_description_count: u32::default(),
13249 p_vertex_binding_descriptions: ::std::ptr::null(),
13250 vertex_attribute_description_count: u32::default(),
13251 p_vertex_attribute_descriptions: ::std::ptr::null(),
13252 }
13253 }
13254 }
13255 impl PipelineVertexInputStateCreateInfo {
builder<'a>() -> PipelineVertexInputStateCreateInfoBuilder<'a>13256 pub fn builder<'a>() -> PipelineVertexInputStateCreateInfoBuilder<'a> {
13257 PipelineVertexInputStateCreateInfoBuilder {
13258 inner: PipelineVertexInputStateCreateInfo::default(),
13259 marker: ::std::marker::PhantomData,
13260 }
13261 }
13262 }
13263 #[repr(transparent)]
13264 pub struct PipelineVertexInputStateCreateInfoBuilder<'a> {
13265 inner: PipelineVertexInputStateCreateInfo,
13266 marker: ::std::marker::PhantomData<&'a ()>,
13267 }
13268 pub unsafe trait ExtendsPipelineVertexInputStateCreateInfo {}
13269 impl<'a> ::std::ops::Deref for PipelineVertexInputStateCreateInfoBuilder<'a> {
13270 type Target = PipelineVertexInputStateCreateInfo;
deref(&self) -> &Self::Target13271 fn deref(&self) -> &Self::Target {
13272 &self.inner
13273 }
13274 }
13275 impl<'a> ::std::ops::DerefMut for PipelineVertexInputStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13276 fn deref_mut(&mut self) -> &mut Self::Target {
13277 &mut self.inner
13278 }
13279 }
13280 impl<'a> PipelineVertexInputStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineVertexInputStateCreateFlags, ) -> PipelineVertexInputStateCreateInfoBuilder<'a>13281 pub fn flags(
13282 mut self,
13283 flags: PipelineVertexInputStateCreateFlags,
13284 ) -> PipelineVertexInputStateCreateInfoBuilder<'a> {
13285 self.inner.flags = flags;
13286 self
13287 }
vertex_binding_descriptions( mut self, vertex_binding_descriptions: &'a [VertexInputBindingDescription], ) -> PipelineVertexInputStateCreateInfoBuilder<'a>13288 pub fn vertex_binding_descriptions(
13289 mut self,
13290 vertex_binding_descriptions: &'a [VertexInputBindingDescription],
13291 ) -> PipelineVertexInputStateCreateInfoBuilder<'a> {
13292 self.inner.vertex_binding_description_count = vertex_binding_descriptions.len() as _;
13293 self.inner.p_vertex_binding_descriptions = vertex_binding_descriptions.as_ptr();
13294 self
13295 }
vertex_attribute_descriptions( mut self, vertex_attribute_descriptions: &'a [VertexInputAttributeDescription], ) -> PipelineVertexInputStateCreateInfoBuilder<'a>13296 pub fn vertex_attribute_descriptions(
13297 mut self,
13298 vertex_attribute_descriptions: &'a [VertexInputAttributeDescription],
13299 ) -> PipelineVertexInputStateCreateInfoBuilder<'a> {
13300 self.inner.vertex_attribute_description_count = vertex_attribute_descriptions.len() as _;
13301 self.inner.p_vertex_attribute_descriptions = vertex_attribute_descriptions.as_ptr();
13302 self
13303 }
13304 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
13305 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
13306 #[doc = r" valid extension structs can be pushed into the chain."]
13307 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
13308 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineVertexInputStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineVertexInputStateCreateInfoBuilder<'a>13309 pub fn push_next<T: ExtendsPipelineVertexInputStateCreateInfo>(
13310 mut self,
13311 next: &'a mut T,
13312 ) -> PipelineVertexInputStateCreateInfoBuilder<'a> {
13313 unsafe {
13314 let next_ptr = next as *mut T as *mut BaseOutStructure;
13315 let last_next = ptr_chain_iter(next).last().unwrap();
13316 (*last_next).p_next = self.inner.p_next as _;
13317 self.inner.p_next = next_ptr as _;
13318 }
13319 self
13320 }
13321 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13322 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13323 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineVertexInputStateCreateInfo13324 pub fn build(self) -> PipelineVertexInputStateCreateInfo {
13325 self.inner
13326 }
13327 }
13328 #[repr(C)]
13329 #[derive(Copy, Clone, Debug)]
13330 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineInputAssemblyStateCreateInfo.html>"]
13331 pub struct PipelineInputAssemblyStateCreateInfo {
13332 pub s_type: StructureType,
13333 pub p_next: *const c_void,
13334 pub flags: PipelineInputAssemblyStateCreateFlags,
13335 pub topology: PrimitiveTopology,
13336 pub primitive_restart_enable: Bool32,
13337 }
13338 impl ::std::default::Default for PipelineInputAssemblyStateCreateInfo {
default() -> PipelineInputAssemblyStateCreateInfo13339 fn default() -> PipelineInputAssemblyStateCreateInfo {
13340 PipelineInputAssemblyStateCreateInfo {
13341 s_type: StructureType::PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,
13342 p_next: ::std::ptr::null(),
13343 flags: PipelineInputAssemblyStateCreateFlags::default(),
13344 topology: PrimitiveTopology::default(),
13345 primitive_restart_enable: Bool32::default(),
13346 }
13347 }
13348 }
13349 impl PipelineInputAssemblyStateCreateInfo {
builder<'a>() -> PipelineInputAssemblyStateCreateInfoBuilder<'a>13350 pub fn builder<'a>() -> PipelineInputAssemblyStateCreateInfoBuilder<'a> {
13351 PipelineInputAssemblyStateCreateInfoBuilder {
13352 inner: PipelineInputAssemblyStateCreateInfo::default(),
13353 marker: ::std::marker::PhantomData,
13354 }
13355 }
13356 }
13357 #[repr(transparent)]
13358 pub struct PipelineInputAssemblyStateCreateInfoBuilder<'a> {
13359 inner: PipelineInputAssemblyStateCreateInfo,
13360 marker: ::std::marker::PhantomData<&'a ()>,
13361 }
13362 pub unsafe trait ExtendsPipelineInputAssemblyStateCreateInfo {}
13363 impl<'a> ::std::ops::Deref for PipelineInputAssemblyStateCreateInfoBuilder<'a> {
13364 type Target = PipelineInputAssemblyStateCreateInfo;
deref(&self) -> &Self::Target13365 fn deref(&self) -> &Self::Target {
13366 &self.inner
13367 }
13368 }
13369 impl<'a> ::std::ops::DerefMut for PipelineInputAssemblyStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13370 fn deref_mut(&mut self) -> &mut Self::Target {
13371 &mut self.inner
13372 }
13373 }
13374 impl<'a> PipelineInputAssemblyStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineInputAssemblyStateCreateFlags, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a>13375 pub fn flags(
13376 mut self,
13377 flags: PipelineInputAssemblyStateCreateFlags,
13378 ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> {
13379 self.inner.flags = flags;
13380 self
13381 }
topology( mut self, topology: PrimitiveTopology, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a>13382 pub fn topology(
13383 mut self,
13384 topology: PrimitiveTopology,
13385 ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> {
13386 self.inner.topology = topology;
13387 self
13388 }
primitive_restart_enable( mut self, primitive_restart_enable: bool, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a>13389 pub fn primitive_restart_enable(
13390 mut self,
13391 primitive_restart_enable: bool,
13392 ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> {
13393 self.inner.primitive_restart_enable = primitive_restart_enable.into();
13394 self
13395 }
13396 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
13397 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
13398 #[doc = r" valid extension structs can be pushed into the chain."]
13399 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
13400 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineInputAssemblyStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a>13401 pub fn push_next<T: ExtendsPipelineInputAssemblyStateCreateInfo>(
13402 mut self,
13403 next: &'a mut T,
13404 ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> {
13405 unsafe {
13406 let next_ptr = next as *mut T as *mut BaseOutStructure;
13407 let last_next = ptr_chain_iter(next).last().unwrap();
13408 (*last_next).p_next = self.inner.p_next as _;
13409 self.inner.p_next = next_ptr as _;
13410 }
13411 self
13412 }
13413 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13414 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13415 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineInputAssemblyStateCreateInfo13416 pub fn build(self) -> PipelineInputAssemblyStateCreateInfo {
13417 self.inner
13418 }
13419 }
13420 #[repr(C)]
13421 #[derive(Copy, Clone, Debug)]
13422 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineTessellationStateCreateInfo.html>"]
13423 pub struct PipelineTessellationStateCreateInfo {
13424 pub s_type: StructureType,
13425 pub p_next: *const c_void,
13426 pub flags: PipelineTessellationStateCreateFlags,
13427 pub patch_control_points: u32,
13428 }
13429 impl ::std::default::Default for PipelineTessellationStateCreateInfo {
default() -> PipelineTessellationStateCreateInfo13430 fn default() -> PipelineTessellationStateCreateInfo {
13431 PipelineTessellationStateCreateInfo {
13432 s_type: StructureType::PIPELINE_TESSELLATION_STATE_CREATE_INFO,
13433 p_next: ::std::ptr::null(),
13434 flags: PipelineTessellationStateCreateFlags::default(),
13435 patch_control_points: u32::default(),
13436 }
13437 }
13438 }
13439 impl PipelineTessellationStateCreateInfo {
builder<'a>() -> PipelineTessellationStateCreateInfoBuilder<'a>13440 pub fn builder<'a>() -> PipelineTessellationStateCreateInfoBuilder<'a> {
13441 PipelineTessellationStateCreateInfoBuilder {
13442 inner: PipelineTessellationStateCreateInfo::default(),
13443 marker: ::std::marker::PhantomData,
13444 }
13445 }
13446 }
13447 #[repr(transparent)]
13448 pub struct PipelineTessellationStateCreateInfoBuilder<'a> {
13449 inner: PipelineTessellationStateCreateInfo,
13450 marker: ::std::marker::PhantomData<&'a ()>,
13451 }
13452 pub unsafe trait ExtendsPipelineTessellationStateCreateInfo {}
13453 impl<'a> ::std::ops::Deref for PipelineTessellationStateCreateInfoBuilder<'a> {
13454 type Target = PipelineTessellationStateCreateInfo;
deref(&self) -> &Self::Target13455 fn deref(&self) -> &Self::Target {
13456 &self.inner
13457 }
13458 }
13459 impl<'a> ::std::ops::DerefMut for PipelineTessellationStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13460 fn deref_mut(&mut self) -> &mut Self::Target {
13461 &mut self.inner
13462 }
13463 }
13464 impl<'a> PipelineTessellationStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineTessellationStateCreateFlags, ) -> PipelineTessellationStateCreateInfoBuilder<'a>13465 pub fn flags(
13466 mut self,
13467 flags: PipelineTessellationStateCreateFlags,
13468 ) -> PipelineTessellationStateCreateInfoBuilder<'a> {
13469 self.inner.flags = flags;
13470 self
13471 }
patch_control_points( mut self, patch_control_points: u32, ) -> PipelineTessellationStateCreateInfoBuilder<'a>13472 pub fn patch_control_points(
13473 mut self,
13474 patch_control_points: u32,
13475 ) -> PipelineTessellationStateCreateInfoBuilder<'a> {
13476 self.inner.patch_control_points = patch_control_points;
13477 self
13478 }
13479 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
13480 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
13481 #[doc = r" valid extension structs can be pushed into the chain."]
13482 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
13483 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineTessellationStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineTessellationStateCreateInfoBuilder<'a>13484 pub fn push_next<T: ExtendsPipelineTessellationStateCreateInfo>(
13485 mut self,
13486 next: &'a mut T,
13487 ) -> PipelineTessellationStateCreateInfoBuilder<'a> {
13488 unsafe {
13489 let next_ptr = next as *mut T as *mut BaseOutStructure;
13490 let last_next = ptr_chain_iter(next).last().unwrap();
13491 (*last_next).p_next = self.inner.p_next as _;
13492 self.inner.p_next = next_ptr as _;
13493 }
13494 self
13495 }
13496 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13497 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13498 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineTessellationStateCreateInfo13499 pub fn build(self) -> PipelineTessellationStateCreateInfo {
13500 self.inner
13501 }
13502 }
13503 #[repr(C)]
13504 #[derive(Copy, Clone, Debug)]
13505 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportStateCreateInfo.html>"]
13506 pub struct PipelineViewportStateCreateInfo {
13507 pub s_type: StructureType,
13508 pub p_next: *const c_void,
13509 pub flags: PipelineViewportStateCreateFlags,
13510 pub viewport_count: u32,
13511 pub p_viewports: *const Viewport,
13512 pub scissor_count: u32,
13513 pub p_scissors: *const Rect2D,
13514 }
13515 impl ::std::default::Default for PipelineViewportStateCreateInfo {
default() -> PipelineViewportStateCreateInfo13516 fn default() -> PipelineViewportStateCreateInfo {
13517 PipelineViewportStateCreateInfo {
13518 s_type: StructureType::PIPELINE_VIEWPORT_STATE_CREATE_INFO,
13519 p_next: ::std::ptr::null(),
13520 flags: PipelineViewportStateCreateFlags::default(),
13521 viewport_count: u32::default(),
13522 p_viewports: ::std::ptr::null(),
13523 scissor_count: u32::default(),
13524 p_scissors: ::std::ptr::null(),
13525 }
13526 }
13527 }
13528 impl PipelineViewportStateCreateInfo {
builder<'a>() -> PipelineViewportStateCreateInfoBuilder<'a>13529 pub fn builder<'a>() -> PipelineViewportStateCreateInfoBuilder<'a> {
13530 PipelineViewportStateCreateInfoBuilder {
13531 inner: PipelineViewportStateCreateInfo::default(),
13532 marker: ::std::marker::PhantomData,
13533 }
13534 }
13535 }
13536 #[repr(transparent)]
13537 pub struct PipelineViewportStateCreateInfoBuilder<'a> {
13538 inner: PipelineViewportStateCreateInfo,
13539 marker: ::std::marker::PhantomData<&'a ()>,
13540 }
13541 pub unsafe trait ExtendsPipelineViewportStateCreateInfo {}
13542 impl<'a> ::std::ops::Deref for PipelineViewportStateCreateInfoBuilder<'a> {
13543 type Target = PipelineViewportStateCreateInfo;
deref(&self) -> &Self::Target13544 fn deref(&self) -> &Self::Target {
13545 &self.inner
13546 }
13547 }
13548 impl<'a> ::std::ops::DerefMut for PipelineViewportStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13549 fn deref_mut(&mut self) -> &mut Self::Target {
13550 &mut self.inner
13551 }
13552 }
13553 impl<'a> PipelineViewportStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineViewportStateCreateFlags, ) -> PipelineViewportStateCreateInfoBuilder<'a>13554 pub fn flags(
13555 mut self,
13556 flags: PipelineViewportStateCreateFlags,
13557 ) -> PipelineViewportStateCreateInfoBuilder<'a> {
13558 self.inner.flags = flags;
13559 self
13560 }
viewport_count( mut self, viewport_count: u32, ) -> PipelineViewportStateCreateInfoBuilder<'a>13561 pub fn viewport_count(
13562 mut self,
13563 viewport_count: u32,
13564 ) -> PipelineViewportStateCreateInfoBuilder<'a> {
13565 self.inner.viewport_count = viewport_count;
13566 self
13567 }
viewports( mut self, viewports: &'a [Viewport], ) -> PipelineViewportStateCreateInfoBuilder<'a>13568 pub fn viewports(
13569 mut self,
13570 viewports: &'a [Viewport],
13571 ) -> PipelineViewportStateCreateInfoBuilder<'a> {
13572 self.inner.viewport_count = viewports.len() as _;
13573 self.inner.p_viewports = viewports.as_ptr();
13574 self
13575 }
scissor_count( mut self, scissor_count: u32, ) -> PipelineViewportStateCreateInfoBuilder<'a>13576 pub fn scissor_count(
13577 mut self,
13578 scissor_count: u32,
13579 ) -> PipelineViewportStateCreateInfoBuilder<'a> {
13580 self.inner.scissor_count = scissor_count;
13581 self
13582 }
scissors( mut self, scissors: &'a [Rect2D], ) -> PipelineViewportStateCreateInfoBuilder<'a>13583 pub fn scissors(
13584 mut self,
13585 scissors: &'a [Rect2D],
13586 ) -> PipelineViewportStateCreateInfoBuilder<'a> {
13587 self.inner.scissor_count = scissors.len() as _;
13588 self.inner.p_scissors = scissors.as_ptr();
13589 self
13590 }
13591 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
13592 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
13593 #[doc = r" valid extension structs can be pushed into the chain."]
13594 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
13595 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineViewportStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineViewportStateCreateInfoBuilder<'a>13596 pub fn push_next<T: ExtendsPipelineViewportStateCreateInfo>(
13597 mut self,
13598 next: &'a mut T,
13599 ) -> PipelineViewportStateCreateInfoBuilder<'a> {
13600 unsafe {
13601 let next_ptr = next as *mut T as *mut BaseOutStructure;
13602 let last_next = ptr_chain_iter(next).last().unwrap();
13603 (*last_next).p_next = self.inner.p_next as _;
13604 self.inner.p_next = next_ptr as _;
13605 }
13606 self
13607 }
13608 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13609 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13610 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineViewportStateCreateInfo13611 pub fn build(self) -> PipelineViewportStateCreateInfo {
13612 self.inner
13613 }
13614 }
13615 #[repr(C)]
13616 #[derive(Copy, Clone, Debug)]
13617 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateCreateInfo.html>"]
13618 pub struct PipelineRasterizationStateCreateInfo {
13619 pub s_type: StructureType,
13620 pub p_next: *const c_void,
13621 pub flags: PipelineRasterizationStateCreateFlags,
13622 pub depth_clamp_enable: Bool32,
13623 pub rasterizer_discard_enable: Bool32,
13624 pub polygon_mode: PolygonMode,
13625 pub cull_mode: CullModeFlags,
13626 pub front_face: FrontFace,
13627 pub depth_bias_enable: Bool32,
13628 pub depth_bias_constant_factor: f32,
13629 pub depth_bias_clamp: f32,
13630 pub depth_bias_slope_factor: f32,
13631 pub line_width: f32,
13632 }
13633 impl ::std::default::Default for PipelineRasterizationStateCreateInfo {
default() -> PipelineRasterizationStateCreateInfo13634 fn default() -> PipelineRasterizationStateCreateInfo {
13635 PipelineRasterizationStateCreateInfo {
13636 s_type: StructureType::PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
13637 p_next: ::std::ptr::null(),
13638 flags: PipelineRasterizationStateCreateFlags::default(),
13639 depth_clamp_enable: Bool32::default(),
13640 rasterizer_discard_enable: Bool32::default(),
13641 polygon_mode: PolygonMode::default(),
13642 cull_mode: CullModeFlags::default(),
13643 front_face: FrontFace::default(),
13644 depth_bias_enable: Bool32::default(),
13645 depth_bias_constant_factor: f32::default(),
13646 depth_bias_clamp: f32::default(),
13647 depth_bias_slope_factor: f32::default(),
13648 line_width: f32::default(),
13649 }
13650 }
13651 }
13652 impl PipelineRasterizationStateCreateInfo {
builder<'a>() -> PipelineRasterizationStateCreateInfoBuilder<'a>13653 pub fn builder<'a>() -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13654 PipelineRasterizationStateCreateInfoBuilder {
13655 inner: PipelineRasterizationStateCreateInfo::default(),
13656 marker: ::std::marker::PhantomData,
13657 }
13658 }
13659 }
13660 #[repr(transparent)]
13661 pub struct PipelineRasterizationStateCreateInfoBuilder<'a> {
13662 inner: PipelineRasterizationStateCreateInfo,
13663 marker: ::std::marker::PhantomData<&'a ()>,
13664 }
13665 pub unsafe trait ExtendsPipelineRasterizationStateCreateInfo {}
13666 impl<'a> ::std::ops::Deref for PipelineRasterizationStateCreateInfoBuilder<'a> {
13667 type Target = PipelineRasterizationStateCreateInfo;
deref(&self) -> &Self::Target13668 fn deref(&self) -> &Self::Target {
13669 &self.inner
13670 }
13671 }
13672 impl<'a> ::std::ops::DerefMut for PipelineRasterizationStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13673 fn deref_mut(&mut self) -> &mut Self::Target {
13674 &mut self.inner
13675 }
13676 }
13677 impl<'a> PipelineRasterizationStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineRasterizationStateCreateFlags, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13678 pub fn flags(
13679 mut self,
13680 flags: PipelineRasterizationStateCreateFlags,
13681 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13682 self.inner.flags = flags;
13683 self
13684 }
depth_clamp_enable( mut self, depth_clamp_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13685 pub fn depth_clamp_enable(
13686 mut self,
13687 depth_clamp_enable: bool,
13688 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13689 self.inner.depth_clamp_enable = depth_clamp_enable.into();
13690 self
13691 }
rasterizer_discard_enable( mut self, rasterizer_discard_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13692 pub fn rasterizer_discard_enable(
13693 mut self,
13694 rasterizer_discard_enable: bool,
13695 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13696 self.inner.rasterizer_discard_enable = rasterizer_discard_enable.into();
13697 self
13698 }
polygon_mode( mut self, polygon_mode: PolygonMode, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13699 pub fn polygon_mode(
13700 mut self,
13701 polygon_mode: PolygonMode,
13702 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13703 self.inner.polygon_mode = polygon_mode;
13704 self
13705 }
cull_mode( mut self, cull_mode: CullModeFlags, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13706 pub fn cull_mode(
13707 mut self,
13708 cull_mode: CullModeFlags,
13709 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13710 self.inner.cull_mode = cull_mode;
13711 self
13712 }
front_face( mut self, front_face: FrontFace, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13713 pub fn front_face(
13714 mut self,
13715 front_face: FrontFace,
13716 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13717 self.inner.front_face = front_face;
13718 self
13719 }
depth_bias_enable( mut self, depth_bias_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13720 pub fn depth_bias_enable(
13721 mut self,
13722 depth_bias_enable: bool,
13723 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13724 self.inner.depth_bias_enable = depth_bias_enable.into();
13725 self
13726 }
depth_bias_constant_factor( mut self, depth_bias_constant_factor: f32, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13727 pub fn depth_bias_constant_factor(
13728 mut self,
13729 depth_bias_constant_factor: f32,
13730 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13731 self.inner.depth_bias_constant_factor = depth_bias_constant_factor;
13732 self
13733 }
depth_bias_clamp( mut self, depth_bias_clamp: f32, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13734 pub fn depth_bias_clamp(
13735 mut self,
13736 depth_bias_clamp: f32,
13737 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13738 self.inner.depth_bias_clamp = depth_bias_clamp;
13739 self
13740 }
depth_bias_slope_factor( mut self, depth_bias_slope_factor: f32, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13741 pub fn depth_bias_slope_factor(
13742 mut self,
13743 depth_bias_slope_factor: f32,
13744 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13745 self.inner.depth_bias_slope_factor = depth_bias_slope_factor;
13746 self
13747 }
line_width( mut self, line_width: f32, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13748 pub fn line_width(
13749 mut self,
13750 line_width: f32,
13751 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13752 self.inner.line_width = line_width;
13753 self
13754 }
13755 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
13756 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
13757 #[doc = r" valid extension structs can be pushed into the chain."]
13758 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
13759 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineRasterizationStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineRasterizationStateCreateInfoBuilder<'a>13760 pub fn push_next<T: ExtendsPipelineRasterizationStateCreateInfo>(
13761 mut self,
13762 next: &'a mut T,
13763 ) -> PipelineRasterizationStateCreateInfoBuilder<'a> {
13764 unsafe {
13765 let next_ptr = next as *mut T as *mut BaseOutStructure;
13766 let last_next = ptr_chain_iter(next).last().unwrap();
13767 (*last_next).p_next = self.inner.p_next as _;
13768 self.inner.p_next = next_ptr as _;
13769 }
13770 self
13771 }
13772 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13773 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13774 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineRasterizationStateCreateInfo13775 pub fn build(self) -> PipelineRasterizationStateCreateInfo {
13776 self.inner
13777 }
13778 }
13779 #[repr(C)]
13780 #[derive(Copy, Clone, Debug)]
13781 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineMultisampleStateCreateInfo.html>"]
13782 pub struct PipelineMultisampleStateCreateInfo {
13783 pub s_type: StructureType,
13784 pub p_next: *const c_void,
13785 pub flags: PipelineMultisampleStateCreateFlags,
13786 pub rasterization_samples: SampleCountFlags,
13787 pub sample_shading_enable: Bool32,
13788 pub min_sample_shading: f32,
13789 pub p_sample_mask: *const SampleMask,
13790 pub alpha_to_coverage_enable: Bool32,
13791 pub alpha_to_one_enable: Bool32,
13792 }
13793 impl ::std::default::Default for PipelineMultisampleStateCreateInfo {
default() -> PipelineMultisampleStateCreateInfo13794 fn default() -> PipelineMultisampleStateCreateInfo {
13795 PipelineMultisampleStateCreateInfo {
13796 s_type: StructureType::PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
13797 p_next: ::std::ptr::null(),
13798 flags: PipelineMultisampleStateCreateFlags::default(),
13799 rasterization_samples: SampleCountFlags::default(),
13800 sample_shading_enable: Bool32::default(),
13801 min_sample_shading: f32::default(),
13802 p_sample_mask: ::std::ptr::null(),
13803 alpha_to_coverage_enable: Bool32::default(),
13804 alpha_to_one_enable: Bool32::default(),
13805 }
13806 }
13807 }
13808 impl PipelineMultisampleStateCreateInfo {
builder<'a>() -> PipelineMultisampleStateCreateInfoBuilder<'a>13809 pub fn builder<'a>() -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13810 PipelineMultisampleStateCreateInfoBuilder {
13811 inner: PipelineMultisampleStateCreateInfo::default(),
13812 marker: ::std::marker::PhantomData,
13813 }
13814 }
13815 }
13816 #[repr(transparent)]
13817 pub struct PipelineMultisampleStateCreateInfoBuilder<'a> {
13818 inner: PipelineMultisampleStateCreateInfo,
13819 marker: ::std::marker::PhantomData<&'a ()>,
13820 }
13821 pub unsafe trait ExtendsPipelineMultisampleStateCreateInfo {}
13822 impl<'a> ::std::ops::Deref for PipelineMultisampleStateCreateInfoBuilder<'a> {
13823 type Target = PipelineMultisampleStateCreateInfo;
deref(&self) -> &Self::Target13824 fn deref(&self) -> &Self::Target {
13825 &self.inner
13826 }
13827 }
13828 impl<'a> ::std::ops::DerefMut for PipelineMultisampleStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13829 fn deref_mut(&mut self) -> &mut Self::Target {
13830 &mut self.inner
13831 }
13832 }
13833 impl<'a> PipelineMultisampleStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineMultisampleStateCreateFlags, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>13834 pub fn flags(
13835 mut self,
13836 flags: PipelineMultisampleStateCreateFlags,
13837 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13838 self.inner.flags = flags;
13839 self
13840 }
rasterization_samples( mut self, rasterization_samples: SampleCountFlags, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>13841 pub fn rasterization_samples(
13842 mut self,
13843 rasterization_samples: SampleCountFlags,
13844 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13845 self.inner.rasterization_samples = rasterization_samples;
13846 self
13847 }
sample_shading_enable( mut self, sample_shading_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>13848 pub fn sample_shading_enable(
13849 mut self,
13850 sample_shading_enable: bool,
13851 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13852 self.inner.sample_shading_enable = sample_shading_enable.into();
13853 self
13854 }
min_sample_shading( mut self, min_sample_shading: f32, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>13855 pub fn min_sample_shading(
13856 mut self,
13857 min_sample_shading: f32,
13858 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13859 self.inner.min_sample_shading = min_sample_shading;
13860 self
13861 }
sample_mask( mut self, sample_mask: &'a [SampleMask], ) -> PipelineMultisampleStateCreateInfoBuilder<'a>13862 pub fn sample_mask(
13863 mut self,
13864 sample_mask: &'a [SampleMask],
13865 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13866 self.inner.p_sample_mask = sample_mask.as_ptr() as *const SampleMask;
13867 self
13868 }
alpha_to_coverage_enable( mut self, alpha_to_coverage_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>13869 pub fn alpha_to_coverage_enable(
13870 mut self,
13871 alpha_to_coverage_enable: bool,
13872 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13873 self.inner.alpha_to_coverage_enable = alpha_to_coverage_enable.into();
13874 self
13875 }
alpha_to_one_enable( mut self, alpha_to_one_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>13876 pub fn alpha_to_one_enable(
13877 mut self,
13878 alpha_to_one_enable: bool,
13879 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13880 self.inner.alpha_to_one_enable = alpha_to_one_enable.into();
13881 self
13882 }
13883 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
13884 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
13885 #[doc = r" valid extension structs can be pushed into the chain."]
13886 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
13887 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineMultisampleStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineMultisampleStateCreateInfoBuilder<'a>13888 pub fn push_next<T: ExtendsPipelineMultisampleStateCreateInfo>(
13889 mut self,
13890 next: &'a mut T,
13891 ) -> PipelineMultisampleStateCreateInfoBuilder<'a> {
13892 unsafe {
13893 let next_ptr = next as *mut T as *mut BaseOutStructure;
13894 let last_next = ptr_chain_iter(next).last().unwrap();
13895 (*last_next).p_next = self.inner.p_next as _;
13896 self.inner.p_next = next_ptr as _;
13897 }
13898 self
13899 }
13900 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
13901 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
13902 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineMultisampleStateCreateInfo13903 pub fn build(self) -> PipelineMultisampleStateCreateInfo {
13904 self.inner
13905 }
13906 }
13907 #[repr(C)]
13908 #[derive(Copy, Clone, Default, Debug)]
13909 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendAttachmentState.html>"]
13910 pub struct PipelineColorBlendAttachmentState {
13911 pub blend_enable: Bool32,
13912 pub src_color_blend_factor: BlendFactor,
13913 pub dst_color_blend_factor: BlendFactor,
13914 pub color_blend_op: BlendOp,
13915 pub src_alpha_blend_factor: BlendFactor,
13916 pub dst_alpha_blend_factor: BlendFactor,
13917 pub alpha_blend_op: BlendOp,
13918 pub color_write_mask: ColorComponentFlags,
13919 }
13920 impl PipelineColorBlendAttachmentState {
builder<'a>() -> PipelineColorBlendAttachmentStateBuilder<'a>13921 pub fn builder<'a>() -> PipelineColorBlendAttachmentStateBuilder<'a> {
13922 PipelineColorBlendAttachmentStateBuilder {
13923 inner: PipelineColorBlendAttachmentState::default(),
13924 marker: ::std::marker::PhantomData,
13925 }
13926 }
13927 }
13928 #[repr(transparent)]
13929 pub struct PipelineColorBlendAttachmentStateBuilder<'a> {
13930 inner: PipelineColorBlendAttachmentState,
13931 marker: ::std::marker::PhantomData<&'a ()>,
13932 }
13933 impl<'a> ::std::ops::Deref for PipelineColorBlendAttachmentStateBuilder<'a> {
13934 type Target = PipelineColorBlendAttachmentState;
deref(&self) -> &Self::Target13935 fn deref(&self) -> &Self::Target {
13936 &self.inner
13937 }
13938 }
13939 impl<'a> ::std::ops::DerefMut for PipelineColorBlendAttachmentStateBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target13940 fn deref_mut(&mut self) -> &mut Self::Target {
13941 &mut self.inner
13942 }
13943 }
13944 impl<'a> PipelineColorBlendAttachmentStateBuilder<'a> {
blend_enable( mut self, blend_enable: bool, ) -> PipelineColorBlendAttachmentStateBuilder<'a>13945 pub fn blend_enable(
13946 mut self,
13947 blend_enable: bool,
13948 ) -> PipelineColorBlendAttachmentStateBuilder<'a> {
13949 self.inner.blend_enable = blend_enable.into();
13950 self
13951 }
src_color_blend_factor( mut self, src_color_blend_factor: BlendFactor, ) -> PipelineColorBlendAttachmentStateBuilder<'a>13952 pub fn src_color_blend_factor(
13953 mut self,
13954 src_color_blend_factor: BlendFactor,
13955 ) -> PipelineColorBlendAttachmentStateBuilder<'a> {
13956 self.inner.src_color_blend_factor = src_color_blend_factor;
13957 self
13958 }
dst_color_blend_factor( mut self, dst_color_blend_factor: BlendFactor, ) -> PipelineColorBlendAttachmentStateBuilder<'a>13959 pub fn dst_color_blend_factor(
13960 mut self,
13961 dst_color_blend_factor: BlendFactor,
13962 ) -> PipelineColorBlendAttachmentStateBuilder<'a> {
13963 self.inner.dst_color_blend_factor = dst_color_blend_factor;
13964 self
13965 }
color_blend_op( mut self, color_blend_op: BlendOp, ) -> PipelineColorBlendAttachmentStateBuilder<'a>13966 pub fn color_blend_op(
13967 mut self,
13968 color_blend_op: BlendOp,
13969 ) -> PipelineColorBlendAttachmentStateBuilder<'a> {
13970 self.inner.color_blend_op = color_blend_op;
13971 self
13972 }
src_alpha_blend_factor( mut self, src_alpha_blend_factor: BlendFactor, ) -> PipelineColorBlendAttachmentStateBuilder<'a>13973 pub fn src_alpha_blend_factor(
13974 mut self,
13975 src_alpha_blend_factor: BlendFactor,
13976 ) -> PipelineColorBlendAttachmentStateBuilder<'a> {
13977 self.inner.src_alpha_blend_factor = src_alpha_blend_factor;
13978 self
13979 }
dst_alpha_blend_factor( mut self, dst_alpha_blend_factor: BlendFactor, ) -> PipelineColorBlendAttachmentStateBuilder<'a>13980 pub fn dst_alpha_blend_factor(
13981 mut self,
13982 dst_alpha_blend_factor: BlendFactor,
13983 ) -> PipelineColorBlendAttachmentStateBuilder<'a> {
13984 self.inner.dst_alpha_blend_factor = dst_alpha_blend_factor;
13985 self
13986 }
alpha_blend_op( mut self, alpha_blend_op: BlendOp, ) -> PipelineColorBlendAttachmentStateBuilder<'a>13987 pub fn alpha_blend_op(
13988 mut self,
13989 alpha_blend_op: BlendOp,
13990 ) -> PipelineColorBlendAttachmentStateBuilder<'a> {
13991 self.inner.alpha_blend_op = alpha_blend_op;
13992 self
13993 }
color_write_mask( mut self, color_write_mask: ColorComponentFlags, ) -> PipelineColorBlendAttachmentStateBuilder<'a>13994 pub fn color_write_mask(
13995 mut self,
13996 color_write_mask: ColorComponentFlags,
13997 ) -> PipelineColorBlendAttachmentStateBuilder<'a> {
13998 self.inner.color_write_mask = color_write_mask;
13999 self
14000 }
14001 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
14002 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
14003 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineColorBlendAttachmentState14004 pub fn build(self) -> PipelineColorBlendAttachmentState {
14005 self.inner
14006 }
14007 }
14008 #[repr(C)]
14009 #[derive(Copy, Clone, Debug)]
14010 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendStateCreateInfo.html>"]
14011 pub struct PipelineColorBlendStateCreateInfo {
14012 pub s_type: StructureType,
14013 pub p_next: *const c_void,
14014 pub flags: PipelineColorBlendStateCreateFlags,
14015 pub logic_op_enable: Bool32,
14016 pub logic_op: LogicOp,
14017 pub attachment_count: u32,
14018 pub p_attachments: *const PipelineColorBlendAttachmentState,
14019 pub blend_constants: [f32; 4],
14020 }
14021 impl ::std::default::Default for PipelineColorBlendStateCreateInfo {
default() -> PipelineColorBlendStateCreateInfo14022 fn default() -> PipelineColorBlendStateCreateInfo {
14023 PipelineColorBlendStateCreateInfo {
14024 s_type: StructureType::PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,
14025 p_next: ::std::ptr::null(),
14026 flags: PipelineColorBlendStateCreateFlags::default(),
14027 logic_op_enable: Bool32::default(),
14028 logic_op: LogicOp::default(),
14029 attachment_count: u32::default(),
14030 p_attachments: ::std::ptr::null(),
14031 blend_constants: unsafe { ::std::mem::zeroed() },
14032 }
14033 }
14034 }
14035 impl PipelineColorBlendStateCreateInfo {
builder<'a>() -> PipelineColorBlendStateCreateInfoBuilder<'a>14036 pub fn builder<'a>() -> PipelineColorBlendStateCreateInfoBuilder<'a> {
14037 PipelineColorBlendStateCreateInfoBuilder {
14038 inner: PipelineColorBlendStateCreateInfo::default(),
14039 marker: ::std::marker::PhantomData,
14040 }
14041 }
14042 }
14043 #[repr(transparent)]
14044 pub struct PipelineColorBlendStateCreateInfoBuilder<'a> {
14045 inner: PipelineColorBlendStateCreateInfo,
14046 marker: ::std::marker::PhantomData<&'a ()>,
14047 }
14048 pub unsafe trait ExtendsPipelineColorBlendStateCreateInfo {}
14049 impl<'a> ::std::ops::Deref for PipelineColorBlendStateCreateInfoBuilder<'a> {
14050 type Target = PipelineColorBlendStateCreateInfo;
deref(&self) -> &Self::Target14051 fn deref(&self) -> &Self::Target {
14052 &self.inner
14053 }
14054 }
14055 impl<'a> ::std::ops::DerefMut for PipelineColorBlendStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target14056 fn deref_mut(&mut self) -> &mut Self::Target {
14057 &mut self.inner
14058 }
14059 }
14060 impl<'a> PipelineColorBlendStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineColorBlendStateCreateFlags, ) -> PipelineColorBlendStateCreateInfoBuilder<'a>14061 pub fn flags(
14062 mut self,
14063 flags: PipelineColorBlendStateCreateFlags,
14064 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> {
14065 self.inner.flags = flags;
14066 self
14067 }
logic_op_enable( mut self, logic_op_enable: bool, ) -> PipelineColorBlendStateCreateInfoBuilder<'a>14068 pub fn logic_op_enable(
14069 mut self,
14070 logic_op_enable: bool,
14071 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> {
14072 self.inner.logic_op_enable = logic_op_enable.into();
14073 self
14074 }
logic_op(mut self, logic_op: LogicOp) -> PipelineColorBlendStateCreateInfoBuilder<'a>14075 pub fn logic_op(mut self, logic_op: LogicOp) -> PipelineColorBlendStateCreateInfoBuilder<'a> {
14076 self.inner.logic_op = logic_op;
14077 self
14078 }
attachments( mut self, attachments: &'a [PipelineColorBlendAttachmentState], ) -> PipelineColorBlendStateCreateInfoBuilder<'a>14079 pub fn attachments(
14080 mut self,
14081 attachments: &'a [PipelineColorBlendAttachmentState],
14082 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> {
14083 self.inner.attachment_count = attachments.len() as _;
14084 self.inner.p_attachments = attachments.as_ptr();
14085 self
14086 }
blend_constants( mut self, blend_constants: [f32; 4], ) -> PipelineColorBlendStateCreateInfoBuilder<'a>14087 pub fn blend_constants(
14088 mut self,
14089 blend_constants: [f32; 4],
14090 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> {
14091 self.inner.blend_constants = blend_constants;
14092 self
14093 }
14094 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
14095 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
14096 #[doc = r" valid extension structs can be pushed into the chain."]
14097 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
14098 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineColorBlendStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineColorBlendStateCreateInfoBuilder<'a>14099 pub fn push_next<T: ExtendsPipelineColorBlendStateCreateInfo>(
14100 mut self,
14101 next: &'a mut T,
14102 ) -> PipelineColorBlendStateCreateInfoBuilder<'a> {
14103 unsafe {
14104 let next_ptr = next as *mut T as *mut BaseOutStructure;
14105 let last_next = ptr_chain_iter(next).last().unwrap();
14106 (*last_next).p_next = self.inner.p_next as _;
14107 self.inner.p_next = next_ptr as _;
14108 }
14109 self
14110 }
14111 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
14112 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
14113 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineColorBlendStateCreateInfo14114 pub fn build(self) -> PipelineColorBlendStateCreateInfo {
14115 self.inner
14116 }
14117 }
14118 #[repr(C)]
14119 #[derive(Copy, Clone, Debug)]
14120 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDynamicStateCreateInfo.html>"]
14121 pub struct PipelineDynamicStateCreateInfo {
14122 pub s_type: StructureType,
14123 pub p_next: *const c_void,
14124 pub flags: PipelineDynamicStateCreateFlags,
14125 pub dynamic_state_count: u32,
14126 pub p_dynamic_states: *const DynamicState,
14127 }
14128 impl ::std::default::Default for PipelineDynamicStateCreateInfo {
default() -> PipelineDynamicStateCreateInfo14129 fn default() -> PipelineDynamicStateCreateInfo {
14130 PipelineDynamicStateCreateInfo {
14131 s_type: StructureType::PIPELINE_DYNAMIC_STATE_CREATE_INFO,
14132 p_next: ::std::ptr::null(),
14133 flags: PipelineDynamicStateCreateFlags::default(),
14134 dynamic_state_count: u32::default(),
14135 p_dynamic_states: ::std::ptr::null(),
14136 }
14137 }
14138 }
14139 impl PipelineDynamicStateCreateInfo {
builder<'a>() -> PipelineDynamicStateCreateInfoBuilder<'a>14140 pub fn builder<'a>() -> PipelineDynamicStateCreateInfoBuilder<'a> {
14141 PipelineDynamicStateCreateInfoBuilder {
14142 inner: PipelineDynamicStateCreateInfo::default(),
14143 marker: ::std::marker::PhantomData,
14144 }
14145 }
14146 }
14147 #[repr(transparent)]
14148 pub struct PipelineDynamicStateCreateInfoBuilder<'a> {
14149 inner: PipelineDynamicStateCreateInfo,
14150 marker: ::std::marker::PhantomData<&'a ()>,
14151 }
14152 pub unsafe trait ExtendsPipelineDynamicStateCreateInfo {}
14153 impl<'a> ::std::ops::Deref for PipelineDynamicStateCreateInfoBuilder<'a> {
14154 type Target = PipelineDynamicStateCreateInfo;
deref(&self) -> &Self::Target14155 fn deref(&self) -> &Self::Target {
14156 &self.inner
14157 }
14158 }
14159 impl<'a> ::std::ops::DerefMut for PipelineDynamicStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target14160 fn deref_mut(&mut self) -> &mut Self::Target {
14161 &mut self.inner
14162 }
14163 }
14164 impl<'a> PipelineDynamicStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineDynamicStateCreateFlags, ) -> PipelineDynamicStateCreateInfoBuilder<'a>14165 pub fn flags(
14166 mut self,
14167 flags: PipelineDynamicStateCreateFlags,
14168 ) -> PipelineDynamicStateCreateInfoBuilder<'a> {
14169 self.inner.flags = flags;
14170 self
14171 }
dynamic_states( mut self, dynamic_states: &'a [DynamicState], ) -> PipelineDynamicStateCreateInfoBuilder<'a>14172 pub fn dynamic_states(
14173 mut self,
14174 dynamic_states: &'a [DynamicState],
14175 ) -> PipelineDynamicStateCreateInfoBuilder<'a> {
14176 self.inner.dynamic_state_count = dynamic_states.len() as _;
14177 self.inner.p_dynamic_states = dynamic_states.as_ptr();
14178 self
14179 }
14180 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
14181 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
14182 #[doc = r" valid extension structs can be pushed into the chain."]
14183 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
14184 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineDynamicStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineDynamicStateCreateInfoBuilder<'a>14185 pub fn push_next<T: ExtendsPipelineDynamicStateCreateInfo>(
14186 mut self,
14187 next: &'a mut T,
14188 ) -> PipelineDynamicStateCreateInfoBuilder<'a> {
14189 unsafe {
14190 let next_ptr = next as *mut T as *mut BaseOutStructure;
14191 let last_next = ptr_chain_iter(next).last().unwrap();
14192 (*last_next).p_next = self.inner.p_next as _;
14193 self.inner.p_next = next_ptr as _;
14194 }
14195 self
14196 }
14197 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
14198 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
14199 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineDynamicStateCreateInfo14200 pub fn build(self) -> PipelineDynamicStateCreateInfo {
14201 self.inner
14202 }
14203 }
14204 #[repr(C)]
14205 #[derive(Copy, Clone, Default, Debug)]
14206 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkStencilOpState.html>"]
14207 pub struct StencilOpState {
14208 pub fail_op: StencilOp,
14209 pub pass_op: StencilOp,
14210 pub depth_fail_op: StencilOp,
14211 pub compare_op: CompareOp,
14212 pub compare_mask: u32,
14213 pub write_mask: u32,
14214 pub reference: u32,
14215 }
14216 impl StencilOpState {
builder<'a>() -> StencilOpStateBuilder<'a>14217 pub fn builder<'a>() -> StencilOpStateBuilder<'a> {
14218 StencilOpStateBuilder {
14219 inner: StencilOpState::default(),
14220 marker: ::std::marker::PhantomData,
14221 }
14222 }
14223 }
14224 #[repr(transparent)]
14225 pub struct StencilOpStateBuilder<'a> {
14226 inner: StencilOpState,
14227 marker: ::std::marker::PhantomData<&'a ()>,
14228 }
14229 impl<'a> ::std::ops::Deref for StencilOpStateBuilder<'a> {
14230 type Target = StencilOpState;
deref(&self) -> &Self::Target14231 fn deref(&self) -> &Self::Target {
14232 &self.inner
14233 }
14234 }
14235 impl<'a> ::std::ops::DerefMut for StencilOpStateBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target14236 fn deref_mut(&mut self) -> &mut Self::Target {
14237 &mut self.inner
14238 }
14239 }
14240 impl<'a> StencilOpStateBuilder<'a> {
fail_op(mut self, fail_op: StencilOp) -> StencilOpStateBuilder<'a>14241 pub fn fail_op(mut self, fail_op: StencilOp) -> StencilOpStateBuilder<'a> {
14242 self.inner.fail_op = fail_op;
14243 self
14244 }
pass_op(mut self, pass_op: StencilOp) -> StencilOpStateBuilder<'a>14245 pub fn pass_op(mut self, pass_op: StencilOp) -> StencilOpStateBuilder<'a> {
14246 self.inner.pass_op = pass_op;
14247 self
14248 }
depth_fail_op(mut self, depth_fail_op: StencilOp) -> StencilOpStateBuilder<'a>14249 pub fn depth_fail_op(mut self, depth_fail_op: StencilOp) -> StencilOpStateBuilder<'a> {
14250 self.inner.depth_fail_op = depth_fail_op;
14251 self
14252 }
compare_op(mut self, compare_op: CompareOp) -> StencilOpStateBuilder<'a>14253 pub fn compare_op(mut self, compare_op: CompareOp) -> StencilOpStateBuilder<'a> {
14254 self.inner.compare_op = compare_op;
14255 self
14256 }
compare_mask(mut self, compare_mask: u32) -> StencilOpStateBuilder<'a>14257 pub fn compare_mask(mut self, compare_mask: u32) -> StencilOpStateBuilder<'a> {
14258 self.inner.compare_mask = compare_mask;
14259 self
14260 }
write_mask(mut self, write_mask: u32) -> StencilOpStateBuilder<'a>14261 pub fn write_mask(mut self, write_mask: u32) -> StencilOpStateBuilder<'a> {
14262 self.inner.write_mask = write_mask;
14263 self
14264 }
reference(mut self, reference: u32) -> StencilOpStateBuilder<'a>14265 pub fn reference(mut self, reference: u32) -> StencilOpStateBuilder<'a> {
14266 self.inner.reference = reference;
14267 self
14268 }
14269 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
14270 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
14271 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> StencilOpState14272 pub fn build(self) -> StencilOpState {
14273 self.inner
14274 }
14275 }
14276 #[repr(C)]
14277 #[derive(Copy, Clone, Debug)]
14278 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDepthStencilStateCreateInfo.html>"]
14279 pub struct PipelineDepthStencilStateCreateInfo {
14280 pub s_type: StructureType,
14281 pub p_next: *const c_void,
14282 pub flags: PipelineDepthStencilStateCreateFlags,
14283 pub depth_test_enable: Bool32,
14284 pub depth_write_enable: Bool32,
14285 pub depth_compare_op: CompareOp,
14286 pub depth_bounds_test_enable: Bool32,
14287 pub stencil_test_enable: Bool32,
14288 pub front: StencilOpState,
14289 pub back: StencilOpState,
14290 pub min_depth_bounds: f32,
14291 pub max_depth_bounds: f32,
14292 }
14293 impl ::std::default::Default for PipelineDepthStencilStateCreateInfo {
default() -> PipelineDepthStencilStateCreateInfo14294 fn default() -> PipelineDepthStencilStateCreateInfo {
14295 PipelineDepthStencilStateCreateInfo {
14296 s_type: StructureType::PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO,
14297 p_next: ::std::ptr::null(),
14298 flags: PipelineDepthStencilStateCreateFlags::default(),
14299 depth_test_enable: Bool32::default(),
14300 depth_write_enable: Bool32::default(),
14301 depth_compare_op: CompareOp::default(),
14302 depth_bounds_test_enable: Bool32::default(),
14303 stencil_test_enable: Bool32::default(),
14304 front: StencilOpState::default(),
14305 back: StencilOpState::default(),
14306 min_depth_bounds: f32::default(),
14307 max_depth_bounds: f32::default(),
14308 }
14309 }
14310 }
14311 impl PipelineDepthStencilStateCreateInfo {
builder<'a>() -> PipelineDepthStencilStateCreateInfoBuilder<'a>14312 pub fn builder<'a>() -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14313 PipelineDepthStencilStateCreateInfoBuilder {
14314 inner: PipelineDepthStencilStateCreateInfo::default(),
14315 marker: ::std::marker::PhantomData,
14316 }
14317 }
14318 }
14319 #[repr(transparent)]
14320 pub struct PipelineDepthStencilStateCreateInfoBuilder<'a> {
14321 inner: PipelineDepthStencilStateCreateInfo,
14322 marker: ::std::marker::PhantomData<&'a ()>,
14323 }
14324 pub unsafe trait ExtendsPipelineDepthStencilStateCreateInfo {}
14325 impl<'a> ::std::ops::Deref for PipelineDepthStencilStateCreateInfoBuilder<'a> {
14326 type Target = PipelineDepthStencilStateCreateInfo;
deref(&self) -> &Self::Target14327 fn deref(&self) -> &Self::Target {
14328 &self.inner
14329 }
14330 }
14331 impl<'a> ::std::ops::DerefMut for PipelineDepthStencilStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target14332 fn deref_mut(&mut self) -> &mut Self::Target {
14333 &mut self.inner
14334 }
14335 }
14336 impl<'a> PipelineDepthStencilStateCreateInfoBuilder<'a> {
flags( mut self, flags: PipelineDepthStencilStateCreateFlags, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14337 pub fn flags(
14338 mut self,
14339 flags: PipelineDepthStencilStateCreateFlags,
14340 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14341 self.inner.flags = flags;
14342 self
14343 }
depth_test_enable( mut self, depth_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14344 pub fn depth_test_enable(
14345 mut self,
14346 depth_test_enable: bool,
14347 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14348 self.inner.depth_test_enable = depth_test_enable.into();
14349 self
14350 }
depth_write_enable( mut self, depth_write_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14351 pub fn depth_write_enable(
14352 mut self,
14353 depth_write_enable: bool,
14354 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14355 self.inner.depth_write_enable = depth_write_enable.into();
14356 self
14357 }
depth_compare_op( mut self, depth_compare_op: CompareOp, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14358 pub fn depth_compare_op(
14359 mut self,
14360 depth_compare_op: CompareOp,
14361 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14362 self.inner.depth_compare_op = depth_compare_op;
14363 self
14364 }
depth_bounds_test_enable( mut self, depth_bounds_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14365 pub fn depth_bounds_test_enable(
14366 mut self,
14367 depth_bounds_test_enable: bool,
14368 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14369 self.inner.depth_bounds_test_enable = depth_bounds_test_enable.into();
14370 self
14371 }
stencil_test_enable( mut self, stencil_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14372 pub fn stencil_test_enable(
14373 mut self,
14374 stencil_test_enable: bool,
14375 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14376 self.inner.stencil_test_enable = stencil_test_enable.into();
14377 self
14378 }
front( mut self, front: StencilOpState, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14379 pub fn front(
14380 mut self,
14381 front: StencilOpState,
14382 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14383 self.inner.front = front;
14384 self
14385 }
back(mut self, back: StencilOpState) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14386 pub fn back(mut self, back: StencilOpState) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14387 self.inner.back = back;
14388 self
14389 }
min_depth_bounds( mut self, min_depth_bounds: f32, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14390 pub fn min_depth_bounds(
14391 mut self,
14392 min_depth_bounds: f32,
14393 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14394 self.inner.min_depth_bounds = min_depth_bounds;
14395 self
14396 }
max_depth_bounds( mut self, max_depth_bounds: f32, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14397 pub fn max_depth_bounds(
14398 mut self,
14399 max_depth_bounds: f32,
14400 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14401 self.inner.max_depth_bounds = max_depth_bounds;
14402 self
14403 }
14404 #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
14405 #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
14406 #[doc = r" valid extension structs can be pushed into the chain."]
14407 #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
14408 #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineDepthStencilStateCreateInfo>( mut self, next: &'a mut T, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a>14409 pub fn push_next<T: ExtendsPipelineDepthStencilStateCreateInfo>(
14410 mut self,
14411 next: &'a mut T,
14412 ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
14413 unsafe {
14414 let next_ptr = next as *mut T as *mut BaseOutStructure;
14415 let last_next = ptr_chain_iter(next).last().unwrap();
14416 (*last_next).p_next = self.inner.p_next as _;
14417 self.inner.p_next = next_ptr as _;
14418 }
14419 self
14420 }
14421 #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
14422 #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
14423 #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineDepthStencilStateCreateInfo14424 pub fn build(self) -> PipelineDepthStencilStateCreateInfo {
14425 self.inner
14426 }
14427 }
14428 #[repr(C)]
14429 #[derive(Copy, Clone, Debug)]
14430 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkGraphicsPipelineCreateInfo.html>"]
14431 pub struct GraphicsPipelineCreateInfo {
14432 pub s_type: StructureType,
14433 pub p_next: *const c_void,
14434 pub flags: PipelineCreateFlags,
14435 pub stage_count: u32,
14436 pub p_stages: *const PipelineShaderStageCreateInfo,
14437 pub p_vertex_input_state: *const PipelineVertexInputStateCreateInfo,
14438 pub p_input_assembly_state: *const PipelineInputAssemblyStateCreateInfo,
14439 pub p_tessellation_state: *const PipelineTessellationStateCreateInfo,
14440 pub p_viewport_state: *const PipelineViewportStateCreateInfo,
14441 pub p_rasterization_state: *const PipelineRasterizationStateCreateInfo,
14442 pub p_multisample_state: *const PipelineMultisampleStateCreateInfo,
14443 pub p_depth_stencil_state: *const PipelineDepthStencilStateCreateInfo,
14444 pub p_color_blend_state: *const PipelineColorBlendStateCreateInfo,
14445 pub p_dynamic_state: *const PipelineDynamicStateCreateInfo,
14446 pub layout: PipelineLayout,
14447 pub render_pass: RenderPass,
14448 pub subpass: u32,
14449 pub base_pipeline_handle: Pipeline,
14450 pub base_pipeline_index: i32,
14451 }
14452 impl ::std::default::Default for GraphicsPipelineCreateInfo {
default() -> GraphicsPipelineCreateInfo14453 fn default() -> GraphicsPipelineCreateInfo {
14454 GraphicsPipelineCreateInfo {
14455 s_type: StructureType::GRAPHICS_PIPELINE_CREATE_INFO,
14456 p_next: ::std::ptr::null(),
14457 flags: PipelineCreateFlags::default(),
14458 stage_count: u32::default(),
14459 p_stages: ::std::ptr::null(),
14460 p_vertex_input_state: ::std::ptr::null(),
14461 p_input_assembly_state: ::std::ptr::null(),
14462 p_tessellation_state: ::std::ptr::null(),
14463 p_viewport_state: ::std::ptr::null(),
14464 p_rasterization_state: ::std::ptr::null(),
14465 p_multisample_state: ::std::ptr::null(),
14466 p_depth_stencil_state: ::std::ptr::null(),
14467 p_color_blend_state: ::std::ptr::null(),
14468 p_dynamic_state: ::std::ptr::null(),
14469 layout: PipelineLayout::default(),
14470 render_pass: RenderPass::default(),
14471 subpass: u32::default(),
14472 base_pipeline_handle: Pipeline::default(),
14473 base_pipeline_index: i32::default(),
14474 }
14475 }
14476 }
14477 impl GraphicsPipelineCreateInfo {
builder<'a>() -> GraphicsPipelineCreateInfoBuilder<'a>14478 pub fn builder<'a>() -> GraphicsPipelineCreateInfoBuilder<'a> {
14479 GraphicsPipelineCreateInfoBuilder {
14480 inner: GraphicsPipelineCreateInfo::default(),
14481 marker: ::std::marker::PhantomData,
14482 }
14483 }
14484 }
14485 #[repr(transparent)]
14486 pub struct GraphicsPipelineCreateInfoBuilder<'a> {
14487 inner: GraphicsPipelineCreateInfo,
14488 marker: ::std::marker::PhantomData<&'a ()>,
14489 }
14490 pub unsafe trait ExtendsGraphicsPipelineCreateInfo {}
14491 impl<'a> ::std::ops::Deref for GraphicsPipelineCreateInfoBuilder<'a> {
14492 type Target = GraphicsPipelineCreateInfo;
deref(&self) -> &Self::Target14493 fn deref(&self) -> &Self::Target {
14494 &self.inner
14495 }
14496 }
14497 impl<'a> ::std::ops::DerefMut for GraphicsPipelineCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target14498 fn deref_mut(&mut self) -> &mut Self::Target {
14499 &mut self.inner
14500 }
14501 }
14502 impl<'a> GraphicsPipelineCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineCreateFlags) -> GraphicsPipelineCreateInfoBuilder<'a>14503 pub fn flags(mut self, flags: PipelineCreateFlags) -> GraphicsPipelineCreateInfoBuilder<'a> {
14504 self.inner.flags = flags;
14505 self
14506 }
stages( mut self, stages: &'a [PipelineShaderStageCreateInfo], ) -> GraphicsPipelineCreateInfoBuilder<'a>14507 pub fn stages(
14508 mut self,
14509 stages: &'a [PipelineShaderStageCreateInfo],
14510 ) -> GraphicsPipelineCreateInfoBuilder<'a> {
14511 self.inner.stage_count = stages.len() as _;
14512 self.inner.p_stages = stages.as_ptr();
14513 self
14514 }
vertex_input_state( mut self, vertex_input_state: &'a PipelineVertexInputStateCreateInfo, ) -> GraphicsPipelineCreateInfoBuilder<'a>14515 pub fn vertex_input_state(
14516 mut self,
14517 vertex_input_state: &'a PipelineVertexInputStateCreateInfo,
14518 ) -> GraphicsPipelineCreateInfoBuilder<'a> {
14519 self.inner.p_vertex_input_state = vertex_input_state;
14520 self
14521 }
input_assembly_state( mut self, input_assembly_state: &'a PipelineInputAssemblyStateCreateInfo, ) -> GraphicsPipelineCreateInfoBuilder<'a>14522