format source
[kazan.git] / vulkan-driver / src / api_impl.rs
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 // Copyright 2018 Jacob Lifshay
3
4 // allow unneeded_field_pattern to ensure fields aren't accidently missed
5 #![cfg_attr(feature = "cargo-clippy", allow(clippy::unneeded_field_pattern))]
6
7 use api;
8 use buffer::{Buffer, BufferMemory};
9 use constants::*;
10 use descriptor_set::{
11 Descriptor, DescriptorLayout, DescriptorPool, DescriptorSet, DescriptorSetLayout,
12 DescriptorWriteArg,
13 };
14 use device_memory::{
15 DeviceMemory, DeviceMemoryAllocation, DeviceMemoryHeap, DeviceMemoryHeaps, DeviceMemoryLayout,
16 DeviceMemoryType, DeviceMemoryTypes,
17 };
18 use enum_map::EnumMap;
19 use handle::{Handle, MutHandle, OwnedHandle, SharedHandle};
20 use image::{
21 ComponentMapping, Image, ImageMemory, ImageMultisampleCount, ImageProperties, ImageView,
22 ImageViewType, SupportedTilings,
23 };
24 use pipeline::{self, PipelineLayout};
25 use render_pass::RenderPass;
26 use sampler;
27 use sampler::Sampler;
28 use shader_module::ShaderModule;
29 use std::ffi::CStr;
30 use std::iter;
31 use std::iter::FromIterator;
32 use std::mem;
33 use std::ops::*;
34 use std::os::raw::{c_char, c_void};
35 use std::ptr::null;
36 use std::ptr::null_mut;
37 #[cfg(target_os = "linux")]
38 use std::ptr::NonNull;
39 use std::str::FromStr;
40 use swapchain::SurfacePlatform;
41 use sys_info;
42 use util;
43 use uuid;
44 #[cfg(target_os = "linux")]
45 use xcb;
46
47 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug, Enum)]
48 #[repr(u32)]
49 #[allow(non_camel_case_types)]
50 pub enum Extension {
51 VK_KHR_surface,
52 VK_KHR_bind_memory2,
53 VK_KHR_device_group_creation,
54 VK_KHR_device_group,
55 VK_KHR_descriptor_update_template,
56 VK_KHR_maintenance1,
57 VK_KHR_get_memory_requirements2,
58 VK_KHR_get_physical_device_properties2,
59 VK_KHR_sampler_ycbcr_conversion,
60 VK_KHR_maintenance2,
61 VK_KHR_maintenance3,
62 VK_KHR_external_memory_capabilities,
63 VK_KHR_external_fence_capabilities,
64 VK_KHR_external_semaphore_capabilities,
65 VK_KHR_16bit_storage,
66 VK_KHR_storage_buffer_storage_class,
67 VK_KHR_dedicated_allocation,
68 VK_KHR_external_fence,
69 VK_KHR_external_memory,
70 VK_KHR_external_semaphore,
71 VK_KHR_multiview,
72 VK_KHR_relaxed_block_layout,
73 VK_KHR_shader_draw_parameters,
74 VK_KHR_variable_pointers,
75 VK_KHR_swapchain,
76 #[cfg(target_os = "linux")]
77 VK_KHR_xcb_surface,
78 }
79
80 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
81 pub enum ExtensionScope {
82 Device,
83 Instance,
84 }
85
86 macro_rules! extensions {
87 [$($extension:expr),*] => {
88 {
89 let extensions: Extensions = [$($extension),*].iter().map(|v|*v).collect();
90 extensions
91 }
92 };
93 }
94
95 impl Extension {
96 pub fn get_required_extensions(self) -> Extensions {
97 match self {
98 Extension::VK_KHR_surface
99 | Extension::VK_KHR_bind_memory2
100 | Extension::VK_KHR_device_group_creation
101 | Extension::VK_KHR_descriptor_update_template
102 | Extension::VK_KHR_maintenance1
103 | Extension::VK_KHR_get_memory_requirements2
104 | Extension::VK_KHR_get_physical_device_properties2
105 | Extension::VK_KHR_maintenance2
106 | Extension::VK_KHR_storage_buffer_storage_class
107 | Extension::VK_KHR_relaxed_block_layout
108 | Extension::VK_KHR_shader_draw_parameters => extensions![],
109 Extension::VK_KHR_device_group => extensions![Extension::VK_KHR_device_group_creation],
110 Extension::VK_KHR_sampler_ycbcr_conversion => extensions![
111 Extension::VK_KHR_maintenance1,
112 Extension::VK_KHR_bind_memory2,
113 Extension::VK_KHR_get_memory_requirements2,
114 Extension::VK_KHR_get_physical_device_properties2
115 ],
116 Extension::VK_KHR_maintenance3
117 | Extension::VK_KHR_external_memory_capabilities
118 | Extension::VK_KHR_external_fence_capabilities
119 | Extension::VK_KHR_external_semaphore_capabilities
120 | Extension::VK_KHR_multiview => {
121 extensions![Extension::VK_KHR_get_physical_device_properties2]
122 }
123 Extension::VK_KHR_16bit_storage | Extension::VK_KHR_variable_pointers => extensions![
124 Extension::VK_KHR_get_physical_device_properties2,
125 Extension::VK_KHR_storage_buffer_storage_class
126 ],
127 Extension::VK_KHR_dedicated_allocation => {
128 extensions![Extension::VK_KHR_get_memory_requirements2]
129 }
130 Extension::VK_KHR_external_fence => {
131 extensions![Extension::VK_KHR_external_fence_capabilities]
132 }
133 Extension::VK_KHR_external_memory => {
134 extensions![Extension::VK_KHR_external_memory_capabilities]
135 }
136 Extension::VK_KHR_external_semaphore => {
137 extensions![Extension::VK_KHR_external_semaphore_capabilities]
138 }
139 Extension::VK_KHR_swapchain => extensions![Extension::VK_KHR_surface],
140 #[cfg(target_os = "linux")]
141 Extension::VK_KHR_xcb_surface => extensions![Extension::VK_KHR_surface],
142 }
143 }
144 pub fn get_recursively_required_extensions(self) -> Extensions {
145 let mut retval = self.get_required_extensions();
146 let mut worklist: EnumMap<Extension, Extension> = enum_map! {_ => self};
147 let worklist = worklist.as_mut_slice();
148 let mut worklist_size = 1;
149 while worklist_size > 0 {
150 worklist_size -= 1;
151 let extension = worklist[worklist_size];
152 retval[extension] = true;
153 for (extension, &v) in extension.get_required_extensions().iter() {
154 if v && !retval[extension] {
155 worklist[worklist_size] = extension;
156 worklist_size += 1;
157 }
158 }
159 }
160 retval
161 }
162 pub fn get_name(self) -> &'static str {
163 macro_rules! name {
164 ($($(#[$attributes:meta])* $name:ident,)*) => {
165 match self {
166 $($(#[$attributes])* Extension::$name => stringify!($name),)*
167 }
168 }
169 }
170 name!(
171 VK_KHR_surface,
172 VK_KHR_bind_memory2,
173 VK_KHR_device_group,
174 VK_KHR_device_group_creation,
175 VK_KHR_descriptor_update_template,
176 VK_KHR_maintenance1,
177 VK_KHR_get_memory_requirements2,
178 VK_KHR_get_physical_device_properties2,
179 VK_KHR_sampler_ycbcr_conversion,
180 VK_KHR_maintenance2,
181 VK_KHR_maintenance3,
182 VK_KHR_external_memory_capabilities,
183 VK_KHR_external_fence_capabilities,
184 VK_KHR_external_semaphore_capabilities,
185 VK_KHR_16bit_storage,
186 VK_KHR_storage_buffer_storage_class,
187 VK_KHR_dedicated_allocation,
188 VK_KHR_external_fence,
189 VK_KHR_external_memory,
190 VK_KHR_external_semaphore,
191 VK_KHR_multiview,
192 VK_KHR_relaxed_block_layout,
193 VK_KHR_shader_draw_parameters,
194 VK_KHR_variable_pointers,
195 VK_KHR_swapchain,
196 #[cfg(target_os = "linux")]
197 VK_KHR_xcb_surface,
198 )
199 }
200 pub fn get_spec_version(self) -> u32 {
201 match self {
202 Extension::VK_KHR_surface => api::VK_KHR_SURFACE_SPEC_VERSION,
203 Extension::VK_KHR_bind_memory2 => api::VK_KHR_BIND_MEMORY_2_SPEC_VERSION,
204 Extension::VK_KHR_device_group => api::VK_KHR_DEVICE_GROUP_SPEC_VERSION,
205 Extension::VK_KHR_device_group_creation => {
206 api::VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION
207 }
208 Extension::VK_KHR_descriptor_update_template => {
209 api::VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION
210 }
211 Extension::VK_KHR_maintenance1 => api::VK_KHR_MAINTENANCE1_SPEC_VERSION,
212 Extension::VK_KHR_get_memory_requirements2 => {
213 api::VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION
214 }
215 Extension::VK_KHR_get_physical_device_properties2 => {
216 api::VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION
217 }
218 Extension::VK_KHR_sampler_ycbcr_conversion => {
219 api::VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION
220 }
221 Extension::VK_KHR_maintenance2 => api::VK_KHR_MAINTENANCE2_SPEC_VERSION,
222 Extension::VK_KHR_maintenance3 => api::VK_KHR_MAINTENANCE3_SPEC_VERSION,
223 Extension::VK_KHR_external_memory_capabilities => {
224 api::VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION
225 }
226 Extension::VK_KHR_external_fence_capabilities => {
227 api::VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION
228 }
229 Extension::VK_KHR_external_semaphore_capabilities => {
230 api::VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION
231 }
232 Extension::VK_KHR_16bit_storage => api::VK_KHR_16BIT_STORAGE_SPEC_VERSION,
233 Extension::VK_KHR_storage_buffer_storage_class => {
234 api::VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION
235 }
236 Extension::VK_KHR_dedicated_allocation => api::VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION,
237 Extension::VK_KHR_external_fence => api::VK_KHR_EXTERNAL_FENCE_SPEC_VERSION,
238 Extension::VK_KHR_external_memory => api::VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION,
239 Extension::VK_KHR_external_semaphore => api::VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION,
240 Extension::VK_KHR_multiview => api::VK_KHR_MULTIVIEW_SPEC_VERSION,
241 Extension::VK_KHR_relaxed_block_layout => api::VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION,
242 Extension::VK_KHR_shader_draw_parameters => {
243 api::VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION
244 }
245 Extension::VK_KHR_variable_pointers => api::VK_KHR_VARIABLE_POINTERS_SPEC_VERSION,
246 Extension::VK_KHR_swapchain => api::VK_KHR_SWAPCHAIN_SPEC_VERSION,
247 #[cfg(target_os = "linux")]
248 Extension::VK_KHR_xcb_surface => api::VK_KHR_XCB_SURFACE_SPEC_VERSION,
249 }
250 }
251 pub fn get_properties(self) -> api::VkExtensionProperties {
252 let mut retval = api::VkExtensionProperties {
253 extensionName: [0; api::VK_MAX_EXTENSION_NAME_SIZE as usize],
254 specVersion: self.get_spec_version(),
255 };
256 util::copy_str_to_char_array(&mut retval.extensionName, self.get_name());
257 retval
258 }
259 pub fn get_scope(self) -> ExtensionScope {
260 match self {
261 Extension::VK_KHR_surface
262 | Extension::VK_KHR_device_group_creation
263 | Extension::VK_KHR_get_physical_device_properties2
264 | Extension::VK_KHR_external_memory_capabilities
265 | Extension::VK_KHR_external_fence_capabilities
266 | Extension::VK_KHR_external_semaphore_capabilities => ExtensionScope::Instance,
267 Extension::VK_KHR_bind_memory2
268 | Extension::VK_KHR_device_group
269 | Extension::VK_KHR_descriptor_update_template
270 | Extension::VK_KHR_maintenance1
271 | Extension::VK_KHR_get_memory_requirements2
272 | Extension::VK_KHR_sampler_ycbcr_conversion
273 | Extension::VK_KHR_maintenance2
274 | Extension::VK_KHR_maintenance3
275 | Extension::VK_KHR_16bit_storage
276 | Extension::VK_KHR_storage_buffer_storage_class
277 | Extension::VK_KHR_dedicated_allocation
278 | Extension::VK_KHR_external_fence
279 | Extension::VK_KHR_external_memory
280 | Extension::VK_KHR_external_semaphore
281 | Extension::VK_KHR_multiview
282 | Extension::VK_KHR_relaxed_block_layout
283 | Extension::VK_KHR_shader_draw_parameters
284 | Extension::VK_KHR_variable_pointers
285 | Extension::VK_KHR_swapchain => ExtensionScope::Device,
286 #[cfg(target_os = "linux")]
287 Extension::VK_KHR_xcb_surface => ExtensionScope::Instance,
288 }
289 }
290 }
291
292 impl FromStr for Extension {
293 type Err = ();
294 fn from_str(s: &str) -> Result<Self, Self::Err> {
295 for (i, _) in Extensions::default().iter() {
296 if s == i.get_name() {
297 return Ok(i);
298 }
299 }
300 Err(())
301 }
302 }
303
304 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
305 pub struct Extensions(EnumMap<Extension, bool>);
306
307 impl Extensions {
308 pub fn create_empty() -> Self {
309 Extensions(enum_map! {_ => false})
310 }
311 pub fn is_empty(&self) -> bool {
312 self.iter().all(|(_, &v)| !v)
313 }
314 #[allow(dead_code)]
315 pub fn is_full(&self) -> bool {
316 self.iter().all(|(_, &v)| v)
317 }
318 pub fn get_allowed_extensions_from_instance_scope(&self) -> Self {
319 let mut retval = Extensions::default();
320 let instance_extensions = Self::instance_extensions();
321 for (extension, value) in retval.iter_mut() {
322 if extension.get_scope() == ExtensionScope::Instance {
323 *value = self[extension];
324 continue;
325 }
326 let required_extensions =
327 instance_extensions & extension.get_recursively_required_extensions();
328 *value = (!*self & required_extensions).is_empty();
329 }
330 retval
331 }
332 pub fn instance_extensions() -> Self {
333 Extensions(
334 (|extension: Extension| extension.get_scope() == ExtensionScope::Instance).into(),
335 )
336 }
337 #[allow(dead_code)]
338 pub fn device_extensions() -> Self {
339 !Self::instance_extensions()
340 }
341 }
342
343 impl FromIterator<Extension> for Extensions {
344 fn from_iter<T: IntoIterator<Item = Extension>>(v: T) -> Extensions {
345 let mut retval = Extensions::create_empty();
346 for extension in v {
347 retval[extension] = true;
348 }
349 retval
350 }
351 }
352
353 impl Default for Extensions {
354 fn default() -> Self {
355 Self::create_empty()
356 }
357 }
358
359 impl Deref for Extensions {
360 type Target = EnumMap<Extension, bool>;
361 fn deref(&self) -> &Self::Target {
362 &self.0
363 }
364 }
365
366 impl DerefMut for Extensions {
367 fn deref_mut(&mut self) -> &mut Self::Target {
368 &mut self.0
369 }
370 }
371
372 impl BitAnd for Extensions {
373 type Output = Self;
374 fn bitand(self, rhs: Self) -> Self {
375 let mut retval = Self::default();
376 for (index, retval) in retval.iter_mut() {
377 *retval = self[index] & rhs[index];
378 }
379 retval
380 }
381 }
382
383 impl BitOr for Extensions {
384 type Output = Self;
385 fn bitor(self, rhs: Self) -> Self {
386 let mut retval = Self::default();
387 for (index, retval) in retval.iter_mut() {
388 *retval = self[index] | rhs[index];
389 }
390 retval
391 }
392 }
393
394 impl BitXor for Extensions {
395 type Output = Self;
396 fn bitxor(self, rhs: Self) -> Self {
397 let mut retval = Self::default();
398 for (index, retval) in retval.iter_mut() {
399 *retval = self[index] ^ rhs[index];
400 }
401 retval
402 }
403 }
404
405 impl Not for Extensions {
406 type Output = Self;
407 fn not(mut self) -> Self {
408 for v in self.values_mut() {
409 *v = !*v;
410 }
411 self
412 }
413 }
414
415 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
416 enum GetProcAddressScope {
417 Global,
418 Instance,
419 Device,
420 }
421
422 #[cfg_attr(feature = "cargo-clippy", allow(clippy::cyclomatic_complexity))]
423 fn get_proc_address(
424 name: *const c_char,
425 scope: GetProcAddressScope,
426 extensions: &Extensions,
427 ) -> api::PFN_vkVoidFunction {
428 let mut name = unsafe { CStr::from_ptr(name) }.to_str().ok()?;
429 use api::*;
430 use std::mem::transmute;
431 struct Scope {
432 global: bool,
433 instance: bool,
434 device: bool,
435 }
436 let scope = Scope {
437 global: scope != GetProcAddressScope::Device,
438 instance: scope == GetProcAddressScope::Instance,
439 device: scope != GetProcAddressScope::Global,
440 };
441 macro_rules! proc_alias_khr {
442 ($base_name:ident, $required_extension:expr) => {
443 if name == concat!(stringify!($base_name), "KHR") {
444 if scope.instance && $required_extension {
445 name = stringify!($base_name);
446 } else {
447 return None;
448 }
449 }
450 };
451 }
452 proc_alias_khr!(
453 vkBindBufferMemory2,
454 extensions[Extension::VK_KHR_bind_memory2]
455 );
456 proc_alias_khr!(
457 vkBindImageMemory2,
458 extensions[Extension::VK_KHR_bind_memory2]
459 );
460 proc_alias_khr!(
461 vkCmdDispatchBase,
462 extensions[Extension::VK_KHR_device_group]
463 );
464 proc_alias_khr!(
465 vkCmdSetDeviceMask,
466 extensions[Extension::VK_KHR_device_group]
467 );
468 proc_alias_khr!(
469 vkCreateDescriptorUpdateTemplate,
470 extensions[Extension::VK_KHR_descriptor_update_template]
471 );
472 proc_alias_khr!(
473 vkCreateSamplerYcbcrConversion,
474 extensions[Extension::VK_KHR_sampler_ycbcr_conversion]
475 );
476 proc_alias_khr!(
477 vkDestroyDescriptorUpdateTemplate,
478 extensions[Extension::VK_KHR_descriptor_update_template]
479 );
480 proc_alias_khr!(
481 vkDestroySamplerYcbcrConversion,
482 extensions[Extension::VK_KHR_sampler_ycbcr_conversion]
483 );
484 proc_alias_khr!(
485 vkEnumeratePhysicalDeviceGroups,
486 extensions[Extension::VK_KHR_device_group_creation]
487 );
488 proc_alias_khr!(
489 vkGetBufferMemoryRequirements2,
490 extensions[Extension::VK_KHR_get_memory_requirements2]
491 );
492 proc_alias_khr!(
493 vkGetDescriptorSetLayoutSupport,
494 extensions[Extension::VK_KHR_maintenance3]
495 );
496 proc_alias_khr!(
497 vkGetDeviceGroupPeerMemoryFeatures,
498 extensions[Extension::VK_KHR_device_group]
499 );
500 proc_alias_khr!(
501 vkGetImageMemoryRequirements2,
502 extensions[Extension::VK_KHR_get_memory_requirements2]
503 );
504 proc_alias_khr!(
505 vkGetImageSparseMemoryRequirements2,
506 extensions[Extension::VK_KHR_get_memory_requirements2]
507 );
508 proc_alias_khr!(
509 vkGetPhysicalDeviceExternalBufferProperties,
510 extensions[Extension::VK_KHR_external_memory_capabilities]
511 );
512 proc_alias_khr!(
513 vkGetPhysicalDeviceExternalFenceProperties,
514 extensions[Extension::VK_KHR_external_fence_capabilities]
515 );
516 proc_alias_khr!(
517 vkGetPhysicalDeviceExternalSemaphoreProperties,
518 extensions[Extension::VK_KHR_external_semaphore_capabilities]
519 );
520 proc_alias_khr!(
521 vkGetPhysicalDeviceFeatures2,
522 extensions[Extension::VK_KHR_get_physical_device_properties2]
523 );
524 proc_alias_khr!(
525 vkGetPhysicalDeviceFormatProperties2,
526 extensions[Extension::VK_KHR_get_physical_device_properties2]
527 );
528 proc_alias_khr!(
529 vkGetPhysicalDeviceImageFormatProperties2,
530 extensions[Extension::VK_KHR_get_physical_device_properties2]
531 );
532 proc_alias_khr!(
533 vkGetPhysicalDeviceMemoryProperties2,
534 extensions[Extension::VK_KHR_get_physical_device_properties2]
535 );
536 proc_alias_khr!(
537 vkGetPhysicalDeviceProperties2,
538 extensions[Extension::VK_KHR_get_physical_device_properties2]
539 );
540 proc_alias_khr!(
541 vkGetPhysicalDeviceQueueFamilyProperties2,
542 extensions[Extension::VK_KHR_get_physical_device_properties2]
543 );
544 proc_alias_khr!(
545 vkGetPhysicalDeviceSparseImageFormatProperties2,
546 extensions[Extension::VK_KHR_get_physical_device_properties2]
547 );
548 proc_alias_khr!(
549 vkTrimCommandPool,
550 extensions[Extension::VK_KHR_maintenance1]
551 );
552 proc_alias_khr!(
553 vkUpdateDescriptorSetWithTemplate,
554 extensions[Extension::VK_KHR_descriptor_update_template]
555 );
556 macro_rules! proc_address {
557 ($name:ident, $pfn_name:ident, $required_scope:ident, $required_extension:expr) => {
558 if stringify!($name) == name {
559 if scope.$required_scope && $required_extension {
560 let f: $pfn_name = Some($name);
561 return unsafe { transmute(f) };
562 } else {
563 return None;
564 }
565 }
566 };
567 }
568 #[cfg_attr(rustfmt, rustfmt_skip)]
569 {
570 proc_address!(vkCreateInstance, PFN_vkCreateInstance, global, true);
571 proc_address!(vkEnumerateInstanceExtensionProperties, PFN_vkEnumerateInstanceExtensionProperties, global, true);
572 proc_address!(vkEnumerateInstanceLayerProperties, PFN_vkEnumerateInstanceLayerProperties, global, true);
573 proc_address!(vkEnumerateInstanceVersion, PFN_vkEnumerateInstanceVersion, global, true);
574
575 proc_address!(vkAllocateCommandBuffers, PFN_vkAllocateCommandBuffers, device, true);
576 proc_address!(vkAllocateDescriptorSets, PFN_vkAllocateDescriptorSets, device, true);
577 proc_address!(vkAllocateMemory, PFN_vkAllocateMemory, device, true);
578 proc_address!(vkBeginCommandBuffer, PFN_vkBeginCommandBuffer, device, true);
579 proc_address!(vkBindBufferMemory, PFN_vkBindBufferMemory, device, true);
580 proc_address!(vkBindBufferMemory2, PFN_vkBindBufferMemory2, device, true);
581 proc_address!(vkBindImageMemory, PFN_vkBindImageMemory, device, true);
582 proc_address!(vkBindImageMemory2, PFN_vkBindImageMemory2, device, true);
583 proc_address!(vkCmdBeginQuery, PFN_vkCmdBeginQuery, device, true);
584 proc_address!(vkCmdBeginRenderPass, PFN_vkCmdBeginRenderPass, device, true);
585 proc_address!(vkCmdBindDescriptorSets, PFN_vkCmdBindDescriptorSets, device, true);
586 proc_address!(vkCmdBindIndexBuffer, PFN_vkCmdBindIndexBuffer, device, true);
587 proc_address!(vkCmdBindPipeline, PFN_vkCmdBindPipeline, device, true);
588 proc_address!(vkCmdBindVertexBuffers, PFN_vkCmdBindVertexBuffers, device, true);
589 proc_address!(vkCmdBlitImage, PFN_vkCmdBlitImage, device, true);
590 proc_address!(vkCmdClearAttachments, PFN_vkCmdClearAttachments, device, true);
591 proc_address!(vkCmdClearColorImage, PFN_vkCmdClearColorImage, device, true);
592 proc_address!(vkCmdClearDepthStencilImage, PFN_vkCmdClearDepthStencilImage, device, true);
593 proc_address!(vkCmdCopyBuffer, PFN_vkCmdCopyBuffer, device, true);
594 proc_address!(vkCmdCopyBufferToImage, PFN_vkCmdCopyBufferToImage, device, true);
595 proc_address!(vkCmdCopyImage, PFN_vkCmdCopyImage, device, true);
596 proc_address!(vkCmdCopyImageToBuffer, PFN_vkCmdCopyImageToBuffer, device, true);
597 proc_address!(vkCmdCopyQueryPoolResults, PFN_vkCmdCopyQueryPoolResults, device, true);
598 proc_address!(vkCmdDispatch, PFN_vkCmdDispatch, device, true);
599 proc_address!(vkCmdDispatchBase, PFN_vkCmdDispatchBase, device, true);
600 proc_address!(vkCmdDispatchIndirect, PFN_vkCmdDispatchIndirect, device, true);
601 proc_address!(vkCmdDraw, PFN_vkCmdDraw, device, true);
602 proc_address!(vkCmdDrawIndexed, PFN_vkCmdDrawIndexed, device, true);
603 proc_address!(vkCmdDrawIndexedIndirect, PFN_vkCmdDrawIndexedIndirect, device, true);
604 proc_address!(vkCmdDrawIndirect, PFN_vkCmdDrawIndirect, device, true);
605 proc_address!(vkCmdEndQuery, PFN_vkCmdEndQuery, device, true);
606 proc_address!(vkCmdEndRenderPass, PFN_vkCmdEndRenderPass, device, true);
607 proc_address!(vkCmdExecuteCommands, PFN_vkCmdExecuteCommands, device, true);
608 proc_address!(vkCmdFillBuffer, PFN_vkCmdFillBuffer, device, true);
609 proc_address!(vkCmdNextSubpass, PFN_vkCmdNextSubpass, device, true);
610 proc_address!(vkCmdPipelineBarrier, PFN_vkCmdPipelineBarrier, device, true);
611 proc_address!(vkCmdPushConstants, PFN_vkCmdPushConstants, device, true);
612 proc_address!(vkCmdResetEvent, PFN_vkCmdResetEvent, device, true);
613 proc_address!(vkCmdResetQueryPool, PFN_vkCmdResetQueryPool, device, true);
614 proc_address!(vkCmdResolveImage, PFN_vkCmdResolveImage, device, true);
615 proc_address!(vkCmdSetBlendConstants, PFN_vkCmdSetBlendConstants, device, true);
616 proc_address!(vkCmdSetDepthBias, PFN_vkCmdSetDepthBias, device, true);
617 proc_address!(vkCmdSetDepthBounds, PFN_vkCmdSetDepthBounds, device, true);
618 proc_address!(vkCmdSetDeviceMask, PFN_vkCmdSetDeviceMask, device, true);
619 proc_address!(vkCmdSetEvent, PFN_vkCmdSetEvent, device, true);
620 proc_address!(vkCmdSetLineWidth, PFN_vkCmdSetLineWidth, device, true);
621 proc_address!(vkCmdSetScissor, PFN_vkCmdSetScissor, device, true);
622 proc_address!(vkCmdSetStencilCompareMask, PFN_vkCmdSetStencilCompareMask, device, true);
623 proc_address!(vkCmdSetStencilReference, PFN_vkCmdSetStencilReference, device, true);
624 proc_address!(vkCmdSetStencilWriteMask, PFN_vkCmdSetStencilWriteMask, device, true);
625 proc_address!(vkCmdSetViewport, PFN_vkCmdSetViewport, device, true);
626 proc_address!(vkCmdUpdateBuffer, PFN_vkCmdUpdateBuffer, device, true);
627 proc_address!(vkCmdWaitEvents, PFN_vkCmdWaitEvents, device, true);
628 proc_address!(vkCmdWriteTimestamp, PFN_vkCmdWriteTimestamp, device, true);
629 proc_address!(vkCreateBuffer, PFN_vkCreateBuffer, device, true);
630 proc_address!(vkCreateBufferView, PFN_vkCreateBufferView, device, true);
631 proc_address!(vkCreateCommandPool, PFN_vkCreateCommandPool, device, true);
632 proc_address!(vkCreateComputePipelines, PFN_vkCreateComputePipelines, device, true);
633 proc_address!(vkCreateDescriptorPool, PFN_vkCreateDescriptorPool, device, true);
634 proc_address!(vkCreateDescriptorSetLayout, PFN_vkCreateDescriptorSetLayout, device, true);
635 proc_address!(vkCreateDescriptorUpdateTemplate, PFN_vkCreateDescriptorUpdateTemplate, device, true);
636 proc_address!(vkCreateDevice, PFN_vkCreateDevice, instance, true);
637 proc_address!(vkCreateEvent, PFN_vkCreateEvent, device, true);
638 proc_address!(vkCreateFence, PFN_vkCreateFence, device, true);
639 proc_address!(vkCreateFramebuffer, PFN_vkCreateFramebuffer, device, true);
640 proc_address!(vkCreateGraphicsPipelines, PFN_vkCreateGraphicsPipelines, device, true);
641 proc_address!(vkCreateImage, PFN_vkCreateImage, device, true);
642 proc_address!(vkCreateImageView, PFN_vkCreateImageView, device, true);
643 proc_address!(vkCreatePipelineCache, PFN_vkCreatePipelineCache, device, true);
644 proc_address!(vkCreatePipelineLayout, PFN_vkCreatePipelineLayout, device, true);
645 proc_address!(vkCreateQueryPool, PFN_vkCreateQueryPool, device, true);
646 proc_address!(vkCreateRenderPass, PFN_vkCreateRenderPass, device, true);
647 proc_address!(vkCreateSampler, PFN_vkCreateSampler, device, true);
648 proc_address!(vkCreateSamplerYcbcrConversion, PFN_vkCreateSamplerYcbcrConversion, device, true);
649 proc_address!(vkCreateSemaphore, PFN_vkCreateSemaphore, device, true);
650 proc_address!(vkCreateShaderModule, PFN_vkCreateShaderModule, device, true);
651 proc_address!(vkDestroyBuffer, PFN_vkDestroyBuffer, device, true);
652 proc_address!(vkDestroyBufferView, PFN_vkDestroyBufferView, device, true);
653 proc_address!(vkDestroyCommandPool, PFN_vkDestroyCommandPool, device, true);
654 proc_address!(vkDestroyDescriptorPool, PFN_vkDestroyDescriptorPool, device, true);
655 proc_address!(vkDestroyDescriptorSetLayout, PFN_vkDestroyDescriptorSetLayout, device, true);
656 proc_address!(vkDestroyDescriptorUpdateTemplate, PFN_vkDestroyDescriptorUpdateTemplate, device, true);
657 proc_address!(vkDestroyDevice, PFN_vkDestroyDevice, device, true);
658 proc_address!(vkDestroyEvent, PFN_vkDestroyEvent, device, true);
659 proc_address!(vkDestroyFence, PFN_vkDestroyFence, device, true);
660 proc_address!(vkDestroyFramebuffer, PFN_vkDestroyFramebuffer, device, true);
661 proc_address!(vkDestroyImage, PFN_vkDestroyImage, device, true);
662 proc_address!(vkDestroyImageView, PFN_vkDestroyImageView, device, true);
663 proc_address!(vkDestroyInstance, PFN_vkDestroyInstance, instance, true);
664 proc_address!(vkDestroyPipeline, PFN_vkDestroyPipeline, device, true);
665 proc_address!(vkDestroyPipelineCache, PFN_vkDestroyPipelineCache, device, true);
666 proc_address!(vkDestroyPipelineLayout, PFN_vkDestroyPipelineLayout, device, true);
667 proc_address!(vkDestroyQueryPool, PFN_vkDestroyQueryPool, device, true);
668 proc_address!(vkDestroyRenderPass, PFN_vkDestroyRenderPass, device, true);
669 proc_address!(vkDestroySampler, PFN_vkDestroySampler, device, true);
670 proc_address!(vkDestroySamplerYcbcrConversion, PFN_vkDestroySamplerYcbcrConversion, device, true);
671 proc_address!(vkDestroySemaphore, PFN_vkDestroySemaphore, device, true);
672 proc_address!(vkDestroyShaderModule, PFN_vkDestroyShaderModule, device, true);
673 proc_address!(vkDeviceWaitIdle, PFN_vkDeviceWaitIdle, device, true);
674 proc_address!(vkEndCommandBuffer, PFN_vkEndCommandBuffer, device, true);
675 proc_address!(vkEnumerateDeviceExtensionProperties, PFN_vkEnumerateDeviceExtensionProperties, instance, true);
676 proc_address!(vkEnumerateDeviceLayerProperties, PFN_vkEnumerateDeviceLayerProperties, instance, true);
677 proc_address!(vkEnumeratePhysicalDeviceGroups, PFN_vkEnumeratePhysicalDeviceGroups, instance, true);
678 proc_address!(vkEnumeratePhysicalDevices, PFN_vkEnumeratePhysicalDevices, instance, true);
679 proc_address!(vkFlushMappedMemoryRanges, PFN_vkFlushMappedMemoryRanges, device, true);
680 proc_address!(vkFreeCommandBuffers, PFN_vkFreeCommandBuffers, device, true);
681 proc_address!(vkFreeDescriptorSets, PFN_vkFreeDescriptorSets, device, true);
682 proc_address!(vkFreeMemory, PFN_vkFreeMemory, device, true);
683 proc_address!(vkGetBufferMemoryRequirements, PFN_vkGetBufferMemoryRequirements, device, true);
684 proc_address!(vkGetBufferMemoryRequirements2, PFN_vkGetBufferMemoryRequirements2, device, true);
685 proc_address!(vkGetDescriptorSetLayoutSupport, PFN_vkGetDescriptorSetLayoutSupport, device, true);
686 proc_address!(vkGetDeviceGroupPeerMemoryFeatures, PFN_vkGetDeviceGroupPeerMemoryFeatures, device, true);
687 proc_address!(vkGetDeviceMemoryCommitment, PFN_vkGetDeviceMemoryCommitment, device, true);
688 proc_address!(vkGetDeviceProcAddr, PFN_vkGetDeviceProcAddr, device, true);
689 proc_address!(vkGetDeviceQueue, PFN_vkGetDeviceQueue, device, true);
690 proc_address!(vkGetDeviceQueue2, PFN_vkGetDeviceQueue2, device, true);
691 proc_address!(vkGetEventStatus, PFN_vkGetEventStatus, device, true);
692 proc_address!(vkGetFenceStatus, PFN_vkGetFenceStatus, device, true);
693 proc_address!(vkGetImageMemoryRequirements, PFN_vkGetImageMemoryRequirements, device, true);
694 proc_address!(vkGetImageMemoryRequirements2, PFN_vkGetImageMemoryRequirements2, device, true);
695 proc_address!(vkGetImageSparseMemoryRequirements, PFN_vkGetImageSparseMemoryRequirements, device, true);
696 proc_address!(vkGetImageSparseMemoryRequirements2, PFN_vkGetImageSparseMemoryRequirements2, device, true);
697 proc_address!(vkGetImageSubresourceLayout, PFN_vkGetImageSubresourceLayout, device, true);
698 proc_address!(vkGetInstanceProcAddr, PFN_vkGetInstanceProcAddr, device, true);
699 proc_address!(vkGetPhysicalDeviceExternalBufferProperties, PFN_vkGetPhysicalDeviceExternalBufferProperties, instance, true);
700 proc_address!(vkGetPhysicalDeviceExternalFenceProperties, PFN_vkGetPhysicalDeviceExternalFenceProperties, instance, true);
701 proc_address!(vkGetPhysicalDeviceExternalSemaphoreProperties, PFN_vkGetPhysicalDeviceExternalSemaphoreProperties, instance, true);
702 proc_address!(vkGetPhysicalDeviceFeatures, PFN_vkGetPhysicalDeviceFeatures, instance, true);
703 proc_address!(vkGetPhysicalDeviceFeatures2, PFN_vkGetPhysicalDeviceFeatures2, instance, true);
704 proc_address!(vkGetPhysicalDeviceFormatProperties, PFN_vkGetPhysicalDeviceFormatProperties, instance, true);
705 proc_address!(vkGetPhysicalDeviceFormatProperties2, PFN_vkGetPhysicalDeviceFormatProperties2, instance, true);
706 proc_address!(vkGetPhysicalDeviceImageFormatProperties, PFN_vkGetPhysicalDeviceImageFormatProperties, instance, true);
707 proc_address!(vkGetPhysicalDeviceImageFormatProperties2, PFN_vkGetPhysicalDeviceImageFormatProperties2, instance, true);
708 proc_address!(vkGetPhysicalDeviceMemoryProperties, PFN_vkGetPhysicalDeviceMemoryProperties, instance, true);
709 proc_address!(vkGetPhysicalDeviceMemoryProperties2, PFN_vkGetPhysicalDeviceMemoryProperties2, instance, true);
710 proc_address!(vkGetPhysicalDeviceProperties, PFN_vkGetPhysicalDeviceProperties, instance, true);
711 proc_address!(vkGetPhysicalDeviceProperties2, PFN_vkGetPhysicalDeviceProperties2, instance, true);
712 proc_address!(vkGetPhysicalDeviceQueueFamilyProperties, PFN_vkGetPhysicalDeviceQueueFamilyProperties, instance, true);
713 proc_address!(vkGetPhysicalDeviceQueueFamilyProperties2, PFN_vkGetPhysicalDeviceQueueFamilyProperties2, instance, true);
714 proc_address!(vkGetPhysicalDeviceSparseImageFormatProperties, PFN_vkGetPhysicalDeviceSparseImageFormatProperties, instance, true);
715 proc_address!(vkGetPhysicalDeviceSparseImageFormatProperties2, PFN_vkGetPhysicalDeviceSparseImageFormatProperties2, instance, true);
716 proc_address!(vkGetPipelineCacheData, PFN_vkGetPipelineCacheData, device, true);
717 proc_address!(vkGetQueryPoolResults, PFN_vkGetQueryPoolResults, device, true);
718 proc_address!(vkGetRenderAreaGranularity, PFN_vkGetRenderAreaGranularity, device, true);
719 proc_address!(vkInvalidateMappedMemoryRanges, PFN_vkInvalidateMappedMemoryRanges, device, true);
720 proc_address!(vkMapMemory, PFN_vkMapMemory, device, true);
721 proc_address!(vkMergePipelineCaches, PFN_vkMergePipelineCaches, device, true);
722 proc_address!(vkQueueBindSparse, PFN_vkQueueBindSparse, device, true);
723 proc_address!(vkQueueSubmit, PFN_vkQueueSubmit, device, true);
724 proc_address!(vkQueueWaitIdle, PFN_vkQueueWaitIdle, device, true);
725 proc_address!(vkResetCommandBuffer, PFN_vkResetCommandBuffer, device, true);
726 proc_address!(vkResetCommandPool, PFN_vkResetCommandPool, device, true);
727 proc_address!(vkResetDescriptorPool, PFN_vkResetDescriptorPool, device, true);
728 proc_address!(vkResetEvent, PFN_vkResetEvent, device, true);
729 proc_address!(vkResetFences, PFN_vkResetFences, device, true);
730 proc_address!(vkSetEvent, PFN_vkSetEvent, device, true);
731 proc_address!(vkTrimCommandPool, PFN_vkTrimCommandPool, device, true);
732 proc_address!(vkUnmapMemory, PFN_vkUnmapMemory, device, true);
733 proc_address!(vkUpdateDescriptorSets, PFN_vkUpdateDescriptorSets, device, true);
734 proc_address!(vkUpdateDescriptorSetWithTemplate, PFN_vkUpdateDescriptorSetWithTemplate, device, true);
735 proc_address!(vkWaitForFences, PFN_vkWaitForFences, device, true);
736
737 proc_address!(vkDestroySurfaceKHR, PFN_vkDestroySurfaceKHR, device, extensions[Extension::VK_KHR_surface]);
738 proc_address!(vkGetPhysicalDeviceSurfaceSupportKHR, PFN_vkGetPhysicalDeviceSurfaceSupportKHR, device, extensions[Extension::VK_KHR_surface]);
739 proc_address!(vkGetPhysicalDeviceSurfaceCapabilitiesKHR, PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, device, extensions[Extension::VK_KHR_surface]);
740 proc_address!(vkGetPhysicalDeviceSurfaceFormatsKHR, PFN_vkGetPhysicalDeviceSurfaceFormatsKHR, device, extensions[Extension::VK_KHR_surface]);
741 proc_address!(vkGetPhysicalDeviceSurfacePresentModesKHR, PFN_vkGetPhysicalDeviceSurfacePresentModesKHR, device, extensions[Extension::VK_KHR_surface]);
742
743 proc_address!(vkCreateSwapchainKHR, PFN_vkCreateSwapchainKHR, device, extensions[Extension::VK_KHR_swapchain]);
744 proc_address!(vkDestroySwapchainKHR, PFN_vkDestroySwapchainKHR, device, extensions[Extension::VK_KHR_swapchain]);
745 proc_address!(vkGetSwapchainImagesKHR, PFN_vkGetSwapchainImagesKHR, device, extensions[Extension::VK_KHR_swapchain]);
746 proc_address!(vkAcquireNextImageKHR, PFN_vkAcquireNextImageKHR, device, extensions[Extension::VK_KHR_swapchain]);
747 proc_address!(vkQueuePresentKHR, PFN_vkQueuePresentKHR, device, extensions[Extension::VK_KHR_swapchain]);
748 proc_address!(vkGetDeviceGroupPresentCapabilitiesKHR, PFN_vkGetDeviceGroupPresentCapabilitiesKHR, device, extensions[Extension::VK_KHR_swapchain]);
749 proc_address!(vkGetDeviceGroupSurfacePresentModesKHR, PFN_vkGetDeviceGroupSurfacePresentModesKHR, device, extensions[Extension::VK_KHR_swapchain]);
750 proc_address!(vkGetPhysicalDevicePresentRectanglesKHR, PFN_vkGetPhysicalDevicePresentRectanglesKHR, device, extensions[Extension::VK_KHR_swapchain]);
751 proc_address!(vkAcquireNextImage2KHR, PFN_vkAcquireNextImage2KHR, device, extensions[Extension::VK_KHR_swapchain]);
752
753 #[cfg(target_os = "linux")]
754 proc_address!(vkCreateXcbSurfaceKHR, PFN_vkCreateXcbSurfaceKHR, device, extensions[Extension::VK_KHR_xcb_surface]);
755 #[cfg(target_os = "linux")]
756 proc_address!(vkGetPhysicalDeviceXcbPresentationSupportKHR, PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR, device, extensions[Extension::VK_KHR_xcb_surface]);
757 /*
758 proc_address!(vkCmdBeginConditionalRenderingEXT, PFN_vkCmdBeginConditionalRenderingEXT, device, unknown);
759 proc_address!(vkCmdBeginDebugUtilsLabelEXT, PFN_vkCmdBeginDebugUtilsLabelEXT, device, unknown);
760 proc_address!(vkCmdBeginRenderPass2KHR, PFN_vkCmdBeginRenderPass2KHR, device, unknown);
761 proc_address!(vkCmdBindShadingRateImageNV, PFN_vkCmdBindShadingRateImageNV, device, unknown);
762 proc_address!(vkCmdDebugMarkerBeginEXT, PFN_vkCmdDebugMarkerBeginEXT, device, unknown);
763 proc_address!(vkCmdDebugMarkerEndEXT, PFN_vkCmdDebugMarkerEndEXT, device, unknown);
764 proc_address!(vkCmdDebugMarkerInsertEXT, PFN_vkCmdDebugMarkerInsertEXT, device, unknown);
765 proc_address!(vkCmdDrawIndexedIndirectCountAMD, PFN_vkCmdDrawIndexedIndirectCountAMD, device, unknown);
766 proc_address!(vkCmdDrawIndexedIndirectCountKHR, PFN_vkCmdDrawIndexedIndirectCountKHR, device, unknown);
767 proc_address!(vkCmdDrawIndirectCountAMD, PFN_vkCmdDrawIndirectCountAMD, device, unknown);
768 proc_address!(vkCmdDrawIndirectCountKHR, PFN_vkCmdDrawIndirectCountKHR, device, unknown);
769 proc_address!(vkCmdDrawMeshTasksIndirectCountNV, PFN_vkCmdDrawMeshTasksIndirectCountNV, device, unknown);
770 proc_address!(vkCmdDrawMeshTasksIndirectNV, PFN_vkCmdDrawMeshTasksIndirectNV, device, unknown);
771 proc_address!(vkCmdDrawMeshTasksNV, PFN_vkCmdDrawMeshTasksNV, device, unknown);
772 proc_address!(vkCmdEndConditionalRenderingEXT, PFN_vkCmdEndConditionalRenderingEXT, device, unknown);
773 proc_address!(vkCmdEndDebugUtilsLabelEXT, PFN_vkCmdEndDebugUtilsLabelEXT, device, unknown);
774 proc_address!(vkCmdEndRenderPass2KHR, PFN_vkCmdEndRenderPass2KHR, device, unknown);
775 proc_address!(vkCmdInsertDebugUtilsLabelEXT, PFN_vkCmdInsertDebugUtilsLabelEXT, device, unknown);
776 proc_address!(vkCmdNextSubpass2KHR, PFN_vkCmdNextSubpass2KHR, device, unknown);
777 proc_address!(vkCmdPushDescriptorSetKHR, PFN_vkCmdPushDescriptorSetKHR, device, unknown);
778 proc_address!(vkCmdPushDescriptorSetWithTemplateKHR, PFN_vkCmdPushDescriptorSetWithTemplateKHR, device, unknown);
779 proc_address!(vkCmdSetCheckpointNV, PFN_vkCmdSetCheckpointNV, device, unknown);
780 proc_address!(vkCmdSetCoarseSampleOrderNV, PFN_vkCmdSetCoarseSampleOrderNV, device, unknown);
781 proc_address!(vkCmdSetDiscardRectangleEXT, PFN_vkCmdSetDiscardRectangleEXT, device, unknown);
782 proc_address!(vkCmdSetExclusiveScissorNV, PFN_vkCmdSetExclusiveScissorNV, device, unknown);
783 proc_address!(vkCmdSetSampleLocationsEXT, PFN_vkCmdSetSampleLocationsEXT, device, unknown);
784 proc_address!(vkCmdSetViewportShadingRatePaletteNV, PFN_vkCmdSetViewportShadingRatePaletteNV, device, unknown);
785 proc_address!(vkCmdSetViewportWScalingNV, PFN_vkCmdSetViewportWScalingNV, device, unknown);
786 proc_address!(vkCmdWriteBufferMarkerAMD, PFN_vkCmdWriteBufferMarkerAMD, device, unknown);
787 proc_address!(vkCreateDebugReportCallbackEXT, PFN_vkCreateDebugReportCallbackEXT, device, unknown);
788 proc_address!(vkCreateDebugUtilsMessengerEXT, PFN_vkCreateDebugUtilsMessengerEXT, device, unknown);
789 proc_address!(vkCreateDisplayModeKHR, PFN_vkCreateDisplayModeKHR, device, unknown);
790 proc_address!(vkCreateDisplayPlaneSurfaceKHR, PFN_vkCreateDisplayPlaneSurfaceKHR, device, unknown);
791 proc_address!(vkCreateRenderPass2KHR, PFN_vkCreateRenderPass2KHR, device, unknown);
792 proc_address!(vkCreateSharedSwapchainsKHR, PFN_vkCreateSharedSwapchainsKHR, device, unknown);
793 proc_address!(vkCreateValidationCacheEXT, PFN_vkCreateValidationCacheEXT, device, unknown);
794 proc_address!(vkDebugMarkerSetObjectNameEXT, PFN_vkDebugMarkerSetObjectNameEXT, device, unknown);
795 proc_address!(vkDebugMarkerSetObjectTagEXT, PFN_vkDebugMarkerSetObjectTagEXT, device, unknown);
796 proc_address!(vkDebugReportCallbackEXT, PFN_vkDebugReportCallbackEXT, device, unknown);
797 proc_address!(vkDebugReportMessageEXT, PFN_vkDebugReportMessageEXT, device, unknown);
798 proc_address!(vkDebugUtilsMessengerCallbackEXT, PFN_vkDebugUtilsMessengerCallbackEXT, device, unknown);
799 proc_address!(vkDestroyDebugReportCallbackEXT, PFN_vkDestroyDebugReportCallbackEXT, device, unknown);
800 proc_address!(vkDestroyDebugUtilsMessengerEXT, PFN_vkDestroyDebugUtilsMessengerEXT, device, unknown);
801 proc_address!(vkDestroyValidationCacheEXT, PFN_vkDestroyValidationCacheEXT, device, unknown);
802 proc_address!(vkDisplayPowerControlEXT, PFN_vkDisplayPowerControlEXT, device, unknown);
803 proc_address!(vkGetDisplayModeProperties2KHR, PFN_vkGetDisplayModeProperties2KHR, device, unknown);
804 proc_address!(vkGetDisplayModePropertiesKHR, PFN_vkGetDisplayModePropertiesKHR, device, unknown);
805 proc_address!(vkGetDisplayPlaneCapabilities2KHR, PFN_vkGetDisplayPlaneCapabilities2KHR, device, unknown);
806 proc_address!(vkGetDisplayPlaneCapabilitiesKHR, PFN_vkGetDisplayPlaneCapabilitiesKHR, device, unknown);
807 proc_address!(vkGetDisplayPlaneSupportedDisplaysKHR, PFN_vkGetDisplayPlaneSupportedDisplaysKHR, device, unknown);
808 proc_address!(vkGetFenceFdKHR, PFN_vkGetFenceFdKHR, device, unknown);
809 proc_address!(vkGetMemoryFdKHR, PFN_vkGetMemoryFdKHR, device, unknown);
810 proc_address!(vkGetMemoryFdPropertiesKHR, PFN_vkGetMemoryFdPropertiesKHR, device, unknown);
811 proc_address!(vkGetMemoryHostPointerPropertiesEXT, PFN_vkGetMemoryHostPointerPropertiesEXT, device, unknown);
812 proc_address!(vkGetPastPresentationTimingGOOGLE, PFN_vkGetPastPresentationTimingGOOGLE, device, unknown);
813 proc_address!(vkGetPhysicalDeviceDisplayPlaneProperties2KHR, PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, device, unknown);
814 proc_address!(vkGetPhysicalDeviceDisplayPlanePropertiesKHR, PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, device, unknown);
815 proc_address!(vkGetPhysicalDeviceDisplayProperties2KHR, PFN_vkGetPhysicalDeviceDisplayProperties2KHR, device, unknown);
816 proc_address!(vkGetPhysicalDeviceDisplayPropertiesKHR, PFN_vkGetPhysicalDeviceDisplayPropertiesKHR, device, unknown);
817 proc_address!(vkGetPhysicalDeviceExternalImageFormatPropertiesNV, PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, device, unknown);
818 proc_address!(vkGetPhysicalDeviceMultisamplePropertiesEXT, PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT, device, unknown);
819 proc_address!(vkGetPhysicalDeviceSurfaceCapabilities2EXT, PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT, device, unknown);
820 proc_address!(vkGetPhysicalDeviceSurfaceCapabilities2KHR, PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR, device, unknown);
821 proc_address!(vkGetPhysicalDeviceSurfaceFormats2KHR, PFN_vkGetPhysicalDeviceSurfaceFormats2KHR, device, unknown);
822 proc_address!(vkGetQueueCheckpointDataNV, PFN_vkGetQueueCheckpointDataNV, device, unknown);
823 proc_address!(vkGetRefreshCycleDurationGOOGLE, PFN_vkGetRefreshCycleDurationGOOGLE, device, unknown);
824 proc_address!(vkGetSemaphoreFdKHR, PFN_vkGetSemaphoreFdKHR, device, unknown);
825 proc_address!(vkGetShaderInfoAMD, PFN_vkGetShaderInfoAMD, device, unknown);
826 proc_address!(vkGetSwapchainCounterEXT, PFN_vkGetSwapchainCounterEXT, device, unknown);
827 proc_address!(vkGetSwapchainStatusKHR, PFN_vkGetSwapchainStatusKHR, device, unknown);
828 proc_address!(vkGetValidationCacheDataEXT, PFN_vkGetValidationCacheDataEXT, device, unknown);
829 proc_address!(vkImportFenceFdKHR, PFN_vkImportFenceFdKHR, device, unknown);
830 proc_address!(vkImportSemaphoreFdKHR, PFN_vkImportSemaphoreFdKHR, device, unknown);
831 proc_address!(vkMergeValidationCachesEXT, PFN_vkMergeValidationCachesEXT, device, unknown);
832 proc_address!(vkQueueBeginDebugUtilsLabelEXT, PFN_vkQueueBeginDebugUtilsLabelEXT, device, unknown);
833 proc_address!(vkQueueEndDebugUtilsLabelEXT, PFN_vkQueueEndDebugUtilsLabelEXT, device, unknown);
834 proc_address!(vkQueueInsertDebugUtilsLabelEXT, PFN_vkQueueInsertDebugUtilsLabelEXT, device, unknown);
835 proc_address!(vkRegisterDeviceEventEXT, PFN_vkRegisterDeviceEventEXT, device, unknown);
836 proc_address!(vkRegisterDisplayEventEXT, PFN_vkRegisterDisplayEventEXT, device, unknown);
837 proc_address!(vkReleaseDisplayEXT, PFN_vkReleaseDisplayEXT, device, unknown);
838 proc_address!(vkSetDebugUtilsObjectNameEXT, PFN_vkSetDebugUtilsObjectNameEXT, device, unknown);
839 proc_address!(vkSetDebugUtilsObjectTagEXT, PFN_vkSetDebugUtilsObjectTagEXT, device, unknown);
840 proc_address!(vkSetHdrMetadataEXT, PFN_vkSetHdrMetadataEXT, device, unknown);
841 proc_address!(vkSubmitDebugUtilsMessageEXT, PFN_vkSubmitDebugUtilsMessageEXT, device, unknown);
842 */
843 }
844 //eprintln!("unknown function: {:?}", name);
845 None
846 }
847
848 #[derive(Debug, Copy, Clone)]
849 pub struct Features {
850 features: api::VkPhysicalDeviceFeatures,
851 physical_device_16bit_storage_features: api::VkPhysicalDevice16BitStorageFeatures,
852 sampler_ycbcr_conversion_features: api::VkPhysicalDeviceSamplerYcbcrConversionFeatures,
853 variable_pointer_features: api::VkPhysicalDeviceVariablePointerFeatures,
854 shader_draw_parameter_features: api::VkPhysicalDeviceShaderDrawParameterFeatures,
855 protected_memory_features: api::VkPhysicalDeviceProtectedMemoryFeatures,
856 multiview_features: api::VkPhysicalDeviceMultiviewFeatures,
857 }
858
859 impl Features {
860 fn new() -> Self {
861 Self {
862 features: api::VkPhysicalDeviceFeatures {
863 robustBufferAccess: api::VK_TRUE,
864 fullDrawIndexUint32: api::VK_TRUE,
865 imageCubeArray: api::VK_TRUE,
866 independentBlend: api::VK_FALSE,
867 geometryShader: api::VK_FALSE,
868 tessellationShader: api::VK_FALSE,
869 sampleRateShading: api::VK_FALSE,
870 dualSrcBlend: api::VK_FALSE,
871 logicOp: api::VK_TRUE,
872 multiDrawIndirect: api::VK_TRUE,
873 drawIndirectFirstInstance: api::VK_TRUE,
874 depthClamp: api::VK_FALSE,
875 depthBiasClamp: api::VK_FALSE,
876 fillModeNonSolid: api::VK_TRUE,
877 depthBounds: api::VK_FALSE,
878 wideLines: api::VK_FALSE,
879 largePoints: api::VK_FALSE,
880 alphaToOne: api::VK_TRUE,
881 multiViewport: api::VK_TRUE,
882 samplerAnisotropy: api::VK_FALSE,
883 textureCompressionETC2: api::VK_FALSE, // FIXME: enable texture compression
884 textureCompressionASTC_LDR: api::VK_FALSE, // FIXME: enable texture compression
885 textureCompressionBC: api::VK_FALSE, // FIXME: enable texture compression
886 occlusionQueryPrecise: api::VK_FALSE,
887 pipelineStatisticsQuery: api::VK_FALSE,
888 vertexPipelineStoresAndAtomics: api::VK_TRUE,
889 fragmentStoresAndAtomics: api::VK_TRUE,
890 shaderTessellationAndGeometryPointSize: api::VK_FALSE,
891 shaderImageGatherExtended: api::VK_FALSE,
892 shaderStorageImageExtendedFormats: api::VK_FALSE,
893 shaderStorageImageMultisample: api::VK_FALSE,
894 shaderStorageImageReadWithoutFormat: api::VK_FALSE,
895 shaderStorageImageWriteWithoutFormat: api::VK_FALSE,
896 shaderUniformBufferArrayDynamicIndexing: api::VK_TRUE,
897 shaderSampledImageArrayDynamicIndexing: api::VK_TRUE,
898 shaderStorageBufferArrayDynamicIndexing: api::VK_TRUE,
899 shaderStorageImageArrayDynamicIndexing: api::VK_TRUE,
900 shaderClipDistance: api::VK_FALSE,
901 shaderCullDistance: api::VK_FALSE,
902 shaderFloat64: api::VK_TRUE,
903 shaderInt64: api::VK_TRUE,
904 shaderInt16: api::VK_TRUE,
905 shaderResourceResidency: api::VK_FALSE,
906 shaderResourceMinLod: api::VK_FALSE,
907 sparseBinding: api::VK_FALSE,
908 sparseResidencyBuffer: api::VK_FALSE,
909 sparseResidencyImage2D: api::VK_FALSE,
910 sparseResidencyImage3D: api::VK_FALSE,
911 sparseResidency2Samples: api::VK_FALSE,
912 sparseResidency4Samples: api::VK_FALSE,
913 sparseResidency8Samples: api::VK_FALSE,
914 sparseResidency16Samples: api::VK_FALSE,
915 sparseResidencyAliased: api::VK_FALSE,
916 variableMultisampleRate: api::VK_FALSE,
917 inheritedQueries: api::VK_FALSE,
918 },
919 physical_device_16bit_storage_features: api::VkPhysicalDevice16BitStorageFeatures {
920 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
921 pNext: null_mut(),
922 storageBuffer16BitAccess: api::VK_TRUE,
923 uniformAndStorageBuffer16BitAccess: api::VK_TRUE,
924 storagePushConstant16: api::VK_TRUE,
925 storageInputOutput16: api::VK_TRUE,
926 },
927 sampler_ycbcr_conversion_features:
928 api::VkPhysicalDeviceSamplerYcbcrConversionFeatures {
929 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
930 pNext: null_mut(),
931 samplerYcbcrConversion: api::VK_FALSE,
932 },
933 variable_pointer_features: api::VkPhysicalDeviceVariablePointerFeatures {
934 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES,
935 pNext: null_mut(),
936 variablePointersStorageBuffer: api::VK_TRUE,
937 variablePointers: api::VK_TRUE,
938 },
939 shader_draw_parameter_features: api::VkPhysicalDeviceShaderDrawParameterFeatures {
940 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES,
941 pNext: null_mut(),
942 shaderDrawParameters: api::VK_TRUE,
943 },
944 protected_memory_features: api::VkPhysicalDeviceProtectedMemoryFeatures {
945 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES,
946 pNext: null_mut(),
947 protectedMemory: api::VK_FALSE,
948 },
949 multiview_features: api::VkPhysicalDeviceMultiviewFeatures {
950 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
951 pNext: null_mut(),
952 multiview: api::VK_FALSE,
953 multiviewGeometryShader: api::VK_FALSE,
954 multiviewTessellationShader: api::VK_FALSE,
955 },
956 }
957 }
958 fn splat(value: bool) -> Self {
959 let value32 = if value { api::VK_TRUE } else { api::VK_FALSE };
960 Self {
961 features: api::VkPhysicalDeviceFeatures {
962 robustBufferAccess: value32,
963 fullDrawIndexUint32: value32,
964 imageCubeArray: value32,
965 independentBlend: value32,
966 geometryShader: value32,
967 tessellationShader: value32,
968 sampleRateShading: value32,
969 dualSrcBlend: value32,
970 logicOp: value32,
971 multiDrawIndirect: value32,
972 drawIndirectFirstInstance: value32,
973 depthClamp: value32,
974 depthBiasClamp: value32,
975 fillModeNonSolid: value32,
976 depthBounds: value32,
977 wideLines: value32,
978 largePoints: value32,
979 alphaToOne: value32,
980 multiViewport: value32,
981 samplerAnisotropy: value32,
982 textureCompressionETC2: value32,
983 textureCompressionASTC_LDR: value32,
984 textureCompressionBC: value32,
985 occlusionQueryPrecise: value32,
986 pipelineStatisticsQuery: value32,
987 vertexPipelineStoresAndAtomics: value32,
988 fragmentStoresAndAtomics: value32,
989 shaderTessellationAndGeometryPointSize: value32,
990 shaderImageGatherExtended: value32,
991 shaderStorageImageExtendedFormats: value32,
992 shaderStorageImageMultisample: value32,
993 shaderStorageImageReadWithoutFormat: value32,
994 shaderStorageImageWriteWithoutFormat: value32,
995 shaderUniformBufferArrayDynamicIndexing: value32,
996 shaderSampledImageArrayDynamicIndexing: value32,
997 shaderStorageBufferArrayDynamicIndexing: value32,
998 shaderStorageImageArrayDynamicIndexing: value32,
999 shaderClipDistance: value32,
1000 shaderCullDistance: value32,
1001 shaderFloat64: value32,
1002 shaderInt64: value32,
1003 shaderInt16: value32,
1004 shaderResourceResidency: value32,
1005 shaderResourceMinLod: value32,
1006 sparseBinding: value32,
1007 sparseResidencyBuffer: value32,
1008 sparseResidencyImage2D: value32,
1009 sparseResidencyImage3D: value32,
1010 sparseResidency2Samples: value32,
1011 sparseResidency4Samples: value32,
1012 sparseResidency8Samples: value32,
1013 sparseResidency16Samples: value32,
1014 sparseResidencyAliased: value32,
1015 variableMultisampleRate: value32,
1016 inheritedQueries: value32,
1017 },
1018 physical_device_16bit_storage_features: api::VkPhysicalDevice16BitStorageFeatures {
1019 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
1020 pNext: null_mut(),
1021 storageBuffer16BitAccess: value32,
1022 uniformAndStorageBuffer16BitAccess: value32,
1023 storagePushConstant16: value32,
1024 storageInputOutput16: value32,
1025 },
1026 sampler_ycbcr_conversion_features:
1027 api::VkPhysicalDeviceSamplerYcbcrConversionFeatures {
1028 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
1029 pNext: null_mut(),
1030 samplerYcbcrConversion: value32,
1031 },
1032 variable_pointer_features: api::VkPhysicalDeviceVariablePointerFeatures {
1033 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES,
1034 pNext: null_mut(),
1035 variablePointersStorageBuffer: value32,
1036 variablePointers: value32,
1037 },
1038 shader_draw_parameter_features: api::VkPhysicalDeviceShaderDrawParameterFeatures {
1039 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES,
1040 pNext: null_mut(),
1041 shaderDrawParameters: value32,
1042 },
1043 protected_memory_features: api::VkPhysicalDeviceProtectedMemoryFeatures {
1044 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES,
1045 pNext: null_mut(),
1046 protectedMemory: value32,
1047 },
1048 multiview_features: api::VkPhysicalDeviceMultiviewFeatures {
1049 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
1050 pNext: null_mut(),
1051 multiview: value32,
1052 multiviewGeometryShader: value32,
1053 multiviewTessellationShader: value32,
1054 },
1055 }
1056 }
1057 fn visit2_mut<F: FnMut(&mut bool, &mut bool)>(&mut self, rhs: &mut Self, f: F) {
1058 struct VisitorStruct<F: FnMut(&mut bool, &mut bool)>(F);
1059 trait Visitor<T> {
1060 fn visit(&mut self, v1: &mut T, v2: &mut T);
1061 }
1062 impl<F: FnMut(&mut bool, &mut bool)> Visitor<bool> for VisitorStruct<F> {
1063 fn visit(&mut self, v1: &mut bool, v2: &mut bool) {
1064 (self.0)(v1, v2);
1065 }
1066 }
1067 impl<F: FnMut(&mut bool, &mut bool)> Visitor<api::VkBool32> for VisitorStruct<F> {
1068 fn visit(&mut self, value1: &mut api::VkBool32, value2: &mut api::VkBool32) {
1069 let mut temp1 = *value1 != api::VK_FALSE;
1070 let mut temp2 = *value2 != api::VK_FALSE;
1071 (self.0)(&mut temp1, &mut temp2);
1072 *value1 = if temp1 { api::VK_TRUE } else { api::VK_FALSE };
1073 *value2 = if temp2 { api::VK_TRUE } else { api::VK_FALSE };
1074 }
1075 }
1076 let mut visitor = VisitorStruct(f);
1077 macro_rules! visit {
1078 ($member1:ident.$member2:ident) => {
1079 visitor.visit(&mut self.$member1.$member2, &mut rhs.$member1.$member2)
1080 };
1081 ($member:ident) => {
1082 visitor.visit(&mut self.$member1, &mut rhs.$member1)
1083 };
1084 }
1085 visit!(features.robustBufferAccess);
1086 visit!(features.fullDrawIndexUint32);
1087 visit!(features.imageCubeArray);
1088 visit!(features.independentBlend);
1089 visit!(features.geometryShader);
1090 visit!(features.tessellationShader);
1091 visit!(features.sampleRateShading);
1092 visit!(features.dualSrcBlend);
1093 visit!(features.logicOp);
1094 visit!(features.multiDrawIndirect);
1095 visit!(features.drawIndirectFirstInstance);
1096 visit!(features.depthClamp);
1097 visit!(features.depthBiasClamp);
1098 visit!(features.fillModeNonSolid);
1099 visit!(features.depthBounds);
1100 visit!(features.wideLines);
1101 visit!(features.largePoints);
1102 visit!(features.alphaToOne);
1103 visit!(features.multiViewport);
1104 visit!(features.samplerAnisotropy);
1105 visit!(features.textureCompressionETC2);
1106 visit!(features.textureCompressionASTC_LDR);
1107 visit!(features.textureCompressionBC);
1108 visit!(features.occlusionQueryPrecise);
1109 visit!(features.pipelineStatisticsQuery);
1110 visit!(features.vertexPipelineStoresAndAtomics);
1111 visit!(features.fragmentStoresAndAtomics);
1112 visit!(features.shaderTessellationAndGeometryPointSize);
1113 visit!(features.shaderImageGatherExtended);
1114 visit!(features.shaderStorageImageExtendedFormats);
1115 visit!(features.shaderStorageImageMultisample);
1116 visit!(features.shaderStorageImageReadWithoutFormat);
1117 visit!(features.shaderStorageImageWriteWithoutFormat);
1118 visit!(features.shaderUniformBufferArrayDynamicIndexing);
1119 visit!(features.shaderSampledImageArrayDynamicIndexing);
1120 visit!(features.shaderStorageBufferArrayDynamicIndexing);
1121 visit!(features.shaderStorageImageArrayDynamicIndexing);
1122 visit!(features.shaderClipDistance);
1123 visit!(features.shaderCullDistance);
1124 visit!(features.shaderFloat64);
1125 visit!(features.shaderInt64);
1126 visit!(features.shaderInt16);
1127 visit!(features.shaderResourceResidency);
1128 visit!(features.shaderResourceMinLod);
1129 visit!(features.sparseBinding);
1130 visit!(features.sparseResidencyBuffer);
1131 visit!(features.sparseResidencyImage2D);
1132 visit!(features.sparseResidencyImage3D);
1133 visit!(features.sparseResidency2Samples);
1134 visit!(features.sparseResidency4Samples);
1135 visit!(features.sparseResidency8Samples);
1136 visit!(features.sparseResidency16Samples);
1137 visit!(features.sparseResidencyAliased);
1138 visit!(features.variableMultisampleRate);
1139 visit!(features.inheritedQueries);
1140 visit!(physical_device_16bit_storage_features.storageBuffer16BitAccess);
1141 visit!(physical_device_16bit_storage_features.uniformAndStorageBuffer16BitAccess);
1142 visit!(physical_device_16bit_storage_features.storagePushConstant16);
1143 visit!(physical_device_16bit_storage_features.storageInputOutput16);
1144 visit!(sampler_ycbcr_conversion_features.samplerYcbcrConversion);
1145 visit!(variable_pointer_features.variablePointersStorageBuffer);
1146 visit!(variable_pointer_features.variablePointers);
1147 visit!(shader_draw_parameter_features.shaderDrawParameters);
1148 visit!(protected_memory_features.protectedMemory);
1149 visit!(multiview_features.multiview);
1150 visit!(multiview_features.multiviewGeometryShader);
1151 visit!(multiview_features.multiviewTessellationShader);
1152 }
1153 fn visit2<F: FnMut(bool, bool)>(mut self, mut rhs: Self, mut f: F) {
1154 self.visit2_mut(&mut rhs, |v1, v2| f(*v1, *v2));
1155 }
1156 fn visit_mut<F: FnMut(&mut bool)>(&mut self, mut f: F) {
1157 let mut rhs = *self;
1158 self.visit2_mut(&mut rhs, |v, _| f(v));
1159 }
1160 #[allow(dead_code)]
1161 fn visit<F: FnMut(bool)>(mut self, mut f: F) {
1162 self.visit_mut(|v| f(*v));
1163 }
1164 }
1165
1166 trait ImportExportFeatureSet<T> {
1167 fn import_feature_set(&mut self, features: &T);
1168 fn export_feature_set(&self, features: &mut T);
1169 }
1170
1171 impl ImportExportFeatureSet<api::VkPhysicalDeviceFeatures> for Features {
1172 fn import_feature_set(&mut self, features: &api::VkPhysicalDeviceFeatures) {
1173 self.features = *features;
1174 }
1175 fn export_feature_set(&self, features: &mut api::VkPhysicalDeviceFeatures) {
1176 *features = self.features;
1177 }
1178 }
1179
1180 impl ImportExportFeatureSet<api::VkPhysicalDeviceFeatures2> for Features {
1181 fn import_feature_set(&mut self, features: &api::VkPhysicalDeviceFeatures2) {
1182 self.features = features.features;
1183 }
1184 fn export_feature_set(&self, features: &mut api::VkPhysicalDeviceFeatures2) {
1185 features.features = self.features;
1186 }
1187 }
1188
1189 macro_rules! impl_import_export_feature_set {
1190 ($type:ident, $member:ident) => {
1191 impl ImportExportFeatureSet<api::$type> for Features {
1192 fn import_feature_set(&mut self, features: &api::$type) {
1193 self.$member = api::$type {
1194 sType: self.$member.sType,
1195 pNext: self.$member.pNext,
1196 ..*features
1197 };
1198 }
1199 fn export_feature_set(&self, features: &mut api::$type) {
1200 *features = api::$type {
1201 sType: features.sType,
1202 pNext: features.pNext,
1203 ..self.$member
1204 };
1205 }
1206 }
1207 };
1208 }
1209
1210 impl_import_export_feature_set!(
1211 VkPhysicalDevice16BitStorageFeatures,
1212 physical_device_16bit_storage_features
1213 );
1214
1215 impl_import_export_feature_set!(
1216 VkPhysicalDeviceSamplerYcbcrConversionFeatures,
1217 sampler_ycbcr_conversion_features
1218 );
1219
1220 impl_import_export_feature_set!(
1221 VkPhysicalDeviceVariablePointerFeatures,
1222 variable_pointer_features
1223 );
1224
1225 impl_import_export_feature_set!(
1226 VkPhysicalDeviceShaderDrawParameterFeatures,
1227 shader_draw_parameter_features
1228 );
1229
1230 impl_import_export_feature_set!(
1231 VkPhysicalDeviceProtectedMemoryFeatures,
1232 protected_memory_features
1233 );
1234
1235 impl_import_export_feature_set!(VkPhysicalDeviceMultiviewFeatures, multiview_features);
1236
1237 impl Eq for Features {}
1238
1239 impl PartialEq for Features {
1240 fn eq(&self, rhs: &Self) -> bool {
1241 let mut equal = true;
1242 self.visit2(*rhs, |a, b| equal &= a == b);
1243 equal
1244 }
1245 }
1246
1247 impl BitAndAssign for Features {
1248 fn bitand_assign(&mut self, mut rhs: Self) {
1249 self.visit2_mut(&mut rhs, |l, r| *l &= *r);
1250 }
1251 }
1252
1253 impl BitOrAssign for Features {
1254 fn bitor_assign(&mut self, mut rhs: Self) {
1255 self.visit2_mut(&mut rhs, |l, r| *l |= *r);
1256 }
1257 }
1258
1259 impl BitXorAssign for Features {
1260 fn bitxor_assign(&mut self, mut rhs: Self) {
1261 self.visit2_mut(&mut rhs, |l, r| *l ^= *r);
1262 }
1263 }
1264
1265 impl BitAnd for Features {
1266 type Output = Self;
1267 fn bitand(mut self, rhs: Self) -> Self {
1268 self &= rhs;
1269 self
1270 }
1271 }
1272
1273 impl BitOr for Features {
1274 type Output = Self;
1275 fn bitor(mut self, rhs: Self) -> Self {
1276 self |= rhs;
1277 self
1278 }
1279 }
1280
1281 impl BitXor for Features {
1282 type Output = Self;
1283 fn bitxor(mut self, rhs: Self) -> Self {
1284 self ^= rhs;
1285 self
1286 }
1287 }
1288
1289 impl Not for Features {
1290 type Output = Self;
1291 fn not(mut self) -> Self {
1292 self.visit_mut(|v| *v = !*v);
1293 self
1294 }
1295 }
1296
1297 pub struct Queue {}
1298
1299 pub struct Device {
1300 #[allow(dead_code)]
1301 physical_device: SharedHandle<api::VkPhysicalDevice>,
1302 extensions: Extensions,
1303 #[allow(dead_code)]
1304 features: Features,
1305 queues: Vec<Vec<OwnedHandle<api::VkQueue>>>,
1306 }
1307
1308 impl Device {
1309 unsafe fn new(
1310 physical_device: SharedHandle<api::VkPhysicalDevice>,
1311 create_info: *const api::VkDeviceCreateInfo,
1312 ) -> Result<OwnedHandle<api::VkDevice>, api::VkResult> {
1313 parse_next_chain_const! {
1314 create_info,
1315 root = api::VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
1316 device_group_device_create_info: api::VkDeviceGroupDeviceCreateInfo = api::VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO,
1317 physical_device_16bit_storage_features: api::VkPhysicalDevice16BitStorageFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
1318 physical_device_features_2: api::VkPhysicalDeviceFeatures2 = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
1319 physical_device_multiview_features: api::VkPhysicalDeviceMultiviewFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
1320 physical_device_protected_memory_features: api::VkPhysicalDeviceProtectedMemoryFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES,
1321 physical_device_sampler_ycbcr_conversion_features: api::VkPhysicalDeviceSamplerYcbcrConversionFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
1322 physical_device_shader_draw_parameter_features: api::VkPhysicalDeviceShaderDrawParameterFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES,
1323 physical_device_variable_pointer_features: api::VkPhysicalDeviceVariablePointerFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES,
1324 }
1325 let create_info = &*create_info;
1326 if create_info.enabledLayerCount != 0 {
1327 return Err(api::VK_ERROR_LAYER_NOT_PRESENT);
1328 }
1329 let mut enabled_extensions = physical_device.enabled_extensions;
1330 for &extension_name in util::to_slice(
1331 create_info.ppEnabledExtensionNames,
1332 create_info.enabledExtensionCount as usize,
1333 ) {
1334 let extension: Extension = CStr::from_ptr(extension_name)
1335 .to_str()
1336 .map_err(|_| api::VK_ERROR_EXTENSION_NOT_PRESENT)?
1337 .parse()
1338 .map_err(|_| api::VK_ERROR_EXTENSION_NOT_PRESENT)?;
1339 assert_eq!(extension.get_scope(), ExtensionScope::Device);
1340 enabled_extensions[extension] = true;
1341 }
1342 for extension in enabled_extensions
1343 .iter()
1344 .filter_map(|(extension, &enabled)| if enabled { Some(extension) } else { None })
1345 {
1346 let missing_extensions = extension.get_required_extensions() & !enabled_extensions;
1347 for missing_extension in missing_extensions
1348 .iter()
1349 .filter_map(|(extension, &enabled)| if enabled { Some(extension) } else { None })
1350 {
1351 panic!(
1352 "extension {} enabled but required extension {} is not enabled",
1353 extension.get_name(),
1354 missing_extension.get_name()
1355 );
1356 }
1357 }
1358 let mut selected_features = Features::splat(false);
1359 if !device_group_device_create_info.is_null() {
1360 let api::VkDeviceGroupDeviceCreateInfo {
1361 sType: _,
1362 pNext: _,
1363 physicalDeviceCount: physical_device_count,
1364 pPhysicalDevices: physical_devices,
1365 } = *device_group_device_create_info;
1366 assert_eq!(
1367 physical_device_count, 1,
1368 "multiple devices in a group are not implemented"
1369 );
1370 assert_eq!(
1371 *physical_devices,
1372 physical_device.get_handle(),
1373 "unknown physical_device"
1374 );
1375 }
1376 if !physical_device_16bit_storage_features.is_null() {
1377 selected_features.import_feature_set(&*physical_device_16bit_storage_features);
1378 }
1379 if !physical_device_features_2.is_null() {
1380 selected_features.import_feature_set(&*physical_device_features_2);
1381 } else if !create_info.pEnabledFeatures.is_null() {
1382 selected_features.import_feature_set(&*create_info.pEnabledFeatures);
1383 }
1384 if !physical_device_multiview_features.is_null() {
1385 selected_features.import_feature_set(&*physical_device_multiview_features);
1386 }
1387 if !physical_device_protected_memory_features.is_null() {
1388 selected_features.import_feature_set(&*physical_device_protected_memory_features);
1389 }
1390 if !physical_device_sampler_ycbcr_conversion_features.is_null() {
1391 selected_features
1392 .import_feature_set(&*physical_device_sampler_ycbcr_conversion_features);
1393 }
1394 if !physical_device_shader_draw_parameter_features.is_null() {
1395 selected_features.import_feature_set(&*physical_device_shader_draw_parameter_features);
1396 } else if enabled_extensions[Extension::VK_KHR_shader_draw_parameters] {
1397 selected_features
1398 .shader_draw_parameter_features
1399 .shaderDrawParameters = api::VK_TRUE;
1400 }
1401 if !physical_device_variable_pointer_features.is_null() {
1402 selected_features.import_feature_set(&*physical_device_variable_pointer_features);
1403 }
1404 if (selected_features & !physical_device.features) != Features::splat(false) {
1405 return Err(api::VK_ERROR_FEATURE_NOT_PRESENT);
1406 }
1407 assert_ne!(create_info.queueCreateInfoCount, 0);
1408 let queue_create_infos = util::to_slice(
1409 create_info.pQueueCreateInfos,
1410 create_info.queueCreateInfoCount as usize,
1411 );
1412 assert!(queue_create_infos.len() <= QUEUE_FAMILY_COUNT as usize);
1413 let mut total_queue_count = 0;
1414 let mut queue_counts: Vec<_> = Vec::new();
1415 for queue_create_info in queue_create_infos {
1416 parse_next_chain_const! {
1417 queue_create_info,
1418 root = api::VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO,
1419 }
1420 let api::VkDeviceQueueCreateInfo {
1421 sType: _,
1422 pNext: _,
1423 flags,
1424 queueFamilyIndex: queue_family_index,
1425 queueCount: queue_count,
1426 pQueuePriorities: queue_priorities,
1427 } = *queue_create_info;
1428 assert_eq!(flags & api::VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT, 0);
1429 assert!(queue_family_index < QUEUE_FAMILY_COUNT);
1430 assert!(queue_count <= QUEUE_COUNTS[queue_family_index as usize]);
1431 let queue_priorities = util::to_slice(queue_priorities, queue_count as usize);
1432 for &queue_priority in queue_priorities {
1433 assert!(queue_priority >= 0.0 && queue_priority <= 1.0);
1434 }
1435 assert_eq!(QUEUE_FAMILY_COUNT, 1, "multiple queues are not implemented");
1436 assert_eq!(
1437 QUEUE_COUNTS, [1; QUEUE_FAMILY_COUNT as usize],
1438 "multiple queues are not implemented"
1439 );
1440 queue_counts.push(queue_count as usize);
1441 total_queue_count += queue_count as usize;
1442 }
1443 assert!(total_queue_count <= TOTAL_QUEUE_COUNT);
1444 let mut queues = Vec::new();
1445 for queue_count in queue_counts {
1446 let mut queue_family_queues = Vec::new();
1447 for _queue_index in 0..queue_count {
1448 queue_family_queues.push(OwnedHandle::<api::VkQueue>::new(Queue {}));
1449 }
1450 queues.push(queue_family_queues);
1451 }
1452 Ok(OwnedHandle::<api::VkDevice>::new(Device {
1453 physical_device,
1454 extensions: enabled_extensions,
1455 features: selected_features,
1456 queues,
1457 }))
1458 }
1459 }
1460
1461 pub struct PhysicalDevice {
1462 enabled_extensions: Extensions,
1463 allowed_extensions: Extensions,
1464 properties: api::VkPhysicalDeviceProperties,
1465 features: Features,
1466 system_memory_size: u64,
1467 point_clipping_properties: api::VkPhysicalDevicePointClippingProperties,
1468 multiview_properties: api::VkPhysicalDeviceMultiviewProperties,
1469 id_properties: api::VkPhysicalDeviceIDProperties,
1470 maintenance_3_properties: api::VkPhysicalDeviceMaintenance3Properties,
1471 protected_memory_properties: api::VkPhysicalDeviceProtectedMemoryProperties,
1472 subgroup_properties: api::VkPhysicalDeviceSubgroupProperties,
1473 }
1474
1475 impl PhysicalDevice {
1476 pub fn get_pipeline_cache_uuid() -> uuid::Uuid {
1477 // FIXME: return real uuid
1478 uuid::Uuid::nil()
1479 }
1480 pub fn get_device_uuid() -> uuid::Uuid {
1481 // FIXME: return real uuid
1482 uuid::Uuid::nil()
1483 }
1484 pub fn get_driver_uuid() -> uuid::Uuid {
1485 // FIXME: return real uuid
1486 uuid::Uuid::nil()
1487 }
1488 pub fn get_limits() -> api::VkPhysicalDeviceLimits {
1489 #![cfg_attr(feature = "cargo-clippy", allow(clippy::needless_update))]
1490 api::VkPhysicalDeviceLimits {
1491 maxImageDimension1D: !0,
1492 maxImageDimension2D: !0,
1493 maxImageDimension3D: !0,
1494 maxImageDimensionCube: !0,
1495 maxImageArrayLayers: !0,
1496 maxTexelBufferElements: !0,
1497 maxUniformBufferRange: !0,
1498 maxStorageBufferRange: !0,
1499 maxPushConstantsSize: !0,
1500 maxMemoryAllocationCount: !0,
1501 maxSamplerAllocationCount: !0,
1502 bufferImageGranularity: 1,
1503 sparseAddressSpaceSize: 0,
1504 maxBoundDescriptorSets: !0,
1505 maxPerStageDescriptorSamplers: !0,
1506 maxPerStageDescriptorUniformBuffers: !0,
1507 maxPerStageDescriptorStorageBuffers: !0,
1508 maxPerStageDescriptorSampledImages: !0,
1509 maxPerStageDescriptorStorageImages: !0,
1510 maxPerStageDescriptorInputAttachments: !0,
1511 maxPerStageResources: !0,
1512 maxDescriptorSetSamplers: !0,
1513 maxDescriptorSetUniformBuffers: !0,
1514 maxDescriptorSetUniformBuffersDynamic: !0,
1515 maxDescriptorSetStorageBuffers: !0,
1516 maxDescriptorSetStorageBuffersDynamic: !0,
1517 maxDescriptorSetSampledImages: !0,
1518 maxDescriptorSetStorageImages: !0,
1519 maxDescriptorSetInputAttachments: !0,
1520 maxVertexInputAttributes: !0,
1521 maxVertexInputBindings: !0,
1522 maxVertexInputAttributeOffset: !0,
1523 maxVertexInputBindingStride: !0,
1524 maxVertexOutputComponents: !0,
1525 maxTessellationGenerationLevel: 0,
1526 maxTessellationPatchSize: 0,
1527 maxTessellationControlPerVertexInputComponents: 0,
1528 maxTessellationControlPerVertexOutputComponents: 0,
1529 maxTessellationControlPerPatchOutputComponents: 0,
1530 maxTessellationControlTotalOutputComponents: 0,
1531 maxTessellationEvaluationInputComponents: 0,
1532 maxTessellationEvaluationOutputComponents: 0,
1533 maxGeometryShaderInvocations: 0,
1534 maxGeometryInputComponents: 0,
1535 maxGeometryOutputComponents: 0,
1536 maxGeometryOutputVertices: 0,
1537 maxGeometryTotalOutputComponents: 0,
1538 maxFragmentInputComponents: !0,
1539 maxFragmentOutputAttachments: !0,
1540 maxFragmentDualSrcAttachments: 0,
1541 maxFragmentCombinedOutputResources: !0,
1542 maxComputeSharedMemorySize: !0,
1543 maxComputeWorkGroupCount: [!0; 3],
1544 maxComputeWorkGroupInvocations: !0,
1545 maxComputeWorkGroupSize: [!0; 3],
1546 subPixelPrecisionBits: 4, // FIXME: update to correct value
1547 subTexelPrecisionBits: 4, // FIXME: update to correct value
1548 mipmapPrecisionBits: 4, // FIXME: update to correct value
1549 maxDrawIndexedIndexValue: !0,
1550 maxDrawIndirectCount: !0,
1551 maxSamplerLodBias: 2.0, // FIXME: update to correct value
1552 maxSamplerAnisotropy: 1.0,
1553 maxViewports: 1,
1554 maxViewportDimensions: [4096; 2], // FIXME: update to correct value
1555 viewportBoundsRange: [-8192.0, 8191.0], // FIXME: update to correct value
1556 viewportSubPixelBits: 0,
1557 minMemoryMapAlignment: MIN_MEMORY_MAP_ALIGNMENT,
1558 minTexelBufferOffsetAlignment: 64, // FIXME: update to correct value
1559 minUniformBufferOffsetAlignment: 64, // FIXME: update to correct value
1560 minStorageBufferOffsetAlignment: 64, // FIXME: update to correct value
1561 minTexelOffset: -8, // FIXME: update to correct value
1562 maxTexelOffset: 7, // FIXME: update to correct value
1563 minTexelGatherOffset: 0,
1564 maxTexelGatherOffset: 0,
1565 minInterpolationOffset: 0.0,
1566 maxInterpolationOffset: 0.0,
1567 subPixelInterpolationOffsetBits: 0,
1568 maxFramebufferWidth: 4096, // FIXME: update to correct value
1569 maxFramebufferHeight: 4096, // FIXME: update to correct value
1570 maxFramebufferLayers: 256, // FIXME: update to correct value
1571 framebufferColorSampleCounts: api::VK_SAMPLE_COUNT_1_BIT | api::VK_SAMPLE_COUNT_4_BIT, // FIXME: update to correct value
1572 framebufferDepthSampleCounts: api::VK_SAMPLE_COUNT_1_BIT | api::VK_SAMPLE_COUNT_4_BIT, // FIXME: update to correct value
1573 framebufferStencilSampleCounts: api::VK_SAMPLE_COUNT_1_BIT | api::VK_SAMPLE_COUNT_4_BIT, // FIXME: update to correct value
1574 framebufferNoAttachmentsSampleCounts: api::VK_SAMPLE_COUNT_1_BIT
1575 | api::VK_SAMPLE_COUNT_4_BIT, // FIXME: update to correct value
1576 maxColorAttachments: 4,
1577 sampledImageColorSampleCounts: api::VK_SAMPLE_COUNT_1_BIT | api::VK_SAMPLE_COUNT_4_BIT, // FIXME: update to correct value
1578 sampledImageIntegerSampleCounts: api::VK_SAMPLE_COUNT_1_BIT
1579 | api::VK_SAMPLE_COUNT_4_BIT, // FIXME: update to correct value
1580 sampledImageDepthSampleCounts: api::VK_SAMPLE_COUNT_1_BIT | api::VK_SAMPLE_COUNT_4_BIT, // FIXME: update to correct value
1581 sampledImageStencilSampleCounts: api::VK_SAMPLE_COUNT_1_BIT
1582 | api::VK_SAMPLE_COUNT_4_BIT, // FIXME: update to correct value
1583 storageImageSampleCounts: api::VK_SAMPLE_COUNT_1_BIT, // FIXME: update to correct value
1584 maxSampleMaskWords: 1,
1585 timestampComputeAndGraphics: api::VK_FALSE,
1586 timestampPeriod: 0.0,
1587 maxClipDistances: 0,
1588 maxCullDistances: 0,
1589 maxCombinedClipAndCullDistances: 0,
1590 discreteQueuePriorities: 2,
1591 pointSizeRange: [1.0; 2],
1592 lineWidthRange: [1.0; 2],
1593 pointSizeGranularity: 0.0,
1594 lineWidthGranularity: 0.0,
1595 strictLines: api::VK_FALSE,
1596 standardSampleLocations: api::VK_TRUE,
1597 optimalBufferCopyOffsetAlignment: 16,
1598 optimalBufferCopyRowPitchAlignment: 16,
1599 nonCoherentAtomSize: 1, //TODO: check if this is correct
1600 ..unsafe { mem::zeroed() } // for padding fields
1601 }
1602 }
1603 pub fn get_format_properties(format: api::VkFormat) -> api::VkFormatProperties {
1604 match format {
1605 api::VK_FORMAT_UNDEFINED => api::VkFormatProperties {
1606 linearTilingFeatures: 0,
1607 optimalTilingFeatures: 0,
1608 bufferFeatures: 0,
1609 },
1610 api::VK_FORMAT_R4G4_UNORM_PACK8 => api::VkFormatProperties {
1611 // FIXME: finish
1612 linearTilingFeatures: 0,
1613 optimalTilingFeatures: 0,
1614 bufferFeatures: 0,
1615 },
1616 api::VK_FORMAT_R4G4B4A4_UNORM_PACK16 => api::VkFormatProperties {
1617 // FIXME: finish
1618 linearTilingFeatures: 0,
1619 optimalTilingFeatures: 0,
1620 bufferFeatures: 0,
1621 },
1622 api::VK_FORMAT_B4G4R4A4_UNORM_PACK16 => api::VkFormatProperties {
1623 // FIXME: finish
1624 linearTilingFeatures: 0,
1625 optimalTilingFeatures: 0,
1626 bufferFeatures: 0,
1627 },
1628 api::VK_FORMAT_R5G6B5_UNORM_PACK16 => api::VkFormatProperties {
1629 // FIXME: finish
1630 linearTilingFeatures: 0,
1631 optimalTilingFeatures: 0,
1632 bufferFeatures: 0,
1633 },
1634 api::VK_FORMAT_B5G6R5_UNORM_PACK16 => api::VkFormatProperties {
1635 // FIXME: finish
1636 linearTilingFeatures: 0,
1637 optimalTilingFeatures: 0,
1638 bufferFeatures: 0,
1639 },
1640 api::VK_FORMAT_R5G5B5A1_UNORM_PACK16 => api::VkFormatProperties {
1641 // FIXME: finish
1642 linearTilingFeatures: 0,
1643 optimalTilingFeatures: 0,
1644 bufferFeatures: 0,
1645 },
1646 api::VK_FORMAT_B5G5R5A1_UNORM_PACK16 => api::VkFormatProperties {
1647 // FIXME: finish
1648 linearTilingFeatures: 0,
1649 optimalTilingFeatures: 0,
1650 bufferFeatures: 0,
1651 },
1652 api::VK_FORMAT_A1R5G5B5_UNORM_PACK16 => api::VkFormatProperties {
1653 // FIXME: finish
1654 linearTilingFeatures: 0,
1655 optimalTilingFeatures: 0,
1656 bufferFeatures: 0,
1657 },
1658 api::VK_FORMAT_R8_UNORM => api::VkFormatProperties {
1659 // FIXME: finish
1660 linearTilingFeatures: 0,
1661 optimalTilingFeatures: 0,
1662 bufferFeatures: 0,
1663 },
1664 api::VK_FORMAT_R8_SNORM => api::VkFormatProperties {
1665 // FIXME: finish
1666 linearTilingFeatures: 0,
1667 optimalTilingFeatures: 0,
1668 bufferFeatures: 0,
1669 },
1670 api::VK_FORMAT_R8_USCALED => api::VkFormatProperties {
1671 // FIXME: finish
1672 linearTilingFeatures: 0,
1673 optimalTilingFeatures: 0,
1674 bufferFeatures: 0,
1675 },
1676 api::VK_FORMAT_R8_SSCALED => api::VkFormatProperties {
1677 // FIXME: finish
1678 linearTilingFeatures: 0,
1679 optimalTilingFeatures: 0,
1680 bufferFeatures: 0,
1681 },
1682 api::VK_FORMAT_R8_UINT => api::VkFormatProperties {
1683 // FIXME: finish
1684 linearTilingFeatures: 0,
1685 optimalTilingFeatures: 0,
1686 bufferFeatures: 0,
1687 },
1688 api::VK_FORMAT_R8_SINT => api::VkFormatProperties {
1689 // FIXME: finish
1690 linearTilingFeatures: 0,
1691 optimalTilingFeatures: 0,
1692 bufferFeatures: 0,
1693 },
1694 api::VK_FORMAT_R8_SRGB => api::VkFormatProperties {
1695 // FIXME: finish
1696 linearTilingFeatures: 0,
1697 optimalTilingFeatures: 0,
1698 bufferFeatures: 0,
1699 },
1700 api::VK_FORMAT_R8G8_UNORM => api::VkFormatProperties {
1701 // FIXME: finish
1702 linearTilingFeatures: 0,
1703 optimalTilingFeatures: 0,
1704 bufferFeatures: 0,
1705 },
1706 api::VK_FORMAT_R8G8_SNORM => api::VkFormatProperties {
1707 // FIXME: finish
1708 linearTilingFeatures: 0,
1709 optimalTilingFeatures: 0,
1710 bufferFeatures: 0,
1711 },
1712 api::VK_FORMAT_R8G8_USCALED => api::VkFormatProperties {
1713 // FIXME: finish
1714 linearTilingFeatures: 0,
1715 optimalTilingFeatures: 0,
1716 bufferFeatures: 0,
1717 },
1718 api::VK_FORMAT_R8G8_SSCALED => api::VkFormatProperties {
1719 // FIXME: finish
1720 linearTilingFeatures: 0,
1721 optimalTilingFeatures: 0,
1722 bufferFeatures: 0,
1723 },
1724 api::VK_FORMAT_R8G8_UINT => api::VkFormatProperties {
1725 // FIXME: finish
1726 linearTilingFeatures: 0,
1727 optimalTilingFeatures: 0,
1728 bufferFeatures: 0,
1729 },
1730 api::VK_FORMAT_R8G8_SINT => api::VkFormatProperties {
1731 // FIXME: finish
1732 linearTilingFeatures: 0,
1733 optimalTilingFeatures: 0,
1734 bufferFeatures: 0,
1735 },
1736 api::VK_FORMAT_R8G8_SRGB => api::VkFormatProperties {
1737 // FIXME: finish
1738 linearTilingFeatures: 0,
1739 optimalTilingFeatures: 0,
1740 bufferFeatures: 0,
1741 },
1742 api::VK_FORMAT_R8G8B8_UNORM => api::VkFormatProperties {
1743 // FIXME: finish
1744 linearTilingFeatures: 0,
1745 optimalTilingFeatures: 0,
1746 bufferFeatures: 0,
1747 },
1748 api::VK_FORMAT_R8G8B8_SNORM => api::VkFormatProperties {
1749 // FIXME: finish
1750 linearTilingFeatures: 0,
1751 optimalTilingFeatures: 0,
1752 bufferFeatures: 0,
1753 },
1754 api::VK_FORMAT_R8G8B8_USCALED => api::VkFormatProperties {
1755 // FIXME: finish
1756 linearTilingFeatures: 0,
1757 optimalTilingFeatures: 0,
1758 bufferFeatures: 0,
1759 },
1760 api::VK_FORMAT_R8G8B8_SSCALED => api::VkFormatProperties {
1761 // FIXME: finish
1762 linearTilingFeatures: 0,
1763 optimalTilingFeatures: 0,
1764 bufferFeatures: 0,
1765 },
1766 api::VK_FORMAT_R8G8B8_UINT => api::VkFormatProperties {
1767 // FIXME: finish
1768 linearTilingFeatures: 0,
1769 optimalTilingFeatures: 0,
1770 bufferFeatures: 0,
1771 },
1772 api::VK_FORMAT_R8G8B8_SINT => api::VkFormatProperties {
1773 // FIXME: finish
1774 linearTilingFeatures: 0,
1775 optimalTilingFeatures: 0,
1776 bufferFeatures: 0,
1777 },
1778 api::VK_FORMAT_R8G8B8_SRGB => api::VkFormatProperties {
1779 // FIXME: finish
1780 linearTilingFeatures: 0,
1781 optimalTilingFeatures: 0,
1782 bufferFeatures: 0,
1783 },
1784 api::VK_FORMAT_B8G8R8_UNORM => api::VkFormatProperties {
1785 // FIXME: finish
1786 linearTilingFeatures: 0,
1787 optimalTilingFeatures: 0,
1788 bufferFeatures: 0,
1789 },
1790 api::VK_FORMAT_B8G8R8_SNORM => api::VkFormatProperties {
1791 // FIXME: finish
1792 linearTilingFeatures: 0,
1793 optimalTilingFeatures: 0,
1794 bufferFeatures: 0,
1795 },
1796 api::VK_FORMAT_B8G8R8_USCALED => api::VkFormatProperties {
1797 // FIXME: finish
1798 linearTilingFeatures: 0,
1799 optimalTilingFeatures: 0,
1800 bufferFeatures: 0,
1801 },
1802 api::VK_FORMAT_B8G8R8_SSCALED => api::VkFormatProperties {
1803 // FIXME: finish
1804 linearTilingFeatures: 0,
1805 optimalTilingFeatures: 0,
1806 bufferFeatures: 0,
1807 },
1808 api::VK_FORMAT_B8G8R8_UINT => api::VkFormatProperties {
1809 // FIXME: finish
1810 linearTilingFeatures: 0,
1811 optimalTilingFeatures: 0,
1812 bufferFeatures: 0,
1813 },
1814 api::VK_FORMAT_B8G8R8_SINT => api::VkFormatProperties {
1815 // FIXME: finish
1816 linearTilingFeatures: 0,
1817 optimalTilingFeatures: 0,
1818 bufferFeatures: 0,
1819 },
1820 api::VK_FORMAT_B8G8R8_SRGB => api::VkFormatProperties {
1821 // FIXME: finish
1822 linearTilingFeatures: 0,
1823 optimalTilingFeatures: 0,
1824 bufferFeatures: 0,
1825 },
1826 api::VK_FORMAT_R8G8B8A8_UNORM => api::VkFormatProperties {
1827 // FIXME: finish
1828 linearTilingFeatures: 0,
1829 optimalTilingFeatures: 0,
1830 bufferFeatures: 0,
1831 },
1832 api::VK_FORMAT_R8G8B8A8_SNORM => api::VkFormatProperties {
1833 // FIXME: finish
1834 linearTilingFeatures: 0,
1835 optimalTilingFeatures: 0,
1836 bufferFeatures: 0,
1837 },
1838 api::VK_FORMAT_R8G8B8A8_USCALED => api::VkFormatProperties {
1839 // FIXME: finish
1840 linearTilingFeatures: 0,
1841 optimalTilingFeatures: 0,
1842 bufferFeatures: 0,
1843 },
1844 api::VK_FORMAT_R8G8B8A8_SSCALED => api::VkFormatProperties {
1845 // FIXME: finish
1846 linearTilingFeatures: 0,
1847 optimalTilingFeatures: 0,
1848 bufferFeatures: 0,
1849 },
1850 api::VK_FORMAT_R8G8B8A8_UINT => api::VkFormatProperties {
1851 // FIXME: finish
1852 linearTilingFeatures: 0,
1853 optimalTilingFeatures: 0,
1854 bufferFeatures: 0,
1855 },
1856 api::VK_FORMAT_R8G8B8A8_SINT => api::VkFormatProperties {
1857 // FIXME: finish
1858 linearTilingFeatures: 0,
1859 optimalTilingFeatures: 0,
1860 bufferFeatures: 0,
1861 },
1862 api::VK_FORMAT_R8G8B8A8_SRGB => api::VkFormatProperties {
1863 // FIXME: finish
1864 linearTilingFeatures: 0,
1865 optimalTilingFeatures: 0,
1866 bufferFeatures: 0,
1867 },
1868 api::VK_FORMAT_B8G8R8A8_UNORM => api::VkFormatProperties {
1869 // FIXME: finish
1870 linearTilingFeatures: 0,
1871 optimalTilingFeatures: 0,
1872 bufferFeatures: 0,
1873 },
1874 api::VK_FORMAT_B8G8R8A8_SNORM => api::VkFormatProperties {
1875 // FIXME: finish
1876 linearTilingFeatures: 0,
1877 optimalTilingFeatures: 0,
1878 bufferFeatures: 0,
1879 },
1880 api::VK_FORMAT_B8G8R8A8_USCALED => api::VkFormatProperties {
1881 // FIXME: finish
1882 linearTilingFeatures: 0,
1883 optimalTilingFeatures: 0,
1884 bufferFeatures: 0,
1885 },
1886 api::VK_FORMAT_B8G8R8A8_SSCALED => api::VkFormatProperties {
1887 // FIXME: finish
1888 linearTilingFeatures: 0,
1889 optimalTilingFeatures: 0,
1890 bufferFeatures: 0,
1891 },
1892 api::VK_FORMAT_B8G8R8A8_UINT => api::VkFormatProperties {
1893 // FIXME: finish
1894 linearTilingFeatures: 0,
1895 optimalTilingFeatures: 0,
1896 bufferFeatures: 0,
1897 },
1898 api::VK_FORMAT_B8G8R8A8_SINT => api::VkFormatProperties {
1899 // FIXME: finish
1900 linearTilingFeatures: 0,
1901 optimalTilingFeatures: 0,
1902 bufferFeatures: 0,
1903 },
1904 api::VK_FORMAT_B8G8R8A8_SRGB => api::VkFormatProperties {
1905 // FIXME: finish
1906 linearTilingFeatures: 0,
1907 optimalTilingFeatures: 0,
1908 bufferFeatures: 0,
1909 },
1910 api::VK_FORMAT_A8B8G8R8_UNORM_PACK32 => api::VkFormatProperties {
1911 // FIXME: finish
1912 linearTilingFeatures: 0,
1913 optimalTilingFeatures: 0,
1914 bufferFeatures: 0,
1915 },
1916 api::VK_FORMAT_A8B8G8R8_SNORM_PACK32 => api::VkFormatProperties {
1917 // FIXME: finish
1918 linearTilingFeatures: 0,
1919 optimalTilingFeatures: 0,
1920 bufferFeatures: 0,
1921 },
1922 api::VK_FORMAT_A8B8G8R8_USCALED_PACK32 => api::VkFormatProperties {
1923 // FIXME: finish
1924 linearTilingFeatures: 0,
1925 optimalTilingFeatures: 0,
1926 bufferFeatures: 0,
1927 },
1928 api::VK_FORMAT_A8B8G8R8_SSCALED_PACK32 => api::VkFormatProperties {
1929 // FIXME: finish
1930 linearTilingFeatures: 0,
1931 optimalTilingFeatures: 0,
1932 bufferFeatures: 0,
1933 },
1934 api::VK_FORMAT_A8B8G8R8_UINT_PACK32 => api::VkFormatProperties {
1935 // FIXME: finish
1936 linearTilingFeatures: 0,
1937 optimalTilingFeatures: 0,
1938 bufferFeatures: 0,
1939 },
1940 api::VK_FORMAT_A8B8G8R8_SINT_PACK32 => api::VkFormatProperties {
1941 // FIXME: finish
1942 linearTilingFeatures: 0,
1943 optimalTilingFeatures: 0,
1944 bufferFeatures: 0,
1945 },
1946 api::VK_FORMAT_A8B8G8R8_SRGB_PACK32 => api::VkFormatProperties {
1947 // FIXME: finish
1948 linearTilingFeatures: 0,
1949 optimalTilingFeatures: 0,
1950 bufferFeatures: 0,
1951 },
1952 api::VK_FORMAT_A2R10G10B10_UNORM_PACK32 => api::VkFormatProperties {
1953 // FIXME: finish
1954 linearTilingFeatures: 0,
1955 optimalTilingFeatures: 0,
1956 bufferFeatures: 0,
1957 },
1958 api::VK_FORMAT_A2R10G10B10_SNORM_PACK32 => api::VkFormatProperties {
1959 // FIXME: finish
1960 linearTilingFeatures: 0,
1961 optimalTilingFeatures: 0,
1962 bufferFeatures: 0,
1963 },
1964 api::VK_FORMAT_A2R10G10B10_USCALED_PACK32 => api::VkFormatProperties {
1965 // FIXME: finish
1966 linearTilingFeatures: 0,
1967 optimalTilingFeatures: 0,
1968 bufferFeatures: 0,
1969 },
1970 api::VK_FORMAT_A2R10G10B10_SSCALED_PACK32 => api::VkFormatProperties {
1971 // FIXME: finish
1972 linearTilingFeatures: 0,
1973 optimalTilingFeatures: 0,
1974 bufferFeatures: 0,
1975 },
1976 api::VK_FORMAT_A2R10G10B10_UINT_PACK32 => api::VkFormatProperties {
1977 // FIXME: finish
1978 linearTilingFeatures: 0,
1979 optimalTilingFeatures: 0,
1980 bufferFeatures: 0,
1981 },
1982 api::VK_FORMAT_A2R10G10B10_SINT_PACK32 => api::VkFormatProperties {
1983 // FIXME: finish
1984 linearTilingFeatures: 0,
1985 optimalTilingFeatures: 0,
1986 bufferFeatures: 0,
1987 },
1988 api::VK_FORMAT_A2B10G10R10_UNORM_PACK32 => api::VkFormatProperties {
1989 // FIXME: finish
1990 linearTilingFeatures: 0,
1991 optimalTilingFeatures: 0,
1992 bufferFeatures: 0,
1993 },
1994 api::VK_FORMAT_A2B10G10R10_SNORM_PACK32 => api::VkFormatProperties {
1995 // FIXME: finish
1996 linearTilingFeatures: 0,
1997 optimalTilingFeatures: 0,
1998 bufferFeatures: 0,
1999 },
2000 api::VK_FORMAT_A2B10G10R10_USCALED_PACK32 => api::VkFormatProperties {
2001 // FIXME: finish
2002 linearTilingFeatures: 0,
2003 optimalTilingFeatures: 0,
2004 bufferFeatures: 0,
2005 },
2006 api::VK_FORMAT_A2B10G10R10_SSCALED_PACK32 => api::VkFormatProperties {
2007 // FIXME: finish
2008 linearTilingFeatures: 0,
2009 optimalTilingFeatures: 0,
2010 bufferFeatures: 0,
2011 },
2012 api::VK_FORMAT_A2B10G10R10_UINT_PACK32 => api::VkFormatProperties {
2013 // FIXME: finish
2014 linearTilingFeatures: 0,
2015 optimalTilingFeatures: 0,
2016 bufferFeatures: 0,
2017 },
2018 api::VK_FORMAT_A2B10G10R10_SINT_PACK32 => api::VkFormatProperties {
2019 // FIXME: finish
2020 linearTilingFeatures: 0,
2021 optimalTilingFeatures: 0,
2022 bufferFeatures: 0,
2023 },
2024 api::VK_FORMAT_R16_UNORM => api::VkFormatProperties {
2025 // FIXME: finish
2026 linearTilingFeatures: 0,
2027 optimalTilingFeatures: 0,
2028 bufferFeatures: 0,
2029 },
2030 api::VK_FORMAT_R16_SNORM => api::VkFormatProperties {
2031 // FIXME: finish
2032 linearTilingFeatures: 0,
2033 optimalTilingFeatures: 0,
2034 bufferFeatures: 0,
2035 },
2036 api::VK_FORMAT_R16_USCALED => api::VkFormatProperties {
2037 // FIXME: finish
2038 linearTilingFeatures: 0,
2039 optimalTilingFeatures: 0,
2040 bufferFeatures: 0,
2041 },
2042 api::VK_FORMAT_R16_SSCALED => api::VkFormatProperties {
2043 // FIXME: finish
2044 linearTilingFeatures: 0,
2045 optimalTilingFeatures: 0,
2046 bufferFeatures: 0,
2047 },
2048 api::VK_FORMAT_R16_UINT => api::VkFormatProperties {
2049 // FIXME: finish
2050 linearTilingFeatures: 0,
2051 optimalTilingFeatures: 0,
2052 bufferFeatures: 0,
2053 },
2054 api::VK_FORMAT_R16_SINT => api::VkFormatProperties {
2055 // FIXME: finish
2056 linearTilingFeatures: 0,
2057 optimalTilingFeatures: 0,
2058 bufferFeatures: 0,
2059 },
2060 api::VK_FORMAT_R16_SFLOAT => api::VkFormatProperties {
2061 // FIXME: finish
2062 linearTilingFeatures: 0,
2063 optimalTilingFeatures: 0,
2064 bufferFeatures: 0,
2065 },
2066 api::VK_FORMAT_R16G16_UNORM => api::VkFormatProperties {
2067 // FIXME: finish
2068 linearTilingFeatures: 0,
2069 optimalTilingFeatures: 0,
2070 bufferFeatures: 0,
2071 },
2072 api::VK_FORMAT_R16G16_SNORM => api::VkFormatProperties {
2073 // FIXME: finish
2074 linearTilingFeatures: 0,
2075 optimalTilingFeatures: 0,
2076 bufferFeatures: 0,
2077 },
2078 api::VK_FORMAT_R16G16_USCALED => api::VkFormatProperties {
2079 // FIXME: finish
2080 linearTilingFeatures: 0,
2081 optimalTilingFeatures: 0,
2082 bufferFeatures: 0,
2083 },
2084 api::VK_FORMAT_R16G16_SSCALED => api::VkFormatProperties {
2085 // FIXME: finish
2086 linearTilingFeatures: 0,
2087 optimalTilingFeatures: 0,
2088 bufferFeatures: 0,
2089 },
2090 api::VK_FORMAT_R16G16_UINT => api::VkFormatProperties {
2091 // FIXME: finish
2092 linearTilingFeatures: 0,
2093 optimalTilingFeatures: 0,
2094 bufferFeatures: 0,
2095 },
2096 api::VK_FORMAT_R16G16_SINT => api::VkFormatProperties {
2097 // FIXME: finish
2098 linearTilingFeatures: 0,
2099 optimalTilingFeatures: 0,
2100 bufferFeatures: 0,
2101 },
2102 api::VK_FORMAT_R16G16_SFLOAT => api::VkFormatProperties {
2103 // FIXME: finish
2104 linearTilingFeatures: 0,
2105 optimalTilingFeatures: 0,
2106 bufferFeatures: 0,
2107 },
2108 api::VK_FORMAT_R16G16B16_UNORM => api::VkFormatProperties {
2109 // FIXME: finish
2110 linearTilingFeatures: 0,
2111 optimalTilingFeatures: 0,
2112 bufferFeatures: 0,
2113 },
2114 api::VK_FORMAT_R16G16B16_SNORM => api::VkFormatProperties {
2115 // FIXME: finish
2116 linearTilingFeatures: 0,
2117 optimalTilingFeatures: 0,
2118 bufferFeatures: 0,
2119 },
2120 api::VK_FORMAT_R16G16B16_USCALED => api::VkFormatProperties {
2121 // FIXME: finish
2122 linearTilingFeatures: 0,
2123 optimalTilingFeatures: 0,
2124 bufferFeatures: 0,
2125 },
2126 api::VK_FORMAT_R16G16B16_SSCALED => api::VkFormatProperties {
2127 // FIXME: finish
2128 linearTilingFeatures: 0,
2129 optimalTilingFeatures: 0,
2130 bufferFeatures: 0,
2131 },
2132 api::VK_FORMAT_R16G16B16_UINT => api::VkFormatProperties {
2133 // FIXME: finish
2134 linearTilingFeatures: 0,
2135 optimalTilingFeatures: 0,
2136 bufferFeatures: 0,
2137 },
2138 api::VK_FORMAT_R16G16B16_SINT => api::VkFormatProperties {
2139 // FIXME: finish
2140 linearTilingFeatures: 0,
2141 optimalTilingFeatures: 0,
2142 bufferFeatures: 0,
2143 },
2144 api::VK_FORMAT_R16G16B16_SFLOAT => api::VkFormatProperties {
2145 // FIXME: finish
2146 linearTilingFeatures: 0,
2147 optimalTilingFeatures: 0,
2148 bufferFeatures: 0,
2149 },
2150 api::VK_FORMAT_R16G16B16A16_UNORM => api::VkFormatProperties {
2151 // FIXME: finish
2152 linearTilingFeatures: 0,
2153 optimalTilingFeatures: 0,
2154 bufferFeatures: 0,
2155 },
2156 api::VK_FORMAT_R16G16B16A16_SNORM => api::VkFormatProperties {
2157 // FIXME: finish
2158 linearTilingFeatures: 0,
2159 optimalTilingFeatures: 0,
2160 bufferFeatures: 0,
2161 },
2162 api::VK_FORMAT_R16G16B16A16_USCALED => api::VkFormatProperties {
2163 // FIXME: finish
2164 linearTilingFeatures: 0,
2165 optimalTilingFeatures: 0,
2166 bufferFeatures: 0,
2167 },
2168 api::VK_FORMAT_R16G16B16A16_SSCALED => api::VkFormatProperties {
2169 // FIXME: finish
2170 linearTilingFeatures: 0,
2171 optimalTilingFeatures: 0,
2172 bufferFeatures: 0,
2173 },
2174 api::VK_FORMAT_R16G16B16A16_UINT => api::VkFormatProperties {
2175 // FIXME: finish
2176 linearTilingFeatures: 0,
2177 optimalTilingFeatures: 0,
2178 bufferFeatures: 0,
2179 },
2180 api::VK_FORMAT_R16G16B16A16_SINT => api::VkFormatProperties {
2181 // FIXME: finish
2182 linearTilingFeatures: 0,
2183 optimalTilingFeatures: 0,
2184 bufferFeatures: 0,
2185 },
2186 api::VK_FORMAT_R16G16B16A16_SFLOAT => api::VkFormatProperties {
2187 // FIXME: finish
2188 linearTilingFeatures: 0,
2189 optimalTilingFeatures: 0,
2190 bufferFeatures: 0,
2191 },
2192 api::VK_FORMAT_R32_UINT => api::VkFormatProperties {
2193 // FIXME: finish
2194 linearTilingFeatures: 0,
2195 optimalTilingFeatures: 0,
2196 bufferFeatures: 0,
2197 },
2198 api::VK_FORMAT_R32_SINT => api::VkFormatProperties {
2199 // FIXME: finish
2200 linearTilingFeatures: 0,
2201 optimalTilingFeatures: 0,
2202 bufferFeatures: 0,
2203 },
2204 api::VK_FORMAT_R32_SFLOAT => api::VkFormatProperties {
2205 // FIXME: finish
2206 linearTilingFeatures: 0,
2207 optimalTilingFeatures: 0,
2208 bufferFeatures: 0,
2209 },
2210 api::VK_FORMAT_R32G32_UINT => api::VkFormatProperties {
2211 // FIXME: finish
2212 linearTilingFeatures: 0,
2213 optimalTilingFeatures: 0,
2214 bufferFeatures: 0,
2215 },
2216 api::VK_FORMAT_R32G32_SINT => api::VkFormatProperties {
2217 // FIXME: finish
2218 linearTilingFeatures: 0,
2219 optimalTilingFeatures: 0,
2220 bufferFeatures: 0,
2221 },
2222 api::VK_FORMAT_R32G32_SFLOAT => api::VkFormatProperties {
2223 // FIXME: finish
2224 linearTilingFeatures: 0,
2225 optimalTilingFeatures: 0,
2226 bufferFeatures: 0,
2227 },
2228 api::VK_FORMAT_R32G32B32_UINT => api::VkFormatProperties {
2229 // FIXME: finish
2230 linearTilingFeatures: 0,
2231 optimalTilingFeatures: 0,
2232 bufferFeatures: 0,
2233 },
2234 api::VK_FORMAT_R32G32B32_SINT => api::VkFormatProperties {
2235 // FIXME: finish
2236 linearTilingFeatures: 0,
2237 optimalTilingFeatures: 0,
2238 bufferFeatures: 0,
2239 },
2240 api::VK_FORMAT_R32G32B32_SFLOAT => api::VkFormatProperties {
2241 // FIXME: finish
2242 linearTilingFeatures: 0,
2243 optimalTilingFeatures: 0,
2244 bufferFeatures: 0,
2245 },
2246 api::VK_FORMAT_R32G32B32A32_UINT => api::VkFormatProperties {
2247 // FIXME: finish
2248 linearTilingFeatures: 0,
2249 optimalTilingFeatures: 0,
2250 bufferFeatures: 0,
2251 },
2252 api::VK_FORMAT_R32G32B32A32_SINT => api::VkFormatProperties {
2253 // FIXME: finish
2254 linearTilingFeatures: 0,
2255 optimalTilingFeatures: 0,
2256 bufferFeatures: 0,
2257 },
2258 api::VK_FORMAT_R32G32B32A32_SFLOAT => api::VkFormatProperties {
2259 // FIXME: finish
2260 linearTilingFeatures: 0,
2261 optimalTilingFeatures: 0,
2262 bufferFeatures: 0,
2263 },
2264 api::VK_FORMAT_R64_UINT => api::VkFormatProperties {
2265 // FIXME: finish
2266 linearTilingFeatures: 0,
2267 optimalTilingFeatures: 0,
2268 bufferFeatures: 0,
2269 },
2270 api::VK_FORMAT_R64_SINT => api::VkFormatProperties {
2271 // FIXME: finish
2272 linearTilingFeatures: 0,
2273 optimalTilingFeatures: 0,
2274 bufferFeatures: 0,
2275 },
2276 api::VK_FORMAT_R64_SFLOAT => api::VkFormatProperties {
2277 // FIXME: finish
2278 linearTilingFeatures: 0,
2279 optimalTilingFeatures: 0,
2280 bufferFeatures: 0,
2281 },
2282 api::VK_FORMAT_R64G64_UINT => api::VkFormatProperties {
2283 // FIXME: finish
2284 linearTilingFeatures: 0,
2285 optimalTilingFeatures: 0,
2286 bufferFeatures: 0,
2287 },
2288 api::VK_FORMAT_R64G64_SINT => api::VkFormatProperties {
2289 // FIXME: finish
2290 linearTilingFeatures: 0,
2291 optimalTilingFeatures: 0,
2292 bufferFeatures: 0,
2293 },
2294 api::VK_FORMAT_R64G64_SFLOAT => api::VkFormatProperties {
2295 // FIXME: finish
2296 linearTilingFeatures: 0,
2297 optimalTilingFeatures: 0,
2298 bufferFeatures: 0,
2299 },
2300 api::VK_FORMAT_R64G64B64_UINT => api::VkFormatProperties {
2301 // FIXME: finish
2302 linearTilingFeatures: 0,
2303 optimalTilingFeatures: 0,
2304 bufferFeatures: 0,
2305 },
2306 api::VK_FORMAT_R64G64B64_SINT => api::VkFormatProperties {
2307 // FIXME: finish
2308 linearTilingFeatures: 0,
2309 optimalTilingFeatures: 0,
2310 bufferFeatures: 0,
2311 },
2312 api::VK_FORMAT_R64G64B64_SFLOAT => api::VkFormatProperties {
2313 // FIXME: finish
2314 linearTilingFeatures: 0,
2315 optimalTilingFeatures: 0,
2316 bufferFeatures: 0,
2317 },
2318 api::VK_FORMAT_R64G64B64A64_UINT => api::VkFormatProperties {
2319 // FIXME: finish
2320 linearTilingFeatures: 0,
2321 optimalTilingFeatures: 0,
2322 bufferFeatures: 0,
2323 },
2324 api::VK_FORMAT_R64G64B64A64_SINT => api::VkFormatProperties {
2325 // FIXME: finish
2326 linearTilingFeatures: 0,
2327 optimalTilingFeatures: 0,
2328 bufferFeatures: 0,
2329 },
2330 api::VK_FORMAT_R64G64B64A64_SFLOAT => api::VkFormatProperties {
2331 // FIXME: finish
2332 linearTilingFeatures: 0,
2333 optimalTilingFeatures: 0,
2334 bufferFeatures: 0,
2335 },
2336 api::VK_FORMAT_B10G11R11_UFLOAT_PACK32 => api::VkFormatProperties {
2337 // FIXME: finish
2338 linearTilingFeatures: 0,
2339 optimalTilingFeatures: 0,
2340 bufferFeatures: 0,
2341 },
2342 api::VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 => api::VkFormatProperties {
2343 // FIXME: finish
2344 linearTilingFeatures: 0,
2345 optimalTilingFeatures: 0,
2346 bufferFeatures: 0,
2347 },
2348 api::VK_FORMAT_D16_UNORM => api::VkFormatProperties {
2349 // FIXME: finish
2350 linearTilingFeatures: 0,
2351 optimalTilingFeatures: 0,
2352 bufferFeatures: 0,
2353 },
2354 api::VK_FORMAT_X8_D24_UNORM_PACK32 => api::VkFormatProperties {
2355 // FIXME: finish
2356 linearTilingFeatures: 0,
2357 optimalTilingFeatures: 0,
2358 bufferFeatures: 0,
2359 },
2360 api::VK_FORMAT_D32_SFLOAT => api::VkFormatProperties {
2361 // FIXME: finish
2362 linearTilingFeatures: 0,
2363 optimalTilingFeatures: 0,
2364 bufferFeatures: 0,
2365 },
2366 api::VK_FORMAT_S8_UINT => api::VkFormatProperties {
2367 // FIXME: finish
2368 linearTilingFeatures: 0,
2369 optimalTilingFeatures: 0,
2370 bufferFeatures: 0,
2371 },
2372 api::VK_FORMAT_D16_UNORM_S8_UINT => api::VkFormatProperties {
2373 // FIXME: finish
2374 linearTilingFeatures: 0,
2375 optimalTilingFeatures: 0,
2376 bufferFeatures: 0,
2377 },
2378 api::VK_FORMAT_D24_UNORM_S8_UINT => api::VkFormatProperties {
2379 // FIXME: finish
2380 linearTilingFeatures: 0,
2381 optimalTilingFeatures: 0,
2382 bufferFeatures: 0,
2383 },
2384 api::VK_FORMAT_D32_SFLOAT_S8_UINT => api::VkFormatProperties {
2385 // FIXME: finish
2386 linearTilingFeatures: 0,
2387 optimalTilingFeatures: 0,
2388 bufferFeatures: 0,
2389 },
2390 api::VK_FORMAT_BC1_RGB_UNORM_BLOCK => api::VkFormatProperties {
2391 // FIXME: finish
2392 linearTilingFeatures: 0,
2393 optimalTilingFeatures: 0,
2394 bufferFeatures: 0,
2395 },
2396 api::VK_FORMAT_BC1_RGB_SRGB_BLOCK => api::VkFormatProperties {
2397 // FIXME: finish
2398 linearTilingFeatures: 0,
2399 optimalTilingFeatures: 0,
2400 bufferFeatures: 0,
2401 },
2402 api::VK_FORMAT_BC1_RGBA_UNORM_BLOCK => api::VkFormatProperties {
2403 // FIXME: finish
2404 linearTilingFeatures: 0,
2405 optimalTilingFeatures: 0,
2406 bufferFeatures: 0,
2407 },
2408 api::VK_FORMAT_BC1_RGBA_SRGB_BLOCK => api::VkFormatProperties {
2409 // FIXME: finish
2410 linearTilingFeatures: 0,
2411 optimalTilingFeatures: 0,
2412 bufferFeatures: 0,
2413 },
2414 api::VK_FORMAT_BC2_UNORM_BLOCK => api::VkFormatProperties {
2415 // FIXME: finish
2416 linearTilingFeatures: 0,
2417 optimalTilingFeatures: 0,
2418 bufferFeatures: 0,
2419 },
2420 api::VK_FORMAT_BC2_SRGB_BLOCK => api::VkFormatProperties {
2421 // FIXME: finish
2422 linearTilingFeatures: 0,
2423 optimalTilingFeatures: 0,
2424 bufferFeatures: 0,
2425 },
2426 api::VK_FORMAT_BC3_UNORM_BLOCK => api::VkFormatProperties {
2427 // FIXME: finish
2428 linearTilingFeatures: 0,
2429 optimalTilingFeatures: 0,
2430 bufferFeatures: 0,
2431 },
2432 api::VK_FORMAT_BC3_SRGB_BLOCK => api::VkFormatProperties {
2433 // FIXME: finish
2434 linearTilingFeatures: 0,
2435 optimalTilingFeatures: 0,
2436 bufferFeatures: 0,
2437 },
2438 api::VK_FORMAT_BC4_UNORM_BLOCK => api::VkFormatProperties {
2439 // FIXME: finish
2440 linearTilingFeatures: 0,
2441 optimalTilingFeatures: 0,
2442 bufferFeatures: 0,
2443 },
2444 api::VK_FORMAT_BC4_SNORM_BLOCK => api::VkFormatProperties {
2445 // FIXME: finish
2446 linearTilingFeatures: 0,
2447 optimalTilingFeatures: 0,
2448 bufferFeatures: 0,
2449 },
2450 api::VK_FORMAT_BC5_UNORM_BLOCK => api::VkFormatProperties {
2451 // FIXME: finish
2452 linearTilingFeatures: 0,
2453 optimalTilingFeatures: 0,
2454 bufferFeatures: 0,
2455 },
2456 api::VK_FORMAT_BC5_SNORM_BLOCK => api::VkFormatProperties {
2457 // FIXME: finish
2458 linearTilingFeatures: 0,
2459 optimalTilingFeatures: 0,
2460 bufferFeatures: 0,
2461 },
2462 api::VK_FORMAT_BC6H_UFLOAT_BLOCK => api::VkFormatProperties {
2463 // FIXME: finish
2464 linearTilingFeatures: 0,
2465 optimalTilingFeatures: 0,
2466 bufferFeatures: 0,
2467 },
2468 api::VK_FORMAT_BC6H_SFLOAT_BLOCK => api::VkFormatProperties {
2469 // FIXME: finish
2470 linearTilingFeatures: 0,
2471 optimalTilingFeatures: 0,
2472 bufferFeatures: 0,
2473 },
2474 api::VK_FORMAT_BC7_UNORM_BLOCK => api::VkFormatProperties {
2475 // FIXME: finish
2476 linearTilingFeatures: 0,
2477 optimalTilingFeatures: 0,
2478 bufferFeatures: 0,
2479 },
2480 api::VK_FORMAT_BC7_SRGB_BLOCK => api::VkFormatProperties {
2481 // FIXME: finish
2482 linearTilingFeatures: 0,
2483 optimalTilingFeatures: 0,
2484 bufferFeatures: 0,
2485 },
2486 api::VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK => api::VkFormatProperties {
2487 // FIXME: finish
2488 linearTilingFeatures: 0,
2489 optimalTilingFeatures: 0,
2490 bufferFeatures: 0,
2491 },
2492 api::VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK => api::VkFormatProperties {
2493 // FIXME: finish
2494 linearTilingFeatures: 0,
2495 optimalTilingFeatures: 0,
2496 bufferFeatures: 0,
2497 },
2498 api::VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK => api::VkFormatProperties {
2499 // FIXME: finish
2500 linearTilingFeatures: 0,
2501 optimalTilingFeatures: 0,
2502 bufferFeatures: 0,
2503 },
2504 api::VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK => api::VkFormatProperties {
2505 // FIXME: finish
2506 linearTilingFeatures: 0,
2507 optimalTilingFeatures: 0,
2508 bufferFeatures: 0,
2509 },
2510 api::VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK => api::VkFormatProperties {
2511 // FIXME: finish
2512 linearTilingFeatures: 0,
2513 optimalTilingFeatures: 0,
2514 bufferFeatures: 0,
2515 },
2516 api::VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK => api::VkFormatProperties {
2517 // FIXME: finish
2518 linearTilingFeatures: 0,
2519 optimalTilingFeatures: 0,
2520 bufferFeatures: 0,
2521 },
2522 api::VK_FORMAT_EAC_R11_UNORM_BLOCK => api::VkFormatProperties {
2523 // FIXME: finish
2524 linearTilingFeatures: 0,
2525 optimalTilingFeatures: 0,
2526 bufferFeatures: 0,
2527 },
2528 api::VK_FORMAT_EAC_R11_SNORM_BLOCK => api::VkFormatProperties {
2529 // FIXME: finish
2530 linearTilingFeatures: 0,
2531 optimalTilingFeatures: 0,
2532 bufferFeatures: 0,
2533 },
2534 api::VK_FORMAT_EAC_R11G11_UNORM_BLOCK => api::VkFormatProperties {
2535 // FIXME: finish
2536 linearTilingFeatures: 0,
2537 optimalTilingFeatures: 0,
2538 bufferFeatures: 0,
2539 },
2540 api::VK_FORMAT_EAC_R11G11_SNORM_BLOCK => api::VkFormatProperties {
2541 // FIXME: finish
2542 linearTilingFeatures: 0,
2543 optimalTilingFeatures: 0,
2544 bufferFeatures: 0,
2545 },
2546 api::VK_FORMAT_ASTC_4x4_UNORM_BLOCK => api::VkFormatProperties {
2547 // FIXME: finish
2548 linearTilingFeatures: 0,
2549 optimalTilingFeatures: 0,
2550 bufferFeatures: 0,
2551 },
2552 api::VK_FORMAT_ASTC_4x4_SRGB_BLOCK => api::VkFormatProperties {
2553 // FIXME: finish
2554 linearTilingFeatures: 0,
2555 optimalTilingFeatures: 0,
2556 bufferFeatures: 0,
2557 },
2558 api::VK_FORMAT_ASTC_5x4_UNORM_BLOCK => api::VkFormatProperties {
2559 // FIXME: finish
2560 linearTilingFeatures: 0,
2561 optimalTilingFeatures: 0,
2562 bufferFeatures: 0,
2563 },
2564 api::VK_FORMAT_ASTC_5x4_SRGB_BLOCK => api::VkFormatProperties {
2565 // FIXME: finish
2566 linearTilingFeatures: 0,
2567 optimalTilingFeatures: 0,
2568 bufferFeatures: 0,
2569 },
2570 api::VK_FORMAT_ASTC_5x5_UNORM_BLOCK => api::VkFormatProperties {
2571 // FIXME: finish
2572 linearTilingFeatures: 0,
2573 optimalTilingFeatures: 0,
2574 bufferFeatures: 0,
2575 },
2576 api::VK_FORMAT_ASTC_5x5_SRGB_BLOCK => api::VkFormatProperties {
2577 // FIXME: finish
2578 linearTilingFeatures: 0,
2579 optimalTilingFeatures: 0,
2580 bufferFeatures: 0,
2581 },
2582 api::VK_FORMAT_ASTC_6x5_UNORM_BLOCK => api::VkFormatProperties {
2583 // FIXME: finish
2584 linearTilingFeatures: 0,
2585 optimalTilingFeatures: 0,
2586 bufferFeatures: 0,
2587 },
2588 api::VK_FORMAT_ASTC_6x5_SRGB_BLOCK => api::VkFormatProperties {
2589 // FIXME: finish
2590 linearTilingFeatures: 0,
2591 optimalTilingFeatures: 0,
2592 bufferFeatures: 0,
2593 },
2594 api::VK_FORMAT_ASTC_6x6_UNORM_BLOCK => api::VkFormatProperties {
2595 // FIXME: finish
2596 linearTilingFeatures: 0,
2597 optimalTilingFeatures: 0,
2598 bufferFeatures: 0,
2599 },
2600 api::VK_FORMAT_ASTC_6x6_SRGB_BLOCK => api::VkFormatProperties {
2601 // FIXME: finish
2602 linearTilingFeatures: 0,
2603 optimalTilingFeatures: 0,
2604 bufferFeatures: 0,
2605 },
2606 api::VK_FORMAT_ASTC_8x5_UNORM_BLOCK => api::VkFormatProperties {
2607 // FIXME: finish
2608 linearTilingFeatures: 0,
2609 optimalTilingFeatures: 0,
2610 bufferFeatures: 0,
2611 },
2612 api::VK_FORMAT_ASTC_8x5_SRGB_BLOCK => api::VkFormatProperties {
2613 // FIXME: finish
2614 linearTilingFeatures: 0,
2615 optimalTilingFeatures: 0,
2616 bufferFeatures: 0,
2617 },
2618 api::VK_FORMAT_ASTC_8x6_UNORM_BLOCK => api::VkFormatProperties {
2619 // FIXME: finish
2620 linearTilingFeatures: 0,
2621 optimalTilingFeatures: 0,
2622 bufferFeatures: 0,
2623 },
2624 api::VK_FORMAT_ASTC_8x6_SRGB_BLOCK => api::VkFormatProperties {
2625 // FIXME: finish
2626 linearTilingFeatures: 0,
2627 optimalTilingFeatures: 0,
2628 bufferFeatures: 0,
2629 },
2630 api::VK_FORMAT_ASTC_8x8_UNORM_BLOCK => api::VkFormatProperties {
2631 // FIXME: finish
2632 linearTilingFeatures: 0,
2633 optimalTilingFeatures: 0,
2634 bufferFeatures: 0,
2635 },
2636 api::VK_FORMAT_ASTC_8x8_SRGB_BLOCK => api::VkFormatProperties {
2637 // FIXME: finish
2638 linearTilingFeatures: 0,
2639 optimalTilingFeatures: 0,
2640 bufferFeatures: 0,
2641 },
2642 api::VK_FORMAT_ASTC_10x5_UNORM_BLOCK => api::VkFormatProperties {
2643 // FIXME: finish
2644 linearTilingFeatures: 0,
2645 optimalTilingFeatures: 0,
2646 bufferFeatures: 0,
2647 },
2648 api::VK_FORMAT_ASTC_10x5_SRGB_BLOCK => api::VkFormatProperties {
2649 // FIXME: finish
2650 linearTilingFeatures: 0,
2651 optimalTilingFeatures: 0,
2652 bufferFeatures: 0,
2653 },
2654 api::VK_FORMAT_ASTC_10x6_UNORM_BLOCK => api::VkFormatProperties {
2655 // FIXME: finish
2656 linearTilingFeatures: 0,
2657 optimalTilingFeatures: 0,
2658 bufferFeatures: 0,
2659 },
2660 api::VK_FORMAT_ASTC_10x6_SRGB_BLOCK => api::VkFormatProperties {
2661 // FIXME: finish
2662 linearTilingFeatures: 0,
2663 optimalTilingFeatures: 0,
2664 bufferFeatures: 0,
2665 },
2666 api::VK_FORMAT_ASTC_10x8_UNORM_BLOCK => api::VkFormatProperties {
2667 // FIXME: finish
2668 linearTilingFeatures: 0,
2669 optimalTilingFeatures: 0,
2670 bufferFeatures: 0,
2671 },
2672 api::VK_FORMAT_ASTC_10x8_SRGB_BLOCK => api::VkFormatProperties {
2673 // FIXME: finish
2674 linearTilingFeatures: 0,
2675 optimalTilingFeatures: 0,
2676 bufferFeatures: 0,
2677 },
2678 api::VK_FORMAT_ASTC_10x10_UNORM_BLOCK => api::VkFormatProperties {
2679 // FIXME: finish
2680 linearTilingFeatures: 0,
2681 optimalTilingFeatures: 0,
2682 bufferFeatures: 0,
2683 },
2684 api::VK_FORMAT_ASTC_10x10_SRGB_BLOCK => api::VkFormatProperties {
2685 // FIXME: finish
2686 linearTilingFeatures: 0,
2687 optimalTilingFeatures: 0,
2688 bufferFeatures: 0,
2689 },
2690 api::VK_FORMAT_ASTC_12x10_UNORM_BLOCK => api::VkFormatProperties {
2691 // FIXME: finish
2692 linearTilingFeatures: 0,
2693 optimalTilingFeatures: 0,
2694 bufferFeatures: 0,
2695 },
2696 api::VK_FORMAT_ASTC_12x10_SRGB_BLOCK => api::VkFormatProperties {
2697 // FIXME: finish
2698 linearTilingFeatures: 0,
2699 optimalTilingFeatures: 0,
2700 bufferFeatures: 0,
2701 },
2702 api::VK_FORMAT_ASTC_12x12_UNORM_BLOCK => api::VkFormatProperties {
2703 // FIXME: finish
2704 linearTilingFeatures: 0,
2705 optimalTilingFeatures: 0,
2706 bufferFeatures: 0,
2707 },
2708 api::VK_FORMAT_ASTC_12x12_SRGB_BLOCK => api::VkFormatProperties {
2709 // FIXME: finish
2710 linearTilingFeatures: 0,
2711 optimalTilingFeatures: 0,
2712 bufferFeatures: 0,
2713 },
2714 api::VK_FORMAT_G8B8G8R8_422_UNORM => api::VkFormatProperties {
2715 // FIXME: finish
2716 linearTilingFeatures: 0,
2717 optimalTilingFeatures: 0,
2718 bufferFeatures: 0,
2719 },
2720 api::VK_FORMAT_B8G8R8G8_422_UNORM => api::VkFormatProperties {
2721 // FIXME: finish
2722 linearTilingFeatures: 0,
2723 optimalTilingFeatures: 0,
2724 bufferFeatures: 0,
2725 },
2726 api::VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM => api::VkFormatProperties {
2727 // FIXME: finish
2728 linearTilingFeatures: 0,
2729 optimalTilingFeatures: 0,
2730 bufferFeatures: 0,
2731 },
2732 api::VK_FORMAT_G8_B8R8_2PLANE_420_UNORM => api::VkFormatProperties {
2733 // FIXME: finish
2734 linearTilingFeatures: 0,
2735 optimalTilingFeatures: 0,
2736 bufferFeatures: 0,
2737 },
2738 api::VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM => api::VkFormatProperties {
2739 // FIXME: finish
2740 linearTilingFeatures: 0,
2741 optimalTilingFeatures: 0,
2742 bufferFeatures: 0,
2743 },
2744 api::VK_FORMAT_G8_B8R8_2PLANE_422_UNORM => api::VkFormatProperties {
2745 // FIXME: finish
2746 linearTilingFeatures: 0,
2747 optimalTilingFeatures: 0,
2748 bufferFeatures: 0,
2749 },
2750 api::VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM => api::VkFormatProperties {
2751 // FIXME: finish
2752 linearTilingFeatures: 0,
2753 optimalTilingFeatures: 0,
2754 bufferFeatures: 0,
2755 },
2756 api::VK_FORMAT_R10X6_UNORM_PACK16 => api::VkFormatProperties {
2757 // FIXME: finish
2758 linearTilingFeatures: 0,
2759 optimalTilingFeatures: 0,
2760 bufferFeatures: 0,
2761 },
2762 api::VK_FORMAT_R10X6G10X6_UNORM_2PACK16 => api::VkFormatProperties {
2763 // FIXME: finish
2764 linearTilingFeatures: 0,
2765 optimalTilingFeatures: 0,
2766 bufferFeatures: 0,
2767 },
2768 api::VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 => api::VkFormatProperties {
2769 // FIXME: finish
2770 linearTilingFeatures: 0,
2771 optimalTilingFeatures: 0,
2772 bufferFeatures: 0,
2773 },
2774 api::VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => api::VkFormatProperties {
2775 // FIXME: finish
2776 linearTilingFeatures: 0,
2777 optimalTilingFeatures: 0,
2778 bufferFeatures: 0,
2779 },
2780 api::VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => api::VkFormatProperties {
2781 // FIXME: finish
2782 linearTilingFeatures: 0,
2783 optimalTilingFeatures: 0,
2784 bufferFeatures: 0,
2785 },
2786 api::VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => api::VkFormatProperties {
2787 // FIXME: finish
2788 linearTilingFeatures: 0,
2789 optimalTilingFeatures: 0,
2790 bufferFeatures: 0,
2791 },
2792 api::VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => api::VkFormatProperties {
2793 // FIXME: finish
2794 linearTilingFeatures: 0,
2795 optimalTilingFeatures: 0,
2796 bufferFeatures: 0,
2797 },
2798 api::VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => api::VkFormatProperties {
2799 // FIXME: finish
2800 linearTilingFeatures: 0,
2801 optimalTilingFeatures: 0,
2802 bufferFeatures: 0,
2803 },
2804 api::VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => api::VkFormatProperties {
2805 // FIXME: finish
2806 linearTilingFeatures: 0,
2807 optimalTilingFeatures: 0,
2808 bufferFeatures: 0,
2809 },
2810 api::VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => api::VkFormatProperties {
2811 // FIXME: finish
2812 linearTilingFeatures: 0,
2813 optimalTilingFeatures: 0,
2814 bufferFeatures: 0,
2815 },
2816 api::VK_FORMAT_R12X4_UNORM_PACK16 => api::VkFormatProperties {
2817 // FIXME: finish
2818 linearTilingFeatures: 0,
2819 optimalTilingFeatures: 0,
2820 bufferFeatures: 0,
2821 },
2822 api::VK_FORMAT_R12X4G12X4_UNORM_2PACK16 => api::VkFormatProperties {
2823 // FIXME: finish
2824 linearTilingFeatures: 0,
2825 optimalTilingFeatures: 0,
2826 bufferFeatures: 0,
2827 },
2828 api::VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 => api::VkFormatProperties {
2829 // FIXME: finish
2830 linearTilingFeatures: 0,
2831 optimalTilingFeatures: 0,
2832 bufferFeatures: 0,
2833 },
2834 api::VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => api::VkFormatProperties {
2835 // FIXME: finish
2836 linearTilingFeatures: 0,
2837 optimalTilingFeatures: 0,
2838 bufferFeatures: 0,
2839 },
2840 api::VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => api::VkFormatProperties {
2841 // FIXME: finish
2842 linearTilingFeatures: 0,
2843 optimalTilingFeatures: 0,
2844 bufferFeatures: 0,
2845 },
2846 api::VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => api::VkFormatProperties {
2847 // FIXME: finish
2848 linearTilingFeatures: 0,
2849 optimalTilingFeatures: 0,
2850 bufferFeatures: 0,
2851 },
2852 api::VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => api::VkFormatProperties {
2853 // FIXME: finish
2854 linearTilingFeatures: 0,
2855 optimalTilingFeatures: 0,
2856 bufferFeatures: 0,
2857 },
2858 api::VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => api::VkFormatProperties {
2859 // FIXME: finish
2860 linearTilingFeatures: 0,
2861 optimalTilingFeatures: 0,
2862 bufferFeatures: 0,
2863 },
2864 api::VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => api::VkFormatProperties {
2865 // FIXME: finish
2866 linearTilingFeatures: 0,
2867 optimalTilingFeatures: 0,
2868 bufferFeatures: 0,
2869 },
2870 api::VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => api::VkFormatProperties {
2871 // FIXME: finish
2872 linearTilingFeatures: 0,
2873 optimalTilingFeatures: 0,
2874 bufferFeatures: 0,
2875 },
2876 api::VK_FORMAT_G16B16G16R16_422_UNORM => api::VkFormatProperties {
2877 // FIXME: finish
2878 linearTilingFeatures: 0,
2879 optimalTilingFeatures: 0,
2880 bufferFeatures: 0,
2881 },
2882 api::VK_FORMAT_B16G16R16G16_422_UNORM => api::VkFormatProperties {
2883 // FIXME: finish
2884 linearTilingFeatures: 0,
2885 optimalTilingFeatures: 0,
2886 bufferFeatures: 0,
2887 },
2888 api::VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM => api::VkFormatProperties {
2889 // FIXME: finish
2890 linearTilingFeatures: 0,
2891 optimalTilingFeatures: 0,
2892 bufferFeatures: 0,
2893 },
2894 api::VK_FORMAT_G16_B16R16_2PLANE_420_UNORM => api::VkFormatProperties {
2895 // FIXME: finish
2896 linearTilingFeatures: 0,
2897 optimalTilingFeatures: 0,
2898 bufferFeatures: 0,
2899 },
2900 api::VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM => api::VkFormatProperties {
2901 // FIXME: finish
2902 linearTilingFeatures: 0,
2903 optimalTilingFeatures: 0,
2904 bufferFeatures: 0,
2905 },
2906 api::VK_FORMAT_G16_B16R16_2PLANE_422_UNORM => api::VkFormatProperties {
2907 // FIXME: finish
2908 linearTilingFeatures: 0,
2909 optimalTilingFeatures: 0,
2910 bufferFeatures: 0,
2911 },
2912 api::VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM => api::VkFormatProperties {
2913 // FIXME: finish
2914 linearTilingFeatures: 0,
2915 optimalTilingFeatures: 0,
2916 bufferFeatures: 0,
2917 },
2918 _ => panic!("unknown format {}", format),
2919 }
2920 }
2921 }
2922
2923 pub struct Instance {
2924 physical_device: OwnedHandle<api::VkPhysicalDevice>,
2925 }
2926
2927 impl Instance {
2928 pub unsafe fn new(
2929 create_info: *const api::VkInstanceCreateInfo,
2930 ) -> Result<api::VkInstance, api::VkResult> {
2931 parse_next_chain_const! {
2932 create_info,
2933 root = api::VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
2934 }
2935 let create_info = &*create_info;
2936 if create_info.enabledLayerCount != 0 {
2937 return Err(api::VK_ERROR_LAYER_NOT_PRESENT);
2938 }
2939 let mut enabled_extensions = Extensions::create_empty();
2940 for &extension_name in util::to_slice(
2941 create_info.ppEnabledExtensionNames,
2942 create_info.enabledExtensionCount as usize,
2943 ) {
2944 let extension: Extension = CStr::from_ptr(extension_name)
2945 .to_str()
2946 .map_err(|_| api::VK_ERROR_EXTENSION_NOT_PRESENT)?
2947 .parse()
2948 .map_err(|_| api::VK_ERROR_EXTENSION_NOT_PRESENT)?;
2949 assert_eq!(extension.get_scope(), ExtensionScope::Instance);
2950 enabled_extensions[extension] = true;
2951 }
2952 for extension in enabled_extensions
2953 .iter()
2954 .filter_map(|(extension, &enabled)| if enabled { Some(extension) } else { None })
2955 {
2956 let missing_extensions = extension.get_required_extensions() & !enabled_extensions;
2957 for missing_extension in missing_extensions
2958 .iter()
2959 .filter_map(|(extension, &enabled)| if enabled { Some(extension) } else { None })
2960 {
2961 panic!(
2962 "extension {} enabled but required extension {} is not enabled",
2963 extension.get_name(),
2964 missing_extension.get_name()
2965 );
2966 }
2967 }
2968 let system_memory_size;
2969 match sys_info::mem_info() {
2970 Err(error) => {
2971 eprintln!("mem_info error: {}", error);
2972 return Err(api::VK_ERROR_INITIALIZATION_FAILED);
2973 }
2974 Ok(info) => system_memory_size = info.total * 1024,
2975 }
2976 let mut device_name = [0; api::VK_MAX_PHYSICAL_DEVICE_NAME_SIZE as usize];
2977 util::copy_str_to_char_array(&mut device_name, KAZAN_DEVICE_NAME);
2978 #[cfg_attr(feature = "cargo-clippy", allow(clippy::needless_update))]
2979 let retval = OwnedHandle::<api::VkInstance>::new(Instance {
2980 physical_device: OwnedHandle::new(PhysicalDevice {
2981 enabled_extensions,
2982 allowed_extensions: enabled_extensions.get_allowed_extensions_from_instance_scope(),
2983 properties: api::VkPhysicalDeviceProperties {
2984 apiVersion: make_api_version(1, 1, api::VK_HEADER_VERSION),
2985 driverVersion: make_api_version(
2986 env!("CARGO_PKG_VERSION_MAJOR").parse().unwrap(),
2987 env!("CARGO_PKG_VERSION_MINOR").parse().unwrap(),
2988 env!("CARGO_PKG_VERSION_PATCH").parse().unwrap(),
2989 ),
2990 vendorID: api::VK_VENDOR_ID_KAZAN,
2991 deviceID: 1,
2992 deviceType: api::VK_PHYSICAL_DEVICE_TYPE_CPU,
2993 deviceName: device_name,
2994 pipelineCacheUUID: *PhysicalDevice::get_pipeline_cache_uuid().as_bytes(),
2995 limits: PhysicalDevice::get_limits(),
2996 sparseProperties: api::VkPhysicalDeviceSparseProperties {
2997 residencyStandard2DBlockShape: api::VK_FALSE,
2998 residencyStandard2DMultisampleBlockShape: api::VK_FALSE,
2999 residencyStandard3DBlockShape: api::VK_FALSE,
3000 residencyAlignedMipSize: api::VK_FALSE,
3001 residencyNonResidentStrict: api::VK_FALSE,
3002 },
3003 ..mem::zeroed() // for padding fields
3004 },
3005 features: Features::new(),
3006 system_memory_size,
3007 point_clipping_properties: api::VkPhysicalDevicePointClippingProperties {
3008 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES,
3009 pNext: null_mut(),
3010 pointClippingBehavior: api::VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES,
3011 },
3012 multiview_properties: api::VkPhysicalDeviceMultiviewProperties {
3013 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES,
3014 pNext: null_mut(),
3015 maxMultiviewViewCount: 6,
3016 maxMultiviewInstanceIndex: !0,
3017 },
3018 id_properties: api::VkPhysicalDeviceIDProperties {
3019 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES,
3020 pNext: null_mut(),
3021 deviceUUID: *PhysicalDevice::get_device_uuid().as_bytes(),
3022 driverUUID: *PhysicalDevice::get_driver_uuid().as_bytes(),
3023 deviceLUID: [0; api::VK_LUID_SIZE as usize],
3024 deviceNodeMask: 1,
3025 deviceLUIDValid: api::VK_FALSE,
3026 },
3027 maintenance_3_properties: api::VkPhysicalDeviceMaintenance3Properties {
3028 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
3029 pNext: null_mut(),
3030 maxPerSetDescriptors: !0,
3031 maxMemoryAllocationSize: isize::max_value() as u64,
3032 ..mem::zeroed() // for padding fields
3033 },
3034 protected_memory_properties: api::VkPhysicalDeviceProtectedMemoryProperties {
3035 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES,
3036 pNext: null_mut(),
3037 protectedNoFault: api::VK_FALSE,
3038 },
3039 subgroup_properties: api::VkPhysicalDeviceSubgroupProperties {
3040 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES,
3041 pNext: null_mut(),
3042 subgroupSize: 1, // FIXME fill in correct value
3043 supportedStages: api::VK_SHADER_STAGE_COMPUTE_BIT,
3044 supportedOperations: api::VK_SUBGROUP_FEATURE_BASIC_BIT,
3045 quadOperationsInAllStages: api::VK_FALSE,
3046 },
3047 }),
3048 });
3049 Ok(retval.take())
3050 }
3051 }
3052
3053 #[allow(non_snake_case)]
3054 pub unsafe extern "system" fn vkGetInstanceProcAddr(
3055 instance: api::VkInstance,
3056 name: *const c_char,
3057 ) -> api::PFN_vkVoidFunction {
3058 match instance.get() {
3059 Some(_) => get_proc_address(
3060 name,
3061 GetProcAddressScope::Instance,
3062 &SharedHandle::from(instance)
3063 .unwrap()
3064 .physical_device
3065 .allowed_extensions,
3066 ),
3067 None => get_proc_address(
3068 name,
3069 GetProcAddressScope::Global,
3070 &Extensions::create_empty(),
3071 ),
3072 }
3073 }
3074
3075 pub fn make_api_version(major: u32, minor: u32, patch: u32) -> u32 {
3076 assert!(major < (1 << 10));
3077 assert!(minor < (1 << 10));
3078 assert!(patch < (1 << 12));
3079 (major << 22) | (minor << 12) | patch
3080 }
3081
3082 #[allow(non_snake_case)]
3083 pub unsafe extern "system" fn vkEnumerateInstanceVersion(api_version: *mut u32) -> api::VkResult {
3084 *api_version = make_api_version(1, 1, api::VK_HEADER_VERSION);
3085 api::VK_SUCCESS
3086 }
3087
3088 pub unsafe fn enumerate_helper<T, Item, I: IntoIterator<Item = Item>, AF: FnMut(&mut T, Item)>(
3089 api_value_count: *mut u32,
3090 api_values: *mut T,
3091 values: I,
3092 mut assign_function: AF,
3093 ) -> api::VkResult {
3094 let mut retval = api::VK_SUCCESS;
3095 let mut api_values = if api_values.is_null() {
3096 None
3097 } else {
3098 Some(util::to_slice_mut(api_values, *api_value_count as usize))
3099 };
3100 let mut final_count = 0;
3101 for value in values {
3102 if let Some(api_values) = &mut api_values {
3103 if final_count >= api_values.len() {
3104 retval = api::VK_INCOMPLETE;
3105 break;
3106 } else {
3107 assign_function(&mut api_values[final_count], value);
3108 final_count += 1;
3109 }
3110 } else {
3111 final_count += 1;
3112 }
3113 }
3114 assert_eq!(final_count as u32 as usize, final_count);
3115 *api_value_count = final_count as u32;
3116 retval
3117 }
3118
3119 #[allow(non_snake_case)]
3120 pub unsafe extern "system" fn vkEnumerateInstanceLayerProperties(
3121 property_count: *mut u32,
3122 properties: *mut api::VkLayerProperties,
3123 ) -> api::VkResult {
3124 enumerate_helper(property_count, properties, &[], |l, r| *l = *r)
3125 }
3126
3127 #[allow(non_snake_case)]
3128 pub unsafe extern "system" fn vkEnumerateInstanceExtensionProperties(
3129 layer_name: *const c_char,
3130 property_count: *mut u32,
3131 properties: *mut api::VkExtensionProperties,
3132 ) -> api::VkResult {
3133 enumerate_extension_properties(
3134 layer_name,
3135 property_count,
3136 properties,
3137 ExtensionScope::Instance,
3138 )
3139 }
3140
3141 #[allow(non_snake_case)]
3142 pub unsafe extern "system" fn vkCreateInstance(
3143 create_info: *const api::VkInstanceCreateInfo,
3144 _allocator: *const api::VkAllocationCallbacks,
3145 instance: *mut api::VkInstance,
3146 ) -> api::VkResult {
3147 *instance = Handle::null();
3148 match Instance::new(create_info) {
3149 Ok(v) => {
3150 *instance = v;
3151 api::VK_SUCCESS
3152 }
3153 Err(error) => error,
3154 }
3155 }
3156
3157 #[allow(non_snake_case)]
3158 pub unsafe extern "system" fn vkDestroyInstance(
3159 instance: api::VkInstance,
3160 _allocator: *const api::VkAllocationCallbacks,
3161 ) {
3162 OwnedHandle::from(instance);
3163 }
3164
3165 #[allow(non_snake_case)]
3166 pub unsafe extern "system" fn vkEnumeratePhysicalDevices(
3167 instance: api::VkInstance,
3168 physical_device_count: *mut u32,
3169 physical_devices: *mut api::VkPhysicalDevice,
3170 ) -> api::VkResult {
3171 let instance = SharedHandle::from(instance).unwrap();
3172 enumerate_helper(
3173 physical_device_count,
3174 physical_devices,
3175 iter::once(instance.physical_device.get_handle()),
3176 |l, r| *l = r,
3177 )
3178 }
3179
3180 #[allow(non_snake_case)]
3181 pub unsafe extern "system" fn vkGetPhysicalDeviceFeatures(
3182 physical_device: api::VkPhysicalDevice,
3183 features: *mut api::VkPhysicalDeviceFeatures,
3184 ) {
3185 let mut v = api::VkPhysicalDeviceFeatures2 {
3186 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
3187 pNext: null_mut(),
3188 features: mem::zeroed(),
3189 };
3190 vkGetPhysicalDeviceFeatures2(physical_device, &mut v);
3191 *features = v.features;
3192 }
3193
3194 #[allow(non_snake_case)]
3195 pub unsafe extern "system" fn vkGetPhysicalDeviceFormatProperties(
3196 physical_device: api::VkPhysicalDevice,
3197 format: api::VkFormat,
3198 format_properties: *mut api::VkFormatProperties,
3199 ) {
3200 let mut format_properties2 = api::VkFormatProperties2 {
3201 sType: api::VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2,
3202 pNext: null_mut(),
3203 formatProperties: mem::zeroed(),
3204 };
3205 vkGetPhysicalDeviceFormatProperties2(physical_device, format, &mut format_properties2);
3206 *format_properties = format_properties2.formatProperties;
3207 }
3208
3209 #[allow(non_snake_case)]
3210 pub unsafe extern "system" fn vkGetPhysicalDeviceImageFormatProperties(
3211 _physicalDevice: api::VkPhysicalDevice,
3212 _format: api::VkFormat,
3213 _type_: api::VkImageType,
3214 _tiling: api::VkImageTiling,
3215 _usage: api::VkImageUsageFlags,
3216 _flags: api::VkImageCreateFlags,
3217 _pImageFormatProperties: *mut api::VkImageFormatProperties,
3218 ) -> api::VkResult {
3219 unimplemented!()
3220 }
3221
3222 #[allow(non_snake_case)]
3223 pub unsafe extern "system" fn vkGetPhysicalDeviceProperties(
3224 physical_device: api::VkPhysicalDevice,
3225 properties: *mut api::VkPhysicalDeviceProperties,
3226 ) {
3227 let physical_device = SharedHandle::from(physical_device).unwrap();
3228 *properties = physical_device.properties;
3229 }
3230
3231 unsafe fn get_physical_device_queue_family_properties(
3232 _physical_device: SharedHandle<api::VkPhysicalDevice>,
3233 queue_family_properties: &mut api::VkQueueFamilyProperties2,
3234 queue_count: u32,
3235 ) {
3236 parse_next_chain_mut! {
3237 queue_family_properties,
3238 root = api::VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
3239 }
3240 queue_family_properties.queueFamilyProperties = api::VkQueueFamilyProperties {
3241 queueFlags: api::VK_QUEUE_GRAPHICS_BIT
3242 | api::VK_QUEUE_COMPUTE_BIT
3243 | api::VK_QUEUE_TRANSFER_BIT,
3244 queueCount: queue_count,
3245 timestampValidBits: 0,
3246 minImageTransferGranularity: api::VkExtent3D {
3247 width: 1,
3248 height: 1,
3249 depth: 1,
3250 },
3251 };
3252 }
3253
3254 #[allow(non_snake_case)]
3255 pub unsafe extern "system" fn vkGetPhysicalDeviceQueueFamilyProperties(
3256 physical_device: api::VkPhysicalDevice,
3257 queue_family_property_count: *mut u32,
3258 queue_family_properties: *mut api::VkQueueFamilyProperties,
3259 ) {
3260 enumerate_helper(
3261 queue_family_property_count,
3262 queue_family_properties,
3263 QUEUE_COUNTS.iter(),
3264 |queue_family_properties, &count| {
3265 let mut queue_family_properties2 = api::VkQueueFamilyProperties2 {
3266 sType: api::VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2,
3267 pNext: null_mut(),
3268 queueFamilyProperties: mem::zeroed(),
3269 };
3270 get_physical_device_queue_family_properties(
3271 SharedHandle::from(physical_device).unwrap(),
3272 &mut queue_family_properties2,
3273 count,
3274 );
3275 *queue_family_properties = queue_family_properties2.queueFamilyProperties;
3276 },
3277 );
3278 }
3279
3280 #[allow(non_snake_case)]
3281 pub unsafe extern "system" fn vkGetPhysicalDeviceMemoryProperties(
3282 physical_device: api::VkPhysicalDevice,
3283 memory_properties: *mut api::VkPhysicalDeviceMemoryProperties,
3284 ) {
3285 let mut memory_properties2 = api::VkPhysicalDeviceMemoryProperties2 {
3286 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2,
3287 pNext: null_mut(),
3288 memoryProperties: mem::zeroed(),
3289 };
3290 vkGetPhysicalDeviceMemoryProperties2(physical_device, &mut memory_properties2);
3291 *memory_properties = memory_properties2.memoryProperties;
3292 }
3293
3294 #[allow(non_snake_case)]
3295 pub unsafe extern "system" fn vkGetDeviceProcAddr(
3296 device: api::VkDevice,
3297 name: *const c_char,
3298 ) -> api::PFN_vkVoidFunction {
3299 get_proc_address(
3300 name,
3301 GetProcAddressScope::Device,
3302 &SharedHandle::from(device).unwrap().extensions,
3303 )
3304 }
3305
3306 #[allow(non_snake_case)]
3307 pub unsafe extern "system" fn vkCreateDevice(
3308 physical_device: api::VkPhysicalDevice,
3309 create_info: *const api::VkDeviceCreateInfo,
3310 _allocator: *const api::VkAllocationCallbacks,
3311 device: *mut api::VkDevice,
3312 ) -> api::VkResult {
3313 *device = Handle::null();
3314 match Device::new(SharedHandle::from(physical_device).unwrap(), create_info) {
3315 Ok(v) => {
3316 *device = v.take();
3317 api::VK_SUCCESS
3318 }
3319 Err(error) => error,
3320 }
3321 }
3322
3323 #[allow(non_snake_case)]
3324 pub unsafe extern "system" fn vkDestroyDevice(
3325 device: api::VkDevice,
3326 _allocator: *const api::VkAllocationCallbacks,
3327 ) {
3328 OwnedHandle::from(device);
3329 }
3330
3331 unsafe fn enumerate_extension_properties(
3332 layer_name: *const c_char,
3333 property_count: *mut u32,
3334 properties: *mut api::VkExtensionProperties,
3335 extension_scope: ExtensionScope,
3336 ) -> api::VkResult {
3337 if !layer_name.is_null() {
3338 return api::VK_ERROR_LAYER_NOT_PRESENT;
3339 }
3340 enumerate_helper(
3341 property_count,
3342 properties,
3343 Extensions::default().iter().filter_map(
3344 |(extension, _): (Extension, _)| -> Option<api::VkExtensionProperties> {
3345 if extension.get_scope() == extension_scope {
3346 Some(extension.get_properties())
3347 } else {
3348 None
3349 }
3350 },
3351 ),
3352 |l, r| *l = r,
3353 )
3354 }
3355
3356 #[allow(non_snake_case)]
3357 pub unsafe extern "system" fn vkEnumerateDeviceExtensionProperties(
3358 _physical_device: api::VkPhysicalDevice,
3359 layer_name: *const c_char,
3360 property_count: *mut u32,
3361 properties: *mut api::VkExtensionProperties,
3362 ) -> api::VkResult {
3363 enumerate_extension_properties(
3364 layer_name,
3365 property_count,
3366 properties,
3367 ExtensionScope::Device,
3368 )
3369 }
3370
3371 #[allow(non_snake_case)]
3372 pub unsafe extern "system" fn vkEnumerateDeviceLayerProperties(
3373 _physicalDevice: api::VkPhysicalDevice,
3374 _pPropertyCount: *mut u32,
3375 _pProperties: *mut api::VkLayerProperties,
3376 ) -> api::VkResult {
3377 unimplemented!()
3378 }
3379
3380 #[allow(non_snake_case)]
3381 pub unsafe extern "system" fn vkGetDeviceQueue(
3382 device: api::VkDevice,
3383 queue_family_index: u32,
3384 queue_index: u32,
3385 queue: *mut api::VkQueue,
3386 ) {
3387 vkGetDeviceQueue2(
3388 device,
3389 &api::VkDeviceQueueInfo2 {
3390 sType: api::VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2,
3391 pNext: null(),
3392 flags: 0,
3393 queueFamilyIndex: queue_family_index,
3394 queueIndex: queue_index,
3395 },
3396 queue,
3397 );
3398 }
3399
3400 #[allow(non_snake_case)]
3401 pub unsafe extern "system" fn vkQueueSubmit(
3402 _queue: api::VkQueue,
3403 _submitCount: u32,
3404 _pSubmits: *const api::VkSubmitInfo,
3405 _fence: api::VkFence,
3406 ) -> api::VkResult {
3407 unimplemented!()
3408 }
3409
3410 #[allow(non_snake_case)]
3411 pub unsafe extern "system" fn vkQueueWaitIdle(_queue: api::VkQueue) -> api::VkResult {
3412 unimplemented!()
3413 }
3414
3415 #[allow(non_snake_case)]
3416 pub unsafe extern "system" fn vkDeviceWaitIdle(_device: api::VkDevice) -> api::VkResult {
3417 unimplemented!()
3418 }
3419
3420 #[allow(non_snake_case)]
3421 pub unsafe extern "system" fn vkAllocateMemory(
3422 _device: api::VkDevice,
3423 allocate_info: *const api::VkMemoryAllocateInfo,
3424 _allocator: *const api::VkAllocationCallbacks,
3425 memory: *mut api::VkDeviceMemory,
3426 ) -> api::VkResult {
3427 parse_next_chain_const! {
3428 allocate_info,
3429 root = api::VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
3430 export_memory_allocate_info: api::VkExportMemoryAllocateInfo = api::VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO,
3431 memory_allocate_flags_info: api::VkMemoryAllocateFlagsInfo = api::VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO,
3432 memory_dedicated_allocate_info: api::VkMemoryDedicatedAllocateInfo = api::VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
3433 }
3434 let allocate_info = &*allocate_info;
3435 if !export_memory_allocate_info.is_null() {
3436 unimplemented!()
3437 }
3438 if !memory_allocate_flags_info.is_null() {
3439 unimplemented!()
3440 }
3441 if !memory_dedicated_allocate_info.is_null() {
3442 unimplemented!()
3443 }
3444 match DeviceMemoryType::from_index(allocate_info.memoryTypeIndex).unwrap() {
3445 DeviceMemoryType::Main => {
3446 if allocate_info.allocationSize > isize::max_value() as u64 {
3447 return api::VK_ERROR_OUT_OF_DEVICE_MEMORY;
3448 }
3449 match DeviceMemory::allocate_from_default_heap(DeviceMemoryLayout::calculate(
3450 allocate_info.allocationSize as usize,
3451 MIN_MEMORY_MAP_ALIGNMENT,
3452 )) {
3453 Ok(new_memory) => {
3454 *memory = OwnedHandle::<api::VkDeviceMemory>::new(new_memory).take();
3455 api::VK_SUCCESS
3456 }
3457 Err(_) => api::VK_ERROR_OUT_OF_DEVICE_MEMORY,
3458 }
3459 }
3460 }
3461 }
3462
3463 #[allow(non_snake_case)]
3464 pub unsafe extern "system" fn vkFreeMemory(
3465 _device: api::VkDevice,
3466 memory: api::VkDeviceMemory,
3467 _allocator: *const api::VkAllocationCallbacks,
3468 ) {
3469 if !memory.is_null() {
3470 OwnedHandle::from(memory);
3471 }
3472 }
3473
3474 #[allow(non_snake_case)]
3475 pub unsafe extern "system" fn vkMapMemory(
3476 _device: api::VkDevice,
3477 memory: api::VkDeviceMemory,
3478 offset: api::VkDeviceSize,
3479 _size: api::VkDeviceSize,
3480 _flags: api::VkMemoryMapFlags,
3481 data: *mut *mut c_void,
3482 ) -> api::VkResult {
3483 let memory = SharedHandle::from(memory).unwrap();
3484 // remember to keep vkUnmapMemory up to date
3485 *data = memory.get().as_ptr().offset(offset as isize) as *mut c_void;
3486 api::VK_SUCCESS
3487 }
3488
3489 #[allow(non_snake_case)]
3490 pub unsafe extern "system" fn vkUnmapMemory(_device: api::VkDevice, _memory: api::VkDeviceMemory) {}
3491
3492 #[allow(non_snake_case)]
3493 pub unsafe extern "system" fn vkFlushMappedMemoryRanges(
3494 _device: api::VkDevice,
3495 _memoryRangeCount: u32,
3496 _pMemoryRanges: *const api::VkMappedMemoryRange,
3497 ) -> api::VkResult {
3498 unimplemented!()
3499 }
3500
3501 #[allow(non_snake_case)]
3502 pub unsafe extern "system" fn vkInvalidateMappedMemoryRanges(
3503 _device: api::VkDevice,
3504 _memoryRangeCount: u32,
3505 _pMemoryRanges: *const api::VkMappedMemoryRange,
3506 ) -> api::VkResult {
3507 unimplemented!()
3508 }
3509
3510 #[allow(non_snake_case)]
3511 pub unsafe extern "system" fn vkGetDeviceMemoryCommitment(
3512 _device: api::VkDevice,
3513 _memory: api::VkDeviceMemory,
3514 _pCommittedMemoryInBytes: *mut api::VkDeviceSize,
3515 ) {
3516 unimplemented!()
3517 }
3518
3519 #[allow(non_snake_case)]
3520 pub unsafe extern "system" fn vkBindBufferMemory(
3521 device: api::VkDevice,
3522 buffer: api::VkBuffer,
3523 memory: api::VkDeviceMemory,
3524 memory_offset: api::VkDeviceSize,
3525 ) -> api::VkResult {
3526 vkBindBufferMemory2(
3527 device,
3528 1,
3529 &api::VkBindBufferMemoryInfo {
3530 sType: api::VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO,
3531 pNext: null(),
3532 buffer,
3533 memory,
3534 memoryOffset: memory_offset,
3535 },
3536 )
3537 }
3538
3539 #[allow(non_snake_case)]
3540 pub unsafe extern "system" fn vkBindImageMemory(
3541 device: api::VkDevice,
3542 image: api::VkImage,
3543 memory: api::VkDeviceMemory,
3544 memory_offset: api::VkDeviceSize,
3545 ) -> api::VkResult {
3546 vkBindImageMemory2(
3547 device,
3548 1,
3549 &api::VkBindImageMemoryInfo {
3550 sType: api::VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO,
3551 pNext: null(),
3552 image,
3553 memory,
3554 memoryOffset: memory_offset,
3555 },
3556 )
3557 }
3558
3559 #[allow(non_snake_case)]
3560 pub unsafe extern "system" fn vkGetBufferMemoryRequirements(
3561 device: api::VkDevice,
3562 buffer: api::VkBuffer,
3563 memory_requirements: *mut api::VkMemoryRequirements,
3564 ) {
3565 let mut memory_requirements_2 = api::VkMemoryRequirements2 {
3566 sType: api::VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
3567 pNext: null_mut(),
3568 memoryRequirements: mem::zeroed(),
3569 };
3570 vkGetBufferMemoryRequirements2(
3571 device,
3572 &api::VkBufferMemoryRequirementsInfo2 {
3573 sType: api::VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2,
3574 pNext: null(),
3575 buffer,
3576 },
3577 &mut memory_requirements_2,
3578 );
3579 *memory_requirements = memory_requirements_2.memoryRequirements;
3580 }
3581
3582 #[allow(non_snake_case)]
3583 pub unsafe extern "system" fn vkGetImageMemoryRequirements(
3584 device: api::VkDevice,
3585 image: api::VkImage,
3586 memory_requirements: *mut api::VkMemoryRequirements,
3587 ) {
3588 let mut memory_requirements_2 = api::VkMemoryRequirements2 {
3589 sType: api::VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
3590 pNext: null_mut(),
3591 memoryRequirements: mem::zeroed(),
3592 };
3593 vkGetImageMemoryRequirements2(
3594 device,
3595 &api::VkImageMemoryRequirementsInfo2 {
3596 sType: api::VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2,
3597 pNext: null(),
3598 image,
3599 },
3600 &mut memory_requirements_2,
3601 );
3602 *memory_requirements = memory_requirements_2.memoryRequirements;
3603 }
3604
3605 #[allow(non_snake_case)]
3606 pub unsafe extern "system" fn vkGetImageSparseMemoryRequirements(
3607 _device: api::VkDevice,
3608 _image: api::VkImage,
3609 _pSparseMemoryRequirementCount: *mut u32,
3610 _pSparseMemoryRequirements: *mut api::VkSparseImageMemoryRequirements,
3611 ) {
3612 unimplemented!()
3613 }
3614
3615 #[allow(non_snake_case)]
3616 pub unsafe extern "system" fn vkGetPhysicalDeviceSparseImageFormatProperties(
3617 _physicalDevice: api::VkPhysicalDevice,
3618 _format: api::VkFormat,
3619 _type_: api::VkImageType,
3620 _samples: api::VkSampleCountFlagBits,
3621 _usage: api::VkImageUsageFlags,
3622 _tiling: api::VkImageTiling,
3623 _pPropertyCount: *mut u32,
3624 _pProperties: *mut api::VkSparseImageFormatProperties,
3625 ) {
3626 unimplemented!()
3627 }
3628
3629 #[allow(non_snake_case)]
3630 pub unsafe extern "system" fn vkQueueBindSparse(
3631 _queue: api::VkQueue,
3632 _bindInfoCount: u32,
3633 _pBindInfo: *const api::VkBindSparseInfo,
3634 _fence: api::VkFence,
3635 ) -> api::VkResult {
3636 unimplemented!()
3637 }
3638
3639 #[allow(non_snake_case)]
3640 pub unsafe extern "system" fn vkCreateFence(
3641 _device: api::VkDevice,
3642 _pCreateInfo: *const api::VkFenceCreateInfo,
3643 _pAllocator: *const api::VkAllocationCallbacks,
3644 _pFence: *mut api::VkFence,
3645 ) -> api::VkResult {
3646 unimplemented!()
3647 }
3648
3649 #[allow(non_snake_case)]
3650 pub unsafe extern "system" fn vkDestroyFence(
3651 _device: api::VkDevice,
3652 _fence: api::VkFence,
3653 _pAllocator: *const api::VkAllocationCallbacks,
3654 ) {
3655 unimplemented!()
3656 }
3657
3658 #[allow(non_snake_case)]
3659 pub unsafe extern "system" fn vkResetFences(
3660 _device: api::VkDevice,
3661 _fenceCount: u32,
3662 _pFences: *const api::VkFence,
3663 ) -> api::VkResult {
3664 unimplemented!()
3665 }
3666
3667 #[allow(non_snake_case)]
3668 pub unsafe extern "system" fn vkGetFenceStatus(
3669 _device: api::VkDevice,
3670 _fence: api::VkFence,
3671 ) -> api::VkResult {
3672 unimplemented!()
3673 }
3674
3675 #[allow(non_snake_case)]
3676 pub unsafe extern "system" fn vkWaitForFences(
3677 _device: api::VkDevice,
3678 _fenceCount: u32,
3679 _pFences: *const api::VkFence,
3680 _waitAll: api::VkBool32,
3681 _timeout: u64,
3682 ) -> api::VkResult {
3683 unimplemented!()
3684 }
3685
3686 #[allow(non_snake_case)]
3687 pub unsafe extern "system" fn vkCreateSemaphore(
3688 _device: api::VkDevice,
3689 _pCreateInfo: *const api::VkSemaphoreCreateInfo,
3690 _pAllocator: *const api::VkAllocationCallbacks,
3691 _pSemaphore: *mut api::VkSemaphore,
3692 ) -> api::VkResult {
3693 unimplemented!()
3694 }
3695
3696 #[allow(non_snake_case)]
3697 pub unsafe extern "system" fn vkDestroySemaphore(
3698 _device: api::VkDevice,
3699 _semaphore: api::VkSemaphore,
3700 _pAllocator: *const api::VkAllocationCallbacks,
3701 ) {
3702 unimplemented!()
3703 }
3704
3705 #[allow(non_snake_case)]
3706 pub unsafe extern "system" fn vkCreateEvent(
3707 _device: api::VkDevice,
3708 _pCreateInfo: *const api::VkEventCreateInfo,
3709 _pAllocator: *const api::VkAllocationCallbacks,
3710 _pEvent: *mut api::VkEvent,
3711 ) -> api::VkResult {
3712 unimplemented!()
3713 }
3714
3715 #[allow(non_snake_case)]
3716 pub unsafe extern "system" fn vkDestroyEvent(
3717 _device: api::VkDevice,
3718 _event: api::VkEvent,
3719 _pAllocator: *const api::VkAllocationCallbacks,
3720 ) {
3721 unimplemented!()
3722 }
3723
3724 #[allow(non_snake_case)]
3725 pub unsafe extern "system" fn vkGetEventStatus(
3726 _device: api::VkDevice,
3727 _event: api::VkEvent,
3728 ) -> api::VkResult {
3729 unimplemented!()
3730 }
3731
3732 #[allow(non_snake_case)]
3733 pub unsafe extern "system" fn vkSetEvent(
3734 _device: api::VkDevice,
3735 _event: api::VkEvent,
3736 ) -> api::VkResult {
3737 unimplemented!()
3738 }
3739
3740 #[allow(non_snake_case)]
3741 pub unsafe extern "system" fn vkResetEvent(
3742 _device: api::VkDevice,
3743 _event: api::VkEvent,
3744 ) -> api::VkResult {
3745 unimplemented!()
3746 }
3747
3748 #[allow(non_snake_case)]
3749 pub unsafe extern "system" fn vkCreateQueryPool(
3750 _device: api::VkDevice,
3751 _pCreateInfo: *const api::VkQueryPoolCreateInfo,
3752 _pAllocator: *const api::VkAllocationCallbacks,
3753 _pQueryPool: *mut api::VkQueryPool,
3754 ) -> api::VkResult {
3755 unimplemented!()
3756 }
3757
3758 #[allow(non_snake_case)]
3759 pub unsafe extern "system" fn vkDestroyQueryPool(
3760 _device: api::VkDevice,
3761 _queryPool: api::VkQueryPool,
3762 _pAllocator: *const api::VkAllocationCallbacks,
3763 ) {
3764 unimplemented!()
3765 }
3766
3767 #[allow(non_snake_case)]
3768 pub unsafe extern "system" fn vkGetQueryPoolResults(
3769 _device: api::VkDevice,
3770 _queryPool: api::VkQueryPool,
3771 _firstQuery: u32,
3772 _queryCount: u32,
3773 _dataSize: usize,
3774 _pData: *mut c_void,
3775 _stride: api::VkDeviceSize,
3776 _flags: api::VkQueryResultFlags,
3777 ) -> api::VkResult {
3778 unimplemented!()
3779 }
3780
3781 #[allow(non_snake_case)]
3782 pub unsafe extern "system" fn vkCreateBuffer(
3783 _device: api::VkDevice,
3784 create_info: *const api::VkBufferCreateInfo,
3785 _allocator: *const api::VkAllocationCallbacks,
3786 buffer: *mut api::VkBuffer,
3787 ) -> api::VkResult {
3788 parse_next_chain_const! {
3789 create_info,
3790 root = api::VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
3791 external_memory_buffer: api::VkExternalMemoryBufferCreateInfo = api::VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO,
3792 }
3793 let create_info = &*create_info;
3794 if !external_memory_buffer.is_null() {
3795 let external_memory_buffer = &*external_memory_buffer;
3796 assert_eq!(external_memory_buffer.handleTypes, 0);
3797 }
3798 if create_info.size > isize::max_value() as u64 {
3799 return api::VK_ERROR_OUT_OF_DEVICE_MEMORY;
3800 }
3801 *buffer = OwnedHandle::<api::VkBuffer>::new(Buffer {
3802 size: create_info.size as usize,
3803 memory: None,
3804 })
3805 .take();
3806 api::VK_SUCCESS
3807 }
3808
3809 #[allow(non_snake_case)]
3810 pub unsafe extern "system" fn vkDestroyBuffer(
3811 _device: api::VkDevice,
3812 buffer: api::VkBuffer,
3813 _allocator: *const api::VkAllocationCallbacks,
3814 ) {
3815 OwnedHandle::from(buffer);
3816 }
3817
3818 #[allow(non_snake_case)]
3819 pub unsafe extern "system" fn vkCreateBufferView(
3820 _device: api::VkDevice,
3821 _pCreateInfo: *const api::VkBufferViewCreateInfo,
3822 _pAllocator: *const api::VkAllocationCallbacks,
3823 _pView: *mut api::VkBufferView,
3824 ) -> api::VkResult {
3825 unimplemented!()
3826 }
3827
3828 #[allow(non_snake_case)]
3829 pub unsafe extern "system" fn vkDestroyBufferView(
3830 _device: api::VkDevice,
3831 _bufferView: api::VkBufferView,
3832 _pAllocator: *const api::VkAllocationCallbacks,
3833 ) {
3834 unimplemented!()
3835 }
3836
3837 #[allow(non_snake_case)]
3838 pub unsafe extern "system" fn vkCreateImage(
3839 _device: api::VkDevice,
3840 create_info: *const api::VkImageCreateInfo,
3841 _allocator: *const api::VkAllocationCallbacks,
3842 image: *mut api::VkImage,
3843 ) -> api::VkResult {
3844 parse_next_chain_const! {
3845 create_info,
3846 root = api::VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
3847 external_memory_image_create_info: api::VkExternalMemoryImageCreateInfo = api::VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO,
3848 image_swapchain_create_info: api::VkImageSwapchainCreateInfoKHR = api::VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR,
3849 }
3850 let create_info = &*create_info;
3851 if !external_memory_image_create_info.is_null() {
3852 unimplemented!();
3853 }
3854 if !image_swapchain_create_info.is_null() {
3855 unimplemented!();
3856 }
3857 *image = OwnedHandle::<api::VkImage>::new(Image {
3858 properties: ImageProperties {
3859 supported_tilings: match create_info.tiling {
3860 api::VK_IMAGE_TILING_OPTIMAL => SupportedTilings::Any,
3861 api::VK_IMAGE_TILING_LINEAR => SupportedTilings::LinearOnly,
3862 _ => unreachable!("invalid image tiling"),
3863 },
3864 format: create_info.format,
3865 extents: create_info.extent,
3866 array_layers: create_info.arrayLayers,
3867 mip_levels: create_info.mipLevels,
3868 multisample_count: match create_info.samples {
3869 api::VK_SAMPLE_COUNT_1_BIT => ImageMultisampleCount::Count1,
3870 api::VK_SAMPLE_COUNT_4_BIT => ImageMultisampleCount::Count4,
3871 _ => unreachable!("invalid sample count"),
3872 },
3873 swapchain_present_tiling: None,
3874 },
3875 memory: None,
3876 })
3877 .take();
3878 api::VK_SUCCESS
3879 }
3880
3881 #[allow(non_snake_case)]
3882 pub unsafe extern "system" fn vkDestroyImage(
3883 _device: api::VkDevice,
3884 image: api::VkImage,
3885 _allocator: *const api::VkAllocationCallbacks,
3886 ) {
3887 OwnedHandle::from(image);
3888 }
3889
3890 #[allow(non_snake_case)]
3891 pub unsafe extern "system" fn vkGetImageSubresourceLayout(
3892 _device: api::VkDevice,
3893 _image: api::VkImage,
3894 _pSubresource: *const api::VkImageSubresource,
3895 _pLayout: *mut api::VkSubresourceLayout,
3896 ) {
3897 unimplemented!()
3898 }
3899
3900 #[allow(non_snake_case)]
3901 pub unsafe extern "system" fn vkCreateImageView(
3902 _device: api::VkDevice,
3903 create_info: *const api::VkImageViewCreateInfo,
3904 _allocator: *const api::VkAllocationCallbacks,
3905 view: *mut api::VkImageView,
3906 ) -> api::VkResult {
3907 parse_next_chain_const! {
3908 create_info,
3909 root = api::VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
3910 }
3911 let create_info = &*create_info;
3912 let new_view = OwnedHandle::<api::VkImageView>::new(ImageView {
3913 image: SharedHandle::from(create_info.image).unwrap(),
3914 view_type: ImageViewType::from(create_info.viewType),
3915 format: create_info.format,
3916 component_mapping: ComponentMapping::from(create_info.components).unwrap(),
3917 subresource_range: create_info.subresourceRange,
3918 });
3919 *view = new_view.take();
3920 api::VK_SUCCESS
3921 }
3922
3923 #[allow(non_snake_case)]
3924 pub unsafe extern "system" fn vkDestroyImageView(
3925 _device: api::VkDevice,
3926 image_view: api::VkImageView,
3927 _allocator: *const api::VkAllocationCallbacks,
3928 ) {
3929 OwnedHandle::from(image_view);
3930 }
3931
3932 #[allow(non_snake_case)]
3933 pub unsafe extern "system" fn vkCreateShaderModule(
3934 _device: api::VkDevice,
3935 create_info: *const api::VkShaderModuleCreateInfo,
3936 _allocator: *const api::VkAllocationCallbacks,
3937 shader_module: *mut api::VkShaderModule,
3938 ) -> api::VkResult {
3939 parse_next_chain_const! {
3940 create_info,
3941 root = api::VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
3942 }
3943 let create_info = &*create_info;
3944 const U32_BYTE_COUNT: usize = 4;
3945 assert_eq!(U32_BYTE_COUNT, mem::size_of::<u32>());
3946 assert_eq!(create_info.codeSize % U32_BYTE_COUNT, 0);
3947 assert_ne!(create_info.codeSize, 0);
3948 let code = util::to_slice(create_info.pCode, create_info.codeSize / U32_BYTE_COUNT);
3949 *shader_module = OwnedHandle::<api::VkShaderModule>::new(ShaderModule {
3950 code: code.to_owned(),
3951 })
3952 .take();
3953 api::VK_SUCCESS
3954 }
3955
3956 #[allow(non_snake_case)]
3957 pub unsafe extern "system" fn vkDestroyShaderModule(
3958 _device: api::VkDevice,
3959 shader_module: api::VkShaderModule,
3960 _allocator: *const api::VkAllocationCallbacks,
3961 ) {
3962 OwnedHandle::from(shader_module);
3963 }
3964
3965 #[allow(non_snake_case)]
3966 pub unsafe extern "system" fn vkCreatePipelineCache(
3967 _device: api::VkDevice,
3968 _pCreateInfo: *const api::VkPipelineCacheCreateInfo,
3969 _pAllocator: *const api::VkAllocationCallbacks,
3970 _pPipelineCache: *mut api::VkPipelineCache,
3971 ) -> api::VkResult {
3972 unimplemented!()
3973 }
3974
3975 #[allow(non_snake_case)]
3976 pub unsafe extern "system" fn vkDestroyPipelineCache(
3977 _device: api::VkDevice,
3978 _pipelineCache: api::VkPipelineCache,
3979 _pAllocator: *const api::VkAllocationCallbacks,
3980 ) {
3981 unimplemented!()
3982 }
3983
3984 #[allow(non_snake_case)]
3985 pub unsafe extern "system" fn vkGetPipelineCacheData(
3986 _device: api::VkDevice,
3987 _pipelineCache: api::VkPipelineCache,
3988 _pDataSize: *mut usize,
3989 _pData: *mut c_void,
3990 ) -> api::VkResult {
3991 unimplemented!()
3992 }
3993
3994 #[allow(non_snake_case)]
3995 pub unsafe extern "system" fn vkMergePipelineCaches(
3996 _device: api::VkDevice,
3997 _dstCache: api::VkPipelineCache,
3998 _srcCacheCount: u32,
3999 _pSrcCaches: *const api::VkPipelineCache,
4000 ) -> api::VkResult {
4001 unimplemented!()
4002 }
4003
4004 #[allow(non_snake_case)]
4005 pub unsafe extern "system" fn vkCreateGraphicsPipelines(
4006 device: api::VkDevice,
4007 pipeline_cache: api::VkPipelineCache,
4008 create_info_count: u32,
4009 create_infos: *const api::VkGraphicsPipelineCreateInfo,
4010 _allocator: *const api::VkAllocationCallbacks,
4011 pipelines: *mut api::VkPipeline,
4012 ) -> api::VkResult {
4013 pipeline::create_pipelines::<pipeline::GraphicsPipeline>(
4014 SharedHandle::from(device).unwrap(),
4015 SharedHandle::from(pipeline_cache),
4016 util::to_slice(create_infos, create_info_count as usize),
4017 util::to_slice_mut(pipelines, create_info_count as usize),
4018 )
4019 }
4020
4021 #[allow(non_snake_case)]
4022 pub unsafe extern "system" fn vkCreateComputePipelines(
4023 device: api::VkDevice,
4024 pipeline_cache: api::VkPipelineCache,
4025 create_info_count: u32,
4026 create_infos: *const api::VkComputePipelineCreateInfo,
4027 _allocator: *const api::VkAllocationCallbacks,
4028 pipelines: *mut api::VkPipeline,
4029 ) -> api::VkResult {
4030 pipeline::create_pipelines::<pipeline::ComputePipeline>(
4031 SharedHandle::from(device).unwrap(),
4032 SharedHandle::from(pipeline_cache),
4033 util::to_slice(create_infos, create_info_count as usize),
4034 util::to_slice_mut(pipelines, create_info_count as usize),
4035 )
4036 }
4037
4038 #[allow(non_snake_case)]
4039 pub unsafe extern "system" fn vkDestroyPipeline(
4040 _device: api::VkDevice,
4041 pipeline: api::VkPipeline,
4042 _allocator: *const api::VkAllocationCallbacks,
4043 ) {
4044 OwnedHandle::from(pipeline);
4045 }
4046
4047 #[allow(non_snake_case)]
4048 pub unsafe extern "system" fn vkCreatePipelineLayout(
4049 _device: api::VkDevice,
4050 create_info: *const api::VkPipelineLayoutCreateInfo,
4051 _allocator: *const api::VkAllocationCallbacks,
4052 pipeline_layout: *mut api::VkPipelineLayout,
4053 ) -> api::VkResult {
4054 parse_next_chain_const! {
4055 create_info,
4056 root = api::VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
4057 }
4058 let create_info = &*create_info;
4059 let set_layouts = util::to_slice(create_info.pSetLayouts, create_info.setLayoutCount as usize);
4060 let push_constant_ranges = util::to_slice(
4061 create_info.pPushConstantRanges,
4062 create_info.pushConstantRangeCount as usize,
4063 );
4064 let push_constants_size = push_constant_ranges
4065 .iter()
4066 .map(|v| v.size as usize + v.offset as usize)
4067 .max()
4068 .unwrap_or(0);
4069 let descriptor_set_layouts: Vec<_> = set_layouts
4070 .iter()
4071 .map(|v| SharedHandle::from(*v).unwrap())
4072 .collect();
4073 let shader_compiler_pipeline_layout = shader_compiler::PipelineLayout {
4074 push_constants_size,
4075 descriptor_sets: descriptor_set_layouts
4076 .iter()
4077 .map(
4078 |descriptor_set_layout| shader_compiler::DescriptorSetLayout {
4079 bindings: descriptor_set_layout
4080 .bindings
4081 .iter()
4082 .map(|binding| {
4083 Some(match *binding.as_ref()? {
4084 DescriptorLayout::Sampler {
4085 count,
4086 immutable_samplers: _,
4087 } => shader_compiler::DescriptorLayout::Sampler { count },
4088 DescriptorLayout::CombinedImageSampler {
4089 count,
4090 immutable_samplers: _,
4091 } => shader_compiler::DescriptorLayout::CombinedImageSampler {
4092 count,
4093 },
4094 DescriptorLayout::SampledImage { count } => {
4095 shader_compiler::DescriptorLayout::SampledImage { count }
4096 }
4097 DescriptorLayout::StorageImage { count } => {
4098 shader_compiler::DescriptorLayout::StorageImage { count }
4099 }
4100 DescriptorLayout::UniformTexelBuffer { count } => {
4101 shader_compiler::DescriptorLayout::UniformTexelBuffer { count }
4102 }
4103 DescriptorLayout::StorageTexelBuffer { count } => {
4104 shader_compiler::DescriptorLayout::StorageTexelBuffer { count }
4105 }
4106 DescriptorLayout::UniformBuffer { count } => {
4107 shader_compiler::DescriptorLayout::UniformBuffer { count }
4108 }
4109 DescriptorLayout::StorageBuffer { count } => {
4110 shader_compiler::DescriptorLayout::StorageBuffer { count }
4111 }
4112 DescriptorLayout::UniformBufferDynamic { count } => {
4113 shader_compiler::DescriptorLayout::UniformBufferDynamic {
4114 count,
4115 }
4116 }
4117 DescriptorLayout::StorageBufferDynamic { count } => {
4118 shader_compiler::DescriptorLayout::StorageBufferDynamic {
4119 count,
4120 }
4121 }
4122 DescriptorLayout::InputAttachment { count } => {
4123 shader_compiler::DescriptorLayout::InputAttachment { count }
4124 }
4125 })
4126 })
4127 .collect(),
4128 },
4129 )
4130 .collect(),
4131 };
4132 *pipeline_layout = OwnedHandle::<api::VkPipelineLayout>::new(PipelineLayout {
4133 push_constants_size,
4134 push_constant_ranges: push_constant_ranges.into(),
4135 descriptor_set_layouts,
4136 shader_compiler_pipeline_layout,
4137 })
4138 .take();
4139 api::VK_SUCCESS
4140 }
4141
4142 #[allow(non_snake_case)]
4143 pub unsafe extern "system" fn vkDestroyPipelineLayout(
4144 _device: api::VkDevice,
4145 pipeline_layout: api::VkPipelineLayout,
4146 _allocator: *const api::VkAllocationCallbacks,
4147 ) {
4148 OwnedHandle::from(pipeline_layout);
4149 }
4150
4151 #[allow(non_snake_case)]
4152 pub unsafe extern "system" fn vkCreateSampler(
4153 _device: api::VkDevice,
4154 create_info: *const api::VkSamplerCreateInfo,
4155 _allocator: *const api::VkAllocationCallbacks,
4156 sampler: *mut api::VkSampler,
4157 ) -> api::VkResult {
4158 parse_next_chain_const! {
4159 create_info,
4160 root = api::VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
4161 }
4162 let create_info = &*create_info;
4163 *sampler = OwnedHandle::<api::VkSampler>::new(Sampler {
4164 mag_filter: create_info.magFilter,
4165 min_filter: create_info.minFilter,
4166 mipmap_mode: create_info.mipmapMode,
4167 address_modes: [
4168 create_info.addressModeU,
4169 create_info.addressModeV,
4170 create_info.addressModeW,
4171 ],
4172 mip_lod_bias: create_info.mipLodBias,
4173 anisotropy: if create_info.anisotropyEnable != api::VK_FALSE {
4174 Some(sampler::AnisotropySettings {
4175 max: create_info.maxAnisotropy,
4176 })
4177 } else {
4178 None
4179 },
4180 compare_op: if create_info.compareEnable != api::VK_FALSE {
4181 Some(create_info.compareOp)
4182 } else {
4183 None
4184 },
4185 min_lod: create_info.minLod,
4186 max_lod: create_info.maxLod,
4187 border_color: create_info.borderColor,
4188 unnormalized_coordinates: create_info.unnormalizedCoordinates != api::VK_FALSE,
4189 sampler_ycbcr_conversion: None,
4190 })
4191 .take();
4192 api::VK_SUCCESS
4193 }
4194
4195 #[allow(non_snake_case)]
4196 pub unsafe extern "system" fn vkDestroySampler(
4197 _device: api::VkDevice,
4198 sampler: api::VkSampler,
4199 _allocator: *const api::VkAllocationCallbacks,
4200 ) {
4201 OwnedHandle::from(sampler);
4202 }
4203
4204 #[allow(non_snake_case)]
4205 pub unsafe extern "system" fn vkCreateDescriptorSetLayout(
4206 _device: api::VkDevice,
4207 create_info: *const api::VkDescriptorSetLayoutCreateInfo,
4208 _allocator: *const api::VkAllocationCallbacks,
4209 set_layout: *mut api::VkDescriptorSetLayout,
4210 ) -> api::VkResult {
4211 parse_next_chain_const! {
4212 create_info,
4213 root = api::VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
4214 }
4215 let create_info = &*create_info;
4216 let bindings = util::to_slice(create_info.pBindings, create_info.bindingCount as usize);
4217 let max_binding = bindings.iter().map(|v| v.binding).max().unwrap_or(0) as usize;
4218 let mut bindings_map: Vec<Option<DescriptorLayout>> = (0..=max_binding).map(|_| None).collect();
4219 for binding in bindings {
4220 let bindings_map_entry = &mut bindings_map[binding.binding as usize];
4221 assert!(
4222 bindings_map_entry.is_none(),
4223 "duplicate binding: {}",
4224 binding.binding
4225 );
4226 *bindings_map_entry = Some(DescriptorLayout::from(binding));
4227 }
4228 *set_layout = OwnedHandle::<api::VkDescriptorSetLayout>::new(DescriptorSetLayout {
4229 bindings: bindings_map,
4230 })
4231 .take();
4232 api::VK_SUCCESS
4233 }
4234
4235 #[allow(non_snake_case)]
4236 pub unsafe extern "system" fn vkDestroyDescriptorSetLayout(
4237 _device: api::VkDevice,
4238 descriptor_set_layout: api::VkDescriptorSetLayout,
4239 _allocator: *const api::VkAllocationCallbacks,
4240 ) {
4241 OwnedHandle::from(descriptor_set_layout);
4242 }
4243
4244 #[allow(non_snake_case)]
4245 pub unsafe extern "system" fn vkCreateDescriptorPool(
4246 _device: api::VkDevice,
4247 create_info: *const api::VkDescriptorPoolCreateInfo,
4248 _allocator: *const api::VkAllocationCallbacks,
4249 descriptor_pool: *mut api::VkDescriptorPool,
4250 ) -> api::VkResult {
4251 parse_next_chain_const! {
4252 create_info,
4253 root = api::VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
4254 }
4255 *descriptor_pool = OwnedHandle::<api::VkDescriptorPool>::new(DescriptorPool::new()).take();
4256 api::VK_SUCCESS
4257 }
4258
4259 #[allow(non_snake_case)]
4260 pub unsafe extern "system" fn vkDestroyDescriptorPool(
4261 _device: api::VkDevice,
4262 descriptor_pool: api::VkDescriptorPool,
4263 _allocator: *const api::VkAllocationCallbacks,
4264 ) {
4265 OwnedHandle::from(descriptor_pool);
4266 }
4267
4268 #[allow(non_snake_case)]
4269 pub unsafe extern "system" fn vkResetDescriptorPool(
4270 _device: api::VkDevice,
4271 descriptor_pool: api::VkDescriptorPool,
4272 _flags: api::VkDescriptorPoolResetFlags,
4273 ) -> api::VkResult {
4274 MutHandle::from(descriptor_pool).unwrap().reset();
4275 api::VK_SUCCESS
4276 }
4277
4278 #[allow(non_snake_case)]
4279 pub unsafe extern "system" fn vkAllocateDescriptorSets(
4280 _device: api::VkDevice,
4281 allocate_info: *const api::VkDescriptorSetAllocateInfo,
4282 descriptor_sets: *mut api::VkDescriptorSet,
4283 ) -> api::VkResult {
4284 parse_next_chain_const! {
4285 allocate_info,
4286 root = api::VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO,
4287 }
4288 let allocate_info = &*allocate_info;
4289 let mut descriptor_pool = MutHandle::from(allocate_info.descriptorPool).unwrap();
4290 let descriptor_sets =
4291 util::to_slice_mut(descriptor_sets, allocate_info.descriptorSetCount as usize);
4292 let descriptor_set_layouts = util::to_slice(
4293 allocate_info.pSetLayouts,
4294 allocate_info.descriptorSetCount as usize,
4295 );
4296 descriptor_pool.allocate(
4297 descriptor_set_layouts
4298 .iter()
4299 .map(|descriptor_set_layout| DescriptorSet {
4300 bindings: SharedHandle::from(*descriptor_set_layout)
4301 .unwrap()
4302 .bindings
4303 .iter()
4304 .map(|layout| layout.as_ref().map(Descriptor::from))
4305 .collect(),
4306 }),
4307 descriptor_sets,
4308 );
4309 api::VK_SUCCESS
4310 }
4311
4312 #[allow(non_snake_case)]
4313 pub unsafe extern "system" fn vkFreeDescriptorSets(
4314 _device: api::VkDevice,
4315 descriptor_pool: api::VkDescriptorPool,
4316 descriptor_set_count: u32,
4317 descriptor_sets: *const api::VkDescriptorSet,
4318 ) -> api::VkResult {
4319 let mut descriptor_pool = MutHandle::from(descriptor_pool).unwrap();
4320 let descriptor_sets = util::to_slice(descriptor_sets, descriptor_set_count as usize);
4321 descriptor_pool.free(descriptor_sets);
4322 api::VK_SUCCESS
4323 }
4324
4325 #[allow(non_snake_case)]
4326 pub unsafe extern "system" fn vkUpdateDescriptorSets(
4327 _device: api::VkDevice,
4328 descriptor_write_count: u32,
4329 descriptor_writes: *const api::VkWriteDescriptorSet,
4330 descriptor_copy_count: u32,
4331 descriptor_copies: *const api::VkCopyDescriptorSet,
4332 ) {
4333 let descriptor_writes = util::to_slice(descriptor_writes, descriptor_write_count as usize);
4334 let descriptor_copies = util::to_slice(descriptor_copies, descriptor_copy_count as usize);
4335 for descriptor_write in descriptor_writes {
4336 parse_next_chain_const! {
4337 descriptor_write,
4338 root = api::VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET,
4339 }
4340 let mut descriptor_set = MutHandle::from(descriptor_write.dstSet).unwrap();
4341 let mut binding_index = descriptor_write.dstBinding as usize;
4342 let mut elements = DescriptorWriteArg::from(descriptor_write);
4343 let mut start_element = Some(descriptor_write.dstArrayElement as usize);
4344 while elements.len() != 0 {
4345 let binding = descriptor_set.bindings[binding_index].as_mut().unwrap();
4346 binding_index += 1;
4347 assert_eq!(binding.descriptor_type(), descriptor_write.descriptorType);
4348 if binding.element_count() == 0 {
4349 assert_eq!(start_element, None);
4350 continue;
4351 }
4352 let start_element = start_element.take().unwrap_or(0);
4353 let used_elements = elements
4354 .len()
4355 .min(binding.element_count().checked_sub(start_element).unwrap());
4356 binding.write(start_element, elements.slice_to(..used_elements));
4357 elements = elements.slice_from(used_elements..);
4358 }
4359 }
4360 for descriptor_copy in descriptor_copies {
4361 parse_next_chain_const! {
4362 descriptor_copy,
4363 root = api::VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET,
4364 }
4365 unimplemented!()
4366 }
4367 }
4368
4369 #[allow(non_snake_case)]
4370 pub unsafe extern "system" fn vkCreateFramebuffer(
4371 _device: api::VkDevice,
4372 _pCreateInfo: *const api::VkFramebufferCreateInfo,
4373 _pAllocator: *const api::VkAllocationCallbacks,
4374 _pFramebuffer: *mut api::VkFramebuffer,
4375 ) -> api::VkResult {
4376 unimplemented!()
4377 }
4378
4379 #[allow(non_snake_case)]
4380 pub unsafe extern "system" fn vkDestroyFramebuffer(
4381 _device: api::VkDevice,
4382 _framebuffer: api::VkFramebuffer,
4383 _pAllocator: *const api::VkAllocationCallbacks,
4384 ) {
4385 unimplemented!()
4386 }
4387
4388 #[allow(non_snake_case)]
4389 pub unsafe extern "system" fn vkCreateRenderPass(
4390 _device: api::VkDevice,
4391 create_info: *const api::VkRenderPassCreateInfo,
4392 _allocator: *const api::VkAllocationCallbacks,
4393 render_pass: *mut api::VkRenderPass,
4394 ) -> api::VkResult {
4395 parse_next_chain_const! {
4396 create_info,
4397 root = api::VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
4398 }
4399 // FIXME: finish implementing
4400 *render_pass = OwnedHandle::<api::VkRenderPass>::new(RenderPass {}).take();
4401 api::VK_SUCCESS
4402 }
4403
4404 #[allow(non_snake_case)]
4405 pub unsafe extern "system" fn vkDestroyRenderPass(
4406 _device: api::VkDevice,
4407 render_pass: api::VkRenderPass,
4408 _allocator: *const api::VkAllocationCallbacks,
4409 ) {
4410 OwnedHandle::from(render_pass);
4411 }
4412
4413 #[allow(non_snake_case)]
4414 pub unsafe extern "system" fn vkGetRenderAreaGranularity(
4415 _device: api::VkDevice,
4416 _renderPass: api::VkRenderPass,
4417 _pGranularity: *mut api::VkExtent2D,
4418 ) {
4419 unimplemented!()
4420 }
4421
4422 #[allow(non_snake_case)]
4423 pub unsafe extern "system" fn vkCreateCommandPool(
4424 _device: api::VkDevice,
4425 _pCreateInfo: *const api::VkCommandPoolCreateInfo,
4426 _pAllocator: *const api::VkAllocationCallbacks,
4427 _pCommandPool: *mut api::VkCommandPool,
4428 ) -> api::VkResult {
4429 unimplemented!()
4430 }
4431
4432 #[allow(non_snake_case)]
4433 pub unsafe extern "system" fn vkDestroyCommandPool(
4434 _device: api::VkDevice,
4435 _commandPool: api::VkCommandPool,
4436 _pAllocator: *const api::VkAllocationCallbacks,
4437 ) {
4438 unimplemented!()
4439 }
4440
4441 #[allow(non_snake_case)]
4442 pub unsafe extern "system" fn vkResetCommandPool(
4443 _device: api::VkDevice,
4444 _commandPool: api::VkCommandPool,
4445 _flags: api::VkCommandPoolResetFlags,
4446 ) -> api::VkResult {
4447 unimplemented!()
4448 }
4449
4450 #[allow(non_snake_case)]
4451 pub unsafe extern "system" fn vkAllocateCommandBuffers(
4452 _device: api::VkDevice,
4453 _pAllocateInfo: *const api::VkCommandBufferAllocateInfo,
4454 _pCommandBuffers: *mut api::VkCommandBuffer,
4455 ) -> api::VkResult {
4456 unimplemented!()
4457 }
4458
4459 #[allow(non_snake_case)]
4460 pub unsafe extern "system" fn vkFreeCommandBuffers(
4461 _device: api::VkDevice,
4462 _commandPool: api::VkCommandPool,
4463 _commandBufferCount: u32,
4464 _pCommandBuffers: *const api::VkCommandBuffer,
4465 ) {
4466 unimplemented!()
4467 }
4468
4469 #[allow(non_snake_case)]
4470 pub unsafe extern "system" fn vkBeginCommandBuffer(
4471 _commandBuffer: api::VkCommandBuffer,
4472 _pBeginInfo: *const api::VkCommandBufferBeginInfo,
4473 ) -> api::VkResult {
4474 unimplemented!()
4475 }
4476
4477 #[allow(non_snake_case)]
4478 pub unsafe extern "system" fn vkEndCommandBuffer(
4479 _commandBuffer: api::VkCommandBuffer,
4480 ) -> api::VkResult {
4481 unimplemented!()
4482 }
4483
4484 #[allow(non_snake_case)]
4485 pub unsafe extern "system" fn vkResetCommandBuffer(
4486 _commandBuffer: api::VkCommandBuffer,
4487 _flags: api::VkCommandBufferResetFlags,
4488 ) -> api::VkResult {
4489 unimplemented!()
4490 }
4491
4492 #[allow(non_snake_case)]
4493 pub unsafe extern "system" fn vkCmdBindPipeline(
4494 _commandBuffer: api::VkCommandBuffer,
4495 _pipelineBindPoint: api::VkPipelineBindPoint,
4496 _pipeline: api::VkPipeline,
4497 ) {
4498 unimplemented!()
4499 }
4500
4501 #[allow(non_snake_case)]
4502 pub unsafe extern "system" fn vkCmdSetViewport(
4503 _commandBuffer: api::VkCommandBuffer,
4504 _firstViewport: u32,
4505 _viewportCount: u32,
4506 _pViewports: *const api::VkViewport,
4507 ) {
4508 unimplemented!()
4509 }
4510
4511 #[allow(non_snake_case)]
4512 pub unsafe extern "system" fn vkCmdSetScissor(
4513 _commandBuffer: api::VkCommandBuffer,
4514 _firstScissor: u32,
4515 _scissorCount: u32,
4516 _pScissors: *const api::VkRect2D,
4517 ) {
4518 unimplemented!()
4519 }
4520
4521 #[allow(non_snake_case)]
4522 pub unsafe extern "system" fn vkCmdSetLineWidth(
4523 _commandBuffer: api::VkCommandBuffer,
4524 _lineWidth: f32,
4525 ) {
4526 unimplemented!()
4527 }
4528
4529 #[allow(non_snake_case)]
4530 pub unsafe extern "system" fn vkCmdSetDepthBias(
4531 _commandBuffer: api::VkCommandBuffer,
4532 _depthBiasConstantFactor: f32,
4533 _depthBiasClamp: f32,
4534 _depthBiasSlopeFactor: f32,
4535 ) {
4536 unimplemented!()
4537 }
4538
4539 #[allow(non_snake_case)]
4540 pub unsafe extern "system" fn vkCmdSetBlendConstants(
4541 _commandBuffer: api::VkCommandBuffer,
4542 _blendConstants: *const f32,
4543 ) {
4544 unimplemented!()
4545 }
4546
4547 #[allow(non_snake_case)]
4548 pub unsafe extern "system" fn vkCmdSetDepthBounds(
4549 _commandBuffer: api::VkCommandBuffer,
4550 _minDepthBounds: f32,
4551 _maxDepthBounds: f32,
4552 ) {
4553 unimplemented!()
4554 }
4555
4556 #[allow(non_snake_case)]
4557 pub unsafe extern "system" fn vkCmdSetStencilCompareMask(
4558 _commandBuffer: api::VkCommandBuffer,
4559 _faceMask: api::VkStencilFaceFlags,
4560 _compareMask: u32,
4561 ) {
4562 unimplemented!()
4563 }
4564
4565 #[allow(non_snake_case)]
4566 pub unsafe extern "system" fn vkCmdSetStencilWriteMask(
4567 _commandBuffer: api::VkCommandBuffer,
4568 _faceMask: api::VkStencilFaceFlags,
4569 _writeMask: u32,
4570 ) {
4571 unimplemented!()
4572 }
4573
4574 #[allow(non_snake_case)]
4575 pub unsafe extern "system" fn vkCmdSetStencilReference(
4576 _commandBuffer: api::VkCommandBuffer,
4577 _faceMask: api::VkStencilFaceFlags,
4578 _reference: u32,
4579 ) {
4580 unimplemented!()
4581 }
4582
4583 #[allow(non_snake_case)]
4584 pub unsafe extern "system" fn vkCmdBindDescriptorSets(
4585 _commandBuffer: api::VkCommandBuffer,
4586 _pipelineBindPoint: api::VkPipelineBindPoint,
4587 _layout: api::VkPipelineLayout,
4588 _firstSet: u32,
4589 _descriptorSetCount: u32,
4590 _pDescriptorSets: *const api::VkDescriptorSet,
4591 _dynamicOffsetCount: u32,
4592 _pDynamicOffsets: *const u32,
4593 ) {
4594 unimplemented!()
4595 }
4596
4597 #[allow(non_snake_case)]
4598 pub unsafe extern "system" fn vkCmdBindIndexBuffer(
4599 _commandBuffer: api::VkCommandBuffer,
4600 _buffer: api::VkBuffer,
4601 _offset: api::VkDeviceSize,
4602 _indexType: api::VkIndexType,
4603 ) {
4604 unimplemented!()
4605 }
4606
4607 #[allow(non_snake_case)]
4608 pub unsafe extern "system" fn vkCmdBindVertexBuffers(
4609 _commandBuffer: api::VkCommandBuffer,
4610 _firstBinding: u32,
4611 _bindingCount: u32,
4612 _pBuffers: *const api::VkBuffer,
4613 _pOffsets: *const api::VkDeviceSize,
4614 ) {
4615 unimplemented!()
4616 }
4617
4618 #[allow(non_snake_case)]
4619 pub unsafe extern "system" fn vkCmdDraw(
4620 _commandBuffer: api::VkCommandBuffer,
4621 _vertexCount: u32,
4622 _instanceCount: u32,
4623 _firstVertex: u32,
4624 _firstInstance: u32,
4625 ) {
4626 unimplemented!()
4627 }
4628
4629 #[allow(non_snake_case)]
4630 pub unsafe extern "system" fn vkCmdDrawIndexed(
4631 _commandBuffer: api::VkCommandBuffer,
4632 _indexCount: u32,
4633 _instanceCount: u32,
4634 _firstIndex: u32,
4635 _vertexOffset: i32,
4636 _firstInstance: u32,
4637 ) {
4638 unimplemented!()
4639 }
4640
4641 #[allow(non_snake_case)]
4642 pub unsafe extern "system" fn vkCmdDrawIndirect(
4643 _commandBuffer: api::VkCommandBuffer,
4644 _buffer: api::VkBuffer,
4645 _offset: api::VkDeviceSize,
4646 _drawCount: u32,
4647 _stride: u32,
4648 ) {
4649 unimplemented!()
4650 }
4651
4652 #[allow(non_snake_case)]
4653 pub unsafe extern "system" fn vkCmdDrawIndexedIndirect(
4654 _commandBuffer: api::VkCommandBuffer,
4655 _buffer: api::VkBuffer,
4656 _offset: api::VkDeviceSize,
4657 _drawCount: u32,
4658 _stride: u32,
4659 ) {
4660 unimplemented!()
4661 }
4662
4663 #[allow(non_snake_case)]
4664 pub unsafe extern "system" fn vkCmdDispatch(
4665 _commandBuffer: api::VkCommandBuffer,
4666 _groupCountX: u32,
4667 _groupCountY: u32,
4668 _groupCountZ: u32,
4669 ) {
4670 unimplemented!()
4671 }
4672
4673 #[allow(non_snake_case)]
4674 pub unsafe extern "system" fn vkCmdDispatchIndirect(
4675 _commandBuffer: api::VkCommandBuffer,
4676 _buffer: api::VkBuffer,
4677 _offset: api::VkDeviceSize,
4678 ) {
4679 unimplemented!()
4680 }
4681
4682 #[allow(non_snake_case)]
4683 pub unsafe extern "system" fn vkCmdCopyBuffer(
4684 _commandBuffer: api::VkCommandBuffer,
4685 _srcBuffer: api::VkBuffer,
4686 _dstBuffer: api::VkBuffer,
4687 _regionCount: u32,
4688 _pRegions: *const api::VkBufferCopy,
4689 ) {
4690 unimplemented!()
4691 }
4692
4693 #[allow(non_snake_case)]
4694 pub unsafe extern "system" fn vkCmdCopyImage(
4695 _commandBuffer: api::VkCommandBuffer,
4696 _srcImage: api::VkImage,
4697 _srcImageLayout: api::VkImageLayout,
4698 _dstImage: api::VkImage,
4699 _dstImageLayout: api::VkImageLayout,
4700 _regionCount: u32,
4701 _pRegions: *const api::VkImageCopy,
4702 ) {
4703 unimplemented!()
4704 }
4705
4706 #[allow(non_snake_case)]
4707 pub unsafe extern "system" fn vkCmdBlitImage(
4708 _commandBuffer: api::VkCommandBuffer,
4709 _srcImage: api::VkImage,
4710 _srcImageLayout: api::VkImageLayout,
4711 _dstImage: api::VkImage,
4712 _dstImageLayout: api::VkImageLayout,
4713 _regionCount: u32,
4714 _pRegions: *const api::VkImageBlit,
4715 _filter: api::VkFilter,
4716 ) {
4717 unimplemented!()
4718 }
4719
4720 #[allow(non_snake_case)]
4721 pub unsafe extern "system" fn vkCmdCopyBufferToImage(
4722 _commandBuffer: api::VkCommandBuffer,
4723 _srcBuffer: api::VkBuffer,
4724 _dstImage: api::VkImage,
4725 _dstImageLayout: api::VkImageLayout,
4726 _regionCount: u32,
4727 _pRegions: *const api::VkBufferImageCopy,
4728 ) {
4729 unimplemented!()
4730 }
4731
4732 #[allow(non_snake_case)]
4733 pub unsafe extern "system" fn vkCmdCopyImageToBuffer(
4734 _commandBuffer: api::VkCommandBuffer,
4735 _srcImage: api::VkImage,
4736 _srcImageLayout: api::VkImageLayout,
4737 _dstBuffer: api::VkBuffer,
4738 _regionCount: u32,
4739 _pRegions: *const api::VkBufferImageCopy,
4740 ) {
4741 unimplemented!()
4742 }
4743
4744 #[allow(non_snake_case)]
4745 pub unsafe extern "system" fn vkCmdUpdateBuffer(
4746 _commandBuffer: api::VkCommandBuffer,
4747 _dstBuffer: api::VkBuffer,
4748 _dstOffset: api::VkDeviceSize,
4749 _dataSize: api::VkDeviceSize,
4750 _pData: *const c_void,
4751 ) {
4752 unimplemented!()
4753 }
4754
4755 #[allow(non_snake_case)]
4756 pub unsafe extern "system" fn vkCmdFillBuffer(
4757 _commandBuffer: api::VkCommandBuffer,
4758 _dstBuffer: api::VkBuffer,
4759 _dstOffset: api::VkDeviceSize,
4760 _size: api::VkDeviceSize,
4761 _data: u32,
4762 ) {
4763 unimplemented!()
4764 }
4765
4766 #[allow(non_snake_case)]
4767 pub unsafe extern "system" fn vkCmdClearColorImage(
4768 _commandBuffer: api::VkCommandBuffer,
4769 _image: api::VkImage,
4770 _imageLayout: api::VkImageLayout,
4771 _pColor: *const api::VkClearColorValue,
4772 _rangeCount: u32,
4773 _pRanges: *const api::VkImageSubresourceRange,
4774 ) {
4775 unimplemented!()
4776 }
4777
4778 #[allow(non_snake_case)]
4779 pub unsafe extern "system" fn vkCmdClearDepthStencilImage(
4780 _commandBuffer: api::VkCommandBuffer,
4781 _image: api::VkImage,
4782 _imageLayout: api::VkImageLayout,
4783 _pDepthStencil: *const api::VkClearDepthStencilValue,
4784 _rangeCount: u32,
4785 _pRanges: *const api::VkImageSubresourceRange,
4786 ) {
4787 unimplemented!()
4788 }
4789
4790 #[allow(non_snake_case)]
4791 pub unsafe extern "system" fn vkCmdClearAttachments(
4792 _commandBuffer: api::VkCommandBuffer,
4793 _attachmentCount: u32,
4794 _pAttachments: *const api::VkClearAttachment,
4795 _rectCount: u32,
4796 _pRects: *const api::VkClearRect,
4797 ) {
4798 unimplemented!()
4799 }
4800
4801 #[allow(non_snake_case)]
4802 pub unsafe extern "system" fn vkCmdResolveImage(
4803 _commandBuffer: api::VkCommandBuffer,
4804 _srcImage: api::VkImage,
4805 _srcImageLayout: api::VkImageLayout,
4806 _dstImage: api::VkImage,
4807 _dstImageLayout: api::VkImageLayout,
4808 _regionCount: u32,
4809 _pRegions: *const api::VkImageResolve,
4810 ) {
4811 unimplemented!()
4812 }
4813
4814 #[allow(non_snake_case)]
4815 pub unsafe extern "system" fn vkCmdSetEvent(
4816 _commandBuffer: api::VkCommandBuffer,
4817 _event: api::VkEvent,
4818 _stageMask: api::VkPipelineStageFlags,
4819 ) {
4820 unimplemented!()
4821 }
4822
4823 #[allow(non_snake_case)]
4824 pub unsafe extern "system" fn vkCmdResetEvent(
4825 _commandBuffer: api::VkCommandBuffer,
4826 _event: api::VkEvent,
4827 _stageMask: api::VkPipelineStageFlags,
4828 ) {
4829 unimplemented!()
4830 }
4831
4832 #[allow(non_snake_case)]
4833 pub unsafe extern "system" fn vkCmdWaitEvents(
4834 _commandBuffer: api::VkCommandBuffer,
4835 _eventCount: u32,
4836 _pEvents: *const api::VkEvent,
4837 _srcStageMask: api::VkPipelineStageFlags,
4838 _dstStageMask: api::VkPipelineStageFlags,
4839 _memoryBarrierCount: u32,
4840 _pMemoryBarriers: *const api::VkMemoryBarrier,
4841 _bufferMemoryBarrierCount: u32,
4842 _pBufferMemoryBarriers: *const api::VkBufferMemoryBarrier,
4843 _imageMemoryBarrierCount: u32,
4844 _pImageMemoryBarriers: *const api::VkImageMemoryBarrier,
4845 ) {
4846 unimplemented!()
4847 }
4848
4849 #[allow(non_snake_case)]
4850 pub unsafe extern "system" fn vkCmdPipelineBarrier(
4851 _commandBuffer: api::VkCommandBuffer,
4852 _srcStageMask: api::VkPipelineStageFlags,
4853 _dstStageMask: api::VkPipelineStageFlags,
4854 _dependencyFlags: api::VkDependencyFlags,
4855 _memoryBarrierCount: u32,
4856 _pMemoryBarriers: *const api::VkMemoryBarrier,
4857 _bufferMemoryBarrierCount: u32,
4858 _pBufferMemoryBarriers: *const api::VkBufferMemoryBarrier,
4859 _imageMemoryBarrierCount: u32,
4860 _pImageMemoryBarriers: *const api::VkImageMemoryBarrier,
4861 ) {
4862 unimplemented!()
4863 }
4864
4865 #[allow(non_snake_case)]
4866 pub unsafe extern "system" fn vkCmdBeginQuery(
4867 _commandBuffer: api::VkCommandBuffer,
4868 _queryPool: api::VkQueryPool,
4869 _query: u32,
4870 _flags: api::VkQueryControlFlags,
4871 ) {
4872 unimplemented!()
4873 }
4874
4875 #[allow(non_snake_case)]
4876 pub unsafe extern "system" fn vkCmdEndQuery(
4877 _commandBuffer: api::VkCommandBuffer,
4878 _queryPool: api::VkQueryPool,
4879 _query: u32,
4880 ) {
4881 unimplemented!()
4882 }
4883
4884 #[allow(non_snake_case)]
4885 pub unsafe extern "system" fn vkCmdResetQueryPool(
4886 _commandBuffer: api::VkCommandBuffer,
4887 _queryPool: api::VkQueryPool,
4888 _firstQuery: u32,
4889 _queryCount: u32,
4890 ) {
4891 unimplemented!()
4892 }
4893
4894 #[allow(non_snake_case)]
4895 pub unsafe extern "system" fn vkCmdWriteTimestamp(
4896 _commandBuffer: api::VkCommandBuffer,
4897 _pipelineStage: api::VkPipelineStageFlagBits,
4898 _queryPool: api::VkQueryPool,
4899 _query: u32,
4900 ) {
4901 unimplemented!()
4902 }
4903
4904 #[allow(non_snake_case)]
4905 pub unsafe extern "system" fn vkCmdCopyQueryPoolResults(
4906 _commandBuffer: api::VkCommandBuffer,
4907 _queryPool: api::VkQueryPool,
4908 _firstQuery: u32,
4909 _queryCount: u32,
4910 _dstBuffer: api::VkBuffer,
4911 _dstOffset: api::VkDeviceSize,
4912 _stride: api::VkDeviceSize,
4913 _flags: api::VkQueryResultFlags,
4914 ) {
4915 unimplemented!()
4916 }
4917
4918 #[allow(non_snake_case)]
4919 pub unsafe extern "system" fn vkCmdPushConstants(
4920 _commandBuffer: api::VkCommandBuffer,
4921 _layout: api::VkPipelineLayout,
4922 _stageFlags: api::VkShaderStageFlags,
4923 _offset: u32,
4924 _size: u32,
4925 _pValues: *const c_void,
4926 ) {
4927 unimplemented!()
4928 }
4929
4930 #[allow(non_snake_case)]
4931 pub unsafe extern "system" fn vkCmdBeginRenderPass(
4932 _commandBuffer: api::VkCommandBuffer,
4933 _pRenderPassBegin: *const api::VkRenderPassBeginInfo,
4934 _contents: api::VkSubpassContents,
4935 ) {
4936 unimplemented!()
4937 }
4938
4939 #[allow(non_snake_case)]
4940 pub unsafe extern "system" fn vkCmdNextSubpass(
4941 _commandBuffer: api::VkCommandBuffer,
4942 _contents: api::VkSubpassContents,
4943 ) {
4944 unimplemented!()
4945 }
4946
4947 #[allow(non_snake_case)]
4948 pub unsafe extern "system" fn vkCmdEndRenderPass(_commandBuffer: api::VkCommandBuffer) {
4949 unimplemented!()
4950 }
4951
4952 #[allow(non_snake_case)]
4953 pub unsafe extern "system" fn vkCmdExecuteCommands(
4954 _commandBuffer: api::VkCommandBuffer,
4955 _commandBufferCount: u32,
4956 _pCommandBuffers: *const api::VkCommandBuffer,
4957 ) {
4958 unimplemented!()
4959 }
4960
4961 #[allow(non_snake_case)]
4962 pub unsafe extern "system" fn vkBindBufferMemory2(
4963 _device: api::VkDevice,
4964 bind_info_count: u32,
4965 bind_infos: *const api::VkBindBufferMemoryInfo,
4966 ) -> api::VkResult {
4967 assert_ne!(bind_info_count, 0);
4968 let bind_infos = util::to_slice(bind_infos, bind_info_count as usize);
4969 for bind_info in bind_infos {
4970 parse_next_chain_const! {
4971 bind_info,
4972 root = api::VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO,
4973 device_group_info: api::VkBindBufferMemoryDeviceGroupInfo = api::VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO,
4974 }
4975 if !device_group_info.is_null() {
4976 let device_group_info = &*device_group_info;
4977 if device_group_info.deviceIndexCount == 0 {
4978 } else {
4979 assert_eq!(device_group_info.deviceIndexCount, 1);
4980 assert_eq!(*device_group_info.pDeviceIndices, 0);
4981 }
4982 }
4983 let bind_info = &*bind_info;
4984 let mut buffer = MutHandle::from(bind_info.buffer).unwrap();
4985 let device_memory = SharedHandle::from(bind_info.memory).unwrap();
4986 let device_memory_size = device_memory.size();
4987 assert!(bind_info.memoryOffset < device_memory_size as u64);
4988 let offset = bind_info.memoryOffset as usize;
4989 assert!(buffer.size.checked_add(offset).unwrap() <= device_memory_size);
4990 assert_eq!(offset % BUFFER_ALIGNMENT, 0);
4991 buffer.memory = Some(BufferMemory {
4992 device_memory,
4993 offset,
4994 });
4995 }
4996 api::VK_SUCCESS
4997 }
4998
4999 #[allow(non_snake_case)]
5000 pub unsafe extern "system" fn vkBindImageMemory2(
5001 _device: api::VkDevice,
5002 bind_info_count: u32,
5003 bind_infos: *const api::VkBindImageMemoryInfo,
5004 ) -> api::VkResult {
5005 assert_ne!(bind_info_count, 0);
5006 let bind_infos = util::to_slice(bind_infos, bind_info_count as usize);
5007 for bind_info in bind_infos {
5008 parse_next_chain_const! {
5009 bind_info,
5010 root = api::VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO,
5011 device_group_info: api::VkBindImageMemoryDeviceGroupInfo = api::VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO,
5012 swapchain_info: api::VkBindImageMemorySwapchainInfoKHR = api::VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR,
5013 plane_info: api::VkBindImagePlaneMemoryInfo = api::VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO,
5014 }
5015 if !device_group_info.is_null() {
5016 let device_group_info = &*device_group_info;
5017 if device_group_info.deviceIndexCount == 0 {
5018 } else {
5019 assert_eq!(device_group_info.deviceIndexCount, 1);
5020 assert_eq!(*device_group_info.pDeviceIndices, 0);
5021 }
5022 }
5023 if !swapchain_info.is_null() {
5024 unimplemented!();
5025 }
5026 if !plane_info.is_null() {
5027 unimplemented!();
5028 }
5029 let bind_info = &*bind_info;
5030 let mut image = MutHandle::from(bind_info.image).unwrap();
5031 let device_memory = SharedHandle::from(bind_info.memory).unwrap();
5032 let device_memory_size = device_memory.size();
5033 let image_memory_layout = image.properties.computed_properties().memory_layout;
5034 assert!(bind_info.memoryOffset < device_memory_size as u64);
5035 let offset = bind_info.memoryOffset as usize;
5036 assert!(image_memory_layout.size.checked_add(offset).unwrap() <= device_memory_size);
5037 assert_eq!(offset % image_memory_layout.alignment, 0);
5038 image.memory = Some(ImageMemory {
5039 device_memory,
5040 offset,
5041 });
5042 }
5043 api::VK_SUCCESS
5044 }
5045
5046 #[allow(non_snake_case)]
5047 pub unsafe extern "system" fn vkGetDeviceGroupPeerMemoryFeatures(
5048 _device: api::VkDevice,
5049 _heapIndex: u32,
5050 _localDeviceIndex: u32,
5051 _remoteDeviceIndex: u32,
5052 _pPeerMemoryFeatures: *mut api::VkPeerMemoryFeatureFlags,
5053 ) {
5054 unimplemented!()
5055 }
5056
5057 #[allow(non_snake_case)]
5058 pub unsafe extern "system" fn vkCmdSetDeviceMask(
5059 _commandBuffer: api::VkCommandBuffer,
5060 _deviceMask: u32,
5061 ) {
5062 unimplemented!()
5063 }
5064
5065 #[allow(non_snake_case)]
5066 pub unsafe extern "system" fn vkCmdDispatchBase(
5067 _commandBuffer: api::VkCommandBuffer,
5068 _baseGroupX: u32,
5069 _baseGroupY: u32,
5070 _baseGroupZ: u32,
5071 _groupCountX: u32,
5072 _groupCountY: u32,
5073 _groupCountZ: u32,
5074 ) {
5075 unimplemented!()
5076 }
5077
5078 #[allow(non_snake_case)]
5079 pub unsafe extern "system" fn vkEnumeratePhysicalDeviceGroups(
5080 instance: api::VkInstance,
5081 physical_device_group_count: *mut u32,
5082 physical_device_group_properties: *mut api::VkPhysicalDeviceGroupProperties,
5083 ) -> api::VkResult {
5084 enumerate_helper(
5085 physical_device_group_count,
5086 physical_device_group_properties,
5087 iter::once(()),
5088 |physical_device_group_properties, _| {
5089 parse_next_chain_mut! {
5090 physical_device_group_properties,
5091 root = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES,
5092 }
5093 let mut physical_devices = [Handle::null(); api::VK_MAX_DEVICE_GROUP_SIZE as usize];
5094 physical_devices[0] = SharedHandle::from(instance)
5095 .unwrap()
5096 .physical_device
5097 .get_handle();
5098 *physical_device_group_properties = api::VkPhysicalDeviceGroupProperties {
5099 sType: physical_device_group_properties.sType,
5100 pNext: physical_device_group_properties.pNext,
5101 physicalDeviceCount: 1,
5102 physicalDevices: physical_devices,
5103 subsetAllocation: api::VK_TRUE,
5104 };
5105 },
5106 )
5107 }
5108
5109 #[allow(non_snake_case)]
5110 pub unsafe extern "system" fn vkGetImageMemoryRequirements2(
5111 _device: api::VkDevice,
5112 info: *const api::VkImageMemoryRequirementsInfo2,
5113 memory_requirements: *mut api::VkMemoryRequirements2,
5114 ) {
5115 #![cfg_attr(feature = "cargo-clippy", allow(clippy::needless_update))]
5116 parse_next_chain_const! {
5117 info,
5118 root = api::VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2,
5119 image_plane_memory_requirements_info: api::VkImagePlaneMemoryRequirementsInfo = api::VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO,
5120 }
5121 parse_next_chain_mut! {
5122 memory_requirements,
5123 root = api::VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
5124 dedicated_requirements: api::VkMemoryDedicatedRequirements = api::VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS,
5125 }
5126 if !image_plane_memory_requirements_info.is_null() {
5127 unimplemented!();
5128 }
5129 let info = &*info;
5130 let image = SharedHandle::from(info.image).unwrap();
5131 let memory_requirements = &mut *memory_requirements;
5132 let layout = image.properties.computed_properties().memory_layout;
5133 memory_requirements.memoryRequirements = api::VkMemoryRequirements {
5134 size: layout.size as u64,
5135 alignment: layout.alignment as u64,
5136 memoryTypeBits: DeviceMemoryType::Main.to_bits(),
5137 ..mem::zeroed() // for padding fields
5138 };
5139 if !dedicated_requirements.is_null() {
5140 let dedicated_requirements = &mut *dedicated_requirements;
5141 dedicated_requirements.prefersDedicatedAllocation = api::VK_FALSE;
5142 dedicated_requirements.requiresDedicatedAllocation = api::VK_FALSE;
5143 }
5144 }
5145
5146 #[allow(non_snake_case)]
5147 pub unsafe extern "system" fn vkGetBufferMemoryRequirements2(
5148 _device: api::VkDevice,
5149 info: *const api::VkBufferMemoryRequirementsInfo2,
5150 memory_requirements: *mut api::VkMemoryRequirements2,
5151 ) {
5152 #![cfg_attr(feature = "cargo-clippy", allow(clippy::needless_update))]
5153 parse_next_chain_const! {
5154 info,
5155 root = api::VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2,
5156 }
5157 parse_next_chain_mut! {
5158 memory_requirements,
5159 root = api::VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2,
5160 dedicated_requirements: api::VkMemoryDedicatedRequirements = api::VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS,
5161 }
5162 let memory_requirements = &mut *memory_requirements;
5163 let info = &*info;
5164 let buffer = SharedHandle::from(info.buffer).unwrap();
5165 let layout = DeviceMemoryLayout::calculate(buffer.size, BUFFER_ALIGNMENT);
5166 memory_requirements.memoryRequirements = api::VkMemoryRequirements {
5167 size: layout.size as u64,
5168 alignment: layout.alignment as u64,
5169 memoryTypeBits: DeviceMemoryType::Main.to_bits(),
5170 ..mem::zeroed() // for padding fields
5171 };
5172 if !dedicated_requirements.is_null() {
5173 let dedicated_requirements = &mut *dedicated_requirements;
5174 dedicated_requirements.prefersDedicatedAllocation = api::VK_FALSE;
5175 dedicated_requirements.requiresDedicatedAllocation = api::VK_FALSE;
5176 }
5177 }
5178
5179 #[allow(non_snake_case)]
5180 pub unsafe extern "system" fn vkGetImageSparseMemoryRequirements2(
5181 _device: api::VkDevice,
5182 _pInfo: *const api::VkImageSparseMemoryRequirementsInfo2,
5183 _pSparseMemoryRequirementCount: *mut u32,
5184 _pSparseMemoryRequirements: *mut api::VkSparseImageMemoryRequirements2,
5185 ) {
5186 unimplemented!()
5187 }
5188
5189 #[allow(non_snake_case)]
5190 pub unsafe extern "system" fn vkGetPhysicalDeviceFeatures2(
5191 physical_device: api::VkPhysicalDevice,
5192 features: *mut api::VkPhysicalDeviceFeatures2,
5193 ) {
5194 parse_next_chain_mut! {
5195 features,
5196 root = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2,
5197 sampler_ycbcr_conversion_features: api::VkPhysicalDeviceSamplerYcbcrConversionFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES,
5198 physical_device_16bit_storage_features: api::VkPhysicalDevice16BitStorageFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES,
5199 variable_pointer_features: api::VkPhysicalDeviceVariablePointerFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES,
5200 physical_device_shader_draw_parameter_features: api::VkPhysicalDeviceShaderDrawParameterFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES,
5201 physical_device_protected_memory_features: api::VkPhysicalDeviceProtectedMemoryFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES,
5202 physical_device_multiview_features: api::VkPhysicalDeviceMultiviewFeatures = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
5203 }
5204 let physical_device = SharedHandle::from(physical_device).unwrap();
5205 physical_device.features.export_feature_set(&mut *features);
5206 if !sampler_ycbcr_conversion_features.is_null() {
5207 physical_device
5208 .features
5209 .export_feature_set(&mut *sampler_ycbcr_conversion_features);
5210 }
5211 if !physical_device_16bit_storage_features.is_null() {
5212 physical_device
5213 .features
5214 .export_feature_set(&mut *physical_device_16bit_storage_features);
5215 }
5216 if !variable_pointer_features.is_null() {
5217 physical_device
5218 .features
5219 .export_feature_set(&mut *variable_pointer_features);
5220 }
5221 if !physical_device_shader_draw_parameter_features.is_null() {
5222 physical_device
5223 .features
5224 .export_feature_set(&mut *physical_device_shader_draw_parameter_features);
5225 }
5226 if !physical_device_protected_memory_features.is_null() {
5227 physical_device
5228 .features
5229 .export_feature_set(&mut *physical_device_protected_memory_features);
5230 }
5231 if !physical_device_multiview_features.is_null() {
5232 physical_device
5233 .features
5234 .export_feature_set(&mut *physical_device_multiview_features);
5235 }
5236 }
5237
5238 #[allow(non_snake_case)]
5239 pub unsafe extern "system" fn vkGetPhysicalDeviceProperties2(
5240 physical_device: api::VkPhysicalDevice,
5241 properties: *mut api::VkPhysicalDeviceProperties2,
5242 ) {
5243 parse_next_chain_mut! {
5244 properties,
5245 root = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2,
5246 point_clipping_properties: api::VkPhysicalDevicePointClippingProperties = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES,
5247 multiview_properties: api::VkPhysicalDeviceMultiviewProperties = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES,
5248 id_properties: api::VkPhysicalDeviceIDProperties = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES,
5249 maintenance_3_properties: api::VkPhysicalDeviceMaintenance3Properties = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES,
5250 protected_memory_properties: api::VkPhysicalDeviceProtectedMemoryProperties = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES,
5251 subgroup_properties: api::VkPhysicalDeviceSubgroupProperties = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES,
5252 }
5253 let properties = &mut *properties;
5254 let physical_device = SharedHandle::from(physical_device).unwrap();
5255 properties.properties = physical_device.properties;
5256 if !point_clipping_properties.is_null() {
5257 let point_clipping_properties = &mut *point_clipping_properties;
5258 *point_clipping_properties = api::VkPhysicalDevicePointClippingProperties {
5259 sType: point_clipping_properties.sType,
5260 pNext: point_clipping_properties.pNext,
5261 ..physical_device.point_clipping_properties
5262 };
5263 }
5264 if !multiview_properties.is_null() {
5265 let multiview_properties = &mut *multiview_properties;
5266 *multiview_properties = api::VkPhysicalDeviceMultiviewProperties {
5267 sType: multiview_properties.sType,
5268 pNext: multiview_properties.pNext,
5269 ..physical_device.multiview_properties
5270 };
5271 }
5272 if !id_properties.is_null() {
5273 let id_properties = &mut *id_properties;
5274 *id_properties = api::VkPhysicalDeviceIDProperties {
5275 sType: id_properties.sType,
5276 pNext: id_properties.pNext,
5277 ..physical_device.id_properties
5278 };
5279 }
5280 if !maintenance_3_properties.is_null() {
5281 let maintenance_3_properties = &mut *maintenance_3_properties;
5282 *maintenance_3_properties = api::VkPhysicalDeviceMaintenance3Properties {
5283 sType: maintenance_3_properties.sType,
5284 pNext: maintenance_3_properties.pNext,
5285 ..physical_device.maintenance_3_properties
5286 };
5287 }
5288 if !protected_memory_properties.is_null() {
5289 let protected_memory_properties = &mut *protected_memory_properties;
5290 *protected_memory_properties = api::VkPhysicalDeviceProtectedMemoryProperties {
5291 sType: protected_memory_properties.sType,
5292 pNext: protected_memory_properties.pNext,
5293 ..physical_device.protected_memory_properties
5294 };
5295 }
5296 if !subgroup_properties.is_null() {
5297 let subgroup_properties = &mut *subgroup_properties;
5298 *subgroup_properties = api::VkPhysicalDeviceSubgroupProperties {
5299 sType: subgroup_properties.sType,
5300 pNext: subgroup_properties.pNext,
5301 ..physical_device.subgroup_properties
5302 };
5303 }
5304 }
5305
5306 #[allow(non_snake_case)]
5307 pub unsafe extern "system" fn vkGetPhysicalDeviceFormatProperties2(
5308 _physical_device: api::VkPhysicalDevice,
5309 format: api::VkFormat,
5310 format_properties: *mut api::VkFormatProperties2,
5311 ) {
5312 parse_next_chain_mut! {
5313 format_properties,
5314 root = api::VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2,
5315 }
5316 let format_properties = &mut *format_properties;
5317 format_properties.formatProperties = PhysicalDevice::get_format_properties(format);
5318 }
5319
5320 #[allow(non_snake_case)]
5321 pub unsafe extern "system" fn vkGetPhysicalDeviceImageFormatProperties2(
5322 _physicalDevice: api::VkPhysicalDevice,
5323 _pImageFormatInfo: *const api::VkPhysicalDeviceImageFormatInfo2,
5324 _pImageFormatProperties: *mut api::VkImageFormatProperties2,
5325 ) -> api::VkResult {
5326 unimplemented!()
5327 }
5328
5329 #[allow(non_snake_case)]
5330 pub unsafe extern "system" fn vkGetPhysicalDeviceQueueFamilyProperties2(
5331 physical_device: api::VkPhysicalDevice,
5332 queue_family_property_count: *mut u32,
5333 queue_family_properties: *mut api::VkQueueFamilyProperties2,
5334 ) {
5335 enumerate_helper(
5336 queue_family_property_count,
5337 queue_family_properties,
5338 QUEUE_COUNTS.iter(),
5339 |queue_family_properties, &count| {
5340 get_physical_device_queue_family_properties(
5341 SharedHandle::from(physical_device).unwrap(),
5342 queue_family_properties,
5343 count,
5344 );
5345 },
5346 );
5347 }
5348
5349 #[allow(non_snake_case)]
5350 pub unsafe extern "system" fn vkGetPhysicalDeviceMemoryProperties2(
5351 physical_device: api::VkPhysicalDevice,
5352 memory_properties: *mut api::VkPhysicalDeviceMemoryProperties2,
5353 ) {
5354 #![cfg_attr(feature = "cargo-clippy", allow(clippy::needless_update))]
5355 let physical_device = SharedHandle::from(physical_device).unwrap();
5356 parse_next_chain_mut! {
5357 memory_properties,
5358 root = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2,
5359 }
5360 let memory_properties = &mut *memory_properties;
5361 let mut properties: api::VkPhysicalDeviceMemoryProperties = mem::zeroed();
5362 properties.memoryTypeCount = DeviceMemoryTypes::default().len() as u32;
5363 for (memory_type, _) in DeviceMemoryTypes::default().iter() {
5364 properties.memoryTypes[memory_type as usize] = api::VkMemoryType {
5365 propertyFlags: memory_type.flags(),
5366 heapIndex: memory_type.heap() as u32,
5367 };
5368 }
5369 properties.memoryHeapCount = DeviceMemoryHeaps::default().len() as u32;
5370 for (memory_heap, _) in DeviceMemoryHeaps::default().iter() {
5371 properties.memoryHeaps[memory_heap as usize] = api::VkMemoryHeap {
5372 size: match memory_heap {
5373 DeviceMemoryHeap::Main => physical_device.system_memory_size * 7 / 8,
5374 },
5375 flags: memory_heap.flags(),
5376 ..mem::zeroed() // for padding fields
5377 }
5378 }
5379 memory_properties.memoryProperties = properties;
5380 }
5381
5382 #[allow(non_snake_case)]
5383 pub unsafe extern "system" fn vkGetPhysicalDeviceSparseImageFormatProperties2(
5384 _physicalDevice: api::VkPhysicalDevice,
5385 _pFormatInfo: *const api::VkPhysicalDeviceSparseImageFormatInfo2,
5386 _pPropertyCount: *mut u32,
5387 _pProperties: *mut api::VkSparseImageFormatProperties2,
5388 ) {
5389 unimplemented!()
5390 }
5391
5392 #[allow(non_snake_case)]
5393 pub unsafe extern "system" fn vkTrimCommandPool(
5394 _device: api::VkDevice,
5395 _commandPool: api::VkCommandPool,
5396 _flags: api::VkCommandPoolTrimFlags,
5397 ) {
5398 unimplemented!()
5399 }
5400
5401 #[allow(non_snake_case)]
5402 pub unsafe extern "system" fn vkGetDeviceQueue2(
5403 device: api::VkDevice,
5404 queue_info: *const api::VkDeviceQueueInfo2,
5405 queue: *mut api::VkQueue,
5406 ) {
5407 parse_next_chain_const! {
5408 queue_info,
5409 root = api::VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2,
5410 }
5411 let queue_info = &*queue_info;
5412 assert_eq!(queue_info.flags, 0);
5413 let device = SharedHandle::from(device).unwrap();
5414 *queue = device.queues[queue_info.queueFamilyIndex as usize][queue_info.queueIndex as usize]
5415 .get_handle();
5416 }
5417
5418 #[allow(non_snake_case)]
5419 pub unsafe extern "system" fn vkCreateSamplerYcbcrConversion(
5420 _device: api::VkDevice,
5421 _pCreateInfo: *const api::VkSamplerYcbcrConversionCreateInfo,
5422 _pAllocator: *const api::VkAllocationCallbacks,
5423 _pYcbcrConversion: *mut api::VkSamplerYcbcrConversion,
5424 ) -> api::VkResult {
5425 unimplemented!()
5426 }
5427
5428 #[allow(non_snake_case)]
5429 pub unsafe extern "system" fn vkDestroySamplerYcbcrConversion(
5430 _device: api::VkDevice,
5431 _ycbcrConversion: api::VkSamplerYcbcrConversion,
5432 _pAllocator: *const api::VkAllocationCallbacks,
5433 ) {
5434 unimplemented!()
5435 }
5436
5437 #[allow(non_snake_case)]
5438 pub unsafe extern "system" fn vkCreateDescriptorUpdateTemplate(
5439 _device: api::VkDevice,
5440 _pCreateInfo: *const api::VkDescriptorUpdateTemplateCreateInfo,
5441 _pAllocator: *const api::VkAllocationCallbacks,
5442 _pDescriptorUpdateTemplate: *mut api::VkDescriptorUpdateTemplate,
5443 ) -> api::VkResult {
5444 unimplemented!()
5445 }
5446
5447 #[allow(non_snake_case)]
5448 pub unsafe extern "system" fn vkDestroyDescriptorUpdateTemplate(
5449 _device: api::VkDevice,
5450 _descriptorUpdateTemplate: api::VkDescriptorUpdateTemplate,
5451 _pAllocator: *const api::VkAllocationCallbacks,
5452 ) {
5453 unimplemented!()
5454 }
5455
5456 #[allow(non_snake_case)]
5457 pub unsafe extern "system" fn vkUpdateDescriptorSetWithTemplate(
5458 _device: api::VkDevice,
5459 _descriptorSet: api::VkDescriptorSet,
5460 _descriptorUpdateTemplate: api::VkDescriptorUpdateTemplate,
5461 _pData: *const c_void,
5462 ) {
5463 unimplemented!()
5464 }
5465
5466 #[allow(non_snake_case)]
5467 pub unsafe extern "system" fn vkGetPhysicalDeviceExternalBufferProperties(
5468 _physicalDevice: api::VkPhysicalDevice,
5469 _pExternalBufferInfo: *const api::VkPhysicalDeviceExternalBufferInfo,
5470 _pExternalBufferProperties: *mut api::VkExternalBufferProperties,
5471 ) {
5472 unimplemented!()
5473 }
5474
5475 #[allow(non_snake_case)]
5476 pub unsafe extern "system" fn vkGetPhysicalDeviceExternalFenceProperties(
5477 _physicalDevice: api::VkPhysicalDevice,
5478 _pExternalFenceInfo: *const api::VkPhysicalDeviceExternalFenceInfo,
5479 _pExternalFenceProperties: *mut api::VkExternalFenceProperties,
5480 ) {
5481 unimplemented!()
5482 }
5483
5484 #[allow(non_snake_case)]
5485 pub unsafe extern "system" fn vkGetPhysicalDeviceExternalSemaphoreProperties(
5486 _physicalDevice: api::VkPhysicalDevice,
5487 _pExternalSemaphoreInfo: *const api::VkPhysicalDeviceExternalSemaphoreInfo,
5488 _pExternalSemaphoreProperties: *mut api::VkExternalSemaphoreProperties,
5489 ) {
5490 unimplemented!()
5491 }
5492
5493 #[allow(non_snake_case)]
5494 pub unsafe extern "system" fn vkGetDescriptorSetLayoutSupport(
5495 _device: api::VkDevice,
5496 _pCreateInfo: *const api::VkDescriptorSetLayoutCreateInfo,
5497 _pSupport: *mut api::VkDescriptorSetLayoutSupport,
5498 ) {
5499 unimplemented!()
5500 }
5501
5502 #[allow(non_snake_case)]
5503 pub unsafe extern "system" fn vkDestroySurfaceKHR(
5504 _instance: api::VkInstance,
5505 surface: api::VkSurfaceKHR,
5506 _allocator: *const api::VkAllocationCallbacks,
5507 ) {
5508 if let Some(surface) = SharedHandle::from(surface) {
5509 let surface_implementation = SurfacePlatform::from(surface.platform)
5510 .unwrap()
5511 .get_surface_implementation();
5512 surface_implementation.destroy_surface(surface.into_nonnull());
5513 }
5514 }
5515
5516 #[allow(non_snake_case)]
5517 pub unsafe extern "system" fn vkGetPhysicalDeviceSurfaceSupportKHR(
5518 _physicalDevice: api::VkPhysicalDevice,
5519 _queueFamilyIndex: u32,
5520 _surface: api::VkSurfaceKHR,
5521 _pSupported: *mut api::VkBool32,
5522 ) -> api::VkResult {
5523 unimplemented!()
5524 }
5525
5526 #[allow(non_snake_case)]
5527 pub unsafe extern "system" fn vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
5528 physical_device: api::VkPhysicalDevice,
5529 surface: api::VkSurfaceKHR,
5530 surface_capabilities: *mut api::VkSurfaceCapabilitiesKHR,
5531 ) -> api::VkResult {
5532 let mut surface_capabilities_2 = api::VkSurfaceCapabilities2KHR {
5533 sType: api::VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR,
5534 pNext: null_mut(),
5535 surfaceCapabilities: mem::zeroed(),
5536 };
5537 match vkGetPhysicalDeviceSurfaceCapabilities2KHR(
5538 physical_device,
5539 &api::VkPhysicalDeviceSurfaceInfo2KHR {
5540 sType: api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR,
5541 pNext: null(),
5542 surface: surface,
5543 },
5544 &mut surface_capabilities_2,
5545 ) {
5546 api::VK_SUCCESS => {
5547 *surface_capabilities = surface_capabilities_2.surfaceCapabilities;
5548 api::VK_SUCCESS
5549 }
5550 error => error,
5551 }
5552 }
5553
5554 #[allow(non_snake_case)]
5555 pub unsafe extern "system" fn vkGetPhysicalDeviceSurfaceFormatsKHR(
5556 _physical_device: api::VkPhysicalDevice,
5557 surface: api::VkSurfaceKHR,
5558 surface_format_count: *mut u32,
5559 surface_formats: *mut api::VkSurfaceFormatKHR,
5560 ) -> api::VkResult {
5561 let surface_implementation =
5562 SurfacePlatform::from(SharedHandle::from(surface).unwrap().platform)
5563 .unwrap()
5564 .get_surface_implementation();
5565 let returned_surface_formats = match surface_implementation.get_surface_formats(surface) {
5566 Ok(returned_surface_formats) => returned_surface_formats,
5567 Err(result) => return result,
5568 };
5569 enumerate_helper(
5570 surface_format_count,
5571 surface_formats,
5572 returned_surface_formats.iter(),
5573 |a, b| *a = *b,
5574 )
5575 }
5576
5577 #[allow(non_snake_case)]
5578 pub unsafe extern "system" fn vkGetPhysicalDeviceSurfacePresentModesKHR(
5579 _physical_device: api::VkPhysicalDevice,
5580 surface: api::VkSurfaceKHR,
5581 present_mode_count: *mut u32,
5582 present_modes: *mut api::VkPresentModeKHR,
5583 ) -> api::VkResult {
5584 let surface_implementation =
5585 SurfacePlatform::from(SharedHandle::from(surface).unwrap().platform)
5586 .unwrap()
5587 .get_surface_implementation();
5588 let returned_present_modes = match surface_implementation.get_present_modes(surface) {
5589 Ok(returned_present_modes) => returned_present_modes,
5590 Err(result) => return result,
5591 };
5592 enumerate_helper(
5593 present_mode_count,
5594 present_modes,
5595 returned_present_modes.iter(),
5596 |a, b| *a = *b,
5597 )
5598 }
5599
5600 #[allow(non_snake_case)]
5601 pub unsafe extern "system" fn vkCreateSwapchainKHR(
5602 _device: api::VkDevice,
5603 create_info: *const api::VkSwapchainCreateInfoKHR,
5604 _allocator: *const api::VkAllocationCallbacks,
5605 swapchain: *mut api::VkSwapchainKHR,
5606 ) -> api::VkResult {
5607 parse_next_chain_const! {
5608 create_info,
5609 root = api::VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
5610 device_group_swapchain_create_info: api::VkDeviceGroupSwapchainCreateInfoKHR = api::VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR,
5611 }
5612 let create_info = &*create_info;
5613 let device_group_swapchain_create_info = if device_group_swapchain_create_info.is_null() {
5614 None
5615 } else {
5616 Some(&*device_group_swapchain_create_info)
5617 };
5618 *swapchain = Handle::null();
5619 let platform =
5620 SurfacePlatform::from(SharedHandle::from(create_info.surface).unwrap().platform).unwrap();
5621 match platform
5622 .get_surface_implementation()
5623 .build(create_info, device_group_swapchain_create_info)
5624 {
5625 Ok(new_swapchain) => {
5626 *swapchain = OwnedHandle::<api::VkSwapchainKHR>::new(new_swapchain).take();
5627 api::VK_SUCCESS
5628 }
5629 Err(error) => error,
5630 }
5631 }
5632
5633 #[allow(non_snake_case)]
5634 pub unsafe extern "system" fn vkDestroySwapchainKHR(
5635 _device: api::VkDevice,
5636 swapchain: api::VkSwapchainKHR,
5637 _allocator: *const api::VkAllocationCallbacks,
5638 ) {
5639 OwnedHandle::from(swapchain);
5640 }
5641
5642 #[allow(non_snake_case)]
5643 pub unsafe extern "system" fn vkGetSwapchainImagesKHR(
5644 _device: api::VkDevice,
5645 _swapchain: api::VkSwapchainKHR,
5646 _pSwapchainImageCount: *mut u32,
5647 _pSwapchainImages: *mut api::VkImage,
5648 ) -> api::VkResult {
5649 unimplemented!()
5650 }
5651
5652 #[allow(non_snake_case)]
5653 pub unsafe extern "system" fn vkAcquireNextImageKHR(
5654 _device: api::VkDevice,
5655 _swapchain: api::VkSwapchainKHR,
5656 _timeout: u64,
5657 _semaphore: api::VkSemaphore,
5658 _fence: api::VkFence,
5659 _pImageIndex: *mut u32,
5660 ) -> api::VkResult {
5661 unimplemented!()
5662 }
5663
5664 #[allow(non_snake_case)]
5665 pub unsafe extern "system" fn vkQueuePresentKHR(
5666 _queue: api::VkQueue,
5667 _pPresentInfo: *const api::VkPresentInfoKHR,
5668 ) -> api::VkResult {
5669 unimplemented!()
5670 }
5671
5672 #[allow(non_snake_case)]
5673 pub unsafe extern "system" fn vkGetDeviceGroupPresentCapabilitiesKHR(
5674 _device: api::VkDevice,
5675 _pDeviceGroupPresentCapabilities: *mut api::VkDeviceGroupPresentCapabilitiesKHR,
5676 ) -> api::VkResult {
5677 unimplemented!()
5678 }
5679
5680 #[allow(non_snake_case)]
5681 pub unsafe extern "system" fn vkGetDeviceGroupSurfacePresentModesKHR(
5682 _device: api::VkDevice,
5683 _surface: api::VkSurfaceKHR,
5684 _pModes: *mut api::VkDeviceGroupPresentModeFlagsKHR,
5685 ) -> api::VkResult {
5686 unimplemented!()
5687 }
5688
5689 #[allow(non_snake_case)]
5690 pub unsafe extern "system" fn vkGetPhysicalDevicePresentRectanglesKHR(
5691 _physicalDevice: api::VkPhysicalDevice,
5692 _surface: api::VkSurfaceKHR,
5693 _pRectCount: *mut u32,
5694 _pRects: *mut api::VkRect2D,
5695 ) -> api::VkResult {
5696 unimplemented!()
5697 }
5698
5699 #[allow(non_snake_case)]
5700 pub unsafe extern "system" fn vkAcquireNextImage2KHR(
5701 _device: api::VkDevice,
5702 _pAcquireInfo: *const api::VkAcquireNextImageInfoKHR,
5703 _pImageIndex: *mut u32,
5704 ) -> api::VkResult {
5705 unimplemented!()
5706 }
5707
5708 #[allow(non_snake_case)]
5709 #[cfg(kazan_include_unused_vulkan_api)]
5710 pub unsafe extern "system" fn vkGetPhysicalDeviceDisplayPropertiesKHR(
5711 _physicalDevice: api::VkPhysicalDevice,
5712 _pPropertyCount: *mut u32,
5713 _pProperties: *mut api::VkDisplayPropertiesKHR,
5714 ) -> api::VkResult {
5715 unimplemented!()
5716 }
5717
5718 #[allow(non_snake_case)]
5719 #[cfg(kazan_include_unused_vulkan_api)]
5720 pub unsafe extern "system" fn vkGetPhysicalDeviceDisplayPlanePropertiesKHR(
5721 _physicalDevice: api::VkPhysicalDevice,
5722 _pPropertyCount: *mut u32,
5723 _pProperties: *mut api::VkDisplayPlanePropertiesKHR,
5724 ) -> api::VkResult {
5725 unimplemented!()
5726 }
5727
5728 #[allow(non_snake_case)]
5729 #[cfg(kazan_include_unused_vulkan_api)]
5730 pub unsafe extern "system" fn vkGetDisplayPlaneSupportedDisplaysKHR(
5731 _physicalDevice: api::VkPhysicalDevice,
5732 _planeIndex: u32,
5733 _pDisplayCount: *mut u32,
5734 _pDisplays: *mut api::VkDisplayKHR,
5735 ) -> api::VkResult {
5736 unimplemented!()
5737 }
5738
5739 #[allow(non_snake_case)]
5740 #[cfg(kazan_include_unused_vulkan_api)]
5741 pub unsafe extern "system" fn vkGetDisplayModePropertiesKHR(
5742 _physicalDevice: api::VkPhysicalDevice,
5743 _display: api::VkDisplayKHR,
5744 _pPropertyCount: *mut u32,
5745 _pProperties: *mut api::VkDisplayModePropertiesKHR,
5746 ) -> api::VkResult {
5747 unimplemented!()
5748 }
5749
5750 #[allow(non_snake_case)]
5751 #[cfg(kazan_include_unused_vulkan_api)]
5752 pub unsafe extern "system" fn vkCreateDisplayModeKHR(
5753 _physicalDevice: api::VkPhysicalDevice,
5754 _display: api::VkDisplayKHR,
5755 _pCreateInfo: *const api::VkDisplayModeCreateInfoKHR,
5756 _pAllocator: *const api::VkAllocationCallbacks,
5757 _pMode: *mut api::VkDisplayModeKHR,
5758 ) -> api::VkResult {
5759 unimplemented!()
5760 }
5761
5762 #[allow(non_snake_case)]
5763 #[cfg(kazan_include_unused_vulkan_api)]
5764 pub unsafe extern "system" fn vkGetDisplayPlaneCapabilitiesKHR(
5765 _physicalDevice: api::VkPhysicalDevice,
5766 _mode: api::VkDisplayModeKHR,
5767 _planeIndex: u32,
5768 _pCapabilities: *mut api::VkDisplayPlaneCapabilitiesKHR,
5769 ) -> api::VkResult {
5770 unimplemented!()
5771 }
5772
5773 #[allow(non_snake_case)]
5774 #[cfg(kazan_include_unused_vulkan_api)]
5775 pub unsafe extern "system" fn vkCreateDisplayPlaneSurfaceKHR(
5776 _instance: api::VkInstance,
5777 _pCreateInfo: *const api::VkDisplaySurfaceCreateInfoKHR,
5778 _pAllocator: *const api::VkAllocationCallbacks,
5779 _pSurface: *mut api::VkSurfaceKHR,
5780 ) -> api::VkResult {
5781 unimplemented!()
5782 }
5783
5784 #[allow(non_snake_case)]
5785 #[cfg(kazan_include_unused_vulkan_api)]
5786 pub unsafe extern "system" fn vkCreateSharedSwapchainsKHR(
5787 _device: api::VkDevice,
5788 _swapchainCount: u32,
5789 _pCreateInfos: *const api::VkSwapchainCreateInfoKHR,
5790 _pAllocator: *const api::VkAllocationCallbacks,
5791 _pSwapchains: *mut api::VkSwapchainKHR,
5792 ) -> api::VkResult {
5793 unimplemented!()
5794 }
5795
5796 #[allow(non_snake_case)]
5797 #[cfg(kazan_include_unused_vulkan_api)]
5798 pub unsafe extern "system" fn vkGetMemoryFdKHR(
5799 _device: api::VkDevice,
5800 _pGetFdInfo: *const api::VkMemoryGetFdInfoKHR,
5801 _pFd: *mut c_int,
5802 ) -> api::VkResult {
5803 unimplemented!()
5804 }
5805
5806 #[allow(non_snake_case)]
5807 #[cfg(kazan_include_unused_vulkan_api)]
5808 pub unsafe extern "system" fn vkGetMemoryFdPropertiesKHR(
5809 _device: api::VkDevice,
5810 _handleType: api::VkExternalMemoryHandleTypeFlagBits,
5811 _fd: c_int,
5812 _pMemoryFdProperties: *mut api::VkMemoryFdPropertiesKHR,
5813 ) -> api::VkResult {
5814 unimplemented!()
5815 }
5816
5817 #[allow(non_snake_case)]
5818 #[cfg(kazan_include_unused_vulkan_api)]
5819 pub unsafe extern "system" fn vkImportSemaphoreFdKHR(
5820 _device: api::VkDevice,
5821 _pImportSemaphoreFdInfo: *const api::VkImportSemaphoreFdInfoKHR,
5822 ) -> api::VkResult {
5823 unimplemented!()
5824 }
5825
5826 #[allow(non_snake_case)]
5827 #[cfg(kazan_include_unused_vulkan_api)]
5828 pub unsafe extern "system" fn vkGetSemaphoreFdKHR(
5829 _device: api::VkDevice,
5830 _pGetFdInfo: *const api::VkSemaphoreGetFdInfoKHR,
5831 _pFd: *mut c_int,
5832 ) -> api::VkResult {
5833 unimplemented!()
5834 }
5835
5836 #[allow(non_snake_case)]
5837 #[cfg(kazan_include_unused_vulkan_api)]
5838 pub unsafe extern "system" fn vkCmdPushDescriptorSetKHR(
5839 _commandBuffer: api::VkCommandBuffer,
5840 _pipelineBindPoint: api::VkPipelineBindPoint,
5841 _layout: api::VkPipelineLayout,
5842 _set: u32,
5843 _descriptorWriteCount: u32,
5844 _pDescriptorWrites: *const api::VkWriteDescriptorSet,
5845 ) {
5846 unimplemented!()
5847 }
5848
5849 #[allow(non_snake_case)]
5850 #[cfg(kazan_include_unused_vulkan_api)]
5851 pub unsafe extern "system" fn vkCmdPushDescriptorSetWithTemplateKHR(
5852 _commandBuffer: api::VkCommandBuffer,
5853 _descriptorUpdateTemplate: api::VkDescriptorUpdateTemplate,
5854 _layout: api::VkPipelineLayout,
5855 _set: u32,
5856 _pData: *const c_void,
5857 ) {
5858 unimplemented!()
5859 }
5860
5861 #[allow(non_snake_case)]
5862 #[cfg(kazan_include_unused_vulkan_api)]
5863 pub unsafe extern "system" fn vkCreateRenderPass2KHR(
5864 _device: api::VkDevice,
5865 _pCreateInfo: *const api::VkRenderPassCreateInfo2KHR,
5866 _pAllocator: *const api::VkAllocationCallbacks,
5867 _pRenderPass: *mut api::VkRenderPass,
5868 ) -> api::VkResult {
5869 unimplemented!()
5870 }
5871
5872 #[allow(non_snake_case)]
5873 #[cfg(kazan_include_unused_vulkan_api)]
5874 pub unsafe extern "system" fn vkCmdBeginRenderPass2KHR(
5875 _commandBuffer: api::VkCommandBuffer,
5876 _pRenderPassBegin: *const api::VkRenderPassBeginInfo,
5877 _pSubpassBeginInfo: *const api::VkSubpassBeginInfoKHR,
5878 ) {
5879 unimplemented!()
5880 }
5881
5882 #[allow(non_snake_case)]
5883 #[cfg(kazan_include_unused_vulkan_api)]
5884 pub unsafe extern "system" fn vkCmdNextSubpass2KHR(
5885 _commandBuffer: api::VkCommandBuffer,
5886 _pSubpassBeginInfo: *const api::VkSubpassBeginInfoKHR,
5887 _pSubpassEndInfo: *const api::VkSubpassEndInfoKHR,
5888 ) {
5889 unimplemented!()
5890 }
5891
5892 #[allow(non_snake_case)]
5893 #[cfg(kazan_include_unused_vulkan_api)]
5894 pub unsafe extern "system" fn vkCmdEndRenderPass2KHR(
5895 _commandBuffer: api::VkCommandBuffer,
5896 _pSubpassEndInfo: *const api::VkSubpassEndInfoKHR,
5897 ) {
5898 unimplemented!()
5899 }
5900
5901 #[allow(non_snake_case)]
5902 #[cfg(kazan_include_unused_vulkan_api)]
5903 pub unsafe extern "system" fn vkGetSwapchainStatusKHR(
5904 _device: api::VkDevice,
5905 _swapchain: api::VkSwapchainKHR,
5906 ) -> api::VkResult {
5907 unimplemented!()
5908 }
5909
5910 #[allow(non_snake_case)]
5911 #[cfg(kazan_include_unused_vulkan_api)]
5912 pub unsafe extern "system" fn vkImportFenceFdKHR(
5913 _device: api::VkDevice,
5914 _pImportFenceFdInfo: *const api::VkImportFenceFdInfoKHR,
5915 ) -> api::VkResult {
5916 unimplemented!()
5917 }
5918
5919 #[allow(non_snake_case)]
5920 #[cfg(kazan_include_unused_vulkan_api)]
5921 pub unsafe extern "system" fn vkGetFenceFdKHR(
5922 _device: api::VkDevice,
5923 _pGetFdInfo: *const api::VkFenceGetFdInfoKHR,
5924 _pFd: *mut c_int,
5925 ) -> api::VkResult {
5926 unimplemented!()
5927 }
5928
5929 #[allow(non_snake_case)]
5930 pub unsafe extern "system" fn vkGetPhysicalDeviceSurfaceCapabilities2KHR(
5931 _physical_device: api::VkPhysicalDevice,
5932 surface_info: *const api::VkPhysicalDeviceSurfaceInfo2KHR,
5933 surface_capabilities: *mut api::VkSurfaceCapabilities2KHR,
5934 ) -> api::VkResult {
5935 parse_next_chain_const! {
5936 surface_info,
5937 root = api::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR,
5938 }
5939 let surface_info = &*surface_info;
5940 parse_next_chain_mut! {
5941 surface_capabilities,
5942 root = api::VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR,
5943 }
5944 let surface_capabilities = &mut *surface_capabilities;
5945 let surface_implementation =
5946 SurfacePlatform::from(SharedHandle::from(surface_info.surface).unwrap().platform)
5947 .unwrap()
5948 .get_surface_implementation();
5949 match surface_implementation.get_capabilities(surface_info.surface) {
5950 Ok(capabilities) => {
5951 surface_capabilities.surfaceCapabilities = capabilities;
5952 api::VK_SUCCESS
5953 }
5954 Err(result) => result,
5955 }
5956 }
5957
5958 #[allow(non_snake_case)]
5959 #[cfg(kazan_include_unused_vulkan_api)]
5960 pub unsafe extern "system" fn vkGetPhysicalDeviceSurfaceFormats2KHR(
5961 _physicalDevice: api::VkPhysicalDevice,
5962 _pSurfaceInfo: *const api::VkPhysicalDeviceSurfaceInfo2KHR,
5963 _pSurfaceFormatCount: *mut u32,
5964 _pSurfaceFormats: *mut api::VkSurfaceFormat2KHR,
5965 ) -> api::VkResult {
5966 unimplemented!()
5967 }
5968
5969 #[allow(non_snake_case)]
5970 #[cfg(kazan_include_unused_vulkan_api)]
5971 pub unsafe extern "system" fn vkGetPhysicalDeviceDisplayProperties2KHR(
5972 _physicalDevice: api::VkPhysicalDevice,
5973 _pPropertyCount: *mut u32,
5974 _pProperties: *mut api::VkDisplayProperties2KHR,
5975 ) -> api::VkResult {
5976 unimplemented!()
5977 }
5978
5979 #[allow(non_snake_case)]
5980 #[cfg(kazan_include_unused_vulkan_api)]
5981 pub unsafe extern "system" fn vkGetPhysicalDeviceDisplayPlaneProperties2KHR(
5982 _physicalDevice: api::VkPhysicalDevice,
5983 _pPropertyCount: *mut u32,
5984 _pProperties: *mut api::VkDisplayPlaneProperties2KHR,
5985 ) -> api::VkResult {
5986 unimplemented!()
5987 }
5988
5989 #[allow(non_snake_case)]
5990 #[cfg(kazan_include_unused_vulkan_api)]
5991 pub unsafe extern "system" fn vkGetDisplayModeProperties2KHR(
5992 _physicalDevice: api::VkPhysicalDevice,
5993 _display: api::VkDisplayKHR,
5994 _pPropertyCount: *mut u32,
5995 _pProperties: *mut api::VkDisplayModeProperties2KHR,
5996 ) -> api::VkResult {
5997 unimplemented!()
5998 }
5999
6000 #[allow(non_snake_case)]
6001 #[cfg(kazan_include_unused_vulkan_api)]
6002 pub unsafe extern "system" fn vkGetDisplayPlaneCapabilities2KHR(
6003 _physicalDevice: api::VkPhysicalDevice,
6004 _pDisplayPlaneInfo: *const api::VkDisplayPlaneInfo2KHR,
6005 _pCapabilities: *mut api::VkDisplayPlaneCapabilities2KHR,
6006 ) -> api::VkResult {
6007 unimplemented!()
6008 }
6009
6010 #[allow(non_snake_case)]
6011 #[cfg(kazan_include_unused_vulkan_api)]
6012 pub unsafe extern "system" fn vkCmdDrawIndirectCountKHR(
6013 _commandBuffer: api::VkCommandBuffer,
6014 _buffer: api::VkBuffer,
6015 _offset: api::VkDeviceSize,
6016 _countBuffer: api::VkBuffer,
6017 _countBufferOffset: api::VkDeviceSize,
6018 _maxDrawCount: u32,
6019 _stride: u32,
6020 ) {
6021 unimplemented!()
6022 }
6023
6024 #[allow(non_snake_case)]
6025 #[cfg(kazan_include_unused_vulkan_api)]
6026 pub unsafe extern "system" fn vkCmdDrawIndexedIndirectCountKHR(
6027 _commandBuffer: api::VkCommandBuffer,
6028 _buffer: api::VkBuffer,
6029 _offset: api::VkDeviceSize,
6030 _countBuffer: api::VkBuffer,
6031 _countBufferOffset: api::VkDeviceSize,
6032 _maxDrawCount: u32,
6033 _stride: u32,
6034 ) {
6035 unimplemented!()
6036 }
6037
6038 #[allow(non_snake_case)]
6039 #[cfg(kazan_include_unused_vulkan_api)]
6040 pub unsafe extern "system" fn vkCreateDebugReportCallbackEXT(
6041 _instance: api::VkInstance,
6042 _pCreateInfo: *const api::VkDebugReportCallbackCreateInfoEXT,
6043 _pAllocator: *const api::VkAllocationCallbacks,
6044 _pCallback: *mut api::VkDebugReportCallbackEXT,
6045 ) -> api::VkResult {
6046 unimplemented!()
6047 }
6048
6049 #[allow(non_snake_case)]
6050 #[cfg(kazan_include_unused_vulkan_api)]
6051 pub unsafe extern "system" fn vkDestroyDebugReportCallbackEXT(
6052 _instance: api::VkInstance,
6053 _callback: api::VkDebugReportCallbackEXT,
6054 _pAllocator: *const api::VkAllocationCallbacks,
6055 ) {
6056 unimplemented!()
6057 }
6058
6059 #[allow(non_snake_case)]
6060 #[cfg(kazan_include_unused_vulkan_api)]
6061 pub unsafe extern "system" fn vkDebugReportMessageEXT(
6062 _instance: api::VkInstance,
6063 _flags: api::VkDebugReportFlagsEXT,
6064 _objectType: api::VkDebugReportObjectTypeEXT,
6065 _object: u64,
6066 _location: usize,
6067 _messageCode: i32,
6068 _pLayerPrefix: *const c_char,
6069 _pMessage: *const c_char,
6070 ) {
6071 unimplemented!()
6072 }
6073
6074 #[allow(non_snake_case)]
6075 #[cfg(kazan_include_unused_vulkan_api)]
6076 pub unsafe extern "system" fn vkDebugMarkerSetObjectTagEXT(
6077 _device: api::VkDevice,
6078 _pTagInfo: *const api::VkDebugMarkerObjectTagInfoEXT,
6079 ) -> api::VkResult {
6080 unimplemented!()
6081 }
6082
6083 #[allow(non_snake_case)]
6084 #[cfg(kazan_include_unused_vulkan_api)]
6085 pub unsafe extern "system" fn vkDebugMarkerSetObjectNameEXT(
6086 _device: api::VkDevice,
6087 _pNameInfo: *const api::VkDebugMarkerObjectNameInfoEXT,
6088 ) -> api::VkResult {
6089 unimplemented!()
6090 }
6091
6092 #[allow(non_snake_case)]
6093 #[cfg(kazan_include_unused_vulkan_api)]
6094 pub unsafe extern "system" fn vkCmdDebugMarkerBeginEXT(
6095 _commandBuffer: api::VkCommandBuffer,
6096 _pMarkerInfo: *const api::VkDebugMarkerMarkerInfoEXT,
6097 ) {
6098 unimplemented!()
6099 }
6100
6101 #[allow(non_snake_case)]
6102 #[cfg(kazan_include_unused_vulkan_api)]
6103 pub unsafe extern "system" fn vkCmdDebugMarkerEndEXT(_commandBuffer: api::VkCommandBuffer) {
6104 unimplemented!()
6105 }
6106
6107 #[allow(non_snake_case)]
6108 #[cfg(kazan_include_unused_vulkan_api)]
6109 pub unsafe extern "system" fn vkCmdDebugMarkerInsertEXT(
6110 _commandBuffer: api::VkCommandBuffer,
6111 _pMarkerInfo: *const api::VkDebugMarkerMarkerInfoEXT,
6112 ) {
6113 unimplemented!()
6114 }
6115
6116 #[allow(non_snake_case)]
6117 #[cfg(kazan_include_unused_vulkan_api)]
6118 pub unsafe extern "system" fn vkCmdDrawIndirectCountAMD(
6119 _commandBuffer: api::VkCommandBuffer,
6120 _buffer: api::VkBuffer,
6121 _offset: api::VkDeviceSize,
6122 _countBuffer: api::VkBuffer,
6123 _countBufferOffset: api::VkDeviceSize,
6124 _maxDrawCount: u32,
6125 _stride: u32,
6126 ) {
6127 unimplemented!()
6128 }
6129
6130 #[allow(non_snake_case)]
6131 #[cfg(kazan_include_unused_vulkan_api)]
6132 pub unsafe extern "system" fn vkCmdDrawIndexedIndirectCountAMD(
6133 _commandBuffer: api::VkCommandBuffer,
6134 _buffer: api::VkBuffer,
6135 _offset: api::VkDeviceSize,
6136 _countBuffer: api::VkBuffer,
6137 _countBufferOffset: api::VkDeviceSize,
6138 _maxDrawCount: u32,
6139 _stride: u32,
6140 ) {
6141 unimplemented!()
6142 }
6143
6144 #[allow(non_snake_case)]
6145 #[cfg(kazan_include_unused_vulkan_api)]
6146 pub unsafe extern "system" fn vkGetShaderInfoAMD(
6147 _device: api::VkDevice,
6148 _pipeline: api::VkPipeline,
6149 _shaderStage: api::VkShaderStageFlagBits,
6150 _infoType: api::VkShaderInfoTypeAMD,
6151 _pInfoSize: *mut usize,
6152 _pInfo: *mut c_void,
6153 ) -> api::VkResult {
6154 unimplemented!()
6155 }
6156
6157 #[allow(non_snake_case)]
6158 #[cfg(kazan_include_unused_vulkan_api)]
6159 pub unsafe extern "system" fn vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
6160 _physicalDevice: api::VkPhysicalDevice,
6161 _format: api::VkFormat,
6162 _type_: api::VkImageType,
6163 _tiling: api::VkImageTiling,
6164 _usage: api::VkImageUsageFlags,
6165 _flags: api::VkImageCreateFlags,
6166 _externalHandleType: api::VkExternalMemoryHandleTypeFlagsNV,
6167 _pExternalImageFormatProperties: *mut api::VkExternalImageFormatPropertiesNV,
6168 ) -> api::VkResult {
6169 unimplemented!()
6170 }
6171
6172 #[allow(non_snake_case)]
6173 #[cfg(kazan_include_unused_vulkan_api)]
6174 pub unsafe extern "system" fn vkCmdBeginConditionalRenderingEXT(
6175 _commandBuffer: api::VkCommandBuffer,
6176 _pConditionalRenderingBegin: *const api::VkConditionalRenderingBeginInfoEXT,
6177 ) {
6178 unimplemented!()
6179 }
6180
6181 #[allow(non_snake_case)]
6182 #[cfg(kazan_include_unused_vulkan_api)]
6183 pub unsafe extern "system" fn vkCmdEndConditionalRenderingEXT(
6184 _commandBuffer: api::VkCommandBuffer,
6185 ) {
6186 unimplemented!()
6187 }
6188
6189 #[allow(non_snake_case)]
6190 #[cfg(kazan_include_unused_vulkan_api)]
6191 pub unsafe extern "system" fn vkCmdSetViewportWScalingNV(
6192 _commandBuffer: api::VkCommandBuffer,
6193 _firstViewport: u32,
6194 _viewportCount: u32,
6195 _pViewportWScalings: *const api::VkViewportWScalingNV,
6196 ) {
6197 unimplemented!()
6198 }
6199
6200 #[allow(non_snake_case)]
6201 #[cfg(kazan_include_unused_vulkan_api)]
6202 pub unsafe extern "system" fn vkReleaseDisplayEXT(
6203 _physicalDevice: api::VkPhysicalDevice,
6204 _display: api::VkDisplayKHR,
6205 ) -> api::VkResult {
6206 unimplemented!()
6207 }
6208
6209 #[allow(non_snake_case)]
6210 #[cfg(kazan_include_unused_vulkan_api)]
6211 pub unsafe extern "system" fn vkGetPhysicalDeviceSurfaceCapabilities2EXT(
6212 _physicalDevice: api::VkPhysicalDevice,
6213 _surface: api::VkSurfaceKHR,
6214 _pSurfaceCapabilities: *mut api::VkSurfaceCapabilities2EXT,
6215 ) -> api::VkResult {
6216 unimplemented!()
6217 }
6218
6219 #[allow(non_snake_case)]
6220 #[cfg(kazan_include_unused_vulkan_api)]
6221 pub unsafe extern "system" fn vkDisplayPowerControlEXT(
6222 _device: api::VkDevice,
6223 _display: api::VkDisplayKHR,
6224 _pDisplayPowerInfo: *const api::VkDisplayPowerInfoEXT,
6225 ) -> api::VkResult {
6226 unimplemented!()
6227 }
6228
6229 #[allow(non_snake_case)]
6230 #[cfg(kazan_include_unused_vulkan_api)]
6231 pub unsafe extern "system" fn vkRegisterDeviceEventEXT(
6232 _device: api::VkDevice,
6233 _pDeviceEventInfo: *const api::VkDeviceEventInfoEXT,
6234 _pAllocator: *const api::VkAllocationCallbacks,
6235 _pFence: *mut api::VkFence,
6236 ) -> api::VkResult {
6237 unimplemented!()
6238 }
6239
6240 #[allow(non_snake_case)]
6241 #[cfg(kazan_include_unused_vulkan_api)]
6242 pub unsafe extern "system" fn vkRegisterDisplayEventEXT(
6243 _device: api::VkDevice,
6244 _display: api::VkDisplayKHR,
6245 _pDisplayEventInfo: *const api::VkDisplayEventInfoEXT,
6246 _pAllocator: *const api::VkAllocationCallbacks,
6247 _pFence: *mut api::VkFence,
6248 ) -> api::VkResult {
6249 unimplemented!()
6250 }
6251
6252 #[allow(non_snake_case)]
6253 #[cfg(kazan_include_unused_vulkan_api)]
6254 pub unsafe extern "system" fn vkGetSwapchainCounterEXT(
6255 _device: api::VkDevice,
6256 _swapchain: api::VkSwapchainKHR,
6257 _counter: api::VkSurfaceCounterFlagBitsEXT,
6258 _pCounterValue: *mut u64,
6259 ) -> api::VkResult {
6260 unimplemented!()
6261 }
6262
6263 #[allow(non_snake_case)]
6264 #[cfg(kazan_include_unused_vulkan_api)]
6265 pub unsafe extern "system" fn vkGetRefreshCycleDurationGOOGLE(
6266 _device: api::VkDevice,
6267 _swapchain: api::VkSwapchainKHR,
6268 _pDisplayTimingProperties: *mut api::VkRefreshCycleDurationGOOGLE,
6269 ) -> api::VkResult {
6270 unimplemented!()
6271 }
6272
6273 #[allow(non_snake_case)]
6274 #[cfg(kazan_include_unused_vulkan_api)]
6275 pub unsafe extern "system" fn vkGetPastPresentationTimingGOOGLE(
6276 _device: api::VkDevice,
6277 _swapchain: api::VkSwapchainKHR,
6278 _pPresentationTimingCount: *mut u32,
6279 _pPresentationTimings: *mut api::VkPastPresentationTimingGOOGLE,
6280 ) -> api::VkResult {
6281 unimplemented!()
6282 }
6283
6284 #[allow(non_snake_case)]
6285 #[cfg(kazan_include_unused_vulkan_api)]
6286 pub unsafe extern "system" fn vkCmdSetDiscardRectangleEXT(
6287 _commandBuffer: api::VkCommandBuffer,
6288 _firstDiscardRectangle: u32,
6289 _discardRectangleCount: u32,
6290 _pDiscardRectangles: *const api::VkRect2D,
6291 ) {
6292 unimplemented!()
6293 }
6294
6295 #[allow(non_snake_case)]
6296 #[cfg(kazan_include_unused_vulkan_api)]
6297 pub unsafe extern "system" fn vkSetHdrMetadataEXT(
6298 _device: api::VkDevice,
6299 _swapchainCount: u32,
6300 _pSwapchains: *const api::VkSwapchainKHR,
6301 _pMetadata: *const api::VkHdrMetadataEXT,
6302 ) {
6303 unimplemented!()
6304 }
6305
6306 #[allow(non_snake_case)]
6307 #[cfg(kazan_include_unused_vulkan_api)]
6308 pub unsafe extern "system" fn vkSetDebugUtilsObjectNameEXT(
6309 _device: api::VkDevice,
6310 _pNameInfo: *const api::VkDebugUtilsObjectNameInfoEXT,
6311 ) -> api::VkResult {
6312 unimplemented!()
6313 }
6314
6315 #[allow(non_snake_case)]
6316 #[cfg(kazan_include_unused_vulkan_api)]
6317 pub unsafe extern "system" fn vkSetDebugUtilsObjectTagEXT(
6318 _device: api::VkDevice,
6319 _pTagInfo: *const api::VkDebugUtilsObjectTagInfoEXT,
6320 ) -> api::VkResult {
6321 unimplemented!()
6322 }
6323
6324 #[allow(non_snake_case)]
6325 #[cfg(kazan_include_unused_vulkan_api)]
6326 pub unsafe extern "system" fn vkQueueBeginDebugUtilsLabelEXT(
6327 _queue: api::VkQueue,
6328 _pLabelInfo: *const api::VkDebugUtilsLabelEXT,
6329 ) {
6330 unimplemented!()
6331 }
6332
6333 #[allow(non_snake_case)]
6334 #[cfg(kazan_include_unused_vulkan_api)]
6335 pub unsafe extern "system" fn vkQueueEndDebugUtilsLabelEXT(_queue: api::VkQueue) {
6336 unimplemented!()
6337 }
6338
6339 #[allow(non_snake_case)]
6340 #[cfg(kazan_include_unused_vulkan_api)]
6341 pub unsafe extern "system" fn vkQueueInsertDebugUtilsLabelEXT(
6342 _queue: api::VkQueue,
6343 _pLabelInfo: *const api::VkDebugUtilsLabelEXT,
6344 ) {
6345 unimplemented!()
6346 }
6347
6348 #[allow(non_snake_case)]
6349 #[cfg(kazan_include_unused_vulkan_api)]
6350 pub unsafe extern "system" fn vkCmdBeginDebugUtilsLabelEXT(
6351 _commandBuffer: api::VkCommandBuffer,
6352 _pLabelInfo: *const api::VkDebugUtilsLabelEXT,
6353 ) {
6354 unimplemented!()
6355 }
6356
6357 #[allow(non_snake_case)]
6358 #[cfg(kazan_include_unused_vulkan_api)]
6359 pub unsafe extern "system" fn vkCmdEndDebugUtilsLabelEXT(_commandBuffer: api::VkCommandBuffer) {
6360 unimplemented!()
6361 }
6362
6363 #[allow(non_snake_case)]
6364 #[cfg(kazan_include_unused_vulkan_api)]
6365 pub unsafe extern "system" fn vkCmdInsertDebugUtilsLabelEXT(
6366 _commandBuffer: api::VkCommandBuffer,
6367 _pLabelInfo: *const api::VkDebugUtilsLabelEXT,
6368 ) {
6369 unimplemented!()
6370 }
6371
6372 #[allow(non_snake_case)]
6373 #[cfg(kazan_include_unused_vulkan_api)]
6374 pub unsafe extern "system" fn vkCreateDebugUtilsMessengerEXT(
6375 _instance: api::VkInstance,
6376 _pCreateInfo: *const api::VkDebugUtilsMessengerCreateInfoEXT,
6377 _pAllocator: *const api::VkAllocationCallbacks,
6378 _pMessenger: *mut api::VkDebugUtilsMessengerEXT,
6379 ) -> api::VkResult {
6380 unimplemented!()
6381 }
6382
6383 #[allow(non_snake_case)]
6384 #[cfg(kazan_include_unused_vulkan_api)]
6385 pub unsafe extern "system" fn vkDestroyDebugUtilsMessengerEXT(
6386 _instance: api::VkInstance,
6387 _messenger: api::VkDebugUtilsMessengerEXT,
6388 _pAllocator: *const api::VkAllocationCallbacks,
6389 ) {
6390 unimplemented!()
6391 }
6392
6393 #[allow(non_snake_case)]
6394 #[cfg(kazan_include_unused_vulkan_api)]
6395 pub unsafe extern "system" fn vkSubmitDebugUtilsMessageEXT(
6396 _instance: api::VkInstance,
6397 _messageSeverity: api::VkDebugUtilsMessageSeverityFlagBitsEXT,
6398 _messageTypes: api::VkDebugUtilsMessageTypeFlagsEXT,
6399 _pCallbackData: *const api::VkDebugUtilsMessengerCallbackDataEXT,
6400 ) {
6401 unimplemented!()
6402 }
6403
6404 #[allow(non_snake_case)]
6405 #[cfg(kazan_include_unused_vulkan_api)]
6406 pub unsafe extern "system" fn vkCmdSetSampleLocationsEXT(
6407 _commandBuffer: api::VkCommandBuffer,
6408 _pSampleLocationsInfo: *const api::VkSampleLocationsInfoEXT,
6409 ) {
6410 unimplemented!()
6411 }
6412
6413 #[allow(non_snake_case)]
6414 #[cfg(kazan_include_unused_vulkan_api)]
6415 pub unsafe extern "system" fn vkGetPhysicalDeviceMultisamplePropertiesEXT(
6416 _physicalDevice: api::VkPhysicalDevice,
6417 _samples: api::VkSampleCountFlagBits,
6418 _pMultisampleProperties: *mut api::VkMultisamplePropertiesEXT,
6419 ) {
6420 unimplemented!()
6421 }
6422
6423 #[allow(non_snake_case)]
6424 #[cfg(kazan_include_unused_vulkan_api)]
6425 pub unsafe extern "system" fn vkCreateValidationCacheEXT(
6426 _device: api::VkDevice,
6427 _pCreateInfo: *const api::VkValidationCacheCreateInfoEXT,
6428 _pAllocator: *const api::VkAllocationCallbacks,
6429 _pValidationCache: *mut api::VkValidationCacheEXT,
6430 ) -> api::VkResult {
6431 unimplemented!()
6432 }
6433
6434 #[allow(non_snake_case)]
6435 #[cfg(kazan_include_unused_vulkan_api)]
6436 pub unsafe extern "system" fn vkDestroyValidationCacheEXT(
6437 _device: api::VkDevice,
6438 _validationCache: api::VkValidationCacheEXT,
6439 _pAllocator: *const api::VkAllocationCallbacks,
6440 ) {
6441 unimplemented!()
6442 }
6443
6444 #[allow(non_snake_case)]
6445 #[cfg(kazan_include_unused_vulkan_api)]
6446 pub unsafe extern "system" fn vkMergeValidationCachesEXT(
6447 _device: api::VkDevice,
6448 _dstCache: api::VkValidationCacheEXT,
6449 _srcCacheCount: u32,
6450 _pSrcCaches: *const api::VkValidationCacheEXT,
6451 ) -> api::VkResult {
6452 unimplemented!()
6453 }
6454
6455 #[allow(non_snake_case)]
6456 #[cfg(kazan_include_unused_vulkan_api)]
6457 pub unsafe extern "system" fn vkGetValidationCacheDataEXT(
6458 _device: api::VkDevice,
6459 _validationCache: api::VkValidationCacheEXT,
6460 _pDataSize: *mut usize,
6461 _pData: *mut c_void,
6462 ) -> api::VkResult {
6463 unimplemented!()
6464 }
6465
6466 #[allow(non_snake_case)]
6467 #[cfg(kazan_include_unused_vulkan_api)]
6468 pub unsafe extern "system" fn vkCmdBindShadingRateImageNV(
6469 _commandBuffer: api::VkCommandBuffer,
6470 _imageView: api::VkImageView,
6471 _imageLayout: api::VkImageLayout,
6472 ) {
6473 unimplemented!()
6474 }
6475
6476 #[allow(non_snake_case)]
6477 #[cfg(kazan_include_unused_vulkan_api)]
6478 pub unsafe extern "system" fn vkCmdSetViewportShadingRatePaletteNV(
6479 _commandBuffer: api::VkCommandBuffer,
6480 _firstViewport: u32,
6481 _viewportCount: u32,
6482 _pShadingRatePalettes: *const api::VkShadingRatePaletteNV,
6483 ) {
6484 unimplemented!()
6485 }
6486
6487 #[allow(non_snake_case)]
6488 #[cfg(kazan_include_unused_vulkan_api)]
6489 pub unsafe extern "system" fn vkCmdSetCoarseSampleOrderNV(
6490 _commandBuffer: api::VkCommandBuffer,
6491 _sampleOrderType: api::VkCoarseSampleOrderTypeNV,
6492 _customSampleOrderCount: u32,
6493 _pCustomSampleOrders: *const api::VkCoarseSampleOrderCustomNV,
6494 ) {
6495 unimplemented!()
6496 }
6497
6498 #[allow(non_snake_case)]
6499 #[cfg(kazan_include_unused_vulkan_api)]
6500 pub unsafe extern "system" fn vkGetMemoryHostPointerPropertiesEXT(
6501 _device: api::VkDevice,
6502 _handleType: api::VkExternalMemoryHandleTypeFlagBits,
6503 _pHostPointer: *const c_void,
6504 _pMemoryHostPointerProperties: *mut api::VkMemoryHostPointerPropertiesEXT,
6505 ) -> api::VkResult {
6506 unimplemented!()
6507 }
6508
6509 #[allow(non_snake_case)]
6510 #[cfg(kazan_include_unused_vulkan_api)]
6511 pub unsafe extern "system" fn vkCmdWriteBufferMarkerAMD(
6512 _commandBuffer: api::VkCommandBuffer,
6513 _pipelineStage: api::VkPipelineStageFlagBits,
6514 _dstBuffer: api::VkBuffer,
6515 _dstOffset: api::VkDeviceSize,
6516 _marker: u32,
6517 ) {
6518 unimplemented!()
6519 }
6520
6521 #[allow(non_snake_case)]
6522 #[cfg(kazan_include_unused_vulkan_api)]
6523 pub unsafe extern "system" fn vkCmdDrawMeshTasksNV(
6524 _commandBuffer: api::VkCommandBuffer,
6525 _taskCount: u32,
6526 _firstTask: u32,
6527 ) {
6528 unimplemented!()
6529 }
6530
6531 #[allow(non_snake_case)]
6532 #[cfg(kazan_include_unused_vulkan_api)]
6533 pub unsafe extern "system" fn vkCmdDrawMeshTasksIndirectNV(
6534 _commandBuffer: api::VkCommandBuffer,
6535 _buffer: api::VkBuffer,
6536 _offset: api::VkDeviceSize,
6537 _drawCount: u32,
6538 _stride: u32,
6539 ) {
6540 unimplemented!()
6541 }
6542
6543 #[allow(non_snake_case)]
6544 #[cfg(kazan_include_unused_vulkan_api)]
6545 pub unsafe extern "system" fn vkCmdDrawMeshTasksIndirectCountNV(
6546 _commandBuffer: api::VkCommandBuffer,
6547 _buffer: api::VkBuffer,
6548 _offset: api::VkDeviceSize,
6549 _countBuffer: api::VkBuffer,
6550 _countBufferOffset: api::VkDeviceSize,
6551 _maxDrawCount: u32,
6552 _stride: u32,
6553 ) {
6554 unimplemented!()
6555 }
6556
6557 #[allow(non_snake_case)]
6558 #[cfg(kazan_include_unused_vulkan_api)]
6559 pub unsafe extern "system" fn vkCmdSetExclusiveScissorNV(
6560 _commandBuffer: api::VkCommandBuffer,
6561 _firstExclusiveScissor: u32,
6562 _exclusiveScissorCount: u32,
6563 _pExclusiveScissors: *const api::VkRect2D,
6564 ) {
6565 unimplemented!()
6566 }
6567
6568 #[allow(non_snake_case)]
6569 #[cfg(kazan_include_unused_vulkan_api)]
6570 pub unsafe extern "system" fn vkCmdSetCheckpointNV(
6571 _commandBuffer: api::VkCommandBuffer,
6572 _pCheckpointMarker: *const c_void,
6573 ) {
6574 unimplemented!()
6575 }
6576
6577 #[allow(non_snake_case)]
6578 #[cfg(kazan_include_unused_vulkan_api)]
6579 pub unsafe extern "system" fn vkGetQueueCheckpointDataNV(
6580 _queue: api::VkQueue,
6581 _pCheckpointDataCount: *mut u32,
6582 _pCheckpointData: *mut api::VkCheckpointDataNV,
6583 ) {
6584 unimplemented!()
6585 }
6586
6587 #[cfg(target_os = "linux")]
6588 #[allow(non_snake_case)]
6589 pub unsafe extern "system" fn vkCreateXcbSurfaceKHR(
6590 _instance: api::VkInstance,
6591 create_info: *const api::VkXcbSurfaceCreateInfoKHR,
6592 _allocator: *const api::VkAllocationCallbacks,
6593 surface: *mut api::VkSurfaceKHR,
6594 ) -> api::VkResult {
6595 parse_next_chain_const! {
6596 create_info,
6597 root = api::VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR,
6598 }
6599 let create_info = &*create_info;
6600 let new_surface = Box::new(api::VkIcdSurfaceXcb {
6601 base: api::VkIcdSurfaceBase {
6602 platform: api::VK_ICD_WSI_PLATFORM_XCB,
6603 },
6604 connection: create_info.connection,
6605 window: create_info.window,
6606 });
6607 *surface = api::VkSurfaceKHR::new(NonNull::new(
6608 Box::into_raw(new_surface) as *mut api::VkIcdSurfaceBase
6609 ));
6610 api::VK_SUCCESS
6611 }
6612
6613 #[cfg(target_os = "linux")]
6614 #[allow(non_snake_case)]
6615 pub unsafe extern "system" fn vkGetPhysicalDeviceXcbPresentationSupportKHR(
6616 _physicalDevice: api::VkPhysicalDevice,
6617 _queueFamilyIndex: u32,
6618 _connection: *mut xcb::ffi::xcb_connection_t,
6619 _visual_id: xcb::ffi::xcb_visualid_t,
6620 ) -> api::VkBool32 {
6621 unimplemented!()
6622 }