| 1 | #![allow(unused_qualifications)] |
| 2 | use crate::vk::*; |
| 3 | use core::ffi::*; |
| 4 | #[derive(Clone)] |
| 5 | #[doc = "Raw Vulkan 1 static function pointers"] |
| 6 | pub struct StaticFn { |
| 7 | pub get_instance_proc_addr: PFN_vkGetInstanceProcAddr, |
| 8 | } |
| 9 | unsafe impl Send for StaticFn {} |
| 10 | unsafe impl Sync for StaticFn {} |
| 11 | impl StaticFn { |
| 12 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 13 | Self::load_erased(&mut f) |
| 14 | } |
| 15 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 16 | Self { |
| 17 | get_instance_proc_addr: unsafe { |
| 18 | unsafe extern "system" fn get_instance_proc_addr( |
| 19 | _instance: crate::vk::Instance, |
| 20 | _p_name: *const c_char, |
| 21 | ) -> PFN_vkVoidFunction { |
| 22 | panic!(concat!( |
| 23 | "Unable to load ", |
| 24 | stringify!(get_instance_proc_addr) |
| 25 | )) |
| 26 | } |
| 27 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetInstanceProcAddr\0"); |
| 28 | let val = _f(cname); |
| 29 | if val.is_null() { |
| 30 | get_instance_proc_addr |
| 31 | } else { |
| 32 | ::core::mem::transmute(val) |
| 33 | } |
| 34 | }, |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | #[derive(Clone)] |
| 39 | #[doc = "Raw Vulkan 1 entry point function pointers"] |
| 40 | pub struct EntryFnV1_0 { |
| 41 | pub create_instance: PFN_vkCreateInstance, |
| 42 | pub enumerate_instance_extension_properties: PFN_vkEnumerateInstanceExtensionProperties, |
| 43 | pub enumerate_instance_layer_properties: PFN_vkEnumerateInstanceLayerProperties, |
| 44 | } |
| 45 | unsafe impl Send for EntryFnV1_0 {} |
| 46 | unsafe impl Sync for EntryFnV1_0 {} |
| 47 | impl EntryFnV1_0 { |
| 48 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 49 | Self::load_erased(&mut f) |
| 50 | } |
| 51 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 52 | Self { |
| 53 | create_instance: unsafe { |
| 54 | unsafe extern "system" fn create_instance( |
| 55 | _p_create_info: *const InstanceCreateInfo<'_>, |
| 56 | _p_allocator: *const AllocationCallbacks<'_>, |
| 57 | _p_instance: *mut crate::vk::Instance, |
| 58 | ) -> Result { |
| 59 | panic!(concat!("Unable to load ", stringify!(create_instance))) |
| 60 | } |
| 61 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateInstance\0"); |
| 62 | let val = _f(cname); |
| 63 | if val.is_null() { |
| 64 | create_instance |
| 65 | } else { |
| 66 | ::core::mem::transmute(val) |
| 67 | } |
| 68 | }, |
| 69 | enumerate_instance_extension_properties: unsafe { |
| 70 | unsafe extern "system" fn enumerate_instance_extension_properties( |
| 71 | _p_layer_name: *const c_char, |
| 72 | _p_property_count: *mut u32, |
| 73 | _p_properties: *mut ExtensionProperties, |
| 74 | ) -> Result { |
| 75 | panic!(concat!( |
| 76 | "Unable to load ", |
| 77 | stringify!(enumerate_instance_extension_properties) |
| 78 | )) |
| 79 | } |
| 80 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 81 | b"vkEnumerateInstanceExtensionProperties\0", |
| 82 | ); |
| 83 | let val = _f(cname); |
| 84 | if val.is_null() { |
| 85 | enumerate_instance_extension_properties |
| 86 | } else { |
| 87 | ::core::mem::transmute(val) |
| 88 | } |
| 89 | }, |
| 90 | enumerate_instance_layer_properties: unsafe { |
| 91 | unsafe extern "system" fn enumerate_instance_layer_properties( |
| 92 | _p_property_count: *mut u32, |
| 93 | _p_properties: *mut LayerProperties, |
| 94 | ) -> Result { |
| 95 | panic!(concat!( |
| 96 | "Unable to load ", |
| 97 | stringify!(enumerate_instance_layer_properties) |
| 98 | )) |
| 99 | } |
| 100 | let cname = |
| 101 | CStr::from_bytes_with_nul_unchecked(b"vkEnumerateInstanceLayerProperties\0"); |
| 102 | let val = _f(cname); |
| 103 | if val.is_null() { |
| 104 | enumerate_instance_layer_properties |
| 105 | } else { |
| 106 | ::core::mem::transmute(val) |
| 107 | } |
| 108 | }, |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | #[derive(Clone)] |
| 113 | #[doc = "Raw Vulkan 1 instance-level function pointers"] |
| 114 | pub struct InstanceFnV1_0 { |
| 115 | pub destroy_instance: PFN_vkDestroyInstance, |
| 116 | pub enumerate_physical_devices: PFN_vkEnumeratePhysicalDevices, |
| 117 | pub get_physical_device_features: PFN_vkGetPhysicalDeviceFeatures, |
| 118 | pub get_physical_device_format_properties: PFN_vkGetPhysicalDeviceFormatProperties, |
| 119 | pub get_physical_device_image_format_properties: PFN_vkGetPhysicalDeviceImageFormatProperties, |
| 120 | pub get_physical_device_properties: PFN_vkGetPhysicalDeviceProperties, |
| 121 | pub get_physical_device_queue_family_properties: PFN_vkGetPhysicalDeviceQueueFamilyProperties, |
| 122 | pub get_physical_device_memory_properties: PFN_vkGetPhysicalDeviceMemoryProperties, |
| 123 | pub get_device_proc_addr: PFN_vkGetDeviceProcAddr, |
| 124 | pub create_device: PFN_vkCreateDevice, |
| 125 | pub enumerate_device_extension_properties: PFN_vkEnumerateDeviceExtensionProperties, |
| 126 | pub enumerate_device_layer_properties: PFN_vkEnumerateDeviceLayerProperties, |
| 127 | pub get_physical_device_sparse_image_format_properties: |
| 128 | PFN_vkGetPhysicalDeviceSparseImageFormatProperties, |
| 129 | } |
| 130 | unsafe impl Send for InstanceFnV1_0 {} |
| 131 | unsafe impl Sync for InstanceFnV1_0 {} |
| 132 | impl InstanceFnV1_0 { |
| 133 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 134 | Self::load_erased(&mut f) |
| 135 | } |
| 136 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 137 | Self { |
| 138 | destroy_instance: unsafe { |
| 139 | unsafe extern "system" fn destroy_instance( |
| 140 | _instance: crate::vk::Instance, |
| 141 | _p_allocator: *const AllocationCallbacks<'_>, |
| 142 | ) { |
| 143 | panic!(concat!("Unable to load ", stringify!(destroy_instance))) |
| 144 | } |
| 145 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyInstance\0"); |
| 146 | let val = _f(cname); |
| 147 | if val.is_null() { |
| 148 | destroy_instance |
| 149 | } else { |
| 150 | ::core::mem::transmute(val) |
| 151 | } |
| 152 | }, |
| 153 | enumerate_physical_devices: unsafe { |
| 154 | unsafe extern "system" fn enumerate_physical_devices( |
| 155 | _instance: crate::vk::Instance, |
| 156 | _p_physical_device_count: *mut u32, |
| 157 | _p_physical_devices: *mut PhysicalDevice, |
| 158 | ) -> Result { |
| 159 | panic!(concat!( |
| 160 | "Unable to load ", |
| 161 | stringify!(enumerate_physical_devices) |
| 162 | )) |
| 163 | } |
| 164 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkEnumeratePhysicalDevices\0"); |
| 165 | let val = _f(cname); |
| 166 | if val.is_null() { |
| 167 | enumerate_physical_devices |
| 168 | } else { |
| 169 | ::core::mem::transmute(val) |
| 170 | } |
| 171 | }, |
| 172 | get_physical_device_features: unsafe { |
| 173 | unsafe extern "system" fn get_physical_device_features( |
| 174 | _physical_device: PhysicalDevice, |
| 175 | _p_features: *mut PhysicalDeviceFeatures, |
| 176 | ) { |
| 177 | panic!(concat!( |
| 178 | "Unable to load ", |
| 179 | stringify!(get_physical_device_features) |
| 180 | )) |
| 181 | } |
| 182 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceFeatures\0"); |
| 183 | let val = _f(cname); |
| 184 | if val.is_null() { |
| 185 | get_physical_device_features |
| 186 | } else { |
| 187 | ::core::mem::transmute(val) |
| 188 | } |
| 189 | }, |
| 190 | get_physical_device_format_properties: unsafe { |
| 191 | unsafe extern "system" fn get_physical_device_format_properties( |
| 192 | _physical_device: PhysicalDevice, |
| 193 | _format: Format, |
| 194 | _p_format_properties: *mut FormatProperties, |
| 195 | ) { |
| 196 | panic!(concat!( |
| 197 | "Unable to load ", |
| 198 | stringify!(get_physical_device_format_properties) |
| 199 | )) |
| 200 | } |
| 201 | let cname = |
| 202 | CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceFormatProperties\0"); |
| 203 | let val = _f(cname); |
| 204 | if val.is_null() { |
| 205 | get_physical_device_format_properties |
| 206 | } else { |
| 207 | ::core::mem::transmute(val) |
| 208 | } |
| 209 | }, |
| 210 | get_physical_device_image_format_properties: unsafe { |
| 211 | unsafe extern "system" fn get_physical_device_image_format_properties( |
| 212 | _physical_device: PhysicalDevice, |
| 213 | _format: Format, |
| 214 | _ty: ImageType, |
| 215 | _tiling: ImageTiling, |
| 216 | _usage: ImageUsageFlags, |
| 217 | _flags: ImageCreateFlags, |
| 218 | _p_image_format_properties: *mut ImageFormatProperties, |
| 219 | ) -> Result { |
| 220 | panic!(concat!( |
| 221 | "Unable to load ", |
| 222 | stringify!(get_physical_device_image_format_properties) |
| 223 | )) |
| 224 | } |
| 225 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 226 | b"vkGetPhysicalDeviceImageFormatProperties\0", |
| 227 | ); |
| 228 | let val = _f(cname); |
| 229 | if val.is_null() { |
| 230 | get_physical_device_image_format_properties |
| 231 | } else { |
| 232 | ::core::mem::transmute(val) |
| 233 | } |
| 234 | }, |
| 235 | get_physical_device_properties: unsafe { |
| 236 | unsafe extern "system" fn get_physical_device_properties( |
| 237 | _physical_device: PhysicalDevice, |
| 238 | _p_properties: *mut PhysicalDeviceProperties, |
| 239 | ) { |
| 240 | panic!(concat!( |
| 241 | "Unable to load ", |
| 242 | stringify!(get_physical_device_properties) |
| 243 | )) |
| 244 | } |
| 245 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceProperties\0"); |
| 246 | let val = _f(cname); |
| 247 | if val.is_null() { |
| 248 | get_physical_device_properties |
| 249 | } else { |
| 250 | ::core::mem::transmute(val) |
| 251 | } |
| 252 | }, |
| 253 | get_physical_device_queue_family_properties: unsafe { |
| 254 | unsafe extern "system" fn get_physical_device_queue_family_properties( |
| 255 | _physical_device: PhysicalDevice, |
| 256 | _p_queue_family_property_count: *mut u32, |
| 257 | _p_queue_family_properties: *mut QueueFamilyProperties, |
| 258 | ) { |
| 259 | panic!(concat!( |
| 260 | "Unable to load ", |
| 261 | stringify!(get_physical_device_queue_family_properties) |
| 262 | )) |
| 263 | } |
| 264 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 265 | b"vkGetPhysicalDeviceQueueFamilyProperties\0", |
| 266 | ); |
| 267 | let val = _f(cname); |
| 268 | if val.is_null() { |
| 269 | get_physical_device_queue_family_properties |
| 270 | } else { |
| 271 | ::core::mem::transmute(val) |
| 272 | } |
| 273 | }, |
| 274 | get_physical_device_memory_properties: unsafe { |
| 275 | unsafe extern "system" fn get_physical_device_memory_properties( |
| 276 | _physical_device: PhysicalDevice, |
| 277 | _p_memory_properties: *mut PhysicalDeviceMemoryProperties, |
| 278 | ) { |
| 279 | panic!(concat!( |
| 280 | "Unable to load ", |
| 281 | stringify!(get_physical_device_memory_properties) |
| 282 | )) |
| 283 | } |
| 284 | let cname = |
| 285 | CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceMemoryProperties\0"); |
| 286 | let val = _f(cname); |
| 287 | if val.is_null() { |
| 288 | get_physical_device_memory_properties |
| 289 | } else { |
| 290 | ::core::mem::transmute(val) |
| 291 | } |
| 292 | }, |
| 293 | get_device_proc_addr: unsafe { |
| 294 | unsafe extern "system" fn get_device_proc_addr( |
| 295 | _device: crate::vk::Device, |
| 296 | _p_name: *const c_char, |
| 297 | ) -> PFN_vkVoidFunction { |
| 298 | panic!(concat!("Unable to load ", stringify!(get_device_proc_addr))) |
| 299 | } |
| 300 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetDeviceProcAddr\0"); |
| 301 | let val = _f(cname); |
| 302 | if val.is_null() { |
| 303 | get_device_proc_addr |
| 304 | } else { |
| 305 | ::core::mem::transmute(val) |
| 306 | } |
| 307 | }, |
| 308 | create_device: unsafe { |
| 309 | unsafe extern "system" fn create_device( |
| 310 | _physical_device: PhysicalDevice, |
| 311 | _p_create_info: *const DeviceCreateInfo<'_>, |
| 312 | _p_allocator: *const AllocationCallbacks<'_>, |
| 313 | _p_device: *mut crate::vk::Device, |
| 314 | ) -> Result { |
| 315 | panic!(concat!("Unable to load ", stringify!(create_device))) |
| 316 | } |
| 317 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateDevice\0"); |
| 318 | let val = _f(cname); |
| 319 | if val.is_null() { |
| 320 | create_device |
| 321 | } else { |
| 322 | ::core::mem::transmute(val) |
| 323 | } |
| 324 | }, |
| 325 | enumerate_device_extension_properties: unsafe { |
| 326 | unsafe extern "system" fn enumerate_device_extension_properties( |
| 327 | _physical_device: PhysicalDevice, |
| 328 | _p_layer_name: *const c_char, |
| 329 | _p_property_count: *mut u32, |
| 330 | _p_properties: *mut ExtensionProperties, |
| 331 | ) -> Result { |
| 332 | panic!(concat!( |
| 333 | "Unable to load ", |
| 334 | stringify!(enumerate_device_extension_properties) |
| 335 | )) |
| 336 | } |
| 337 | let cname = |
| 338 | CStr::from_bytes_with_nul_unchecked(b"vkEnumerateDeviceExtensionProperties\0"); |
| 339 | let val = _f(cname); |
| 340 | if val.is_null() { |
| 341 | enumerate_device_extension_properties |
| 342 | } else { |
| 343 | ::core::mem::transmute(val) |
| 344 | } |
| 345 | }, |
| 346 | enumerate_device_layer_properties: unsafe { |
| 347 | unsafe extern "system" fn enumerate_device_layer_properties( |
| 348 | _physical_device: PhysicalDevice, |
| 349 | _p_property_count: *mut u32, |
| 350 | _p_properties: *mut LayerProperties, |
| 351 | ) -> Result { |
| 352 | panic!(concat!( |
| 353 | "Unable to load ", |
| 354 | stringify!(enumerate_device_layer_properties) |
| 355 | )) |
| 356 | } |
| 357 | let cname = |
| 358 | CStr::from_bytes_with_nul_unchecked(b"vkEnumerateDeviceLayerProperties\0"); |
| 359 | let val = _f(cname); |
| 360 | if val.is_null() { |
| 361 | enumerate_device_layer_properties |
| 362 | } else { |
| 363 | ::core::mem::transmute(val) |
| 364 | } |
| 365 | }, |
| 366 | get_physical_device_sparse_image_format_properties: unsafe { |
| 367 | unsafe extern "system" fn get_physical_device_sparse_image_format_properties( |
| 368 | _physical_device: PhysicalDevice, |
| 369 | _format: Format, |
| 370 | _ty: ImageType, |
| 371 | _samples: SampleCountFlags, |
| 372 | _usage: ImageUsageFlags, |
| 373 | _tiling: ImageTiling, |
| 374 | _p_property_count: *mut u32, |
| 375 | _p_properties: *mut SparseImageFormatProperties, |
| 376 | ) { |
| 377 | panic!(concat!( |
| 378 | "Unable to load ", |
| 379 | stringify!(get_physical_device_sparse_image_format_properties) |
| 380 | )) |
| 381 | } |
| 382 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 383 | b"vkGetPhysicalDeviceSparseImageFormatProperties\0", |
| 384 | ); |
| 385 | let val = _f(cname); |
| 386 | if val.is_null() { |
| 387 | get_physical_device_sparse_image_format_properties |
| 388 | } else { |
| 389 | ::core::mem::transmute(val) |
| 390 | } |
| 391 | }, |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | #[derive(Clone)] |
| 396 | #[doc = "Raw Vulkan 1 device-level function pointers"] |
| 397 | pub struct DeviceFnV1_0 { |
| 398 | pub destroy_device: PFN_vkDestroyDevice, |
| 399 | pub get_device_queue: PFN_vkGetDeviceQueue, |
| 400 | pub queue_submit: PFN_vkQueueSubmit, |
| 401 | pub queue_wait_idle: PFN_vkQueueWaitIdle, |
| 402 | pub device_wait_idle: PFN_vkDeviceWaitIdle, |
| 403 | pub allocate_memory: PFN_vkAllocateMemory, |
| 404 | pub free_memory: PFN_vkFreeMemory, |
| 405 | pub map_memory: PFN_vkMapMemory, |
| 406 | pub unmap_memory: PFN_vkUnmapMemory, |
| 407 | pub flush_mapped_memory_ranges: PFN_vkFlushMappedMemoryRanges, |
| 408 | pub invalidate_mapped_memory_ranges: PFN_vkInvalidateMappedMemoryRanges, |
| 409 | pub get_device_memory_commitment: PFN_vkGetDeviceMemoryCommitment, |
| 410 | pub bind_buffer_memory: PFN_vkBindBufferMemory, |
| 411 | pub bind_image_memory: PFN_vkBindImageMemory, |
| 412 | pub get_buffer_memory_requirements: PFN_vkGetBufferMemoryRequirements, |
| 413 | pub get_image_memory_requirements: PFN_vkGetImageMemoryRequirements, |
| 414 | pub get_image_sparse_memory_requirements: PFN_vkGetImageSparseMemoryRequirements, |
| 415 | pub queue_bind_sparse: PFN_vkQueueBindSparse, |
| 416 | pub create_fence: PFN_vkCreateFence, |
| 417 | pub destroy_fence: PFN_vkDestroyFence, |
| 418 | pub reset_fences: PFN_vkResetFences, |
| 419 | pub get_fence_status: PFN_vkGetFenceStatus, |
| 420 | pub wait_for_fences: PFN_vkWaitForFences, |
| 421 | pub create_semaphore: PFN_vkCreateSemaphore, |
| 422 | pub destroy_semaphore: PFN_vkDestroySemaphore, |
| 423 | pub create_event: PFN_vkCreateEvent, |
| 424 | pub destroy_event: PFN_vkDestroyEvent, |
| 425 | pub get_event_status: PFN_vkGetEventStatus, |
| 426 | pub set_event: PFN_vkSetEvent, |
| 427 | pub reset_event: PFN_vkResetEvent, |
| 428 | pub create_query_pool: PFN_vkCreateQueryPool, |
| 429 | pub destroy_query_pool: PFN_vkDestroyQueryPool, |
| 430 | pub get_query_pool_results: PFN_vkGetQueryPoolResults, |
| 431 | pub create_buffer: PFN_vkCreateBuffer, |
| 432 | pub destroy_buffer: PFN_vkDestroyBuffer, |
| 433 | pub create_buffer_view: PFN_vkCreateBufferView, |
| 434 | pub destroy_buffer_view: PFN_vkDestroyBufferView, |
| 435 | pub create_image: PFN_vkCreateImage, |
| 436 | pub destroy_image: PFN_vkDestroyImage, |
| 437 | pub get_image_subresource_layout: PFN_vkGetImageSubresourceLayout, |
| 438 | pub create_image_view: PFN_vkCreateImageView, |
| 439 | pub destroy_image_view: PFN_vkDestroyImageView, |
| 440 | pub create_shader_module: PFN_vkCreateShaderModule, |
| 441 | pub destroy_shader_module: PFN_vkDestroyShaderModule, |
| 442 | pub create_pipeline_cache: PFN_vkCreatePipelineCache, |
| 443 | pub destroy_pipeline_cache: PFN_vkDestroyPipelineCache, |
| 444 | pub get_pipeline_cache_data: PFN_vkGetPipelineCacheData, |
| 445 | pub merge_pipeline_caches: PFN_vkMergePipelineCaches, |
| 446 | pub create_graphics_pipelines: PFN_vkCreateGraphicsPipelines, |
| 447 | pub create_compute_pipelines: PFN_vkCreateComputePipelines, |
| 448 | pub destroy_pipeline: PFN_vkDestroyPipeline, |
| 449 | pub create_pipeline_layout: PFN_vkCreatePipelineLayout, |
| 450 | pub destroy_pipeline_layout: PFN_vkDestroyPipelineLayout, |
| 451 | pub create_sampler: PFN_vkCreateSampler, |
| 452 | pub destroy_sampler: PFN_vkDestroySampler, |
| 453 | pub create_descriptor_set_layout: PFN_vkCreateDescriptorSetLayout, |
| 454 | pub destroy_descriptor_set_layout: PFN_vkDestroyDescriptorSetLayout, |
| 455 | pub create_descriptor_pool: PFN_vkCreateDescriptorPool, |
| 456 | pub destroy_descriptor_pool: PFN_vkDestroyDescriptorPool, |
| 457 | pub reset_descriptor_pool: PFN_vkResetDescriptorPool, |
| 458 | pub allocate_descriptor_sets: PFN_vkAllocateDescriptorSets, |
| 459 | pub free_descriptor_sets: PFN_vkFreeDescriptorSets, |
| 460 | pub update_descriptor_sets: PFN_vkUpdateDescriptorSets, |
| 461 | pub create_framebuffer: PFN_vkCreateFramebuffer, |
| 462 | pub destroy_framebuffer: PFN_vkDestroyFramebuffer, |
| 463 | pub create_render_pass: PFN_vkCreateRenderPass, |
| 464 | pub destroy_render_pass: PFN_vkDestroyRenderPass, |
| 465 | pub get_render_area_granularity: PFN_vkGetRenderAreaGranularity, |
| 466 | pub create_command_pool: PFN_vkCreateCommandPool, |
| 467 | pub destroy_command_pool: PFN_vkDestroyCommandPool, |
| 468 | pub reset_command_pool: PFN_vkResetCommandPool, |
| 469 | pub allocate_command_buffers: PFN_vkAllocateCommandBuffers, |
| 470 | pub free_command_buffers: PFN_vkFreeCommandBuffers, |
| 471 | pub begin_command_buffer: PFN_vkBeginCommandBuffer, |
| 472 | pub end_command_buffer: PFN_vkEndCommandBuffer, |
| 473 | pub reset_command_buffer: PFN_vkResetCommandBuffer, |
| 474 | pub cmd_bind_pipeline: PFN_vkCmdBindPipeline, |
| 475 | pub cmd_set_viewport: PFN_vkCmdSetViewport, |
| 476 | pub cmd_set_scissor: PFN_vkCmdSetScissor, |
| 477 | pub cmd_set_line_width: PFN_vkCmdSetLineWidth, |
| 478 | pub cmd_set_depth_bias: PFN_vkCmdSetDepthBias, |
| 479 | pub cmd_set_blend_constants: PFN_vkCmdSetBlendConstants, |
| 480 | pub cmd_set_depth_bounds: PFN_vkCmdSetDepthBounds, |
| 481 | pub cmd_set_stencil_compare_mask: PFN_vkCmdSetStencilCompareMask, |
| 482 | pub cmd_set_stencil_write_mask: PFN_vkCmdSetStencilWriteMask, |
| 483 | pub cmd_set_stencil_reference: PFN_vkCmdSetStencilReference, |
| 484 | pub cmd_bind_descriptor_sets: PFN_vkCmdBindDescriptorSets, |
| 485 | pub cmd_bind_index_buffer: PFN_vkCmdBindIndexBuffer, |
| 486 | pub cmd_bind_vertex_buffers: PFN_vkCmdBindVertexBuffers, |
| 487 | pub cmd_draw: PFN_vkCmdDraw, |
| 488 | pub cmd_draw_indexed: PFN_vkCmdDrawIndexed, |
| 489 | pub cmd_draw_indirect: PFN_vkCmdDrawIndirect, |
| 490 | pub cmd_draw_indexed_indirect: PFN_vkCmdDrawIndexedIndirect, |
| 491 | pub cmd_dispatch: PFN_vkCmdDispatch, |
| 492 | pub cmd_dispatch_indirect: PFN_vkCmdDispatchIndirect, |
| 493 | pub cmd_copy_buffer: PFN_vkCmdCopyBuffer, |
| 494 | pub cmd_copy_image: PFN_vkCmdCopyImage, |
| 495 | pub cmd_blit_image: PFN_vkCmdBlitImage, |
| 496 | pub cmd_copy_buffer_to_image: PFN_vkCmdCopyBufferToImage, |
| 497 | pub cmd_copy_image_to_buffer: PFN_vkCmdCopyImageToBuffer, |
| 498 | pub cmd_update_buffer: PFN_vkCmdUpdateBuffer, |
| 499 | pub cmd_fill_buffer: PFN_vkCmdFillBuffer, |
| 500 | pub cmd_clear_color_image: PFN_vkCmdClearColorImage, |
| 501 | pub cmd_clear_depth_stencil_image: PFN_vkCmdClearDepthStencilImage, |
| 502 | pub cmd_clear_attachments: PFN_vkCmdClearAttachments, |
| 503 | pub cmd_resolve_image: PFN_vkCmdResolveImage, |
| 504 | pub cmd_set_event: PFN_vkCmdSetEvent, |
| 505 | pub cmd_reset_event: PFN_vkCmdResetEvent, |
| 506 | pub cmd_wait_events: PFN_vkCmdWaitEvents, |
| 507 | pub cmd_pipeline_barrier: PFN_vkCmdPipelineBarrier, |
| 508 | pub cmd_begin_query: PFN_vkCmdBeginQuery, |
| 509 | pub cmd_end_query: PFN_vkCmdEndQuery, |
| 510 | pub cmd_reset_query_pool: PFN_vkCmdResetQueryPool, |
| 511 | pub cmd_write_timestamp: PFN_vkCmdWriteTimestamp, |
| 512 | pub cmd_copy_query_pool_results: PFN_vkCmdCopyQueryPoolResults, |
| 513 | pub cmd_push_constants: PFN_vkCmdPushConstants, |
| 514 | pub cmd_begin_render_pass: PFN_vkCmdBeginRenderPass, |
| 515 | pub cmd_next_subpass: PFN_vkCmdNextSubpass, |
| 516 | pub cmd_end_render_pass: PFN_vkCmdEndRenderPass, |
| 517 | pub cmd_execute_commands: PFN_vkCmdExecuteCommands, |
| 518 | } |
| 519 | unsafe impl Send for DeviceFnV1_0 {} |
| 520 | unsafe impl Sync for DeviceFnV1_0 {} |
| 521 | impl DeviceFnV1_0 { |
| 522 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 523 | Self::load_erased(&mut f) |
| 524 | } |
| 525 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 526 | Self { |
| 527 | destroy_device: unsafe { |
| 528 | unsafe extern "system" fn destroy_device( |
| 529 | _device: crate::vk::Device, |
| 530 | _p_allocator: *const AllocationCallbacks<'_>, |
| 531 | ) { |
| 532 | panic!(concat!("Unable to load ", stringify!(destroy_device))) |
| 533 | } |
| 534 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyDevice\0"); |
| 535 | let val = _f(cname); |
| 536 | if val.is_null() { |
| 537 | destroy_device |
| 538 | } else { |
| 539 | ::core::mem::transmute(val) |
| 540 | } |
| 541 | }, |
| 542 | get_device_queue: unsafe { |
| 543 | unsafe extern "system" fn get_device_queue( |
| 544 | _device: crate::vk::Device, |
| 545 | _queue_family_index: u32, |
| 546 | _queue_index: u32, |
| 547 | _p_queue: *mut Queue, |
| 548 | ) { |
| 549 | panic!(concat!("Unable to load ", stringify!(get_device_queue))) |
| 550 | } |
| 551 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetDeviceQueue\0"); |
| 552 | let val = _f(cname); |
| 553 | if val.is_null() { |
| 554 | get_device_queue |
| 555 | } else { |
| 556 | ::core::mem::transmute(val) |
| 557 | } |
| 558 | }, |
| 559 | queue_submit: unsafe { |
| 560 | unsafe extern "system" fn queue_submit( |
| 561 | _queue: Queue, |
| 562 | _submit_count: u32, |
| 563 | _p_submits: *const SubmitInfo<'_>, |
| 564 | _fence: Fence, |
| 565 | ) -> Result { |
| 566 | panic!(concat!("Unable to load ", stringify!(queue_submit))) |
| 567 | } |
| 568 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkQueueSubmit\0"); |
| 569 | let val = _f(cname); |
| 570 | if val.is_null() { |
| 571 | queue_submit |
| 572 | } else { |
| 573 | ::core::mem::transmute(val) |
| 574 | } |
| 575 | }, |
| 576 | queue_wait_idle: unsafe { |
| 577 | unsafe extern "system" fn queue_wait_idle(_queue: Queue) -> Result { |
| 578 | panic!(concat!("Unable to load ", stringify!(queue_wait_idle))) |
| 579 | } |
| 580 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkQueueWaitIdle\0"); |
| 581 | let val = _f(cname); |
| 582 | if val.is_null() { |
| 583 | queue_wait_idle |
| 584 | } else { |
| 585 | ::core::mem::transmute(val) |
| 586 | } |
| 587 | }, |
| 588 | device_wait_idle: unsafe { |
| 589 | unsafe extern "system" fn device_wait_idle(_device: crate::vk::Device) -> Result { |
| 590 | panic!(concat!("Unable to load ", stringify!(device_wait_idle))) |
| 591 | } |
| 592 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDeviceWaitIdle\0"); |
| 593 | let val = _f(cname); |
| 594 | if val.is_null() { |
| 595 | device_wait_idle |
| 596 | } else { |
| 597 | ::core::mem::transmute(val) |
| 598 | } |
| 599 | }, |
| 600 | allocate_memory: unsafe { |
| 601 | unsafe extern "system" fn allocate_memory( |
| 602 | _device: crate::vk::Device, |
| 603 | _p_allocate_info: *const MemoryAllocateInfo<'_>, |
| 604 | _p_allocator: *const AllocationCallbacks<'_>, |
| 605 | _p_memory: *mut DeviceMemory, |
| 606 | ) -> Result { |
| 607 | panic!(concat!("Unable to load ", stringify!(allocate_memory))) |
| 608 | } |
| 609 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkAllocateMemory\0"); |
| 610 | let val = _f(cname); |
| 611 | if val.is_null() { |
| 612 | allocate_memory |
| 613 | } else { |
| 614 | ::core::mem::transmute(val) |
| 615 | } |
| 616 | }, |
| 617 | free_memory: unsafe { |
| 618 | unsafe extern "system" fn free_memory( |
| 619 | _device: crate::vk::Device, |
| 620 | _memory: DeviceMemory, |
| 621 | _p_allocator: *const AllocationCallbacks<'_>, |
| 622 | ) { |
| 623 | panic!(concat!("Unable to load ", stringify!(free_memory))) |
| 624 | } |
| 625 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkFreeMemory\0"); |
| 626 | let val = _f(cname); |
| 627 | if val.is_null() { |
| 628 | free_memory |
| 629 | } else { |
| 630 | ::core::mem::transmute(val) |
| 631 | } |
| 632 | }, |
| 633 | map_memory: unsafe { |
| 634 | unsafe extern "system" fn map_memory( |
| 635 | _device: crate::vk::Device, |
| 636 | _memory: DeviceMemory, |
| 637 | _offset: DeviceSize, |
| 638 | _size: DeviceSize, |
| 639 | _flags: MemoryMapFlags, |
| 640 | _pp_data: *mut *mut c_void, |
| 641 | ) -> Result { |
| 642 | panic!(concat!("Unable to load ", stringify!(map_memory))) |
| 643 | } |
| 644 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkMapMemory\0"); |
| 645 | let val = _f(cname); |
| 646 | if val.is_null() { |
| 647 | map_memory |
| 648 | } else { |
| 649 | ::core::mem::transmute(val) |
| 650 | } |
| 651 | }, |
| 652 | unmap_memory: unsafe { |
| 653 | unsafe extern "system" fn unmap_memory( |
| 654 | _device: crate::vk::Device, |
| 655 | _memory: DeviceMemory, |
| 656 | ) { |
| 657 | panic!(concat!("Unable to load ", stringify!(unmap_memory))) |
| 658 | } |
| 659 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkUnmapMemory\0"); |
| 660 | let val = _f(cname); |
| 661 | if val.is_null() { |
| 662 | unmap_memory |
| 663 | } else { |
| 664 | ::core::mem::transmute(val) |
| 665 | } |
| 666 | }, |
| 667 | flush_mapped_memory_ranges: unsafe { |
| 668 | unsafe extern "system" fn flush_mapped_memory_ranges( |
| 669 | _device: crate::vk::Device, |
| 670 | _memory_range_count: u32, |
| 671 | _p_memory_ranges: *const MappedMemoryRange<'_>, |
| 672 | ) -> Result { |
| 673 | panic!(concat!( |
| 674 | "Unable to load ", |
| 675 | stringify!(flush_mapped_memory_ranges) |
| 676 | )) |
| 677 | } |
| 678 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkFlushMappedMemoryRanges\0"); |
| 679 | let val = _f(cname); |
| 680 | if val.is_null() { |
| 681 | flush_mapped_memory_ranges |
| 682 | } else { |
| 683 | ::core::mem::transmute(val) |
| 684 | } |
| 685 | }, |
| 686 | invalidate_mapped_memory_ranges: unsafe { |
| 687 | unsafe extern "system" fn invalidate_mapped_memory_ranges( |
| 688 | _device: crate::vk::Device, |
| 689 | _memory_range_count: u32, |
| 690 | _p_memory_ranges: *const MappedMemoryRange<'_>, |
| 691 | ) -> Result { |
| 692 | panic!(concat!( |
| 693 | "Unable to load ", |
| 694 | stringify!(invalidate_mapped_memory_ranges) |
| 695 | )) |
| 696 | } |
| 697 | let cname = |
| 698 | CStr::from_bytes_with_nul_unchecked(b"vkInvalidateMappedMemoryRanges\0"); |
| 699 | let val = _f(cname); |
| 700 | if val.is_null() { |
| 701 | invalidate_mapped_memory_ranges |
| 702 | } else { |
| 703 | ::core::mem::transmute(val) |
| 704 | } |
| 705 | }, |
| 706 | get_device_memory_commitment: unsafe { |
| 707 | unsafe extern "system" fn get_device_memory_commitment( |
| 708 | _device: crate::vk::Device, |
| 709 | _memory: DeviceMemory, |
| 710 | _p_committed_memory_in_bytes: *mut DeviceSize, |
| 711 | ) { |
| 712 | panic!(concat!( |
| 713 | "Unable to load ", |
| 714 | stringify!(get_device_memory_commitment) |
| 715 | )) |
| 716 | } |
| 717 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetDeviceMemoryCommitment\0"); |
| 718 | let val = _f(cname); |
| 719 | if val.is_null() { |
| 720 | get_device_memory_commitment |
| 721 | } else { |
| 722 | ::core::mem::transmute(val) |
| 723 | } |
| 724 | }, |
| 725 | bind_buffer_memory: unsafe { |
| 726 | unsafe extern "system" fn bind_buffer_memory( |
| 727 | _device: crate::vk::Device, |
| 728 | _buffer: Buffer, |
| 729 | _memory: DeviceMemory, |
| 730 | _memory_offset: DeviceSize, |
| 731 | ) -> Result { |
| 732 | panic!(concat!("Unable to load ", stringify!(bind_buffer_memory))) |
| 733 | } |
| 734 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkBindBufferMemory\0"); |
| 735 | let val = _f(cname); |
| 736 | if val.is_null() { |
| 737 | bind_buffer_memory |
| 738 | } else { |
| 739 | ::core::mem::transmute(val) |
| 740 | } |
| 741 | }, |
| 742 | bind_image_memory: unsafe { |
| 743 | unsafe extern "system" fn bind_image_memory( |
| 744 | _device: crate::vk::Device, |
| 745 | _image: Image, |
| 746 | _memory: DeviceMemory, |
| 747 | _memory_offset: DeviceSize, |
| 748 | ) -> Result { |
| 749 | panic!(concat!("Unable to load ", stringify!(bind_image_memory))) |
| 750 | } |
| 751 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkBindImageMemory\0"); |
| 752 | let val = _f(cname); |
| 753 | if val.is_null() { |
| 754 | bind_image_memory |
| 755 | } else { |
| 756 | ::core::mem::transmute(val) |
| 757 | } |
| 758 | }, |
| 759 | get_buffer_memory_requirements: unsafe { |
| 760 | unsafe extern "system" fn get_buffer_memory_requirements( |
| 761 | _device: crate::vk::Device, |
| 762 | _buffer: Buffer, |
| 763 | _p_memory_requirements: *mut MemoryRequirements, |
| 764 | ) { |
| 765 | panic!(concat!( |
| 766 | "Unable to load ", |
| 767 | stringify!(get_buffer_memory_requirements) |
| 768 | )) |
| 769 | } |
| 770 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetBufferMemoryRequirements\0"); |
| 771 | let val = _f(cname); |
| 772 | if val.is_null() { |
| 773 | get_buffer_memory_requirements |
| 774 | } else { |
| 775 | ::core::mem::transmute(val) |
| 776 | } |
| 777 | }, |
| 778 | get_image_memory_requirements: unsafe { |
| 779 | unsafe extern "system" fn get_image_memory_requirements( |
| 780 | _device: crate::vk::Device, |
| 781 | _image: Image, |
| 782 | _p_memory_requirements: *mut MemoryRequirements, |
| 783 | ) { |
| 784 | panic!(concat!( |
| 785 | "Unable to load ", |
| 786 | stringify!(get_image_memory_requirements) |
| 787 | )) |
| 788 | } |
| 789 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetImageMemoryRequirements\0"); |
| 790 | let val = _f(cname); |
| 791 | if val.is_null() { |
| 792 | get_image_memory_requirements |
| 793 | } else { |
| 794 | ::core::mem::transmute(val) |
| 795 | } |
| 796 | }, |
| 797 | get_image_sparse_memory_requirements: unsafe { |
| 798 | unsafe extern "system" fn get_image_sparse_memory_requirements( |
| 799 | _device: crate::vk::Device, |
| 800 | _image: Image, |
| 801 | _p_sparse_memory_requirement_count: *mut u32, |
| 802 | _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements, |
| 803 | ) { |
| 804 | panic!(concat!( |
| 805 | "Unable to load ", |
| 806 | stringify!(get_image_sparse_memory_requirements) |
| 807 | )) |
| 808 | } |
| 809 | let cname = |
| 810 | CStr::from_bytes_with_nul_unchecked(b"vkGetImageSparseMemoryRequirements\0"); |
| 811 | let val = _f(cname); |
| 812 | if val.is_null() { |
| 813 | get_image_sparse_memory_requirements |
| 814 | } else { |
| 815 | ::core::mem::transmute(val) |
| 816 | } |
| 817 | }, |
| 818 | queue_bind_sparse: unsafe { |
| 819 | unsafe extern "system" fn queue_bind_sparse( |
| 820 | _queue: Queue, |
| 821 | _bind_info_count: u32, |
| 822 | _p_bind_info: *const BindSparseInfo<'_>, |
| 823 | _fence: Fence, |
| 824 | ) -> Result { |
| 825 | panic!(concat!("Unable to load ", stringify!(queue_bind_sparse))) |
| 826 | } |
| 827 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkQueueBindSparse\0"); |
| 828 | let val = _f(cname); |
| 829 | if val.is_null() { |
| 830 | queue_bind_sparse |
| 831 | } else { |
| 832 | ::core::mem::transmute(val) |
| 833 | } |
| 834 | }, |
| 835 | create_fence: unsafe { |
| 836 | unsafe extern "system" fn create_fence( |
| 837 | _device: crate::vk::Device, |
| 838 | _p_create_info: *const FenceCreateInfo<'_>, |
| 839 | _p_allocator: *const AllocationCallbacks<'_>, |
| 840 | _p_fence: *mut Fence, |
| 841 | ) -> Result { |
| 842 | panic!(concat!("Unable to load ", stringify!(create_fence))) |
| 843 | } |
| 844 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateFence\0"); |
| 845 | let val = _f(cname); |
| 846 | if val.is_null() { |
| 847 | create_fence |
| 848 | } else { |
| 849 | ::core::mem::transmute(val) |
| 850 | } |
| 851 | }, |
| 852 | destroy_fence: unsafe { |
| 853 | unsafe extern "system" fn destroy_fence( |
| 854 | _device: crate::vk::Device, |
| 855 | _fence: Fence, |
| 856 | _p_allocator: *const AllocationCallbacks<'_>, |
| 857 | ) { |
| 858 | panic!(concat!("Unable to load ", stringify!(destroy_fence))) |
| 859 | } |
| 860 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyFence\0"); |
| 861 | let val = _f(cname); |
| 862 | if val.is_null() { |
| 863 | destroy_fence |
| 864 | } else { |
| 865 | ::core::mem::transmute(val) |
| 866 | } |
| 867 | }, |
| 868 | reset_fences: unsafe { |
| 869 | unsafe extern "system" fn reset_fences( |
| 870 | _device: crate::vk::Device, |
| 871 | _fence_count: u32, |
| 872 | _p_fences: *const Fence, |
| 873 | ) -> Result { |
| 874 | panic!(concat!("Unable to load ", stringify!(reset_fences))) |
| 875 | } |
| 876 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkResetFences\0"); |
| 877 | let val = _f(cname); |
| 878 | if val.is_null() { |
| 879 | reset_fences |
| 880 | } else { |
| 881 | ::core::mem::transmute(val) |
| 882 | } |
| 883 | }, |
| 884 | get_fence_status: unsafe { |
| 885 | unsafe extern "system" fn get_fence_status( |
| 886 | _device: crate::vk::Device, |
| 887 | _fence: Fence, |
| 888 | ) -> Result { |
| 889 | panic!(concat!("Unable to load ", stringify!(get_fence_status))) |
| 890 | } |
| 891 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetFenceStatus\0"); |
| 892 | let val = _f(cname); |
| 893 | if val.is_null() { |
| 894 | get_fence_status |
| 895 | } else { |
| 896 | ::core::mem::transmute(val) |
| 897 | } |
| 898 | }, |
| 899 | wait_for_fences: unsafe { |
| 900 | unsafe extern "system" fn wait_for_fences( |
| 901 | _device: crate::vk::Device, |
| 902 | _fence_count: u32, |
| 903 | _p_fences: *const Fence, |
| 904 | _wait_all: Bool32, |
| 905 | _timeout: u64, |
| 906 | ) -> Result { |
| 907 | panic!(concat!("Unable to load ", stringify!(wait_for_fences))) |
| 908 | } |
| 909 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkWaitForFences\0"); |
| 910 | let val = _f(cname); |
| 911 | if val.is_null() { |
| 912 | wait_for_fences |
| 913 | } else { |
| 914 | ::core::mem::transmute(val) |
| 915 | } |
| 916 | }, |
| 917 | create_semaphore: unsafe { |
| 918 | unsafe extern "system" fn create_semaphore( |
| 919 | _device: crate::vk::Device, |
| 920 | _p_create_info: *const SemaphoreCreateInfo<'_>, |
| 921 | _p_allocator: *const AllocationCallbacks<'_>, |
| 922 | _p_semaphore: *mut Semaphore, |
| 923 | ) -> Result { |
| 924 | panic!(concat!("Unable to load ", stringify!(create_semaphore))) |
| 925 | } |
| 926 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateSemaphore\0"); |
| 927 | let val = _f(cname); |
| 928 | if val.is_null() { |
| 929 | create_semaphore |
| 930 | } else { |
| 931 | ::core::mem::transmute(val) |
| 932 | } |
| 933 | }, |
| 934 | destroy_semaphore: unsafe { |
| 935 | unsafe extern "system" fn destroy_semaphore( |
| 936 | _device: crate::vk::Device, |
| 937 | _semaphore: Semaphore, |
| 938 | _p_allocator: *const AllocationCallbacks<'_>, |
| 939 | ) { |
| 940 | panic!(concat!("Unable to load ", stringify!(destroy_semaphore))) |
| 941 | } |
| 942 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroySemaphore\0"); |
| 943 | let val = _f(cname); |
| 944 | if val.is_null() { |
| 945 | destroy_semaphore |
| 946 | } else { |
| 947 | ::core::mem::transmute(val) |
| 948 | } |
| 949 | }, |
| 950 | create_event: unsafe { |
| 951 | unsafe extern "system" fn create_event( |
| 952 | _device: crate::vk::Device, |
| 953 | _p_create_info: *const EventCreateInfo<'_>, |
| 954 | _p_allocator: *const AllocationCallbacks<'_>, |
| 955 | _p_event: *mut Event, |
| 956 | ) -> Result { |
| 957 | panic!(concat!("Unable to load ", stringify!(create_event))) |
| 958 | } |
| 959 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateEvent\0"); |
| 960 | let val = _f(cname); |
| 961 | if val.is_null() { |
| 962 | create_event |
| 963 | } else { |
| 964 | ::core::mem::transmute(val) |
| 965 | } |
| 966 | }, |
| 967 | destroy_event: unsafe { |
| 968 | unsafe extern "system" fn destroy_event( |
| 969 | _device: crate::vk::Device, |
| 970 | _event: Event, |
| 971 | _p_allocator: *const AllocationCallbacks<'_>, |
| 972 | ) { |
| 973 | panic!(concat!("Unable to load ", stringify!(destroy_event))) |
| 974 | } |
| 975 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyEvent\0"); |
| 976 | let val = _f(cname); |
| 977 | if val.is_null() { |
| 978 | destroy_event |
| 979 | } else { |
| 980 | ::core::mem::transmute(val) |
| 981 | } |
| 982 | }, |
| 983 | get_event_status: unsafe { |
| 984 | unsafe extern "system" fn get_event_status( |
| 985 | _device: crate::vk::Device, |
| 986 | _event: Event, |
| 987 | ) -> Result { |
| 988 | panic!(concat!("Unable to load ", stringify!(get_event_status))) |
| 989 | } |
| 990 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetEventStatus\0"); |
| 991 | let val = _f(cname); |
| 992 | if val.is_null() { |
| 993 | get_event_status |
| 994 | } else { |
| 995 | ::core::mem::transmute(val) |
| 996 | } |
| 997 | }, |
| 998 | set_event: unsafe { |
| 999 | unsafe extern "system" fn set_event( |
| 1000 | _device: crate::vk::Device, |
| 1001 | _event: Event, |
| 1002 | ) -> Result { |
| 1003 | panic!(concat!("Unable to load ", stringify!(set_event))) |
| 1004 | } |
| 1005 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkSetEvent\0"); |
| 1006 | let val = _f(cname); |
| 1007 | if val.is_null() { |
| 1008 | set_event |
| 1009 | } else { |
| 1010 | ::core::mem::transmute(val) |
| 1011 | } |
| 1012 | }, |
| 1013 | reset_event: unsafe { |
| 1014 | unsafe extern "system" fn reset_event( |
| 1015 | _device: crate::vk::Device, |
| 1016 | _event: Event, |
| 1017 | ) -> Result { |
| 1018 | panic!(concat!("Unable to load ", stringify!(reset_event))) |
| 1019 | } |
| 1020 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkResetEvent\0"); |
| 1021 | let val = _f(cname); |
| 1022 | if val.is_null() { |
| 1023 | reset_event |
| 1024 | } else { |
| 1025 | ::core::mem::transmute(val) |
| 1026 | } |
| 1027 | }, |
| 1028 | create_query_pool: unsafe { |
| 1029 | unsafe extern "system" fn create_query_pool( |
| 1030 | _device: crate::vk::Device, |
| 1031 | _p_create_info: *const QueryPoolCreateInfo<'_>, |
| 1032 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1033 | _p_query_pool: *mut QueryPool, |
| 1034 | ) -> Result { |
| 1035 | panic!(concat!("Unable to load ", stringify!(create_query_pool))) |
| 1036 | } |
| 1037 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateQueryPool\0"); |
| 1038 | let val = _f(cname); |
| 1039 | if val.is_null() { |
| 1040 | create_query_pool |
| 1041 | } else { |
| 1042 | ::core::mem::transmute(val) |
| 1043 | } |
| 1044 | }, |
| 1045 | destroy_query_pool: unsafe { |
| 1046 | unsafe extern "system" fn destroy_query_pool( |
| 1047 | _device: crate::vk::Device, |
| 1048 | _query_pool: QueryPool, |
| 1049 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1050 | ) { |
| 1051 | panic!(concat!("Unable to load ", stringify!(destroy_query_pool))) |
| 1052 | } |
| 1053 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyQueryPool\0"); |
| 1054 | let val = _f(cname); |
| 1055 | if val.is_null() { |
| 1056 | destroy_query_pool |
| 1057 | } else { |
| 1058 | ::core::mem::transmute(val) |
| 1059 | } |
| 1060 | }, |
| 1061 | get_query_pool_results: unsafe { |
| 1062 | unsafe extern "system" fn get_query_pool_results( |
| 1063 | _device: crate::vk::Device, |
| 1064 | _query_pool: QueryPool, |
| 1065 | _first_query: u32, |
| 1066 | _query_count: u32, |
| 1067 | _data_size: usize, |
| 1068 | _p_data: *mut c_void, |
| 1069 | _stride: DeviceSize, |
| 1070 | _flags: QueryResultFlags, |
| 1071 | ) -> Result { |
| 1072 | panic!(concat!( |
| 1073 | "Unable to load ", |
| 1074 | stringify!(get_query_pool_results) |
| 1075 | )) |
| 1076 | } |
| 1077 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetQueryPoolResults\0"); |
| 1078 | let val = _f(cname); |
| 1079 | if val.is_null() { |
| 1080 | get_query_pool_results |
| 1081 | } else { |
| 1082 | ::core::mem::transmute(val) |
| 1083 | } |
| 1084 | }, |
| 1085 | create_buffer: unsafe { |
| 1086 | unsafe extern "system" fn create_buffer( |
| 1087 | _device: crate::vk::Device, |
| 1088 | _p_create_info: *const BufferCreateInfo<'_>, |
| 1089 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1090 | _p_buffer: *mut Buffer, |
| 1091 | ) -> Result { |
| 1092 | panic!(concat!("Unable to load ", stringify!(create_buffer))) |
| 1093 | } |
| 1094 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateBuffer\0"); |
| 1095 | let val = _f(cname); |
| 1096 | if val.is_null() { |
| 1097 | create_buffer |
| 1098 | } else { |
| 1099 | ::core::mem::transmute(val) |
| 1100 | } |
| 1101 | }, |
| 1102 | destroy_buffer: unsafe { |
| 1103 | unsafe extern "system" fn destroy_buffer( |
| 1104 | _device: crate::vk::Device, |
| 1105 | _buffer: Buffer, |
| 1106 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1107 | ) { |
| 1108 | panic!(concat!("Unable to load ", stringify!(destroy_buffer))) |
| 1109 | } |
| 1110 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyBuffer\0"); |
| 1111 | let val = _f(cname); |
| 1112 | if val.is_null() { |
| 1113 | destroy_buffer |
| 1114 | } else { |
| 1115 | ::core::mem::transmute(val) |
| 1116 | } |
| 1117 | }, |
| 1118 | create_buffer_view: unsafe { |
| 1119 | unsafe extern "system" fn create_buffer_view( |
| 1120 | _device: crate::vk::Device, |
| 1121 | _p_create_info: *const BufferViewCreateInfo<'_>, |
| 1122 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1123 | _p_view: *mut BufferView, |
| 1124 | ) -> Result { |
| 1125 | panic!(concat!("Unable to load ", stringify!(create_buffer_view))) |
| 1126 | } |
| 1127 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateBufferView\0"); |
| 1128 | let val = _f(cname); |
| 1129 | if val.is_null() { |
| 1130 | create_buffer_view |
| 1131 | } else { |
| 1132 | ::core::mem::transmute(val) |
| 1133 | } |
| 1134 | }, |
| 1135 | destroy_buffer_view: unsafe { |
| 1136 | unsafe extern "system" fn destroy_buffer_view( |
| 1137 | _device: crate::vk::Device, |
| 1138 | _buffer_view: BufferView, |
| 1139 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1140 | ) { |
| 1141 | panic!(concat!("Unable to load ", stringify!(destroy_buffer_view))) |
| 1142 | } |
| 1143 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyBufferView\0"); |
| 1144 | let val = _f(cname); |
| 1145 | if val.is_null() { |
| 1146 | destroy_buffer_view |
| 1147 | } else { |
| 1148 | ::core::mem::transmute(val) |
| 1149 | } |
| 1150 | }, |
| 1151 | create_image: unsafe { |
| 1152 | unsafe extern "system" fn create_image( |
| 1153 | _device: crate::vk::Device, |
| 1154 | _p_create_info: *const ImageCreateInfo<'_>, |
| 1155 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1156 | _p_image: *mut Image, |
| 1157 | ) -> Result { |
| 1158 | panic!(concat!("Unable to load ", stringify!(create_image))) |
| 1159 | } |
| 1160 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateImage\0"); |
| 1161 | let val = _f(cname); |
| 1162 | if val.is_null() { |
| 1163 | create_image |
| 1164 | } else { |
| 1165 | ::core::mem::transmute(val) |
| 1166 | } |
| 1167 | }, |
| 1168 | destroy_image: unsafe { |
| 1169 | unsafe extern "system" fn destroy_image( |
| 1170 | _device: crate::vk::Device, |
| 1171 | _image: Image, |
| 1172 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1173 | ) { |
| 1174 | panic!(concat!("Unable to load ", stringify!(destroy_image))) |
| 1175 | } |
| 1176 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyImage\0"); |
| 1177 | let val = _f(cname); |
| 1178 | if val.is_null() { |
| 1179 | destroy_image |
| 1180 | } else { |
| 1181 | ::core::mem::transmute(val) |
| 1182 | } |
| 1183 | }, |
| 1184 | get_image_subresource_layout: unsafe { |
| 1185 | unsafe extern "system" fn get_image_subresource_layout( |
| 1186 | _device: crate::vk::Device, |
| 1187 | _image: Image, |
| 1188 | _p_subresource: *const ImageSubresource, |
| 1189 | _p_layout: *mut SubresourceLayout, |
| 1190 | ) { |
| 1191 | panic!(concat!( |
| 1192 | "Unable to load ", |
| 1193 | stringify!(get_image_subresource_layout) |
| 1194 | )) |
| 1195 | } |
| 1196 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetImageSubresourceLayout\0"); |
| 1197 | let val = _f(cname); |
| 1198 | if val.is_null() { |
| 1199 | get_image_subresource_layout |
| 1200 | } else { |
| 1201 | ::core::mem::transmute(val) |
| 1202 | } |
| 1203 | }, |
| 1204 | create_image_view: unsafe { |
| 1205 | unsafe extern "system" fn create_image_view( |
| 1206 | _device: crate::vk::Device, |
| 1207 | _p_create_info: *const ImageViewCreateInfo<'_>, |
| 1208 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1209 | _p_view: *mut ImageView, |
| 1210 | ) -> Result { |
| 1211 | panic!(concat!("Unable to load ", stringify!(create_image_view))) |
| 1212 | } |
| 1213 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateImageView\0"); |
| 1214 | let val = _f(cname); |
| 1215 | if val.is_null() { |
| 1216 | create_image_view |
| 1217 | } else { |
| 1218 | ::core::mem::transmute(val) |
| 1219 | } |
| 1220 | }, |
| 1221 | destroy_image_view: unsafe { |
| 1222 | unsafe extern "system" fn destroy_image_view( |
| 1223 | _device: crate::vk::Device, |
| 1224 | _image_view: ImageView, |
| 1225 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1226 | ) { |
| 1227 | panic!(concat!("Unable to load ", stringify!(destroy_image_view))) |
| 1228 | } |
| 1229 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyImageView\0"); |
| 1230 | let val = _f(cname); |
| 1231 | if val.is_null() { |
| 1232 | destroy_image_view |
| 1233 | } else { |
| 1234 | ::core::mem::transmute(val) |
| 1235 | } |
| 1236 | }, |
| 1237 | create_shader_module: unsafe { |
| 1238 | unsafe extern "system" fn create_shader_module( |
| 1239 | _device: crate::vk::Device, |
| 1240 | _p_create_info: *const ShaderModuleCreateInfo<'_>, |
| 1241 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1242 | _p_shader_module: *mut ShaderModule, |
| 1243 | ) -> Result { |
| 1244 | panic!(concat!("Unable to load ", stringify!(create_shader_module))) |
| 1245 | } |
| 1246 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateShaderModule\0"); |
| 1247 | let val = _f(cname); |
| 1248 | if val.is_null() { |
| 1249 | create_shader_module |
| 1250 | } else { |
| 1251 | ::core::mem::transmute(val) |
| 1252 | } |
| 1253 | }, |
| 1254 | destroy_shader_module: unsafe { |
| 1255 | unsafe extern "system" fn destroy_shader_module( |
| 1256 | _device: crate::vk::Device, |
| 1257 | _shader_module: ShaderModule, |
| 1258 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1259 | ) { |
| 1260 | panic!(concat!( |
| 1261 | "Unable to load ", |
| 1262 | stringify!(destroy_shader_module) |
| 1263 | )) |
| 1264 | } |
| 1265 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyShaderModule\0"); |
| 1266 | let val = _f(cname); |
| 1267 | if val.is_null() { |
| 1268 | destroy_shader_module |
| 1269 | } else { |
| 1270 | ::core::mem::transmute(val) |
| 1271 | } |
| 1272 | }, |
| 1273 | create_pipeline_cache: unsafe { |
| 1274 | unsafe extern "system" fn create_pipeline_cache( |
| 1275 | _device: crate::vk::Device, |
| 1276 | _p_create_info: *const PipelineCacheCreateInfo<'_>, |
| 1277 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1278 | _p_pipeline_cache: *mut PipelineCache, |
| 1279 | ) -> Result { |
| 1280 | panic!(concat!( |
| 1281 | "Unable to load ", |
| 1282 | stringify!(create_pipeline_cache) |
| 1283 | )) |
| 1284 | } |
| 1285 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreatePipelineCache\0"); |
| 1286 | let val = _f(cname); |
| 1287 | if val.is_null() { |
| 1288 | create_pipeline_cache |
| 1289 | } else { |
| 1290 | ::core::mem::transmute(val) |
| 1291 | } |
| 1292 | }, |
| 1293 | destroy_pipeline_cache: unsafe { |
| 1294 | unsafe extern "system" fn destroy_pipeline_cache( |
| 1295 | _device: crate::vk::Device, |
| 1296 | _pipeline_cache: PipelineCache, |
| 1297 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1298 | ) { |
| 1299 | panic!(concat!( |
| 1300 | "Unable to load ", |
| 1301 | stringify!(destroy_pipeline_cache) |
| 1302 | )) |
| 1303 | } |
| 1304 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyPipelineCache\0"); |
| 1305 | let val = _f(cname); |
| 1306 | if val.is_null() { |
| 1307 | destroy_pipeline_cache |
| 1308 | } else { |
| 1309 | ::core::mem::transmute(val) |
| 1310 | } |
| 1311 | }, |
| 1312 | get_pipeline_cache_data: unsafe { |
| 1313 | unsafe extern "system" fn get_pipeline_cache_data( |
| 1314 | _device: crate::vk::Device, |
| 1315 | _pipeline_cache: PipelineCache, |
| 1316 | _p_data_size: *mut usize, |
| 1317 | _p_data: *mut c_void, |
| 1318 | ) -> Result { |
| 1319 | panic!(concat!( |
| 1320 | "Unable to load ", |
| 1321 | stringify!(get_pipeline_cache_data) |
| 1322 | )) |
| 1323 | } |
| 1324 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetPipelineCacheData\0"); |
| 1325 | let val = _f(cname); |
| 1326 | if val.is_null() { |
| 1327 | get_pipeline_cache_data |
| 1328 | } else { |
| 1329 | ::core::mem::transmute(val) |
| 1330 | } |
| 1331 | }, |
| 1332 | merge_pipeline_caches: unsafe { |
| 1333 | unsafe extern "system" fn merge_pipeline_caches( |
| 1334 | _device: crate::vk::Device, |
| 1335 | _dst_cache: PipelineCache, |
| 1336 | _src_cache_count: u32, |
| 1337 | _p_src_caches: *const PipelineCache, |
| 1338 | ) -> Result { |
| 1339 | panic!(concat!( |
| 1340 | "Unable to load ", |
| 1341 | stringify!(merge_pipeline_caches) |
| 1342 | )) |
| 1343 | } |
| 1344 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkMergePipelineCaches\0"); |
| 1345 | let val = _f(cname); |
| 1346 | if val.is_null() { |
| 1347 | merge_pipeline_caches |
| 1348 | } else { |
| 1349 | ::core::mem::transmute(val) |
| 1350 | } |
| 1351 | }, |
| 1352 | create_graphics_pipelines: unsafe { |
| 1353 | unsafe extern "system" fn create_graphics_pipelines( |
| 1354 | _device: crate::vk::Device, |
| 1355 | _pipeline_cache: PipelineCache, |
| 1356 | _create_info_count: u32, |
| 1357 | _p_create_infos: *const GraphicsPipelineCreateInfo<'_>, |
| 1358 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1359 | _p_pipelines: *mut Pipeline, |
| 1360 | ) -> Result { |
| 1361 | panic!(concat!( |
| 1362 | "Unable to load ", |
| 1363 | stringify!(create_graphics_pipelines) |
| 1364 | )) |
| 1365 | } |
| 1366 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateGraphicsPipelines\0"); |
| 1367 | let val = _f(cname); |
| 1368 | if val.is_null() { |
| 1369 | create_graphics_pipelines |
| 1370 | } else { |
| 1371 | ::core::mem::transmute(val) |
| 1372 | } |
| 1373 | }, |
| 1374 | create_compute_pipelines: unsafe { |
| 1375 | unsafe extern "system" fn create_compute_pipelines( |
| 1376 | _device: crate::vk::Device, |
| 1377 | _pipeline_cache: PipelineCache, |
| 1378 | _create_info_count: u32, |
| 1379 | _p_create_infos: *const ComputePipelineCreateInfo<'_>, |
| 1380 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1381 | _p_pipelines: *mut Pipeline, |
| 1382 | ) -> Result { |
| 1383 | panic!(concat!( |
| 1384 | "Unable to load ", |
| 1385 | stringify!(create_compute_pipelines) |
| 1386 | )) |
| 1387 | } |
| 1388 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateComputePipelines\0"); |
| 1389 | let val = _f(cname); |
| 1390 | if val.is_null() { |
| 1391 | create_compute_pipelines |
| 1392 | } else { |
| 1393 | ::core::mem::transmute(val) |
| 1394 | } |
| 1395 | }, |
| 1396 | destroy_pipeline: unsafe { |
| 1397 | unsafe extern "system" fn destroy_pipeline( |
| 1398 | _device: crate::vk::Device, |
| 1399 | _pipeline: Pipeline, |
| 1400 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1401 | ) { |
| 1402 | panic!(concat!("Unable to load ", stringify!(destroy_pipeline))) |
| 1403 | } |
| 1404 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyPipeline\0"); |
| 1405 | let val = _f(cname); |
| 1406 | if val.is_null() { |
| 1407 | destroy_pipeline |
| 1408 | } else { |
| 1409 | ::core::mem::transmute(val) |
| 1410 | } |
| 1411 | }, |
| 1412 | create_pipeline_layout: unsafe { |
| 1413 | unsafe extern "system" fn create_pipeline_layout( |
| 1414 | _device: crate::vk::Device, |
| 1415 | _p_create_info: *const PipelineLayoutCreateInfo<'_>, |
| 1416 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1417 | _p_pipeline_layout: *mut PipelineLayout, |
| 1418 | ) -> Result { |
| 1419 | panic!(concat!( |
| 1420 | "Unable to load ", |
| 1421 | stringify!(create_pipeline_layout) |
| 1422 | )) |
| 1423 | } |
| 1424 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreatePipelineLayout\0"); |
| 1425 | let val = _f(cname); |
| 1426 | if val.is_null() { |
| 1427 | create_pipeline_layout |
| 1428 | } else { |
| 1429 | ::core::mem::transmute(val) |
| 1430 | } |
| 1431 | }, |
| 1432 | destroy_pipeline_layout: unsafe { |
| 1433 | unsafe extern "system" fn destroy_pipeline_layout( |
| 1434 | _device: crate::vk::Device, |
| 1435 | _pipeline_layout: PipelineLayout, |
| 1436 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1437 | ) { |
| 1438 | panic!(concat!( |
| 1439 | "Unable to load ", |
| 1440 | stringify!(destroy_pipeline_layout) |
| 1441 | )) |
| 1442 | } |
| 1443 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyPipelineLayout\0"); |
| 1444 | let val = _f(cname); |
| 1445 | if val.is_null() { |
| 1446 | destroy_pipeline_layout |
| 1447 | } else { |
| 1448 | ::core::mem::transmute(val) |
| 1449 | } |
| 1450 | }, |
| 1451 | create_sampler: unsafe { |
| 1452 | unsafe extern "system" fn create_sampler( |
| 1453 | _device: crate::vk::Device, |
| 1454 | _p_create_info: *const SamplerCreateInfo<'_>, |
| 1455 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1456 | _p_sampler: *mut Sampler, |
| 1457 | ) -> Result { |
| 1458 | panic!(concat!("Unable to load ", stringify!(create_sampler))) |
| 1459 | } |
| 1460 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateSampler\0"); |
| 1461 | let val = _f(cname); |
| 1462 | if val.is_null() { |
| 1463 | create_sampler |
| 1464 | } else { |
| 1465 | ::core::mem::transmute(val) |
| 1466 | } |
| 1467 | }, |
| 1468 | destroy_sampler: unsafe { |
| 1469 | unsafe extern "system" fn destroy_sampler( |
| 1470 | _device: crate::vk::Device, |
| 1471 | _sampler: Sampler, |
| 1472 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1473 | ) { |
| 1474 | panic!(concat!("Unable to load ", stringify!(destroy_sampler))) |
| 1475 | } |
| 1476 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroySampler\0"); |
| 1477 | let val = _f(cname); |
| 1478 | if val.is_null() { |
| 1479 | destroy_sampler |
| 1480 | } else { |
| 1481 | ::core::mem::transmute(val) |
| 1482 | } |
| 1483 | }, |
| 1484 | create_descriptor_set_layout: unsafe { |
| 1485 | unsafe extern "system" fn create_descriptor_set_layout( |
| 1486 | _device: crate::vk::Device, |
| 1487 | _p_create_info: *const DescriptorSetLayoutCreateInfo<'_>, |
| 1488 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1489 | _p_set_layout: *mut DescriptorSetLayout, |
| 1490 | ) -> Result { |
| 1491 | panic!(concat!( |
| 1492 | "Unable to load ", |
| 1493 | stringify!(create_descriptor_set_layout) |
| 1494 | )) |
| 1495 | } |
| 1496 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateDescriptorSetLayout\0"); |
| 1497 | let val = _f(cname); |
| 1498 | if val.is_null() { |
| 1499 | create_descriptor_set_layout |
| 1500 | } else { |
| 1501 | ::core::mem::transmute(val) |
| 1502 | } |
| 1503 | }, |
| 1504 | destroy_descriptor_set_layout: unsafe { |
| 1505 | unsafe extern "system" fn destroy_descriptor_set_layout( |
| 1506 | _device: crate::vk::Device, |
| 1507 | _descriptor_set_layout: DescriptorSetLayout, |
| 1508 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1509 | ) { |
| 1510 | panic!(concat!( |
| 1511 | "Unable to load ", |
| 1512 | stringify!(destroy_descriptor_set_layout) |
| 1513 | )) |
| 1514 | } |
| 1515 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyDescriptorSetLayout\0"); |
| 1516 | let val = _f(cname); |
| 1517 | if val.is_null() { |
| 1518 | destroy_descriptor_set_layout |
| 1519 | } else { |
| 1520 | ::core::mem::transmute(val) |
| 1521 | } |
| 1522 | }, |
| 1523 | create_descriptor_pool: unsafe { |
| 1524 | unsafe extern "system" fn create_descriptor_pool( |
| 1525 | _device: crate::vk::Device, |
| 1526 | _p_create_info: *const DescriptorPoolCreateInfo<'_>, |
| 1527 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1528 | _p_descriptor_pool: *mut DescriptorPool, |
| 1529 | ) -> Result { |
| 1530 | panic!(concat!( |
| 1531 | "Unable to load ", |
| 1532 | stringify!(create_descriptor_pool) |
| 1533 | )) |
| 1534 | } |
| 1535 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateDescriptorPool\0"); |
| 1536 | let val = _f(cname); |
| 1537 | if val.is_null() { |
| 1538 | create_descriptor_pool |
| 1539 | } else { |
| 1540 | ::core::mem::transmute(val) |
| 1541 | } |
| 1542 | }, |
| 1543 | destroy_descriptor_pool: unsafe { |
| 1544 | unsafe extern "system" fn destroy_descriptor_pool( |
| 1545 | _device: crate::vk::Device, |
| 1546 | _descriptor_pool: DescriptorPool, |
| 1547 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1548 | ) { |
| 1549 | panic!(concat!( |
| 1550 | "Unable to load ", |
| 1551 | stringify!(destroy_descriptor_pool) |
| 1552 | )) |
| 1553 | } |
| 1554 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyDescriptorPool\0"); |
| 1555 | let val = _f(cname); |
| 1556 | if val.is_null() { |
| 1557 | destroy_descriptor_pool |
| 1558 | } else { |
| 1559 | ::core::mem::transmute(val) |
| 1560 | } |
| 1561 | }, |
| 1562 | reset_descriptor_pool: unsafe { |
| 1563 | unsafe extern "system" fn reset_descriptor_pool( |
| 1564 | _device: crate::vk::Device, |
| 1565 | _descriptor_pool: DescriptorPool, |
| 1566 | _flags: DescriptorPoolResetFlags, |
| 1567 | ) -> Result { |
| 1568 | panic!(concat!( |
| 1569 | "Unable to load ", |
| 1570 | stringify!(reset_descriptor_pool) |
| 1571 | )) |
| 1572 | } |
| 1573 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkResetDescriptorPool\0"); |
| 1574 | let val = _f(cname); |
| 1575 | if val.is_null() { |
| 1576 | reset_descriptor_pool |
| 1577 | } else { |
| 1578 | ::core::mem::transmute(val) |
| 1579 | } |
| 1580 | }, |
| 1581 | allocate_descriptor_sets: unsafe { |
| 1582 | unsafe extern "system" fn allocate_descriptor_sets( |
| 1583 | _device: crate::vk::Device, |
| 1584 | _p_allocate_info: *const DescriptorSetAllocateInfo<'_>, |
| 1585 | _p_descriptor_sets: *mut DescriptorSet, |
| 1586 | ) -> Result { |
| 1587 | panic!(concat!( |
| 1588 | "Unable to load ", |
| 1589 | stringify!(allocate_descriptor_sets) |
| 1590 | )) |
| 1591 | } |
| 1592 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkAllocateDescriptorSets\0"); |
| 1593 | let val = _f(cname); |
| 1594 | if val.is_null() { |
| 1595 | allocate_descriptor_sets |
| 1596 | } else { |
| 1597 | ::core::mem::transmute(val) |
| 1598 | } |
| 1599 | }, |
| 1600 | free_descriptor_sets: unsafe { |
| 1601 | unsafe extern "system" fn free_descriptor_sets( |
| 1602 | _device: crate::vk::Device, |
| 1603 | _descriptor_pool: DescriptorPool, |
| 1604 | _descriptor_set_count: u32, |
| 1605 | _p_descriptor_sets: *const DescriptorSet, |
| 1606 | ) -> Result { |
| 1607 | panic!(concat!("Unable to load ", stringify!(free_descriptor_sets))) |
| 1608 | } |
| 1609 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkFreeDescriptorSets\0"); |
| 1610 | let val = _f(cname); |
| 1611 | if val.is_null() { |
| 1612 | free_descriptor_sets |
| 1613 | } else { |
| 1614 | ::core::mem::transmute(val) |
| 1615 | } |
| 1616 | }, |
| 1617 | update_descriptor_sets: unsafe { |
| 1618 | unsafe extern "system" fn update_descriptor_sets( |
| 1619 | _device: crate::vk::Device, |
| 1620 | _descriptor_write_count: u32, |
| 1621 | _p_descriptor_writes: *const WriteDescriptorSet<'_>, |
| 1622 | _descriptor_copy_count: u32, |
| 1623 | _p_descriptor_copies: *const CopyDescriptorSet<'_>, |
| 1624 | ) { |
| 1625 | panic!(concat!( |
| 1626 | "Unable to load ", |
| 1627 | stringify!(update_descriptor_sets) |
| 1628 | )) |
| 1629 | } |
| 1630 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkUpdateDescriptorSets\0"); |
| 1631 | let val = _f(cname); |
| 1632 | if val.is_null() { |
| 1633 | update_descriptor_sets |
| 1634 | } else { |
| 1635 | ::core::mem::transmute(val) |
| 1636 | } |
| 1637 | }, |
| 1638 | create_framebuffer: unsafe { |
| 1639 | unsafe extern "system" fn create_framebuffer( |
| 1640 | _device: crate::vk::Device, |
| 1641 | _p_create_info: *const FramebufferCreateInfo<'_>, |
| 1642 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1643 | _p_framebuffer: *mut Framebuffer, |
| 1644 | ) -> Result { |
| 1645 | panic!(concat!("Unable to load ", stringify!(create_framebuffer))) |
| 1646 | } |
| 1647 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateFramebuffer\0"); |
| 1648 | let val = _f(cname); |
| 1649 | if val.is_null() { |
| 1650 | create_framebuffer |
| 1651 | } else { |
| 1652 | ::core::mem::transmute(val) |
| 1653 | } |
| 1654 | }, |
| 1655 | destroy_framebuffer: unsafe { |
| 1656 | unsafe extern "system" fn destroy_framebuffer( |
| 1657 | _device: crate::vk::Device, |
| 1658 | _framebuffer: Framebuffer, |
| 1659 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1660 | ) { |
| 1661 | panic!(concat!("Unable to load ", stringify!(destroy_framebuffer))) |
| 1662 | } |
| 1663 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyFramebuffer\0"); |
| 1664 | let val = _f(cname); |
| 1665 | if val.is_null() { |
| 1666 | destroy_framebuffer |
| 1667 | } else { |
| 1668 | ::core::mem::transmute(val) |
| 1669 | } |
| 1670 | }, |
| 1671 | create_render_pass: unsafe { |
| 1672 | unsafe extern "system" fn create_render_pass( |
| 1673 | _device: crate::vk::Device, |
| 1674 | _p_create_info: *const RenderPassCreateInfo<'_>, |
| 1675 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1676 | _p_render_pass: *mut RenderPass, |
| 1677 | ) -> Result { |
| 1678 | panic!(concat!("Unable to load ", stringify!(create_render_pass))) |
| 1679 | } |
| 1680 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateRenderPass\0"); |
| 1681 | let val = _f(cname); |
| 1682 | if val.is_null() { |
| 1683 | create_render_pass |
| 1684 | } else { |
| 1685 | ::core::mem::transmute(val) |
| 1686 | } |
| 1687 | }, |
| 1688 | destroy_render_pass: unsafe { |
| 1689 | unsafe extern "system" fn destroy_render_pass( |
| 1690 | _device: crate::vk::Device, |
| 1691 | _render_pass: RenderPass, |
| 1692 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1693 | ) { |
| 1694 | panic!(concat!("Unable to load ", stringify!(destroy_render_pass))) |
| 1695 | } |
| 1696 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyRenderPass\0"); |
| 1697 | let val = _f(cname); |
| 1698 | if val.is_null() { |
| 1699 | destroy_render_pass |
| 1700 | } else { |
| 1701 | ::core::mem::transmute(val) |
| 1702 | } |
| 1703 | }, |
| 1704 | get_render_area_granularity: unsafe { |
| 1705 | unsafe extern "system" fn get_render_area_granularity( |
| 1706 | _device: crate::vk::Device, |
| 1707 | _render_pass: RenderPass, |
| 1708 | _p_granularity: *mut Extent2D, |
| 1709 | ) { |
| 1710 | panic!(concat!( |
| 1711 | "Unable to load ", |
| 1712 | stringify!(get_render_area_granularity) |
| 1713 | )) |
| 1714 | } |
| 1715 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetRenderAreaGranularity\0"); |
| 1716 | let val = _f(cname); |
| 1717 | if val.is_null() { |
| 1718 | get_render_area_granularity |
| 1719 | } else { |
| 1720 | ::core::mem::transmute(val) |
| 1721 | } |
| 1722 | }, |
| 1723 | create_command_pool: unsafe { |
| 1724 | unsafe extern "system" fn create_command_pool( |
| 1725 | _device: crate::vk::Device, |
| 1726 | _p_create_info: *const CommandPoolCreateInfo<'_>, |
| 1727 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1728 | _p_command_pool: *mut CommandPool, |
| 1729 | ) -> Result { |
| 1730 | panic!(concat!("Unable to load ", stringify!(create_command_pool))) |
| 1731 | } |
| 1732 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateCommandPool\0"); |
| 1733 | let val = _f(cname); |
| 1734 | if val.is_null() { |
| 1735 | create_command_pool |
| 1736 | } else { |
| 1737 | ::core::mem::transmute(val) |
| 1738 | } |
| 1739 | }, |
| 1740 | destroy_command_pool: unsafe { |
| 1741 | unsafe extern "system" fn destroy_command_pool( |
| 1742 | _device: crate::vk::Device, |
| 1743 | _command_pool: CommandPool, |
| 1744 | _p_allocator: *const AllocationCallbacks<'_>, |
| 1745 | ) { |
| 1746 | panic!(concat!("Unable to load ", stringify!(destroy_command_pool))) |
| 1747 | } |
| 1748 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyCommandPool\0"); |
| 1749 | let val = _f(cname); |
| 1750 | if val.is_null() { |
| 1751 | destroy_command_pool |
| 1752 | } else { |
| 1753 | ::core::mem::transmute(val) |
| 1754 | } |
| 1755 | }, |
| 1756 | reset_command_pool: unsafe { |
| 1757 | unsafe extern "system" fn reset_command_pool( |
| 1758 | _device: crate::vk::Device, |
| 1759 | _command_pool: CommandPool, |
| 1760 | _flags: CommandPoolResetFlags, |
| 1761 | ) -> Result { |
| 1762 | panic!(concat!("Unable to load ", stringify!(reset_command_pool))) |
| 1763 | } |
| 1764 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkResetCommandPool\0"); |
| 1765 | let val = _f(cname); |
| 1766 | if val.is_null() { |
| 1767 | reset_command_pool |
| 1768 | } else { |
| 1769 | ::core::mem::transmute(val) |
| 1770 | } |
| 1771 | }, |
| 1772 | allocate_command_buffers: unsafe { |
| 1773 | unsafe extern "system" fn allocate_command_buffers( |
| 1774 | _device: crate::vk::Device, |
| 1775 | _p_allocate_info: *const CommandBufferAllocateInfo<'_>, |
| 1776 | _p_command_buffers: *mut CommandBuffer, |
| 1777 | ) -> Result { |
| 1778 | panic!(concat!( |
| 1779 | "Unable to load ", |
| 1780 | stringify!(allocate_command_buffers) |
| 1781 | )) |
| 1782 | } |
| 1783 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkAllocateCommandBuffers\0"); |
| 1784 | let val = _f(cname); |
| 1785 | if val.is_null() { |
| 1786 | allocate_command_buffers |
| 1787 | } else { |
| 1788 | ::core::mem::transmute(val) |
| 1789 | } |
| 1790 | }, |
| 1791 | free_command_buffers: unsafe { |
| 1792 | unsafe extern "system" fn free_command_buffers( |
| 1793 | _device: crate::vk::Device, |
| 1794 | _command_pool: CommandPool, |
| 1795 | _command_buffer_count: u32, |
| 1796 | _p_command_buffers: *const CommandBuffer, |
| 1797 | ) { |
| 1798 | panic!(concat!("Unable to load ", stringify!(free_command_buffers))) |
| 1799 | } |
| 1800 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkFreeCommandBuffers\0"); |
| 1801 | let val = _f(cname); |
| 1802 | if val.is_null() { |
| 1803 | free_command_buffers |
| 1804 | } else { |
| 1805 | ::core::mem::transmute(val) |
| 1806 | } |
| 1807 | }, |
| 1808 | begin_command_buffer: unsafe { |
| 1809 | unsafe extern "system" fn begin_command_buffer( |
| 1810 | _command_buffer: CommandBuffer, |
| 1811 | _p_begin_info: *const CommandBufferBeginInfo<'_>, |
| 1812 | ) -> Result { |
| 1813 | panic!(concat!("Unable to load ", stringify!(begin_command_buffer))) |
| 1814 | } |
| 1815 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkBeginCommandBuffer\0"); |
| 1816 | let val = _f(cname); |
| 1817 | if val.is_null() { |
| 1818 | begin_command_buffer |
| 1819 | } else { |
| 1820 | ::core::mem::transmute(val) |
| 1821 | } |
| 1822 | }, |
| 1823 | end_command_buffer: unsafe { |
| 1824 | unsafe extern "system" fn end_command_buffer( |
| 1825 | _command_buffer: CommandBuffer, |
| 1826 | ) -> Result { |
| 1827 | panic!(concat!("Unable to load ", stringify!(end_command_buffer))) |
| 1828 | } |
| 1829 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkEndCommandBuffer\0"); |
| 1830 | let val = _f(cname); |
| 1831 | if val.is_null() { |
| 1832 | end_command_buffer |
| 1833 | } else { |
| 1834 | ::core::mem::transmute(val) |
| 1835 | } |
| 1836 | }, |
| 1837 | reset_command_buffer: unsafe { |
| 1838 | unsafe extern "system" fn reset_command_buffer( |
| 1839 | _command_buffer: CommandBuffer, |
| 1840 | _flags: CommandBufferResetFlags, |
| 1841 | ) -> Result { |
| 1842 | panic!(concat!("Unable to load ", stringify!(reset_command_buffer))) |
| 1843 | } |
| 1844 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkResetCommandBuffer\0"); |
| 1845 | let val = _f(cname); |
| 1846 | if val.is_null() { |
| 1847 | reset_command_buffer |
| 1848 | } else { |
| 1849 | ::core::mem::transmute(val) |
| 1850 | } |
| 1851 | }, |
| 1852 | cmd_bind_pipeline: unsafe { |
| 1853 | unsafe extern "system" fn cmd_bind_pipeline( |
| 1854 | _command_buffer: CommandBuffer, |
| 1855 | _pipeline_bind_point: PipelineBindPoint, |
| 1856 | _pipeline: Pipeline, |
| 1857 | ) { |
| 1858 | panic!(concat!("Unable to load ", stringify!(cmd_bind_pipeline))) |
| 1859 | } |
| 1860 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBindPipeline\0"); |
| 1861 | let val = _f(cname); |
| 1862 | if val.is_null() { |
| 1863 | cmd_bind_pipeline |
| 1864 | } else { |
| 1865 | ::core::mem::transmute(val) |
| 1866 | } |
| 1867 | }, |
| 1868 | cmd_set_viewport: unsafe { |
| 1869 | unsafe extern "system" fn cmd_set_viewport( |
| 1870 | _command_buffer: CommandBuffer, |
| 1871 | _first_viewport: u32, |
| 1872 | _viewport_count: u32, |
| 1873 | _p_viewports: *const Viewport, |
| 1874 | ) { |
| 1875 | panic!(concat!("Unable to load ", stringify!(cmd_set_viewport))) |
| 1876 | } |
| 1877 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetViewport\0"); |
| 1878 | let val = _f(cname); |
| 1879 | if val.is_null() { |
| 1880 | cmd_set_viewport |
| 1881 | } else { |
| 1882 | ::core::mem::transmute(val) |
| 1883 | } |
| 1884 | }, |
| 1885 | cmd_set_scissor: unsafe { |
| 1886 | unsafe extern "system" fn cmd_set_scissor( |
| 1887 | _command_buffer: CommandBuffer, |
| 1888 | _first_scissor: u32, |
| 1889 | _scissor_count: u32, |
| 1890 | _p_scissors: *const Rect2D, |
| 1891 | ) { |
| 1892 | panic!(concat!("Unable to load ", stringify!(cmd_set_scissor))) |
| 1893 | } |
| 1894 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetScissor\0"); |
| 1895 | let val = _f(cname); |
| 1896 | if val.is_null() { |
| 1897 | cmd_set_scissor |
| 1898 | } else { |
| 1899 | ::core::mem::transmute(val) |
| 1900 | } |
| 1901 | }, |
| 1902 | cmd_set_line_width: unsafe { |
| 1903 | unsafe extern "system" fn cmd_set_line_width( |
| 1904 | _command_buffer: CommandBuffer, |
| 1905 | _line_width: f32, |
| 1906 | ) { |
| 1907 | panic!(concat!("Unable to load ", stringify!(cmd_set_line_width))) |
| 1908 | } |
| 1909 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetLineWidth\0"); |
| 1910 | let val = _f(cname); |
| 1911 | if val.is_null() { |
| 1912 | cmd_set_line_width |
| 1913 | } else { |
| 1914 | ::core::mem::transmute(val) |
| 1915 | } |
| 1916 | }, |
| 1917 | cmd_set_depth_bias: unsafe { |
| 1918 | unsafe extern "system" fn cmd_set_depth_bias( |
| 1919 | _command_buffer: CommandBuffer, |
| 1920 | _depth_bias_constant_factor: f32, |
| 1921 | _depth_bias_clamp: f32, |
| 1922 | _depth_bias_slope_factor: f32, |
| 1923 | ) { |
| 1924 | panic!(concat!("Unable to load ", stringify!(cmd_set_depth_bias))) |
| 1925 | } |
| 1926 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetDepthBias\0"); |
| 1927 | let val = _f(cname); |
| 1928 | if val.is_null() { |
| 1929 | cmd_set_depth_bias |
| 1930 | } else { |
| 1931 | ::core::mem::transmute(val) |
| 1932 | } |
| 1933 | }, |
| 1934 | cmd_set_blend_constants: unsafe { |
| 1935 | unsafe extern "system" fn cmd_set_blend_constants( |
| 1936 | _command_buffer: CommandBuffer, |
| 1937 | _blend_constants: *const [f32; 4usize], |
| 1938 | ) { |
| 1939 | panic!(concat!( |
| 1940 | "Unable to load ", |
| 1941 | stringify!(cmd_set_blend_constants) |
| 1942 | )) |
| 1943 | } |
| 1944 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetBlendConstants\0"); |
| 1945 | let val = _f(cname); |
| 1946 | if val.is_null() { |
| 1947 | cmd_set_blend_constants |
| 1948 | } else { |
| 1949 | ::core::mem::transmute(val) |
| 1950 | } |
| 1951 | }, |
| 1952 | cmd_set_depth_bounds: unsafe { |
| 1953 | unsafe extern "system" fn cmd_set_depth_bounds( |
| 1954 | _command_buffer: CommandBuffer, |
| 1955 | _min_depth_bounds: f32, |
| 1956 | _max_depth_bounds: f32, |
| 1957 | ) { |
| 1958 | panic!(concat!("Unable to load ", stringify!(cmd_set_depth_bounds))) |
| 1959 | } |
| 1960 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetDepthBounds\0"); |
| 1961 | let val = _f(cname); |
| 1962 | if val.is_null() { |
| 1963 | cmd_set_depth_bounds |
| 1964 | } else { |
| 1965 | ::core::mem::transmute(val) |
| 1966 | } |
| 1967 | }, |
| 1968 | cmd_set_stencil_compare_mask: unsafe { |
| 1969 | unsafe extern "system" fn cmd_set_stencil_compare_mask( |
| 1970 | _command_buffer: CommandBuffer, |
| 1971 | _face_mask: StencilFaceFlags, |
| 1972 | _compare_mask: u32, |
| 1973 | ) { |
| 1974 | panic!(concat!( |
| 1975 | "Unable to load ", |
| 1976 | stringify!(cmd_set_stencil_compare_mask) |
| 1977 | )) |
| 1978 | } |
| 1979 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetStencilCompareMask\0"); |
| 1980 | let val = _f(cname); |
| 1981 | if val.is_null() { |
| 1982 | cmd_set_stencil_compare_mask |
| 1983 | } else { |
| 1984 | ::core::mem::transmute(val) |
| 1985 | } |
| 1986 | }, |
| 1987 | cmd_set_stencil_write_mask: unsafe { |
| 1988 | unsafe extern "system" fn cmd_set_stencil_write_mask( |
| 1989 | _command_buffer: CommandBuffer, |
| 1990 | _face_mask: StencilFaceFlags, |
| 1991 | _write_mask: u32, |
| 1992 | ) { |
| 1993 | panic!(concat!( |
| 1994 | "Unable to load ", |
| 1995 | stringify!(cmd_set_stencil_write_mask) |
| 1996 | )) |
| 1997 | } |
| 1998 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetStencilWriteMask\0"); |
| 1999 | let val = _f(cname); |
| 2000 | if val.is_null() { |
| 2001 | cmd_set_stencil_write_mask |
| 2002 | } else { |
| 2003 | ::core::mem::transmute(val) |
| 2004 | } |
| 2005 | }, |
| 2006 | cmd_set_stencil_reference: unsafe { |
| 2007 | unsafe extern "system" fn cmd_set_stencil_reference( |
| 2008 | _command_buffer: CommandBuffer, |
| 2009 | _face_mask: StencilFaceFlags, |
| 2010 | _reference: u32, |
| 2011 | ) { |
| 2012 | panic!(concat!( |
| 2013 | "Unable to load ", |
| 2014 | stringify!(cmd_set_stencil_reference) |
| 2015 | )) |
| 2016 | } |
| 2017 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetStencilReference\0"); |
| 2018 | let val = _f(cname); |
| 2019 | if val.is_null() { |
| 2020 | cmd_set_stencil_reference |
| 2021 | } else { |
| 2022 | ::core::mem::transmute(val) |
| 2023 | } |
| 2024 | }, |
| 2025 | cmd_bind_descriptor_sets: unsafe { |
| 2026 | unsafe extern "system" fn cmd_bind_descriptor_sets( |
| 2027 | _command_buffer: CommandBuffer, |
| 2028 | _pipeline_bind_point: PipelineBindPoint, |
| 2029 | _layout: PipelineLayout, |
| 2030 | _first_set: u32, |
| 2031 | _descriptor_set_count: u32, |
| 2032 | _p_descriptor_sets: *const DescriptorSet, |
| 2033 | _dynamic_offset_count: u32, |
| 2034 | _p_dynamic_offsets: *const u32, |
| 2035 | ) { |
| 2036 | panic!(concat!( |
| 2037 | "Unable to load ", |
| 2038 | stringify!(cmd_bind_descriptor_sets) |
| 2039 | )) |
| 2040 | } |
| 2041 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBindDescriptorSets\0"); |
| 2042 | let val = _f(cname); |
| 2043 | if val.is_null() { |
| 2044 | cmd_bind_descriptor_sets |
| 2045 | } else { |
| 2046 | ::core::mem::transmute(val) |
| 2047 | } |
| 2048 | }, |
| 2049 | cmd_bind_index_buffer: unsafe { |
| 2050 | unsafe extern "system" fn cmd_bind_index_buffer( |
| 2051 | _command_buffer: CommandBuffer, |
| 2052 | _buffer: Buffer, |
| 2053 | _offset: DeviceSize, |
| 2054 | _index_type: IndexType, |
| 2055 | ) { |
| 2056 | panic!(concat!( |
| 2057 | "Unable to load ", |
| 2058 | stringify!(cmd_bind_index_buffer) |
| 2059 | )) |
| 2060 | } |
| 2061 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBindIndexBuffer\0"); |
| 2062 | let val = _f(cname); |
| 2063 | if val.is_null() { |
| 2064 | cmd_bind_index_buffer |
| 2065 | } else { |
| 2066 | ::core::mem::transmute(val) |
| 2067 | } |
| 2068 | }, |
| 2069 | cmd_bind_vertex_buffers: unsafe { |
| 2070 | unsafe extern "system" fn cmd_bind_vertex_buffers( |
| 2071 | _command_buffer: CommandBuffer, |
| 2072 | _first_binding: u32, |
| 2073 | _binding_count: u32, |
| 2074 | _p_buffers: *const Buffer, |
| 2075 | _p_offsets: *const DeviceSize, |
| 2076 | ) { |
| 2077 | panic!(concat!( |
| 2078 | "Unable to load ", |
| 2079 | stringify!(cmd_bind_vertex_buffers) |
| 2080 | )) |
| 2081 | } |
| 2082 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBindVertexBuffers\0"); |
| 2083 | let val = _f(cname); |
| 2084 | if val.is_null() { |
| 2085 | cmd_bind_vertex_buffers |
| 2086 | } else { |
| 2087 | ::core::mem::transmute(val) |
| 2088 | } |
| 2089 | }, |
| 2090 | cmd_draw: unsafe { |
| 2091 | unsafe extern "system" fn cmd_draw( |
| 2092 | _command_buffer: CommandBuffer, |
| 2093 | _vertex_count: u32, |
| 2094 | _instance_count: u32, |
| 2095 | _first_vertex: u32, |
| 2096 | _first_instance: u32, |
| 2097 | ) { |
| 2098 | panic!(concat!("Unable to load ", stringify!(cmd_draw))) |
| 2099 | } |
| 2100 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDraw\0"); |
| 2101 | let val = _f(cname); |
| 2102 | if val.is_null() { |
| 2103 | cmd_draw |
| 2104 | } else { |
| 2105 | ::core::mem::transmute(val) |
| 2106 | } |
| 2107 | }, |
| 2108 | cmd_draw_indexed: unsafe { |
| 2109 | unsafe extern "system" fn cmd_draw_indexed( |
| 2110 | _command_buffer: CommandBuffer, |
| 2111 | _index_count: u32, |
| 2112 | _instance_count: u32, |
| 2113 | _first_index: u32, |
| 2114 | _vertex_offset: i32, |
| 2115 | _first_instance: u32, |
| 2116 | ) { |
| 2117 | panic!(concat!("Unable to load ", stringify!(cmd_draw_indexed))) |
| 2118 | } |
| 2119 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawIndexed\0"); |
| 2120 | let val = _f(cname); |
| 2121 | if val.is_null() { |
| 2122 | cmd_draw_indexed |
| 2123 | } else { |
| 2124 | ::core::mem::transmute(val) |
| 2125 | } |
| 2126 | }, |
| 2127 | cmd_draw_indirect: unsafe { |
| 2128 | unsafe extern "system" fn cmd_draw_indirect( |
| 2129 | _command_buffer: CommandBuffer, |
| 2130 | _buffer: Buffer, |
| 2131 | _offset: DeviceSize, |
| 2132 | _draw_count: u32, |
| 2133 | _stride: u32, |
| 2134 | ) { |
| 2135 | panic!(concat!("Unable to load ", stringify!(cmd_draw_indirect))) |
| 2136 | } |
| 2137 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawIndirect\0"); |
| 2138 | let val = _f(cname); |
| 2139 | if val.is_null() { |
| 2140 | cmd_draw_indirect |
| 2141 | } else { |
| 2142 | ::core::mem::transmute(val) |
| 2143 | } |
| 2144 | }, |
| 2145 | cmd_draw_indexed_indirect: unsafe { |
| 2146 | unsafe extern "system" fn cmd_draw_indexed_indirect( |
| 2147 | _command_buffer: CommandBuffer, |
| 2148 | _buffer: Buffer, |
| 2149 | _offset: DeviceSize, |
| 2150 | _draw_count: u32, |
| 2151 | _stride: u32, |
| 2152 | ) { |
| 2153 | panic!(concat!( |
| 2154 | "Unable to load ", |
| 2155 | stringify!(cmd_draw_indexed_indirect) |
| 2156 | )) |
| 2157 | } |
| 2158 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawIndexedIndirect\0"); |
| 2159 | let val = _f(cname); |
| 2160 | if val.is_null() { |
| 2161 | cmd_draw_indexed_indirect |
| 2162 | } else { |
| 2163 | ::core::mem::transmute(val) |
| 2164 | } |
| 2165 | }, |
| 2166 | cmd_dispatch: unsafe { |
| 2167 | unsafe extern "system" fn cmd_dispatch( |
| 2168 | _command_buffer: CommandBuffer, |
| 2169 | _group_count_x: u32, |
| 2170 | _group_count_y: u32, |
| 2171 | _group_count_z: u32, |
| 2172 | ) { |
| 2173 | panic!(concat!("Unable to load ", stringify!(cmd_dispatch))) |
| 2174 | } |
| 2175 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDispatch\0"); |
| 2176 | let val = _f(cname); |
| 2177 | if val.is_null() { |
| 2178 | cmd_dispatch |
| 2179 | } else { |
| 2180 | ::core::mem::transmute(val) |
| 2181 | } |
| 2182 | }, |
| 2183 | cmd_dispatch_indirect: unsafe { |
| 2184 | unsafe extern "system" fn cmd_dispatch_indirect( |
| 2185 | _command_buffer: CommandBuffer, |
| 2186 | _buffer: Buffer, |
| 2187 | _offset: DeviceSize, |
| 2188 | ) { |
| 2189 | panic!(concat!( |
| 2190 | "Unable to load ", |
| 2191 | stringify!(cmd_dispatch_indirect) |
| 2192 | )) |
| 2193 | } |
| 2194 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDispatchIndirect\0"); |
| 2195 | let val = _f(cname); |
| 2196 | if val.is_null() { |
| 2197 | cmd_dispatch_indirect |
| 2198 | } else { |
| 2199 | ::core::mem::transmute(val) |
| 2200 | } |
| 2201 | }, |
| 2202 | cmd_copy_buffer: unsafe { |
| 2203 | unsafe extern "system" fn cmd_copy_buffer( |
| 2204 | _command_buffer: CommandBuffer, |
| 2205 | _src_buffer: Buffer, |
| 2206 | _dst_buffer: Buffer, |
| 2207 | _region_count: u32, |
| 2208 | _p_regions: *const BufferCopy, |
| 2209 | ) { |
| 2210 | panic!(concat!("Unable to load ", stringify!(cmd_copy_buffer))) |
| 2211 | } |
| 2212 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyBuffer\0"); |
| 2213 | let val = _f(cname); |
| 2214 | if val.is_null() { |
| 2215 | cmd_copy_buffer |
| 2216 | } else { |
| 2217 | ::core::mem::transmute(val) |
| 2218 | } |
| 2219 | }, |
| 2220 | cmd_copy_image: unsafe { |
| 2221 | unsafe extern "system" fn cmd_copy_image( |
| 2222 | _command_buffer: CommandBuffer, |
| 2223 | _src_image: Image, |
| 2224 | _src_image_layout: ImageLayout, |
| 2225 | _dst_image: Image, |
| 2226 | _dst_image_layout: ImageLayout, |
| 2227 | _region_count: u32, |
| 2228 | _p_regions: *const ImageCopy, |
| 2229 | ) { |
| 2230 | panic!(concat!("Unable to load ", stringify!(cmd_copy_image))) |
| 2231 | } |
| 2232 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyImage\0"); |
| 2233 | let val = _f(cname); |
| 2234 | if val.is_null() { |
| 2235 | cmd_copy_image |
| 2236 | } else { |
| 2237 | ::core::mem::transmute(val) |
| 2238 | } |
| 2239 | }, |
| 2240 | cmd_blit_image: unsafe { |
| 2241 | unsafe extern "system" fn cmd_blit_image( |
| 2242 | _command_buffer: CommandBuffer, |
| 2243 | _src_image: Image, |
| 2244 | _src_image_layout: ImageLayout, |
| 2245 | _dst_image: Image, |
| 2246 | _dst_image_layout: ImageLayout, |
| 2247 | _region_count: u32, |
| 2248 | _p_regions: *const ImageBlit, |
| 2249 | _filter: Filter, |
| 2250 | ) { |
| 2251 | panic!(concat!("Unable to load ", stringify!(cmd_blit_image))) |
| 2252 | } |
| 2253 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBlitImage\0"); |
| 2254 | let val = _f(cname); |
| 2255 | if val.is_null() { |
| 2256 | cmd_blit_image |
| 2257 | } else { |
| 2258 | ::core::mem::transmute(val) |
| 2259 | } |
| 2260 | }, |
| 2261 | cmd_copy_buffer_to_image: unsafe { |
| 2262 | unsafe extern "system" fn cmd_copy_buffer_to_image( |
| 2263 | _command_buffer: CommandBuffer, |
| 2264 | _src_buffer: Buffer, |
| 2265 | _dst_image: Image, |
| 2266 | _dst_image_layout: ImageLayout, |
| 2267 | _region_count: u32, |
| 2268 | _p_regions: *const BufferImageCopy, |
| 2269 | ) { |
| 2270 | panic!(concat!( |
| 2271 | "Unable to load ", |
| 2272 | stringify!(cmd_copy_buffer_to_image) |
| 2273 | )) |
| 2274 | } |
| 2275 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyBufferToImage\0"); |
| 2276 | let val = _f(cname); |
| 2277 | if val.is_null() { |
| 2278 | cmd_copy_buffer_to_image |
| 2279 | } else { |
| 2280 | ::core::mem::transmute(val) |
| 2281 | } |
| 2282 | }, |
| 2283 | cmd_copy_image_to_buffer: unsafe { |
| 2284 | unsafe extern "system" fn cmd_copy_image_to_buffer( |
| 2285 | _command_buffer: CommandBuffer, |
| 2286 | _src_image: Image, |
| 2287 | _src_image_layout: ImageLayout, |
| 2288 | _dst_buffer: Buffer, |
| 2289 | _region_count: u32, |
| 2290 | _p_regions: *const BufferImageCopy, |
| 2291 | ) { |
| 2292 | panic!(concat!( |
| 2293 | "Unable to load ", |
| 2294 | stringify!(cmd_copy_image_to_buffer) |
| 2295 | )) |
| 2296 | } |
| 2297 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyImageToBuffer\0"); |
| 2298 | let val = _f(cname); |
| 2299 | if val.is_null() { |
| 2300 | cmd_copy_image_to_buffer |
| 2301 | } else { |
| 2302 | ::core::mem::transmute(val) |
| 2303 | } |
| 2304 | }, |
| 2305 | cmd_update_buffer: unsafe { |
| 2306 | unsafe extern "system" fn cmd_update_buffer( |
| 2307 | _command_buffer: CommandBuffer, |
| 2308 | _dst_buffer: Buffer, |
| 2309 | _dst_offset: DeviceSize, |
| 2310 | _data_size: DeviceSize, |
| 2311 | _p_data: *const c_void, |
| 2312 | ) { |
| 2313 | panic!(concat!("Unable to load ", stringify!(cmd_update_buffer))) |
| 2314 | } |
| 2315 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdUpdateBuffer\0"); |
| 2316 | let val = _f(cname); |
| 2317 | if val.is_null() { |
| 2318 | cmd_update_buffer |
| 2319 | } else { |
| 2320 | ::core::mem::transmute(val) |
| 2321 | } |
| 2322 | }, |
| 2323 | cmd_fill_buffer: unsafe { |
| 2324 | unsafe extern "system" fn cmd_fill_buffer( |
| 2325 | _command_buffer: CommandBuffer, |
| 2326 | _dst_buffer: Buffer, |
| 2327 | _dst_offset: DeviceSize, |
| 2328 | _size: DeviceSize, |
| 2329 | _data: u32, |
| 2330 | ) { |
| 2331 | panic!(concat!("Unable to load ", stringify!(cmd_fill_buffer))) |
| 2332 | } |
| 2333 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdFillBuffer\0"); |
| 2334 | let val = _f(cname); |
| 2335 | if val.is_null() { |
| 2336 | cmd_fill_buffer |
| 2337 | } else { |
| 2338 | ::core::mem::transmute(val) |
| 2339 | } |
| 2340 | }, |
| 2341 | cmd_clear_color_image: unsafe { |
| 2342 | unsafe extern "system" fn cmd_clear_color_image( |
| 2343 | _command_buffer: CommandBuffer, |
| 2344 | _image: Image, |
| 2345 | _image_layout: ImageLayout, |
| 2346 | _p_color: *const ClearColorValue, |
| 2347 | _range_count: u32, |
| 2348 | _p_ranges: *const ImageSubresourceRange, |
| 2349 | ) { |
| 2350 | panic!(concat!( |
| 2351 | "Unable to load ", |
| 2352 | stringify!(cmd_clear_color_image) |
| 2353 | )) |
| 2354 | } |
| 2355 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdClearColorImage\0"); |
| 2356 | let val = _f(cname); |
| 2357 | if val.is_null() { |
| 2358 | cmd_clear_color_image |
| 2359 | } else { |
| 2360 | ::core::mem::transmute(val) |
| 2361 | } |
| 2362 | }, |
| 2363 | cmd_clear_depth_stencil_image: unsafe { |
| 2364 | unsafe extern "system" fn cmd_clear_depth_stencil_image( |
| 2365 | _command_buffer: CommandBuffer, |
| 2366 | _image: Image, |
| 2367 | _image_layout: ImageLayout, |
| 2368 | _p_depth_stencil: *const ClearDepthStencilValue, |
| 2369 | _range_count: u32, |
| 2370 | _p_ranges: *const ImageSubresourceRange, |
| 2371 | ) { |
| 2372 | panic!(concat!( |
| 2373 | "Unable to load ", |
| 2374 | stringify!(cmd_clear_depth_stencil_image) |
| 2375 | )) |
| 2376 | } |
| 2377 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdClearDepthStencilImage\0"); |
| 2378 | let val = _f(cname); |
| 2379 | if val.is_null() { |
| 2380 | cmd_clear_depth_stencil_image |
| 2381 | } else { |
| 2382 | ::core::mem::transmute(val) |
| 2383 | } |
| 2384 | }, |
| 2385 | cmd_clear_attachments: unsafe { |
| 2386 | unsafe extern "system" fn cmd_clear_attachments( |
| 2387 | _command_buffer: CommandBuffer, |
| 2388 | _attachment_count: u32, |
| 2389 | _p_attachments: *const ClearAttachment, |
| 2390 | _rect_count: u32, |
| 2391 | _p_rects: *const ClearRect, |
| 2392 | ) { |
| 2393 | panic!(concat!( |
| 2394 | "Unable to load ", |
| 2395 | stringify!(cmd_clear_attachments) |
| 2396 | )) |
| 2397 | } |
| 2398 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdClearAttachments\0"); |
| 2399 | let val = _f(cname); |
| 2400 | if val.is_null() { |
| 2401 | cmd_clear_attachments |
| 2402 | } else { |
| 2403 | ::core::mem::transmute(val) |
| 2404 | } |
| 2405 | }, |
| 2406 | cmd_resolve_image: unsafe { |
| 2407 | unsafe extern "system" fn cmd_resolve_image( |
| 2408 | _command_buffer: CommandBuffer, |
| 2409 | _src_image: Image, |
| 2410 | _src_image_layout: ImageLayout, |
| 2411 | _dst_image: Image, |
| 2412 | _dst_image_layout: ImageLayout, |
| 2413 | _region_count: u32, |
| 2414 | _p_regions: *const ImageResolve, |
| 2415 | ) { |
| 2416 | panic!(concat!("Unable to load ", stringify!(cmd_resolve_image))) |
| 2417 | } |
| 2418 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdResolveImage\0"); |
| 2419 | let val = _f(cname); |
| 2420 | if val.is_null() { |
| 2421 | cmd_resolve_image |
| 2422 | } else { |
| 2423 | ::core::mem::transmute(val) |
| 2424 | } |
| 2425 | }, |
| 2426 | cmd_set_event: unsafe { |
| 2427 | unsafe extern "system" fn cmd_set_event( |
| 2428 | _command_buffer: CommandBuffer, |
| 2429 | _event: Event, |
| 2430 | _stage_mask: PipelineStageFlags, |
| 2431 | ) { |
| 2432 | panic!(concat!("Unable to load ", stringify!(cmd_set_event))) |
| 2433 | } |
| 2434 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetEvent\0"); |
| 2435 | let val = _f(cname); |
| 2436 | if val.is_null() { |
| 2437 | cmd_set_event |
| 2438 | } else { |
| 2439 | ::core::mem::transmute(val) |
| 2440 | } |
| 2441 | }, |
| 2442 | cmd_reset_event: unsafe { |
| 2443 | unsafe extern "system" fn cmd_reset_event( |
| 2444 | _command_buffer: CommandBuffer, |
| 2445 | _event: Event, |
| 2446 | _stage_mask: PipelineStageFlags, |
| 2447 | ) { |
| 2448 | panic!(concat!("Unable to load ", stringify!(cmd_reset_event))) |
| 2449 | } |
| 2450 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdResetEvent\0"); |
| 2451 | let val = _f(cname); |
| 2452 | if val.is_null() { |
| 2453 | cmd_reset_event |
| 2454 | } else { |
| 2455 | ::core::mem::transmute(val) |
| 2456 | } |
| 2457 | }, |
| 2458 | cmd_wait_events: unsafe { |
| 2459 | unsafe extern "system" fn cmd_wait_events( |
| 2460 | _command_buffer: CommandBuffer, |
| 2461 | _event_count: u32, |
| 2462 | _p_events: *const Event, |
| 2463 | _src_stage_mask: PipelineStageFlags, |
| 2464 | _dst_stage_mask: PipelineStageFlags, |
| 2465 | _memory_barrier_count: u32, |
| 2466 | _p_memory_barriers: *const MemoryBarrier<'_>, |
| 2467 | _buffer_memory_barrier_count: u32, |
| 2468 | _p_buffer_memory_barriers: *const BufferMemoryBarrier<'_>, |
| 2469 | _image_memory_barrier_count: u32, |
| 2470 | _p_image_memory_barriers: *const ImageMemoryBarrier<'_>, |
| 2471 | ) { |
| 2472 | panic!(concat!("Unable to load ", stringify!(cmd_wait_events))) |
| 2473 | } |
| 2474 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdWaitEvents\0"); |
| 2475 | let val = _f(cname); |
| 2476 | if val.is_null() { |
| 2477 | cmd_wait_events |
| 2478 | } else { |
| 2479 | ::core::mem::transmute(val) |
| 2480 | } |
| 2481 | }, |
| 2482 | cmd_pipeline_barrier: unsafe { |
| 2483 | unsafe extern "system" fn cmd_pipeline_barrier( |
| 2484 | _command_buffer: CommandBuffer, |
| 2485 | _src_stage_mask: PipelineStageFlags, |
| 2486 | _dst_stage_mask: PipelineStageFlags, |
| 2487 | _dependency_flags: DependencyFlags, |
| 2488 | _memory_barrier_count: u32, |
| 2489 | _p_memory_barriers: *const MemoryBarrier<'_>, |
| 2490 | _buffer_memory_barrier_count: u32, |
| 2491 | _p_buffer_memory_barriers: *const BufferMemoryBarrier<'_>, |
| 2492 | _image_memory_barrier_count: u32, |
| 2493 | _p_image_memory_barriers: *const ImageMemoryBarrier<'_>, |
| 2494 | ) { |
| 2495 | panic!(concat!("Unable to load ", stringify!(cmd_pipeline_barrier))) |
| 2496 | } |
| 2497 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdPipelineBarrier\0"); |
| 2498 | let val = _f(cname); |
| 2499 | if val.is_null() { |
| 2500 | cmd_pipeline_barrier |
| 2501 | } else { |
| 2502 | ::core::mem::transmute(val) |
| 2503 | } |
| 2504 | }, |
| 2505 | cmd_begin_query: unsafe { |
| 2506 | unsafe extern "system" fn cmd_begin_query( |
| 2507 | _command_buffer: CommandBuffer, |
| 2508 | _query_pool: QueryPool, |
| 2509 | _query: u32, |
| 2510 | _flags: QueryControlFlags, |
| 2511 | ) { |
| 2512 | panic!(concat!("Unable to load ", stringify!(cmd_begin_query))) |
| 2513 | } |
| 2514 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBeginQuery\0"); |
| 2515 | let val = _f(cname); |
| 2516 | if val.is_null() { |
| 2517 | cmd_begin_query |
| 2518 | } else { |
| 2519 | ::core::mem::transmute(val) |
| 2520 | } |
| 2521 | }, |
| 2522 | cmd_end_query: unsafe { |
| 2523 | unsafe extern "system" fn cmd_end_query( |
| 2524 | _command_buffer: CommandBuffer, |
| 2525 | _query_pool: QueryPool, |
| 2526 | _query: u32, |
| 2527 | ) { |
| 2528 | panic!(concat!("Unable to load ", stringify!(cmd_end_query))) |
| 2529 | } |
| 2530 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdEndQuery\0"); |
| 2531 | let val = _f(cname); |
| 2532 | if val.is_null() { |
| 2533 | cmd_end_query |
| 2534 | } else { |
| 2535 | ::core::mem::transmute(val) |
| 2536 | } |
| 2537 | }, |
| 2538 | cmd_reset_query_pool: unsafe { |
| 2539 | unsafe extern "system" fn cmd_reset_query_pool( |
| 2540 | _command_buffer: CommandBuffer, |
| 2541 | _query_pool: QueryPool, |
| 2542 | _first_query: u32, |
| 2543 | _query_count: u32, |
| 2544 | ) { |
| 2545 | panic!(concat!("Unable to load ", stringify!(cmd_reset_query_pool))) |
| 2546 | } |
| 2547 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdResetQueryPool\0"); |
| 2548 | let val = _f(cname); |
| 2549 | if val.is_null() { |
| 2550 | cmd_reset_query_pool |
| 2551 | } else { |
| 2552 | ::core::mem::transmute(val) |
| 2553 | } |
| 2554 | }, |
| 2555 | cmd_write_timestamp: unsafe { |
| 2556 | unsafe extern "system" fn cmd_write_timestamp( |
| 2557 | _command_buffer: CommandBuffer, |
| 2558 | _pipeline_stage: PipelineStageFlags, |
| 2559 | _query_pool: QueryPool, |
| 2560 | _query: u32, |
| 2561 | ) { |
| 2562 | panic!(concat!("Unable to load ", stringify!(cmd_write_timestamp))) |
| 2563 | } |
| 2564 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdWriteTimestamp\0"); |
| 2565 | let val = _f(cname); |
| 2566 | if val.is_null() { |
| 2567 | cmd_write_timestamp |
| 2568 | } else { |
| 2569 | ::core::mem::transmute(val) |
| 2570 | } |
| 2571 | }, |
| 2572 | cmd_copy_query_pool_results: unsafe { |
| 2573 | unsafe extern "system" fn cmd_copy_query_pool_results( |
| 2574 | _command_buffer: CommandBuffer, |
| 2575 | _query_pool: QueryPool, |
| 2576 | _first_query: u32, |
| 2577 | _query_count: u32, |
| 2578 | _dst_buffer: Buffer, |
| 2579 | _dst_offset: DeviceSize, |
| 2580 | _stride: DeviceSize, |
| 2581 | _flags: QueryResultFlags, |
| 2582 | ) { |
| 2583 | panic!(concat!( |
| 2584 | "Unable to load ", |
| 2585 | stringify!(cmd_copy_query_pool_results) |
| 2586 | )) |
| 2587 | } |
| 2588 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyQueryPoolResults\0"); |
| 2589 | let val = _f(cname); |
| 2590 | if val.is_null() { |
| 2591 | cmd_copy_query_pool_results |
| 2592 | } else { |
| 2593 | ::core::mem::transmute(val) |
| 2594 | } |
| 2595 | }, |
| 2596 | cmd_push_constants: unsafe { |
| 2597 | unsafe extern "system" fn cmd_push_constants( |
| 2598 | _command_buffer: CommandBuffer, |
| 2599 | _layout: PipelineLayout, |
| 2600 | _stage_flags: ShaderStageFlags, |
| 2601 | _offset: u32, |
| 2602 | _size: u32, |
| 2603 | _p_values: *const c_void, |
| 2604 | ) { |
| 2605 | panic!(concat!("Unable to load ", stringify!(cmd_push_constants))) |
| 2606 | } |
| 2607 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdPushConstants\0"); |
| 2608 | let val = _f(cname); |
| 2609 | if val.is_null() { |
| 2610 | cmd_push_constants |
| 2611 | } else { |
| 2612 | ::core::mem::transmute(val) |
| 2613 | } |
| 2614 | }, |
| 2615 | cmd_begin_render_pass: unsafe { |
| 2616 | unsafe extern "system" fn cmd_begin_render_pass( |
| 2617 | _command_buffer: CommandBuffer, |
| 2618 | _p_render_pass_begin: *const RenderPassBeginInfo<'_>, |
| 2619 | _contents: SubpassContents, |
| 2620 | ) { |
| 2621 | panic!(concat!( |
| 2622 | "Unable to load ", |
| 2623 | stringify!(cmd_begin_render_pass) |
| 2624 | )) |
| 2625 | } |
| 2626 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBeginRenderPass\0"); |
| 2627 | let val = _f(cname); |
| 2628 | if val.is_null() { |
| 2629 | cmd_begin_render_pass |
| 2630 | } else { |
| 2631 | ::core::mem::transmute(val) |
| 2632 | } |
| 2633 | }, |
| 2634 | cmd_next_subpass: unsafe { |
| 2635 | unsafe extern "system" fn cmd_next_subpass( |
| 2636 | _command_buffer: CommandBuffer, |
| 2637 | _contents: SubpassContents, |
| 2638 | ) { |
| 2639 | panic!(concat!("Unable to load ", stringify!(cmd_next_subpass))) |
| 2640 | } |
| 2641 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdNextSubpass\0"); |
| 2642 | let val = _f(cname); |
| 2643 | if val.is_null() { |
| 2644 | cmd_next_subpass |
| 2645 | } else { |
| 2646 | ::core::mem::transmute(val) |
| 2647 | } |
| 2648 | }, |
| 2649 | cmd_end_render_pass: unsafe { |
| 2650 | unsafe extern "system" fn cmd_end_render_pass(_command_buffer: CommandBuffer) { |
| 2651 | panic!(concat!("Unable to load ", stringify!(cmd_end_render_pass))) |
| 2652 | } |
| 2653 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdEndRenderPass\0"); |
| 2654 | let val = _f(cname); |
| 2655 | if val.is_null() { |
| 2656 | cmd_end_render_pass |
| 2657 | } else { |
| 2658 | ::core::mem::transmute(val) |
| 2659 | } |
| 2660 | }, |
| 2661 | cmd_execute_commands: unsafe { |
| 2662 | unsafe extern "system" fn cmd_execute_commands( |
| 2663 | _command_buffer: CommandBuffer, |
| 2664 | _command_buffer_count: u32, |
| 2665 | _p_command_buffers: *const CommandBuffer, |
| 2666 | ) { |
| 2667 | panic!(concat!("Unable to load ", stringify!(cmd_execute_commands))) |
| 2668 | } |
| 2669 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdExecuteCommands\0"); |
| 2670 | let val = _f(cname); |
| 2671 | if val.is_null() { |
| 2672 | cmd_execute_commands |
| 2673 | } else { |
| 2674 | ::core::mem::transmute(val) |
| 2675 | } |
| 2676 | }, |
| 2677 | } |
| 2678 | } |
| 2679 | } |
| 2680 | #[derive(Clone)] |
| 2681 | #[doc = "Raw Vulkan 1.1 entry point function pointers"] |
| 2682 | pub struct EntryFnV1_1 { |
| 2683 | pub enumerate_instance_version: PFN_vkEnumerateInstanceVersion, |
| 2684 | } |
| 2685 | unsafe impl Send for EntryFnV1_1 {} |
| 2686 | unsafe impl Sync for EntryFnV1_1 {} |
| 2687 | impl EntryFnV1_1 { |
| 2688 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 2689 | Self::load_erased(&mut f) |
| 2690 | } |
| 2691 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 2692 | Self { |
| 2693 | enumerate_instance_version: unsafe { |
| 2694 | unsafe extern "system" fn enumerate_instance_version( |
| 2695 | _p_api_version: *mut u32, |
| 2696 | ) -> Result { |
| 2697 | panic!(concat!( |
| 2698 | "Unable to load ", |
| 2699 | stringify!(enumerate_instance_version) |
| 2700 | )) |
| 2701 | } |
| 2702 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkEnumerateInstanceVersion\0"); |
| 2703 | let val = _f(cname); |
| 2704 | if val.is_null() { |
| 2705 | enumerate_instance_version |
| 2706 | } else { |
| 2707 | ::core::mem::transmute(val) |
| 2708 | } |
| 2709 | }, |
| 2710 | } |
| 2711 | } |
| 2712 | } |
| 2713 | #[derive(Clone)] |
| 2714 | #[doc = "Raw Vulkan 1.1 instance-level function pointers"] |
| 2715 | pub struct InstanceFnV1_1 { |
| 2716 | pub enumerate_physical_device_groups: PFN_vkEnumeratePhysicalDeviceGroups, |
| 2717 | pub get_physical_device_features2: PFN_vkGetPhysicalDeviceFeatures2, |
| 2718 | pub get_physical_device_properties2: PFN_vkGetPhysicalDeviceProperties2, |
| 2719 | pub get_physical_device_format_properties2: PFN_vkGetPhysicalDeviceFormatProperties2, |
| 2720 | pub get_physical_device_image_format_properties2: PFN_vkGetPhysicalDeviceImageFormatProperties2, |
| 2721 | pub get_physical_device_queue_family_properties2: PFN_vkGetPhysicalDeviceQueueFamilyProperties2, |
| 2722 | pub get_physical_device_memory_properties2: PFN_vkGetPhysicalDeviceMemoryProperties2, |
| 2723 | pub get_physical_device_sparse_image_format_properties2: |
| 2724 | PFN_vkGetPhysicalDeviceSparseImageFormatProperties2, |
| 2725 | pub get_physical_device_external_buffer_properties: |
| 2726 | PFN_vkGetPhysicalDeviceExternalBufferProperties, |
| 2727 | pub get_physical_device_external_fence_properties: |
| 2728 | PFN_vkGetPhysicalDeviceExternalFenceProperties, |
| 2729 | pub get_physical_device_external_semaphore_properties: |
| 2730 | PFN_vkGetPhysicalDeviceExternalSemaphoreProperties, |
| 2731 | } |
| 2732 | unsafe impl Send for InstanceFnV1_1 {} |
| 2733 | unsafe impl Sync for InstanceFnV1_1 {} |
| 2734 | impl InstanceFnV1_1 { |
| 2735 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 2736 | Self::load_erased(&mut f) |
| 2737 | } |
| 2738 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 2739 | Self { |
| 2740 | enumerate_physical_device_groups: unsafe { |
| 2741 | unsafe extern "system" fn enumerate_physical_device_groups( |
| 2742 | _instance: crate::vk::Instance, |
| 2743 | _p_physical_device_group_count: *mut u32, |
| 2744 | _p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties<'_>, |
| 2745 | ) -> Result { |
| 2746 | panic!(concat!( |
| 2747 | "Unable to load ", |
| 2748 | stringify!(enumerate_physical_device_groups) |
| 2749 | )) |
| 2750 | } |
| 2751 | let cname = |
| 2752 | CStr::from_bytes_with_nul_unchecked(b"vkEnumeratePhysicalDeviceGroups\0"); |
| 2753 | let val = _f(cname); |
| 2754 | if val.is_null() { |
| 2755 | enumerate_physical_device_groups |
| 2756 | } else { |
| 2757 | ::core::mem::transmute(val) |
| 2758 | } |
| 2759 | }, |
| 2760 | get_physical_device_features2: unsafe { |
| 2761 | unsafe extern "system" fn get_physical_device_features2( |
| 2762 | _physical_device: PhysicalDevice, |
| 2763 | _p_features: *mut PhysicalDeviceFeatures2<'_>, |
| 2764 | ) { |
| 2765 | panic!(concat!( |
| 2766 | "Unable to load ", |
| 2767 | stringify!(get_physical_device_features2) |
| 2768 | )) |
| 2769 | } |
| 2770 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceFeatures2\0"); |
| 2771 | let val = _f(cname); |
| 2772 | if val.is_null() { |
| 2773 | get_physical_device_features2 |
| 2774 | } else { |
| 2775 | ::core::mem::transmute(val) |
| 2776 | } |
| 2777 | }, |
| 2778 | get_physical_device_properties2: unsafe { |
| 2779 | unsafe extern "system" fn get_physical_device_properties2( |
| 2780 | _physical_device: PhysicalDevice, |
| 2781 | _p_properties: *mut PhysicalDeviceProperties2<'_>, |
| 2782 | ) { |
| 2783 | panic!(concat!( |
| 2784 | "Unable to load ", |
| 2785 | stringify!(get_physical_device_properties2) |
| 2786 | )) |
| 2787 | } |
| 2788 | let cname = |
| 2789 | CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceProperties2\0"); |
| 2790 | let val = _f(cname); |
| 2791 | if val.is_null() { |
| 2792 | get_physical_device_properties2 |
| 2793 | } else { |
| 2794 | ::core::mem::transmute(val) |
| 2795 | } |
| 2796 | }, |
| 2797 | get_physical_device_format_properties2: unsafe { |
| 2798 | unsafe extern "system" fn get_physical_device_format_properties2( |
| 2799 | _physical_device: PhysicalDevice, |
| 2800 | _format: Format, |
| 2801 | _p_format_properties: *mut FormatProperties2<'_>, |
| 2802 | ) { |
| 2803 | panic!(concat!( |
| 2804 | "Unable to load ", |
| 2805 | stringify!(get_physical_device_format_properties2) |
| 2806 | )) |
| 2807 | } |
| 2808 | let cname = |
| 2809 | CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceFormatProperties2\0"); |
| 2810 | let val = _f(cname); |
| 2811 | if val.is_null() { |
| 2812 | get_physical_device_format_properties2 |
| 2813 | } else { |
| 2814 | ::core::mem::transmute(val) |
| 2815 | } |
| 2816 | }, |
| 2817 | get_physical_device_image_format_properties2: unsafe { |
| 2818 | unsafe extern "system" fn get_physical_device_image_format_properties2( |
| 2819 | _physical_device: PhysicalDevice, |
| 2820 | _p_image_format_info: *const PhysicalDeviceImageFormatInfo2<'_>, |
| 2821 | _p_image_format_properties: *mut ImageFormatProperties2<'_>, |
| 2822 | ) -> Result { |
| 2823 | panic!(concat!( |
| 2824 | "Unable to load ", |
| 2825 | stringify!(get_physical_device_image_format_properties2) |
| 2826 | )) |
| 2827 | } |
| 2828 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 2829 | b"vkGetPhysicalDeviceImageFormatProperties2\0", |
| 2830 | ); |
| 2831 | let val = _f(cname); |
| 2832 | if val.is_null() { |
| 2833 | get_physical_device_image_format_properties2 |
| 2834 | } else { |
| 2835 | ::core::mem::transmute(val) |
| 2836 | } |
| 2837 | }, |
| 2838 | get_physical_device_queue_family_properties2: unsafe { |
| 2839 | unsafe extern "system" fn get_physical_device_queue_family_properties2( |
| 2840 | _physical_device: PhysicalDevice, |
| 2841 | _p_queue_family_property_count: *mut u32, |
| 2842 | _p_queue_family_properties: *mut QueueFamilyProperties2<'_>, |
| 2843 | ) { |
| 2844 | panic!(concat!( |
| 2845 | "Unable to load ", |
| 2846 | stringify!(get_physical_device_queue_family_properties2) |
| 2847 | )) |
| 2848 | } |
| 2849 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 2850 | b"vkGetPhysicalDeviceQueueFamilyProperties2\0", |
| 2851 | ); |
| 2852 | let val = _f(cname); |
| 2853 | if val.is_null() { |
| 2854 | get_physical_device_queue_family_properties2 |
| 2855 | } else { |
| 2856 | ::core::mem::transmute(val) |
| 2857 | } |
| 2858 | }, |
| 2859 | get_physical_device_memory_properties2: unsafe { |
| 2860 | unsafe extern "system" fn get_physical_device_memory_properties2( |
| 2861 | _physical_device: PhysicalDevice, |
| 2862 | _p_memory_properties: *mut PhysicalDeviceMemoryProperties2<'_>, |
| 2863 | ) { |
| 2864 | panic!(concat!( |
| 2865 | "Unable to load ", |
| 2866 | stringify!(get_physical_device_memory_properties2) |
| 2867 | )) |
| 2868 | } |
| 2869 | let cname = |
| 2870 | CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceMemoryProperties2\0"); |
| 2871 | let val = _f(cname); |
| 2872 | if val.is_null() { |
| 2873 | get_physical_device_memory_properties2 |
| 2874 | } else { |
| 2875 | ::core::mem::transmute(val) |
| 2876 | } |
| 2877 | }, |
| 2878 | get_physical_device_sparse_image_format_properties2: unsafe { |
| 2879 | unsafe extern "system" fn get_physical_device_sparse_image_format_properties2( |
| 2880 | _physical_device: PhysicalDevice, |
| 2881 | _p_format_info: *const PhysicalDeviceSparseImageFormatInfo2<'_>, |
| 2882 | _p_property_count: *mut u32, |
| 2883 | _p_properties: *mut SparseImageFormatProperties2<'_>, |
| 2884 | ) { |
| 2885 | panic!(concat!( |
| 2886 | "Unable to load ", |
| 2887 | stringify!(get_physical_device_sparse_image_format_properties2) |
| 2888 | )) |
| 2889 | } |
| 2890 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 2891 | b"vkGetPhysicalDeviceSparseImageFormatProperties2\0", |
| 2892 | ); |
| 2893 | let val = _f(cname); |
| 2894 | if val.is_null() { |
| 2895 | get_physical_device_sparse_image_format_properties2 |
| 2896 | } else { |
| 2897 | ::core::mem::transmute(val) |
| 2898 | } |
| 2899 | }, |
| 2900 | get_physical_device_external_buffer_properties: unsafe { |
| 2901 | unsafe extern "system" fn get_physical_device_external_buffer_properties( |
| 2902 | _physical_device: PhysicalDevice, |
| 2903 | _p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo<'_>, |
| 2904 | _p_external_buffer_properties: *mut ExternalBufferProperties<'_>, |
| 2905 | ) { |
| 2906 | panic!(concat!( |
| 2907 | "Unable to load ", |
| 2908 | stringify!(get_physical_device_external_buffer_properties) |
| 2909 | )) |
| 2910 | } |
| 2911 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 2912 | b"vkGetPhysicalDeviceExternalBufferProperties\0", |
| 2913 | ); |
| 2914 | let val = _f(cname); |
| 2915 | if val.is_null() { |
| 2916 | get_physical_device_external_buffer_properties |
| 2917 | } else { |
| 2918 | ::core::mem::transmute(val) |
| 2919 | } |
| 2920 | }, |
| 2921 | get_physical_device_external_fence_properties: unsafe { |
| 2922 | unsafe extern "system" fn get_physical_device_external_fence_properties( |
| 2923 | _physical_device: PhysicalDevice, |
| 2924 | _p_external_fence_info: *const PhysicalDeviceExternalFenceInfo<'_>, |
| 2925 | _p_external_fence_properties: *mut ExternalFenceProperties<'_>, |
| 2926 | ) { |
| 2927 | panic!(concat!( |
| 2928 | "Unable to load ", |
| 2929 | stringify!(get_physical_device_external_fence_properties) |
| 2930 | )) |
| 2931 | } |
| 2932 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 2933 | b"vkGetPhysicalDeviceExternalFenceProperties\0", |
| 2934 | ); |
| 2935 | let val = _f(cname); |
| 2936 | if val.is_null() { |
| 2937 | get_physical_device_external_fence_properties |
| 2938 | } else { |
| 2939 | ::core::mem::transmute(val) |
| 2940 | } |
| 2941 | }, |
| 2942 | get_physical_device_external_semaphore_properties: unsafe { |
| 2943 | unsafe extern "system" fn get_physical_device_external_semaphore_properties( |
| 2944 | _physical_device: PhysicalDevice, |
| 2945 | _p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo<'_>, |
| 2946 | _p_external_semaphore_properties: *mut ExternalSemaphoreProperties<'_>, |
| 2947 | ) { |
| 2948 | panic!(concat!( |
| 2949 | "Unable to load ", |
| 2950 | stringify!(get_physical_device_external_semaphore_properties) |
| 2951 | )) |
| 2952 | } |
| 2953 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 2954 | b"vkGetPhysicalDeviceExternalSemaphoreProperties\0", |
| 2955 | ); |
| 2956 | let val = _f(cname); |
| 2957 | if val.is_null() { |
| 2958 | get_physical_device_external_semaphore_properties |
| 2959 | } else { |
| 2960 | ::core::mem::transmute(val) |
| 2961 | } |
| 2962 | }, |
| 2963 | } |
| 2964 | } |
| 2965 | } |
| 2966 | #[derive(Clone)] |
| 2967 | #[doc = "Raw Vulkan 1.1 device-level function pointers"] |
| 2968 | pub struct DeviceFnV1_1 { |
| 2969 | pub bind_buffer_memory2: PFN_vkBindBufferMemory2, |
| 2970 | pub bind_image_memory2: PFN_vkBindImageMemory2, |
| 2971 | pub get_device_group_peer_memory_features: PFN_vkGetDeviceGroupPeerMemoryFeatures, |
| 2972 | pub cmd_set_device_mask: PFN_vkCmdSetDeviceMask, |
| 2973 | pub cmd_dispatch_base: PFN_vkCmdDispatchBase, |
| 2974 | pub get_image_memory_requirements2: PFN_vkGetImageMemoryRequirements2, |
| 2975 | pub get_buffer_memory_requirements2: PFN_vkGetBufferMemoryRequirements2, |
| 2976 | pub get_image_sparse_memory_requirements2: PFN_vkGetImageSparseMemoryRequirements2, |
| 2977 | pub trim_command_pool: PFN_vkTrimCommandPool, |
| 2978 | pub get_device_queue2: PFN_vkGetDeviceQueue2, |
| 2979 | pub create_sampler_ycbcr_conversion: PFN_vkCreateSamplerYcbcrConversion, |
| 2980 | pub destroy_sampler_ycbcr_conversion: PFN_vkDestroySamplerYcbcrConversion, |
| 2981 | pub create_descriptor_update_template: PFN_vkCreateDescriptorUpdateTemplate, |
| 2982 | pub destroy_descriptor_update_template: PFN_vkDestroyDescriptorUpdateTemplate, |
| 2983 | pub update_descriptor_set_with_template: PFN_vkUpdateDescriptorSetWithTemplate, |
| 2984 | pub get_descriptor_set_layout_support: PFN_vkGetDescriptorSetLayoutSupport, |
| 2985 | } |
| 2986 | unsafe impl Send for DeviceFnV1_1 {} |
| 2987 | unsafe impl Sync for DeviceFnV1_1 {} |
| 2988 | impl DeviceFnV1_1 { |
| 2989 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 2990 | Self::load_erased(&mut f) |
| 2991 | } |
| 2992 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 2993 | Self { |
| 2994 | bind_buffer_memory2: unsafe { |
| 2995 | unsafe extern "system" fn bind_buffer_memory2( |
| 2996 | _device: crate::vk::Device, |
| 2997 | _bind_info_count: u32, |
| 2998 | _p_bind_infos: *const BindBufferMemoryInfo<'_>, |
| 2999 | ) -> Result { |
| 3000 | panic!(concat!("Unable to load ", stringify!(bind_buffer_memory2))) |
| 3001 | } |
| 3002 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkBindBufferMemory2\0"); |
| 3003 | let val = _f(cname); |
| 3004 | if val.is_null() { |
| 3005 | bind_buffer_memory2 |
| 3006 | } else { |
| 3007 | ::core::mem::transmute(val) |
| 3008 | } |
| 3009 | }, |
| 3010 | bind_image_memory2: unsafe { |
| 3011 | unsafe extern "system" fn bind_image_memory2( |
| 3012 | _device: crate::vk::Device, |
| 3013 | _bind_info_count: u32, |
| 3014 | _p_bind_infos: *const BindImageMemoryInfo<'_>, |
| 3015 | ) -> Result { |
| 3016 | panic!(concat!("Unable to load ", stringify!(bind_image_memory2))) |
| 3017 | } |
| 3018 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkBindImageMemory2\0"); |
| 3019 | let val = _f(cname); |
| 3020 | if val.is_null() { |
| 3021 | bind_image_memory2 |
| 3022 | } else { |
| 3023 | ::core::mem::transmute(val) |
| 3024 | } |
| 3025 | }, |
| 3026 | get_device_group_peer_memory_features: unsafe { |
| 3027 | unsafe extern "system" fn get_device_group_peer_memory_features( |
| 3028 | _device: crate::vk::Device, |
| 3029 | _heap_index: u32, |
| 3030 | _local_device_index: u32, |
| 3031 | _remote_device_index: u32, |
| 3032 | _p_peer_memory_features: *mut PeerMemoryFeatureFlags, |
| 3033 | ) { |
| 3034 | panic!(concat!( |
| 3035 | "Unable to load ", |
| 3036 | stringify!(get_device_group_peer_memory_features) |
| 3037 | )) |
| 3038 | } |
| 3039 | let cname = |
| 3040 | CStr::from_bytes_with_nul_unchecked(b"vkGetDeviceGroupPeerMemoryFeatures\0"); |
| 3041 | let val = _f(cname); |
| 3042 | if val.is_null() { |
| 3043 | get_device_group_peer_memory_features |
| 3044 | } else { |
| 3045 | ::core::mem::transmute(val) |
| 3046 | } |
| 3047 | }, |
| 3048 | cmd_set_device_mask: unsafe { |
| 3049 | unsafe extern "system" fn cmd_set_device_mask( |
| 3050 | _command_buffer: CommandBuffer, |
| 3051 | _device_mask: u32, |
| 3052 | ) { |
| 3053 | panic!(concat!("Unable to load ", stringify!(cmd_set_device_mask))) |
| 3054 | } |
| 3055 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetDeviceMask\0"); |
| 3056 | let val = _f(cname); |
| 3057 | if val.is_null() { |
| 3058 | cmd_set_device_mask |
| 3059 | } else { |
| 3060 | ::core::mem::transmute(val) |
| 3061 | } |
| 3062 | }, |
| 3063 | cmd_dispatch_base: unsafe { |
| 3064 | unsafe extern "system" fn cmd_dispatch_base( |
| 3065 | _command_buffer: CommandBuffer, |
| 3066 | _base_group_x: u32, |
| 3067 | _base_group_y: u32, |
| 3068 | _base_group_z: u32, |
| 3069 | _group_count_x: u32, |
| 3070 | _group_count_y: u32, |
| 3071 | _group_count_z: u32, |
| 3072 | ) { |
| 3073 | panic!(concat!("Unable to load ", stringify!(cmd_dispatch_base))) |
| 3074 | } |
| 3075 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDispatchBase\0"); |
| 3076 | let val = _f(cname); |
| 3077 | if val.is_null() { |
| 3078 | cmd_dispatch_base |
| 3079 | } else { |
| 3080 | ::core::mem::transmute(val) |
| 3081 | } |
| 3082 | }, |
| 3083 | get_image_memory_requirements2: unsafe { |
| 3084 | unsafe extern "system" fn get_image_memory_requirements2( |
| 3085 | _device: crate::vk::Device, |
| 3086 | _p_info: *const ImageMemoryRequirementsInfo2<'_>, |
| 3087 | _p_memory_requirements: *mut MemoryRequirements2<'_>, |
| 3088 | ) { |
| 3089 | panic!(concat!( |
| 3090 | "Unable to load ", |
| 3091 | stringify!(get_image_memory_requirements2) |
| 3092 | )) |
| 3093 | } |
| 3094 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetImageMemoryRequirements2\0"); |
| 3095 | let val = _f(cname); |
| 3096 | if val.is_null() { |
| 3097 | get_image_memory_requirements2 |
| 3098 | } else { |
| 3099 | ::core::mem::transmute(val) |
| 3100 | } |
| 3101 | }, |
| 3102 | get_buffer_memory_requirements2: unsafe { |
| 3103 | unsafe extern "system" fn get_buffer_memory_requirements2( |
| 3104 | _device: crate::vk::Device, |
| 3105 | _p_info: *const BufferMemoryRequirementsInfo2<'_>, |
| 3106 | _p_memory_requirements: *mut MemoryRequirements2<'_>, |
| 3107 | ) { |
| 3108 | panic!(concat!( |
| 3109 | "Unable to load ", |
| 3110 | stringify!(get_buffer_memory_requirements2) |
| 3111 | )) |
| 3112 | } |
| 3113 | let cname = |
| 3114 | CStr::from_bytes_with_nul_unchecked(b"vkGetBufferMemoryRequirements2\0"); |
| 3115 | let val = _f(cname); |
| 3116 | if val.is_null() { |
| 3117 | get_buffer_memory_requirements2 |
| 3118 | } else { |
| 3119 | ::core::mem::transmute(val) |
| 3120 | } |
| 3121 | }, |
| 3122 | get_image_sparse_memory_requirements2: unsafe { |
| 3123 | unsafe extern "system" fn get_image_sparse_memory_requirements2( |
| 3124 | _device: crate::vk::Device, |
| 3125 | _p_info: *const ImageSparseMemoryRequirementsInfo2<'_>, |
| 3126 | _p_sparse_memory_requirement_count: *mut u32, |
| 3127 | _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2<'_>, |
| 3128 | ) { |
| 3129 | panic!(concat!( |
| 3130 | "Unable to load ", |
| 3131 | stringify!(get_image_sparse_memory_requirements2) |
| 3132 | )) |
| 3133 | } |
| 3134 | let cname = |
| 3135 | CStr::from_bytes_with_nul_unchecked(b"vkGetImageSparseMemoryRequirements2\0"); |
| 3136 | let val = _f(cname); |
| 3137 | if val.is_null() { |
| 3138 | get_image_sparse_memory_requirements2 |
| 3139 | } else { |
| 3140 | ::core::mem::transmute(val) |
| 3141 | } |
| 3142 | }, |
| 3143 | trim_command_pool: unsafe { |
| 3144 | unsafe extern "system" fn trim_command_pool( |
| 3145 | _device: crate::vk::Device, |
| 3146 | _command_pool: CommandPool, |
| 3147 | _flags: CommandPoolTrimFlags, |
| 3148 | ) { |
| 3149 | panic!(concat!("Unable to load ", stringify!(trim_command_pool))) |
| 3150 | } |
| 3151 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkTrimCommandPool\0"); |
| 3152 | let val = _f(cname); |
| 3153 | if val.is_null() { |
| 3154 | trim_command_pool |
| 3155 | } else { |
| 3156 | ::core::mem::transmute(val) |
| 3157 | } |
| 3158 | }, |
| 3159 | get_device_queue2: unsafe { |
| 3160 | unsafe extern "system" fn get_device_queue2( |
| 3161 | _device: crate::vk::Device, |
| 3162 | _p_queue_info: *const DeviceQueueInfo2<'_>, |
| 3163 | _p_queue: *mut Queue, |
| 3164 | ) { |
| 3165 | panic!(concat!("Unable to load ", stringify!(get_device_queue2))) |
| 3166 | } |
| 3167 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetDeviceQueue2\0"); |
| 3168 | let val = _f(cname); |
| 3169 | if val.is_null() { |
| 3170 | get_device_queue2 |
| 3171 | } else { |
| 3172 | ::core::mem::transmute(val) |
| 3173 | } |
| 3174 | }, |
| 3175 | create_sampler_ycbcr_conversion: unsafe { |
| 3176 | unsafe extern "system" fn create_sampler_ycbcr_conversion( |
| 3177 | _device: crate::vk::Device, |
| 3178 | _p_create_info: *const SamplerYcbcrConversionCreateInfo<'_>, |
| 3179 | _p_allocator: *const AllocationCallbacks<'_>, |
| 3180 | _p_ycbcr_conversion: *mut SamplerYcbcrConversion, |
| 3181 | ) -> Result { |
| 3182 | panic!(concat!( |
| 3183 | "Unable to load ", |
| 3184 | stringify!(create_sampler_ycbcr_conversion) |
| 3185 | )) |
| 3186 | } |
| 3187 | let cname = |
| 3188 | CStr::from_bytes_with_nul_unchecked(b"vkCreateSamplerYcbcrConversion\0"); |
| 3189 | let val = _f(cname); |
| 3190 | if val.is_null() { |
| 3191 | create_sampler_ycbcr_conversion |
| 3192 | } else { |
| 3193 | ::core::mem::transmute(val) |
| 3194 | } |
| 3195 | }, |
| 3196 | destroy_sampler_ycbcr_conversion: unsafe { |
| 3197 | unsafe extern "system" fn destroy_sampler_ycbcr_conversion( |
| 3198 | _device: crate::vk::Device, |
| 3199 | _ycbcr_conversion: SamplerYcbcrConversion, |
| 3200 | _p_allocator: *const AllocationCallbacks<'_>, |
| 3201 | ) { |
| 3202 | panic!(concat!( |
| 3203 | "Unable to load ", |
| 3204 | stringify!(destroy_sampler_ycbcr_conversion) |
| 3205 | )) |
| 3206 | } |
| 3207 | let cname = |
| 3208 | CStr::from_bytes_with_nul_unchecked(b"vkDestroySamplerYcbcrConversion\0"); |
| 3209 | let val = _f(cname); |
| 3210 | if val.is_null() { |
| 3211 | destroy_sampler_ycbcr_conversion |
| 3212 | } else { |
| 3213 | ::core::mem::transmute(val) |
| 3214 | } |
| 3215 | }, |
| 3216 | create_descriptor_update_template: unsafe { |
| 3217 | unsafe extern "system" fn create_descriptor_update_template( |
| 3218 | _device: crate::vk::Device, |
| 3219 | _p_create_info: *const DescriptorUpdateTemplateCreateInfo<'_>, |
| 3220 | _p_allocator: *const AllocationCallbacks<'_>, |
| 3221 | _p_descriptor_update_template: *mut DescriptorUpdateTemplate, |
| 3222 | ) -> Result { |
| 3223 | panic!(concat!( |
| 3224 | "Unable to load ", |
| 3225 | stringify!(create_descriptor_update_template) |
| 3226 | )) |
| 3227 | } |
| 3228 | let cname = |
| 3229 | CStr::from_bytes_with_nul_unchecked(b"vkCreateDescriptorUpdateTemplate\0"); |
| 3230 | let val = _f(cname); |
| 3231 | if val.is_null() { |
| 3232 | create_descriptor_update_template |
| 3233 | } else { |
| 3234 | ::core::mem::transmute(val) |
| 3235 | } |
| 3236 | }, |
| 3237 | destroy_descriptor_update_template: unsafe { |
| 3238 | unsafe extern "system" fn destroy_descriptor_update_template( |
| 3239 | _device: crate::vk::Device, |
| 3240 | _descriptor_update_template: DescriptorUpdateTemplate, |
| 3241 | _p_allocator: *const AllocationCallbacks<'_>, |
| 3242 | ) { |
| 3243 | panic!(concat!( |
| 3244 | "Unable to load ", |
| 3245 | stringify!(destroy_descriptor_update_template) |
| 3246 | )) |
| 3247 | } |
| 3248 | let cname = |
| 3249 | CStr::from_bytes_with_nul_unchecked(b"vkDestroyDescriptorUpdateTemplate\0"); |
| 3250 | let val = _f(cname); |
| 3251 | if val.is_null() { |
| 3252 | destroy_descriptor_update_template |
| 3253 | } else { |
| 3254 | ::core::mem::transmute(val) |
| 3255 | } |
| 3256 | }, |
| 3257 | update_descriptor_set_with_template: unsafe { |
| 3258 | unsafe extern "system" fn update_descriptor_set_with_template( |
| 3259 | _device: crate::vk::Device, |
| 3260 | _descriptor_set: DescriptorSet, |
| 3261 | _descriptor_update_template: DescriptorUpdateTemplate, |
| 3262 | _p_data: *const c_void, |
| 3263 | ) { |
| 3264 | panic!(concat!( |
| 3265 | "Unable to load ", |
| 3266 | stringify!(update_descriptor_set_with_template) |
| 3267 | )) |
| 3268 | } |
| 3269 | let cname = |
| 3270 | CStr::from_bytes_with_nul_unchecked(b"vkUpdateDescriptorSetWithTemplate\0"); |
| 3271 | let val = _f(cname); |
| 3272 | if val.is_null() { |
| 3273 | update_descriptor_set_with_template |
| 3274 | } else { |
| 3275 | ::core::mem::transmute(val) |
| 3276 | } |
| 3277 | }, |
| 3278 | get_descriptor_set_layout_support: unsafe { |
| 3279 | unsafe extern "system" fn get_descriptor_set_layout_support( |
| 3280 | _device: crate::vk::Device, |
| 3281 | _p_create_info: *const DescriptorSetLayoutCreateInfo<'_>, |
| 3282 | _p_support: *mut DescriptorSetLayoutSupport<'_>, |
| 3283 | ) { |
| 3284 | panic!(concat!( |
| 3285 | "Unable to load ", |
| 3286 | stringify!(get_descriptor_set_layout_support) |
| 3287 | )) |
| 3288 | } |
| 3289 | let cname = |
| 3290 | CStr::from_bytes_with_nul_unchecked(b"vkGetDescriptorSetLayoutSupport\0"); |
| 3291 | let val = _f(cname); |
| 3292 | if val.is_null() { |
| 3293 | get_descriptor_set_layout_support |
| 3294 | } else { |
| 3295 | ::core::mem::transmute(val) |
| 3296 | } |
| 3297 | }, |
| 3298 | } |
| 3299 | } |
| 3300 | } |
| 3301 | #[derive(Clone)] |
| 3302 | #[doc = "Raw Vulkan 1.2 entry point function pointers"] |
| 3303 | pub struct EntryFnV1_2; |
| 3304 | #[derive(Clone)] |
| 3305 | #[doc = "Raw Vulkan 1.2 instance-level function pointers"] |
| 3306 | pub struct InstanceFnV1_2; |
| 3307 | #[derive(Clone)] |
| 3308 | #[doc = "Raw Vulkan 1.2 device-level function pointers"] |
| 3309 | pub struct DeviceFnV1_2 { |
| 3310 | pub cmd_draw_indirect_count: PFN_vkCmdDrawIndirectCount, |
| 3311 | pub cmd_draw_indexed_indirect_count: PFN_vkCmdDrawIndexedIndirectCount, |
| 3312 | pub create_render_pass2: PFN_vkCreateRenderPass2, |
| 3313 | pub cmd_begin_render_pass2: PFN_vkCmdBeginRenderPass2, |
| 3314 | pub cmd_next_subpass2: PFN_vkCmdNextSubpass2, |
| 3315 | pub cmd_end_render_pass2: PFN_vkCmdEndRenderPass2, |
| 3316 | pub reset_query_pool: PFN_vkResetQueryPool, |
| 3317 | pub get_semaphore_counter_value: PFN_vkGetSemaphoreCounterValue, |
| 3318 | pub wait_semaphores: PFN_vkWaitSemaphores, |
| 3319 | pub signal_semaphore: PFN_vkSignalSemaphore, |
| 3320 | pub get_buffer_device_address: PFN_vkGetBufferDeviceAddress, |
| 3321 | pub get_buffer_opaque_capture_address: PFN_vkGetBufferOpaqueCaptureAddress, |
| 3322 | pub get_device_memory_opaque_capture_address: PFN_vkGetDeviceMemoryOpaqueCaptureAddress, |
| 3323 | } |
| 3324 | unsafe impl Send for DeviceFnV1_2 {} |
| 3325 | unsafe impl Sync for DeviceFnV1_2 {} |
| 3326 | impl DeviceFnV1_2 { |
| 3327 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 3328 | Self::load_erased(&mut f) |
| 3329 | } |
| 3330 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 3331 | Self { |
| 3332 | cmd_draw_indirect_count: unsafe { |
| 3333 | unsafe extern "system" fn cmd_draw_indirect_count( |
| 3334 | _command_buffer: CommandBuffer, |
| 3335 | _buffer: Buffer, |
| 3336 | _offset: DeviceSize, |
| 3337 | _count_buffer: Buffer, |
| 3338 | _count_buffer_offset: DeviceSize, |
| 3339 | _max_draw_count: u32, |
| 3340 | _stride: u32, |
| 3341 | ) { |
| 3342 | panic!(concat!( |
| 3343 | "Unable to load ", |
| 3344 | stringify!(cmd_draw_indirect_count) |
| 3345 | )) |
| 3346 | } |
| 3347 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawIndirectCount\0"); |
| 3348 | let val = _f(cname); |
| 3349 | if val.is_null() { |
| 3350 | cmd_draw_indirect_count |
| 3351 | } else { |
| 3352 | ::core::mem::transmute(val) |
| 3353 | } |
| 3354 | }, |
| 3355 | cmd_draw_indexed_indirect_count: unsafe { |
| 3356 | unsafe extern "system" fn cmd_draw_indexed_indirect_count( |
| 3357 | _command_buffer: CommandBuffer, |
| 3358 | _buffer: Buffer, |
| 3359 | _offset: DeviceSize, |
| 3360 | _count_buffer: Buffer, |
| 3361 | _count_buffer_offset: DeviceSize, |
| 3362 | _max_draw_count: u32, |
| 3363 | _stride: u32, |
| 3364 | ) { |
| 3365 | panic!(concat!( |
| 3366 | "Unable to load ", |
| 3367 | stringify!(cmd_draw_indexed_indirect_count) |
| 3368 | )) |
| 3369 | } |
| 3370 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdDrawIndexedIndirectCount\0"); |
| 3371 | let val = _f(cname); |
| 3372 | if val.is_null() { |
| 3373 | cmd_draw_indexed_indirect_count |
| 3374 | } else { |
| 3375 | ::core::mem::transmute(val) |
| 3376 | } |
| 3377 | }, |
| 3378 | create_render_pass2: unsafe { |
| 3379 | unsafe extern "system" fn create_render_pass2( |
| 3380 | _device: crate::vk::Device, |
| 3381 | _p_create_info: *const RenderPassCreateInfo2<'_>, |
| 3382 | _p_allocator: *const AllocationCallbacks<'_>, |
| 3383 | _p_render_pass: *mut RenderPass, |
| 3384 | ) -> Result { |
| 3385 | panic!(concat!("Unable to load ", stringify!(create_render_pass2))) |
| 3386 | } |
| 3387 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreateRenderPass2\0"); |
| 3388 | let val = _f(cname); |
| 3389 | if val.is_null() { |
| 3390 | create_render_pass2 |
| 3391 | } else { |
| 3392 | ::core::mem::transmute(val) |
| 3393 | } |
| 3394 | }, |
| 3395 | cmd_begin_render_pass2: unsafe { |
| 3396 | unsafe extern "system" fn cmd_begin_render_pass2( |
| 3397 | _command_buffer: CommandBuffer, |
| 3398 | _p_render_pass_begin: *const RenderPassBeginInfo<'_>, |
| 3399 | _p_subpass_begin_info: *const SubpassBeginInfo<'_>, |
| 3400 | ) { |
| 3401 | panic!(concat!( |
| 3402 | "Unable to load ", |
| 3403 | stringify!(cmd_begin_render_pass2) |
| 3404 | )) |
| 3405 | } |
| 3406 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBeginRenderPass2\0"); |
| 3407 | let val = _f(cname); |
| 3408 | if val.is_null() { |
| 3409 | cmd_begin_render_pass2 |
| 3410 | } else { |
| 3411 | ::core::mem::transmute(val) |
| 3412 | } |
| 3413 | }, |
| 3414 | cmd_next_subpass2: unsafe { |
| 3415 | unsafe extern "system" fn cmd_next_subpass2( |
| 3416 | _command_buffer: CommandBuffer, |
| 3417 | _p_subpass_begin_info: *const SubpassBeginInfo<'_>, |
| 3418 | _p_subpass_end_info: *const SubpassEndInfo<'_>, |
| 3419 | ) { |
| 3420 | panic!(concat!("Unable to load ", stringify!(cmd_next_subpass2))) |
| 3421 | } |
| 3422 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdNextSubpass2\0"); |
| 3423 | let val = _f(cname); |
| 3424 | if val.is_null() { |
| 3425 | cmd_next_subpass2 |
| 3426 | } else { |
| 3427 | ::core::mem::transmute(val) |
| 3428 | } |
| 3429 | }, |
| 3430 | cmd_end_render_pass2: unsafe { |
| 3431 | unsafe extern "system" fn cmd_end_render_pass2( |
| 3432 | _command_buffer: CommandBuffer, |
| 3433 | _p_subpass_end_info: *const SubpassEndInfo<'_>, |
| 3434 | ) { |
| 3435 | panic!(concat!("Unable to load ", stringify!(cmd_end_render_pass2))) |
| 3436 | } |
| 3437 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdEndRenderPass2\0"); |
| 3438 | let val = _f(cname); |
| 3439 | if val.is_null() { |
| 3440 | cmd_end_render_pass2 |
| 3441 | } else { |
| 3442 | ::core::mem::transmute(val) |
| 3443 | } |
| 3444 | }, |
| 3445 | reset_query_pool: unsafe { |
| 3446 | unsafe extern "system" fn reset_query_pool( |
| 3447 | _device: crate::vk::Device, |
| 3448 | _query_pool: QueryPool, |
| 3449 | _first_query: u32, |
| 3450 | _query_count: u32, |
| 3451 | ) { |
| 3452 | panic!(concat!("Unable to load ", stringify!(reset_query_pool))) |
| 3453 | } |
| 3454 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkResetQueryPool\0"); |
| 3455 | let val = _f(cname); |
| 3456 | if val.is_null() { |
| 3457 | reset_query_pool |
| 3458 | } else { |
| 3459 | ::core::mem::transmute(val) |
| 3460 | } |
| 3461 | }, |
| 3462 | get_semaphore_counter_value: unsafe { |
| 3463 | unsafe extern "system" fn get_semaphore_counter_value( |
| 3464 | _device: crate::vk::Device, |
| 3465 | _semaphore: Semaphore, |
| 3466 | _p_value: *mut u64, |
| 3467 | ) -> Result { |
| 3468 | panic!(concat!( |
| 3469 | "Unable to load ", |
| 3470 | stringify!(get_semaphore_counter_value) |
| 3471 | )) |
| 3472 | } |
| 3473 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetSemaphoreCounterValue\0"); |
| 3474 | let val = _f(cname); |
| 3475 | if val.is_null() { |
| 3476 | get_semaphore_counter_value |
| 3477 | } else { |
| 3478 | ::core::mem::transmute(val) |
| 3479 | } |
| 3480 | }, |
| 3481 | wait_semaphores: unsafe { |
| 3482 | unsafe extern "system" fn wait_semaphores( |
| 3483 | _device: crate::vk::Device, |
| 3484 | _p_wait_info: *const SemaphoreWaitInfo<'_>, |
| 3485 | _timeout: u64, |
| 3486 | ) -> Result { |
| 3487 | panic!(concat!("Unable to load ", stringify!(wait_semaphores))) |
| 3488 | } |
| 3489 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkWaitSemaphores\0"); |
| 3490 | let val = _f(cname); |
| 3491 | if val.is_null() { |
| 3492 | wait_semaphores |
| 3493 | } else { |
| 3494 | ::core::mem::transmute(val) |
| 3495 | } |
| 3496 | }, |
| 3497 | signal_semaphore: unsafe { |
| 3498 | unsafe extern "system" fn signal_semaphore( |
| 3499 | _device: crate::vk::Device, |
| 3500 | _p_signal_info: *const SemaphoreSignalInfo<'_>, |
| 3501 | ) -> Result { |
| 3502 | panic!(concat!("Unable to load ", stringify!(signal_semaphore))) |
| 3503 | } |
| 3504 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkSignalSemaphore\0"); |
| 3505 | let val = _f(cname); |
| 3506 | if val.is_null() { |
| 3507 | signal_semaphore |
| 3508 | } else { |
| 3509 | ::core::mem::transmute(val) |
| 3510 | } |
| 3511 | }, |
| 3512 | get_buffer_device_address: unsafe { |
| 3513 | unsafe extern "system" fn get_buffer_device_address( |
| 3514 | _device: crate::vk::Device, |
| 3515 | _p_info: *const BufferDeviceAddressInfo<'_>, |
| 3516 | ) -> DeviceAddress { |
| 3517 | panic!(concat!( |
| 3518 | "Unable to load ", |
| 3519 | stringify!(get_buffer_device_address) |
| 3520 | )) |
| 3521 | } |
| 3522 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetBufferDeviceAddress\0"); |
| 3523 | let val = _f(cname); |
| 3524 | if val.is_null() { |
| 3525 | get_buffer_device_address |
| 3526 | } else { |
| 3527 | ::core::mem::transmute(val) |
| 3528 | } |
| 3529 | }, |
| 3530 | get_buffer_opaque_capture_address: unsafe { |
| 3531 | unsafe extern "system" fn get_buffer_opaque_capture_address( |
| 3532 | _device: crate::vk::Device, |
| 3533 | _p_info: *const BufferDeviceAddressInfo<'_>, |
| 3534 | ) -> u64 { |
| 3535 | panic!(concat!( |
| 3536 | "Unable to load ", |
| 3537 | stringify!(get_buffer_opaque_capture_address) |
| 3538 | )) |
| 3539 | } |
| 3540 | let cname = |
| 3541 | CStr::from_bytes_with_nul_unchecked(b"vkGetBufferOpaqueCaptureAddress\0"); |
| 3542 | let val = _f(cname); |
| 3543 | if val.is_null() { |
| 3544 | get_buffer_opaque_capture_address |
| 3545 | } else { |
| 3546 | ::core::mem::transmute(val) |
| 3547 | } |
| 3548 | }, |
| 3549 | get_device_memory_opaque_capture_address: unsafe { |
| 3550 | unsafe extern "system" fn get_device_memory_opaque_capture_address( |
| 3551 | _device: crate::vk::Device, |
| 3552 | _p_info: *const DeviceMemoryOpaqueCaptureAddressInfo<'_>, |
| 3553 | ) -> u64 { |
| 3554 | panic!(concat!( |
| 3555 | "Unable to load ", |
| 3556 | stringify!(get_device_memory_opaque_capture_address) |
| 3557 | )) |
| 3558 | } |
| 3559 | let cname = |
| 3560 | CStr::from_bytes_with_nul_unchecked(b"vkGetDeviceMemoryOpaqueCaptureAddress\0"); |
| 3561 | let val = _f(cname); |
| 3562 | if val.is_null() { |
| 3563 | get_device_memory_opaque_capture_address |
| 3564 | } else { |
| 3565 | ::core::mem::transmute(val) |
| 3566 | } |
| 3567 | }, |
| 3568 | } |
| 3569 | } |
| 3570 | } |
| 3571 | #[derive(Clone)] |
| 3572 | #[doc = "Raw Vulkan 1.3 entry point function pointers"] |
| 3573 | pub struct EntryFnV1_3; |
| 3574 | #[derive(Clone)] |
| 3575 | #[doc = "Raw Vulkan 1.3 instance-level function pointers"] |
| 3576 | pub struct InstanceFnV1_3 { |
| 3577 | pub get_physical_device_tool_properties: PFN_vkGetPhysicalDeviceToolProperties, |
| 3578 | } |
| 3579 | unsafe impl Send for InstanceFnV1_3 {} |
| 3580 | unsafe impl Sync for InstanceFnV1_3 {} |
| 3581 | impl InstanceFnV1_3 { |
| 3582 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 3583 | Self::load_erased(&mut f) |
| 3584 | } |
| 3585 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 3586 | Self { |
| 3587 | get_physical_device_tool_properties: unsafe { |
| 3588 | unsafe extern "system" fn get_physical_device_tool_properties( |
| 3589 | _physical_device: PhysicalDevice, |
| 3590 | _p_tool_count: *mut u32, |
| 3591 | _p_tool_properties: *mut PhysicalDeviceToolProperties<'_>, |
| 3592 | ) -> Result { |
| 3593 | panic!(concat!( |
| 3594 | "Unable to load ", |
| 3595 | stringify!(get_physical_device_tool_properties) |
| 3596 | )) |
| 3597 | } |
| 3598 | let cname = |
| 3599 | CStr::from_bytes_with_nul_unchecked(b"vkGetPhysicalDeviceToolProperties\0"); |
| 3600 | let val = _f(cname); |
| 3601 | if val.is_null() { |
| 3602 | get_physical_device_tool_properties |
| 3603 | } else { |
| 3604 | ::core::mem::transmute(val) |
| 3605 | } |
| 3606 | }, |
| 3607 | } |
| 3608 | } |
| 3609 | } |
| 3610 | #[derive(Clone)] |
| 3611 | #[doc = "Raw Vulkan 1.3 device-level function pointers"] |
| 3612 | pub struct DeviceFnV1_3 { |
| 3613 | pub create_private_data_slot: PFN_vkCreatePrivateDataSlot, |
| 3614 | pub destroy_private_data_slot: PFN_vkDestroyPrivateDataSlot, |
| 3615 | pub set_private_data: PFN_vkSetPrivateData, |
| 3616 | pub get_private_data: PFN_vkGetPrivateData, |
| 3617 | pub cmd_set_event2: PFN_vkCmdSetEvent2, |
| 3618 | pub cmd_reset_event2: PFN_vkCmdResetEvent2, |
| 3619 | pub cmd_wait_events2: PFN_vkCmdWaitEvents2, |
| 3620 | pub cmd_pipeline_barrier2: PFN_vkCmdPipelineBarrier2, |
| 3621 | pub cmd_write_timestamp2: PFN_vkCmdWriteTimestamp2, |
| 3622 | pub queue_submit2: PFN_vkQueueSubmit2, |
| 3623 | pub cmd_copy_buffer2: PFN_vkCmdCopyBuffer2, |
| 3624 | pub cmd_copy_image2: PFN_vkCmdCopyImage2, |
| 3625 | pub cmd_copy_buffer_to_image2: PFN_vkCmdCopyBufferToImage2, |
| 3626 | pub cmd_copy_image_to_buffer2: PFN_vkCmdCopyImageToBuffer2, |
| 3627 | pub cmd_blit_image2: PFN_vkCmdBlitImage2, |
| 3628 | pub cmd_resolve_image2: PFN_vkCmdResolveImage2, |
| 3629 | pub cmd_begin_rendering: PFN_vkCmdBeginRendering, |
| 3630 | pub cmd_end_rendering: PFN_vkCmdEndRendering, |
| 3631 | pub cmd_set_cull_mode: PFN_vkCmdSetCullMode, |
| 3632 | pub cmd_set_front_face: PFN_vkCmdSetFrontFace, |
| 3633 | pub cmd_set_primitive_topology: PFN_vkCmdSetPrimitiveTopology, |
| 3634 | pub cmd_set_viewport_with_count: PFN_vkCmdSetViewportWithCount, |
| 3635 | pub cmd_set_scissor_with_count: PFN_vkCmdSetScissorWithCount, |
| 3636 | pub cmd_bind_vertex_buffers2: PFN_vkCmdBindVertexBuffers2, |
| 3637 | pub cmd_set_depth_test_enable: PFN_vkCmdSetDepthTestEnable, |
| 3638 | pub cmd_set_depth_write_enable: PFN_vkCmdSetDepthWriteEnable, |
| 3639 | pub cmd_set_depth_compare_op: PFN_vkCmdSetDepthCompareOp, |
| 3640 | pub cmd_set_depth_bounds_test_enable: PFN_vkCmdSetDepthBoundsTestEnable, |
| 3641 | pub cmd_set_stencil_test_enable: PFN_vkCmdSetStencilTestEnable, |
| 3642 | pub cmd_set_stencil_op: PFN_vkCmdSetStencilOp, |
| 3643 | pub cmd_set_rasterizer_discard_enable: PFN_vkCmdSetRasterizerDiscardEnable, |
| 3644 | pub cmd_set_depth_bias_enable: PFN_vkCmdSetDepthBiasEnable, |
| 3645 | pub cmd_set_primitive_restart_enable: PFN_vkCmdSetPrimitiveRestartEnable, |
| 3646 | pub get_device_buffer_memory_requirements: PFN_vkGetDeviceBufferMemoryRequirements, |
| 3647 | pub get_device_image_memory_requirements: PFN_vkGetDeviceImageMemoryRequirements, |
| 3648 | pub get_device_image_sparse_memory_requirements: PFN_vkGetDeviceImageSparseMemoryRequirements, |
| 3649 | } |
| 3650 | unsafe impl Send for DeviceFnV1_3 {} |
| 3651 | unsafe impl Sync for DeviceFnV1_3 {} |
| 3652 | impl DeviceFnV1_3 { |
| 3653 | pub fn load<F: FnMut(&CStr) -> *const c_void>(mut f: F) -> Self { |
| 3654 | Self::load_erased(&mut f) |
| 3655 | } |
| 3656 | fn load_erased(_f: &mut dyn FnMut(&CStr) -> *const c_void) -> Self { |
| 3657 | Self { |
| 3658 | create_private_data_slot: unsafe { |
| 3659 | unsafe extern "system" fn create_private_data_slot( |
| 3660 | _device: crate::vk::Device, |
| 3661 | _p_create_info: *const PrivateDataSlotCreateInfo<'_>, |
| 3662 | _p_allocator: *const AllocationCallbacks<'_>, |
| 3663 | _p_private_data_slot: *mut PrivateDataSlot, |
| 3664 | ) -> Result { |
| 3665 | panic!(concat!( |
| 3666 | "Unable to load ", |
| 3667 | stringify!(create_private_data_slot) |
| 3668 | )) |
| 3669 | } |
| 3670 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCreatePrivateDataSlot\0"); |
| 3671 | let val = _f(cname); |
| 3672 | if val.is_null() { |
| 3673 | create_private_data_slot |
| 3674 | } else { |
| 3675 | ::core::mem::transmute(val) |
| 3676 | } |
| 3677 | }, |
| 3678 | destroy_private_data_slot: unsafe { |
| 3679 | unsafe extern "system" fn destroy_private_data_slot( |
| 3680 | _device: crate::vk::Device, |
| 3681 | _private_data_slot: PrivateDataSlot, |
| 3682 | _p_allocator: *const AllocationCallbacks<'_>, |
| 3683 | ) { |
| 3684 | panic!(concat!( |
| 3685 | "Unable to load ", |
| 3686 | stringify!(destroy_private_data_slot) |
| 3687 | )) |
| 3688 | } |
| 3689 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkDestroyPrivateDataSlot\0"); |
| 3690 | let val = _f(cname); |
| 3691 | if val.is_null() { |
| 3692 | destroy_private_data_slot |
| 3693 | } else { |
| 3694 | ::core::mem::transmute(val) |
| 3695 | } |
| 3696 | }, |
| 3697 | set_private_data: unsafe { |
| 3698 | unsafe extern "system" fn set_private_data( |
| 3699 | _device: crate::vk::Device, |
| 3700 | _object_type: ObjectType, |
| 3701 | _object_handle: u64, |
| 3702 | _private_data_slot: PrivateDataSlot, |
| 3703 | _data: u64, |
| 3704 | ) -> Result { |
| 3705 | panic!(concat!("Unable to load ", stringify!(set_private_data))) |
| 3706 | } |
| 3707 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkSetPrivateData\0"); |
| 3708 | let val = _f(cname); |
| 3709 | if val.is_null() { |
| 3710 | set_private_data |
| 3711 | } else { |
| 3712 | ::core::mem::transmute(val) |
| 3713 | } |
| 3714 | }, |
| 3715 | get_private_data: unsafe { |
| 3716 | unsafe extern "system" fn get_private_data( |
| 3717 | _device: crate::vk::Device, |
| 3718 | _object_type: ObjectType, |
| 3719 | _object_handle: u64, |
| 3720 | _private_data_slot: PrivateDataSlot, |
| 3721 | _p_data: *mut u64, |
| 3722 | ) { |
| 3723 | panic!(concat!("Unable to load ", stringify!(get_private_data))) |
| 3724 | } |
| 3725 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkGetPrivateData\0"); |
| 3726 | let val = _f(cname); |
| 3727 | if val.is_null() { |
| 3728 | get_private_data |
| 3729 | } else { |
| 3730 | ::core::mem::transmute(val) |
| 3731 | } |
| 3732 | }, |
| 3733 | cmd_set_event2: unsafe { |
| 3734 | unsafe extern "system" fn cmd_set_event2( |
| 3735 | _command_buffer: CommandBuffer, |
| 3736 | _event: Event, |
| 3737 | _p_dependency_info: *const DependencyInfo<'_>, |
| 3738 | ) { |
| 3739 | panic!(concat!("Unable to load ", stringify!(cmd_set_event2))) |
| 3740 | } |
| 3741 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetEvent2\0"); |
| 3742 | let val = _f(cname); |
| 3743 | if val.is_null() { |
| 3744 | cmd_set_event2 |
| 3745 | } else { |
| 3746 | ::core::mem::transmute(val) |
| 3747 | } |
| 3748 | }, |
| 3749 | cmd_reset_event2: unsafe { |
| 3750 | unsafe extern "system" fn cmd_reset_event2( |
| 3751 | _command_buffer: CommandBuffer, |
| 3752 | _event: Event, |
| 3753 | _stage_mask: PipelineStageFlags2, |
| 3754 | ) { |
| 3755 | panic!(concat!("Unable to load ", stringify!(cmd_reset_event2))) |
| 3756 | } |
| 3757 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdResetEvent2\0"); |
| 3758 | let val = _f(cname); |
| 3759 | if val.is_null() { |
| 3760 | cmd_reset_event2 |
| 3761 | } else { |
| 3762 | ::core::mem::transmute(val) |
| 3763 | } |
| 3764 | }, |
| 3765 | cmd_wait_events2: unsafe { |
| 3766 | unsafe extern "system" fn cmd_wait_events2( |
| 3767 | _command_buffer: CommandBuffer, |
| 3768 | _event_count: u32, |
| 3769 | _p_events: *const Event, |
| 3770 | _p_dependency_infos: *const DependencyInfo<'_>, |
| 3771 | ) { |
| 3772 | panic!(concat!("Unable to load ", stringify!(cmd_wait_events2))) |
| 3773 | } |
| 3774 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdWaitEvents2\0"); |
| 3775 | let val = _f(cname); |
| 3776 | if val.is_null() { |
| 3777 | cmd_wait_events2 |
| 3778 | } else { |
| 3779 | ::core::mem::transmute(val) |
| 3780 | } |
| 3781 | }, |
| 3782 | cmd_pipeline_barrier2: unsafe { |
| 3783 | unsafe extern "system" fn cmd_pipeline_barrier2( |
| 3784 | _command_buffer: CommandBuffer, |
| 3785 | _p_dependency_info: *const DependencyInfo<'_>, |
| 3786 | ) { |
| 3787 | panic!(concat!( |
| 3788 | "Unable to load ", |
| 3789 | stringify!(cmd_pipeline_barrier2) |
| 3790 | )) |
| 3791 | } |
| 3792 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdPipelineBarrier2\0"); |
| 3793 | let val = _f(cname); |
| 3794 | if val.is_null() { |
| 3795 | cmd_pipeline_barrier2 |
| 3796 | } else { |
| 3797 | ::core::mem::transmute(val) |
| 3798 | } |
| 3799 | }, |
| 3800 | cmd_write_timestamp2: unsafe { |
| 3801 | unsafe extern "system" fn cmd_write_timestamp2( |
| 3802 | _command_buffer: CommandBuffer, |
| 3803 | _stage: PipelineStageFlags2, |
| 3804 | _query_pool: QueryPool, |
| 3805 | _query: u32, |
| 3806 | ) { |
| 3807 | panic!(concat!("Unable to load ", stringify!(cmd_write_timestamp2))) |
| 3808 | } |
| 3809 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdWriteTimestamp2\0"); |
| 3810 | let val = _f(cname); |
| 3811 | if val.is_null() { |
| 3812 | cmd_write_timestamp2 |
| 3813 | } else { |
| 3814 | ::core::mem::transmute(val) |
| 3815 | } |
| 3816 | }, |
| 3817 | queue_submit2: unsafe { |
| 3818 | unsafe extern "system" fn queue_submit2( |
| 3819 | _queue: Queue, |
| 3820 | _submit_count: u32, |
| 3821 | _p_submits: *const SubmitInfo2<'_>, |
| 3822 | _fence: Fence, |
| 3823 | ) -> Result { |
| 3824 | panic!(concat!("Unable to load ", stringify!(queue_submit2))) |
| 3825 | } |
| 3826 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkQueueSubmit2\0"); |
| 3827 | let val = _f(cname); |
| 3828 | if val.is_null() { |
| 3829 | queue_submit2 |
| 3830 | } else { |
| 3831 | ::core::mem::transmute(val) |
| 3832 | } |
| 3833 | }, |
| 3834 | cmd_copy_buffer2: unsafe { |
| 3835 | unsafe extern "system" fn cmd_copy_buffer2( |
| 3836 | _command_buffer: CommandBuffer, |
| 3837 | _p_copy_buffer_info: *const CopyBufferInfo2<'_>, |
| 3838 | ) { |
| 3839 | panic!(concat!("Unable to load ", stringify!(cmd_copy_buffer2))) |
| 3840 | } |
| 3841 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyBuffer2\0"); |
| 3842 | let val = _f(cname); |
| 3843 | if val.is_null() { |
| 3844 | cmd_copy_buffer2 |
| 3845 | } else { |
| 3846 | ::core::mem::transmute(val) |
| 3847 | } |
| 3848 | }, |
| 3849 | cmd_copy_image2: unsafe { |
| 3850 | unsafe extern "system" fn cmd_copy_image2( |
| 3851 | _command_buffer: CommandBuffer, |
| 3852 | _p_copy_image_info: *const CopyImageInfo2<'_>, |
| 3853 | ) { |
| 3854 | panic!(concat!("Unable to load ", stringify!(cmd_copy_image2))) |
| 3855 | } |
| 3856 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyImage2\0"); |
| 3857 | let val = _f(cname); |
| 3858 | if val.is_null() { |
| 3859 | cmd_copy_image2 |
| 3860 | } else { |
| 3861 | ::core::mem::transmute(val) |
| 3862 | } |
| 3863 | }, |
| 3864 | cmd_copy_buffer_to_image2: unsafe { |
| 3865 | unsafe extern "system" fn cmd_copy_buffer_to_image2( |
| 3866 | _command_buffer: CommandBuffer, |
| 3867 | _p_copy_buffer_to_image_info: *const CopyBufferToImageInfo2<'_>, |
| 3868 | ) { |
| 3869 | panic!(concat!( |
| 3870 | "Unable to load ", |
| 3871 | stringify!(cmd_copy_buffer_to_image2) |
| 3872 | )) |
| 3873 | } |
| 3874 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyBufferToImage2\0"); |
| 3875 | let val = _f(cname); |
| 3876 | if val.is_null() { |
| 3877 | cmd_copy_buffer_to_image2 |
| 3878 | } else { |
| 3879 | ::core::mem::transmute(val) |
| 3880 | } |
| 3881 | }, |
| 3882 | cmd_copy_image_to_buffer2: unsafe { |
| 3883 | unsafe extern "system" fn cmd_copy_image_to_buffer2( |
| 3884 | _command_buffer: CommandBuffer, |
| 3885 | _p_copy_image_to_buffer_info: *const CopyImageToBufferInfo2<'_>, |
| 3886 | ) { |
| 3887 | panic!(concat!( |
| 3888 | "Unable to load ", |
| 3889 | stringify!(cmd_copy_image_to_buffer2) |
| 3890 | )) |
| 3891 | } |
| 3892 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdCopyImageToBuffer2\0"); |
| 3893 | let val = _f(cname); |
| 3894 | if val.is_null() { |
| 3895 | cmd_copy_image_to_buffer2 |
| 3896 | } else { |
| 3897 | ::core::mem::transmute(val) |
| 3898 | } |
| 3899 | }, |
| 3900 | cmd_blit_image2: unsafe { |
| 3901 | unsafe extern "system" fn cmd_blit_image2( |
| 3902 | _command_buffer: CommandBuffer, |
| 3903 | _p_blit_image_info: *const BlitImageInfo2<'_>, |
| 3904 | ) { |
| 3905 | panic!(concat!("Unable to load ", stringify!(cmd_blit_image2))) |
| 3906 | } |
| 3907 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBlitImage2\0"); |
| 3908 | let val = _f(cname); |
| 3909 | if val.is_null() { |
| 3910 | cmd_blit_image2 |
| 3911 | } else { |
| 3912 | ::core::mem::transmute(val) |
| 3913 | } |
| 3914 | }, |
| 3915 | cmd_resolve_image2: unsafe { |
| 3916 | unsafe extern "system" fn cmd_resolve_image2( |
| 3917 | _command_buffer: CommandBuffer, |
| 3918 | _p_resolve_image_info: *const ResolveImageInfo2<'_>, |
| 3919 | ) { |
| 3920 | panic!(concat!("Unable to load ", stringify!(cmd_resolve_image2))) |
| 3921 | } |
| 3922 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdResolveImage2\0"); |
| 3923 | let val = _f(cname); |
| 3924 | if val.is_null() { |
| 3925 | cmd_resolve_image2 |
| 3926 | } else { |
| 3927 | ::core::mem::transmute(val) |
| 3928 | } |
| 3929 | }, |
| 3930 | cmd_begin_rendering: unsafe { |
| 3931 | unsafe extern "system" fn cmd_begin_rendering( |
| 3932 | _command_buffer: CommandBuffer, |
| 3933 | _p_rendering_info: *const RenderingInfo<'_>, |
| 3934 | ) { |
| 3935 | panic!(concat!("Unable to load ", stringify!(cmd_begin_rendering))) |
| 3936 | } |
| 3937 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBeginRendering\0"); |
| 3938 | let val = _f(cname); |
| 3939 | if val.is_null() { |
| 3940 | cmd_begin_rendering |
| 3941 | } else { |
| 3942 | ::core::mem::transmute(val) |
| 3943 | } |
| 3944 | }, |
| 3945 | cmd_end_rendering: unsafe { |
| 3946 | unsafe extern "system" fn cmd_end_rendering(_command_buffer: CommandBuffer) { |
| 3947 | panic!(concat!("Unable to load ", stringify!(cmd_end_rendering))) |
| 3948 | } |
| 3949 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdEndRendering\0"); |
| 3950 | let val = _f(cname); |
| 3951 | if val.is_null() { |
| 3952 | cmd_end_rendering |
| 3953 | } else { |
| 3954 | ::core::mem::transmute(val) |
| 3955 | } |
| 3956 | }, |
| 3957 | cmd_set_cull_mode: unsafe { |
| 3958 | unsafe extern "system" fn cmd_set_cull_mode( |
| 3959 | _command_buffer: CommandBuffer, |
| 3960 | _cull_mode: CullModeFlags, |
| 3961 | ) { |
| 3962 | panic!(concat!("Unable to load ", stringify!(cmd_set_cull_mode))) |
| 3963 | } |
| 3964 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetCullMode\0"); |
| 3965 | let val = _f(cname); |
| 3966 | if val.is_null() { |
| 3967 | cmd_set_cull_mode |
| 3968 | } else { |
| 3969 | ::core::mem::transmute(val) |
| 3970 | } |
| 3971 | }, |
| 3972 | cmd_set_front_face: unsafe { |
| 3973 | unsafe extern "system" fn cmd_set_front_face( |
| 3974 | _command_buffer: CommandBuffer, |
| 3975 | _front_face: FrontFace, |
| 3976 | ) { |
| 3977 | panic!(concat!("Unable to load ", stringify!(cmd_set_front_face))) |
| 3978 | } |
| 3979 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetFrontFace\0"); |
| 3980 | let val = _f(cname); |
| 3981 | if val.is_null() { |
| 3982 | cmd_set_front_face |
| 3983 | } else { |
| 3984 | ::core::mem::transmute(val) |
| 3985 | } |
| 3986 | }, |
| 3987 | cmd_set_primitive_topology: unsafe { |
| 3988 | unsafe extern "system" fn cmd_set_primitive_topology( |
| 3989 | _command_buffer: CommandBuffer, |
| 3990 | _primitive_topology: PrimitiveTopology, |
| 3991 | ) { |
| 3992 | panic!(concat!( |
| 3993 | "Unable to load ", |
| 3994 | stringify!(cmd_set_primitive_topology) |
| 3995 | )) |
| 3996 | } |
| 3997 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetPrimitiveTopology\0"); |
| 3998 | let val = _f(cname); |
| 3999 | if val.is_null() { |
| 4000 | cmd_set_primitive_topology |
| 4001 | } else { |
| 4002 | ::core::mem::transmute(val) |
| 4003 | } |
| 4004 | }, |
| 4005 | cmd_set_viewport_with_count: unsafe { |
| 4006 | unsafe extern "system" fn cmd_set_viewport_with_count( |
| 4007 | _command_buffer: CommandBuffer, |
| 4008 | _viewport_count: u32, |
| 4009 | _p_viewports: *const Viewport, |
| 4010 | ) { |
| 4011 | panic!(concat!( |
| 4012 | "Unable to load ", |
| 4013 | stringify!(cmd_set_viewport_with_count) |
| 4014 | )) |
| 4015 | } |
| 4016 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetViewportWithCount\0"); |
| 4017 | let val = _f(cname); |
| 4018 | if val.is_null() { |
| 4019 | cmd_set_viewport_with_count |
| 4020 | } else { |
| 4021 | ::core::mem::transmute(val) |
| 4022 | } |
| 4023 | }, |
| 4024 | cmd_set_scissor_with_count: unsafe { |
| 4025 | unsafe extern "system" fn cmd_set_scissor_with_count( |
| 4026 | _command_buffer: CommandBuffer, |
| 4027 | _scissor_count: u32, |
| 4028 | _p_scissors: *const Rect2D, |
| 4029 | ) { |
| 4030 | panic!(concat!( |
| 4031 | "Unable to load ", |
| 4032 | stringify!(cmd_set_scissor_with_count) |
| 4033 | )) |
| 4034 | } |
| 4035 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetScissorWithCount\0"); |
| 4036 | let val = _f(cname); |
| 4037 | if val.is_null() { |
| 4038 | cmd_set_scissor_with_count |
| 4039 | } else { |
| 4040 | ::core::mem::transmute(val) |
| 4041 | } |
| 4042 | }, |
| 4043 | cmd_bind_vertex_buffers2: unsafe { |
| 4044 | unsafe extern "system" fn cmd_bind_vertex_buffers2( |
| 4045 | _command_buffer: CommandBuffer, |
| 4046 | _first_binding: u32, |
| 4047 | _binding_count: u32, |
| 4048 | _p_buffers: *const Buffer, |
| 4049 | _p_offsets: *const DeviceSize, |
| 4050 | _p_sizes: *const DeviceSize, |
| 4051 | _p_strides: *const DeviceSize, |
| 4052 | ) { |
| 4053 | panic!(concat!( |
| 4054 | "Unable to load ", |
| 4055 | stringify!(cmd_bind_vertex_buffers2) |
| 4056 | )) |
| 4057 | } |
| 4058 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdBindVertexBuffers2\0"); |
| 4059 | let val = _f(cname); |
| 4060 | if val.is_null() { |
| 4061 | cmd_bind_vertex_buffers2 |
| 4062 | } else { |
| 4063 | ::core::mem::transmute(val) |
| 4064 | } |
| 4065 | }, |
| 4066 | cmd_set_depth_test_enable: unsafe { |
| 4067 | unsafe extern "system" fn cmd_set_depth_test_enable( |
| 4068 | _command_buffer: CommandBuffer, |
| 4069 | _depth_test_enable: Bool32, |
| 4070 | ) { |
| 4071 | panic!(concat!( |
| 4072 | "Unable to load ", |
| 4073 | stringify!(cmd_set_depth_test_enable) |
| 4074 | )) |
| 4075 | } |
| 4076 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetDepthTestEnable\0"); |
| 4077 | let val = _f(cname); |
| 4078 | if val.is_null() { |
| 4079 | cmd_set_depth_test_enable |
| 4080 | } else { |
| 4081 | ::core::mem::transmute(val) |
| 4082 | } |
| 4083 | }, |
| 4084 | cmd_set_depth_write_enable: unsafe { |
| 4085 | unsafe extern "system" fn cmd_set_depth_write_enable( |
| 4086 | _command_buffer: CommandBuffer, |
| 4087 | _depth_write_enable: Bool32, |
| 4088 | ) { |
| 4089 | panic!(concat!( |
| 4090 | "Unable to load ", |
| 4091 | stringify!(cmd_set_depth_write_enable) |
| 4092 | )) |
| 4093 | } |
| 4094 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetDepthWriteEnable\0"); |
| 4095 | let val = _f(cname); |
| 4096 | if val.is_null() { |
| 4097 | cmd_set_depth_write_enable |
| 4098 | } else { |
| 4099 | ::core::mem::transmute(val) |
| 4100 | } |
| 4101 | }, |
| 4102 | cmd_set_depth_compare_op: unsafe { |
| 4103 | unsafe extern "system" fn cmd_set_depth_compare_op( |
| 4104 | _command_buffer: CommandBuffer, |
| 4105 | _depth_compare_op: CompareOp, |
| 4106 | ) { |
| 4107 | panic!(concat!( |
| 4108 | "Unable to load ", |
| 4109 | stringify!(cmd_set_depth_compare_op) |
| 4110 | )) |
| 4111 | } |
| 4112 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetDepthCompareOp\0"); |
| 4113 | let val = _f(cname); |
| 4114 | if val.is_null() { |
| 4115 | cmd_set_depth_compare_op |
| 4116 | } else { |
| 4117 | ::core::mem::transmute(val) |
| 4118 | } |
| 4119 | }, |
| 4120 | cmd_set_depth_bounds_test_enable: unsafe { |
| 4121 | unsafe extern "system" fn cmd_set_depth_bounds_test_enable( |
| 4122 | _command_buffer: CommandBuffer, |
| 4123 | _depth_bounds_test_enable: Bool32, |
| 4124 | ) { |
| 4125 | panic!(concat!( |
| 4126 | "Unable to load ", |
| 4127 | stringify!(cmd_set_depth_bounds_test_enable) |
| 4128 | )) |
| 4129 | } |
| 4130 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetDepthBoundsTestEnable\0"); |
| 4131 | let val = _f(cname); |
| 4132 | if val.is_null() { |
| 4133 | cmd_set_depth_bounds_test_enable |
| 4134 | } else { |
| 4135 | ::core::mem::transmute(val) |
| 4136 | } |
| 4137 | }, |
| 4138 | cmd_set_stencil_test_enable: unsafe { |
| 4139 | unsafe extern "system" fn cmd_set_stencil_test_enable( |
| 4140 | _command_buffer: CommandBuffer, |
| 4141 | _stencil_test_enable: Bool32, |
| 4142 | ) { |
| 4143 | panic!(concat!( |
| 4144 | "Unable to load ", |
| 4145 | stringify!(cmd_set_stencil_test_enable) |
| 4146 | )) |
| 4147 | } |
| 4148 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetStencilTestEnable\0"); |
| 4149 | let val = _f(cname); |
| 4150 | if val.is_null() { |
| 4151 | cmd_set_stencil_test_enable |
| 4152 | } else { |
| 4153 | ::core::mem::transmute(val) |
| 4154 | } |
| 4155 | }, |
| 4156 | cmd_set_stencil_op: unsafe { |
| 4157 | unsafe extern "system" fn cmd_set_stencil_op( |
| 4158 | _command_buffer: CommandBuffer, |
| 4159 | _face_mask: StencilFaceFlags, |
| 4160 | _fail_op: StencilOp, |
| 4161 | _pass_op: StencilOp, |
| 4162 | _depth_fail_op: StencilOp, |
| 4163 | _compare_op: CompareOp, |
| 4164 | ) { |
| 4165 | panic!(concat!("Unable to load ", stringify!(cmd_set_stencil_op))) |
| 4166 | } |
| 4167 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetStencilOp\0"); |
| 4168 | let val = _f(cname); |
| 4169 | if val.is_null() { |
| 4170 | cmd_set_stencil_op |
| 4171 | } else { |
| 4172 | ::core::mem::transmute(val) |
| 4173 | } |
| 4174 | }, |
| 4175 | cmd_set_rasterizer_discard_enable: unsafe { |
| 4176 | unsafe extern "system" fn cmd_set_rasterizer_discard_enable( |
| 4177 | _command_buffer: CommandBuffer, |
| 4178 | _rasterizer_discard_enable: Bool32, |
| 4179 | ) { |
| 4180 | panic!(concat!( |
| 4181 | "Unable to load ", |
| 4182 | stringify!(cmd_set_rasterizer_discard_enable) |
| 4183 | )) |
| 4184 | } |
| 4185 | let cname = |
| 4186 | CStr::from_bytes_with_nul_unchecked(b"vkCmdSetRasterizerDiscardEnable\0"); |
| 4187 | let val = _f(cname); |
| 4188 | if val.is_null() { |
| 4189 | cmd_set_rasterizer_discard_enable |
| 4190 | } else { |
| 4191 | ::core::mem::transmute(val) |
| 4192 | } |
| 4193 | }, |
| 4194 | cmd_set_depth_bias_enable: unsafe { |
| 4195 | unsafe extern "system" fn cmd_set_depth_bias_enable( |
| 4196 | _command_buffer: CommandBuffer, |
| 4197 | _depth_bias_enable: Bool32, |
| 4198 | ) { |
| 4199 | panic!(concat!( |
| 4200 | "Unable to load ", |
| 4201 | stringify!(cmd_set_depth_bias_enable) |
| 4202 | )) |
| 4203 | } |
| 4204 | let cname = CStr::from_bytes_with_nul_unchecked(b"vkCmdSetDepthBiasEnable\0"); |
| 4205 | let val = _f(cname); |
| 4206 | if val.is_null() { |
| 4207 | cmd_set_depth_bias_enable |
| 4208 | } else { |
| 4209 | ::core::mem::transmute(val) |
| 4210 | } |
| 4211 | }, |
| 4212 | cmd_set_primitive_restart_enable: unsafe { |
| 4213 | unsafe extern "system" fn cmd_set_primitive_restart_enable( |
| 4214 | _command_buffer: CommandBuffer, |
| 4215 | _primitive_restart_enable: Bool32, |
| 4216 | ) { |
| 4217 | panic!(concat!( |
| 4218 | "Unable to load ", |
| 4219 | stringify!(cmd_set_primitive_restart_enable) |
| 4220 | )) |
| 4221 | } |
| 4222 | let cname = |
| 4223 | CStr::from_bytes_with_nul_unchecked(b"vkCmdSetPrimitiveRestartEnable\0"); |
| 4224 | let val = _f(cname); |
| 4225 | if val.is_null() { |
| 4226 | cmd_set_primitive_restart_enable |
| 4227 | } else { |
| 4228 | ::core::mem::transmute(val) |
| 4229 | } |
| 4230 | }, |
| 4231 | get_device_buffer_memory_requirements: unsafe { |
| 4232 | unsafe extern "system" fn get_device_buffer_memory_requirements( |
| 4233 | _device: crate::vk::Device, |
| 4234 | _p_info: *const DeviceBufferMemoryRequirements<'_>, |
| 4235 | _p_memory_requirements: *mut MemoryRequirements2<'_>, |
| 4236 | ) { |
| 4237 | panic!(concat!( |
| 4238 | "Unable to load ", |
| 4239 | stringify!(get_device_buffer_memory_requirements) |
| 4240 | )) |
| 4241 | } |
| 4242 | let cname = |
| 4243 | CStr::from_bytes_with_nul_unchecked(b"vkGetDeviceBufferMemoryRequirements\0"); |
| 4244 | let val = _f(cname); |
| 4245 | if val.is_null() { |
| 4246 | get_device_buffer_memory_requirements |
| 4247 | } else { |
| 4248 | ::core::mem::transmute(val) |
| 4249 | } |
| 4250 | }, |
| 4251 | get_device_image_memory_requirements: unsafe { |
| 4252 | unsafe extern "system" fn get_device_image_memory_requirements( |
| 4253 | _device: crate::vk::Device, |
| 4254 | _p_info: *const DeviceImageMemoryRequirements<'_>, |
| 4255 | _p_memory_requirements: *mut MemoryRequirements2<'_>, |
| 4256 | ) { |
| 4257 | panic!(concat!( |
| 4258 | "Unable to load ", |
| 4259 | stringify!(get_device_image_memory_requirements) |
| 4260 | )) |
| 4261 | } |
| 4262 | let cname = |
| 4263 | CStr::from_bytes_with_nul_unchecked(b"vkGetDeviceImageMemoryRequirements\0"); |
| 4264 | let val = _f(cname); |
| 4265 | if val.is_null() { |
| 4266 | get_device_image_memory_requirements |
| 4267 | } else { |
| 4268 | ::core::mem::transmute(val) |
| 4269 | } |
| 4270 | }, |
| 4271 | get_device_image_sparse_memory_requirements: unsafe { |
| 4272 | unsafe extern "system" fn get_device_image_sparse_memory_requirements( |
| 4273 | _device: crate::vk::Device, |
| 4274 | _p_info: *const DeviceImageMemoryRequirements<'_>, |
| 4275 | _p_sparse_memory_requirement_count: *mut u32, |
| 4276 | _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2<'_>, |
| 4277 | ) { |
| 4278 | panic!(concat!( |
| 4279 | "Unable to load ", |
| 4280 | stringify!(get_device_image_sparse_memory_requirements) |
| 4281 | )) |
| 4282 | } |
| 4283 | let cname = CStr::from_bytes_with_nul_unchecked( |
| 4284 | b"vkGetDeviceImageSparseMemoryRequirements\0", |
| 4285 | ); |
| 4286 | let val = _f(cname); |
| 4287 | if val.is_null() { |
| 4288 | get_device_image_sparse_memory_requirements |
| 4289 | } else { |
| 4290 | ::core::mem::transmute(val) |
| 4291 | } |
| 4292 | }, |
| 4293 | } |
| 4294 | } |
| 4295 | } |