1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
// Generated by `scripts/generate.js`

use std::os::raw::c_char;
use std::ops::Deref;
use std::ptr;
use std::cmp;
use std::mem;
use utils::c_bindings::*;
use utils::vk_convert::*;
use utils::vk_null::*;
use utils::vk_ptr::*;
use utils::vk_traits::*;
use vulkan::vk::*;
use vulkan::vk::{VkSampleCountFlags,RawVkSampleCountFlags};

/// Wrapper for [VkPhysicalDeviceLimits](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkPhysicalDeviceLimits.html)
#[derive(Debug, Clone)]
pub struct VkPhysicalDeviceLimits {
    pub max_image_dimension_1d: usize,
    pub max_image_dimension_2d: usize,
    pub max_image_dimension_3d: usize,
    pub max_image_dimension_cube: usize,
    pub max_image_array_layers: usize,
    pub max_texel_buffer_elements: usize,
    pub max_uniform_buffer_range: usize,
    pub max_storage_buffer_range: usize,
    pub max_push_constants_size: usize,
    pub max_memory_allocation_count: usize,
    pub max_sampler_allocation_count: usize,
    pub buffer_image_granularity: usize,
    pub sparse_address_space_size: usize,
    pub max_bound_descriptor_sets: usize,
    pub max_per_stage_descriptor_samplers: usize,
    pub max_per_stage_descriptor_uniform_buffers: usize,
    pub max_per_stage_descriptor_storage_buffers: usize,
    pub max_per_stage_descriptor_sampled_images: usize,
    pub max_per_stage_descriptor_storage_images: usize,
    pub max_per_stage_descriptor_input_attachments: usize,
    pub max_per_stage_resources: usize,
    pub max_descriptor_set_samplers: usize,
    pub max_descriptor_set_uniform_buffers: usize,
    pub max_descriptor_set_uniform_buffers_dynamic: usize,
    pub max_descriptor_set_storage_buffers: usize,
    pub max_descriptor_set_storage_buffers_dynamic: usize,
    pub max_descriptor_set_sampled_images: usize,
    pub max_descriptor_set_storage_images: usize,
    pub max_descriptor_set_input_attachments: usize,
    pub max_vertex_input_attributes: usize,
    pub max_vertex_input_bindings: usize,
    pub max_vertex_input_attribute_offset: usize,
    pub max_vertex_input_binding_stride: usize,
    pub max_vertex_output_components: usize,
    pub max_tessellation_generation_level: usize,
    pub max_tessellation_patch_size: usize,
    pub max_tessellation_control_per_vertex_input_components: usize,
    pub max_tessellation_control_per_vertex_output_components: usize,
    pub max_tessellation_control_per_patch_output_components: usize,
    pub max_tessellation_control_total_output_components: usize,
    pub max_tessellation_evaluation_input_components: usize,
    pub max_tessellation_evaluation_output_components: usize,
    pub max_geometry_shader_invocations: usize,
    pub max_geometry_input_components: usize,
    pub max_geometry_output_components: usize,
    pub max_geometry_output_vertices: usize,
    pub max_geometry_total_output_components: usize,
    pub max_fragment_input_components: usize,
    pub max_fragment_output_attachments: usize,
    pub max_fragment_dual_src_attachments: usize,
    pub max_fragment_combined_output_resources: usize,
    pub max_compute_shared_memory_size: usize,
    pub max_compute_work_group_count: [usize; 3],
    pub max_compute_work_group_invocations: usize,
    pub max_compute_work_group_size: [usize; 3],
    pub sub_pixel_precision_bits: u32,
    pub sub_texel_precision_bits: u32,
    pub mipmap_precision_bits: u32,
    pub max_draw_indexed_index_value: usize,
    pub max_draw_indirect_count: usize,
    pub max_sampler_lod_bias: f32,
    pub max_sampler_anisotropy: f32,
    pub max_viewports: usize,
    pub max_viewport_dimensions: [usize; 2],
    pub viewport_bounds_range: [f32; 2],
    pub viewport_sub_pixel_bits: u32,
    pub min_memory_map_alignment: usize,
    pub min_texel_buffer_offset_alignment: usize,
    pub min_uniform_buffer_offset_alignment: usize,
    pub min_storage_buffer_offset_alignment: usize,
    pub min_texel_offset: isize,
    pub max_texel_offset: usize,
    pub min_texel_gather_offset: isize,
    pub max_texel_gather_offset: usize,
    pub min_interpolation_offset: f32,
    pub max_interpolation_offset: f32,
    pub sub_pixel_interpolation_offset_bits: u32,
    pub max_framebuffer_width: usize,
    pub max_framebuffer_height: usize,
    pub max_framebuffer_layers: usize,
    pub framebuffer_color_sample_counts: VkSampleCountFlags,
    pub framebuffer_depth_sample_counts: VkSampleCountFlags,
    pub framebuffer_stencil_sample_counts: VkSampleCountFlags,
    pub framebuffer_no_attachments_sample_counts: VkSampleCountFlags,
    pub max_color_attachments: usize,
    pub sampled_image_color_sample_counts: VkSampleCountFlags,
    pub sampled_image_integer_sample_counts: VkSampleCountFlags,
    pub sampled_image_depth_sample_counts: VkSampleCountFlags,
    pub sampled_image_stencil_sample_counts: VkSampleCountFlags,
    pub storage_image_sample_counts: VkSampleCountFlags,
    pub max_sample_mask_words: u32,
    pub timestamp_compute_and_graphics: bool,
    pub timestamp_period: f32,
    pub max_clip_distances: usize,
    pub max_cull_distances: usize,
    pub max_combined_clip_and_cull_distances: usize,
    pub discrete_queue_priorities: usize,
    pub point_size_range: [f32; 2],
    pub line_width_range: [f32; 2],
    pub point_size_granularity: f32,
    pub line_width_granularity: f32,
    pub strict_lines: bool,
    pub standard_sample_locations: bool,
    pub optimal_buffer_copy_offset_alignment: usize,
    pub optimal_buffer_copy_row_pitch_alignment: usize,
    pub non_coherent_atom_size: usize,
}

#[doc(hidden)]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RawVkPhysicalDeviceLimits {
    pub max_image_dimension_1d: u32,
    pub max_image_dimension_2d: u32,
    pub max_image_dimension_3d: u32,
    pub max_image_dimension_cube: u32,
    pub max_image_array_layers: u32,
    pub max_texel_buffer_elements: u32,
    pub max_uniform_buffer_range: u32,
    pub max_storage_buffer_range: u32,
    pub max_push_constants_size: u32,
    pub max_memory_allocation_count: u32,
    pub max_sampler_allocation_count: u32,
    pub buffer_image_granularity: u64,
    pub sparse_address_space_size: u64,
    pub max_bound_descriptor_sets: u32,
    pub max_per_stage_descriptor_samplers: u32,
    pub max_per_stage_descriptor_uniform_buffers: u32,
    pub max_per_stage_descriptor_storage_buffers: u32,
    pub max_per_stage_descriptor_sampled_images: u32,
    pub max_per_stage_descriptor_storage_images: u32,
    pub max_per_stage_descriptor_input_attachments: u32,
    pub max_per_stage_resources: u32,
    pub max_descriptor_set_samplers: u32,
    pub max_descriptor_set_uniform_buffers: u32,
    pub max_descriptor_set_uniform_buffers_dynamic: u32,
    pub max_descriptor_set_storage_buffers: u32,
    pub max_descriptor_set_storage_buffers_dynamic: u32,
    pub max_descriptor_set_sampled_images: u32,
    pub max_descriptor_set_storage_images: u32,
    pub max_descriptor_set_input_attachments: u32,
    pub max_vertex_input_attributes: u32,
    pub max_vertex_input_bindings: u32,
    pub max_vertex_input_attribute_offset: u32,
    pub max_vertex_input_binding_stride: u32,
    pub max_vertex_output_components: u32,
    pub max_tessellation_generation_level: u32,
    pub max_tessellation_patch_size: u32,
    pub max_tessellation_control_per_vertex_input_components: u32,
    pub max_tessellation_control_per_vertex_output_components: u32,
    pub max_tessellation_control_per_patch_output_components: u32,
    pub max_tessellation_control_total_output_components: u32,
    pub max_tessellation_evaluation_input_components: u32,
    pub max_tessellation_evaluation_output_components: u32,
    pub max_geometry_shader_invocations: u32,
    pub max_geometry_input_components: u32,
    pub max_geometry_output_components: u32,
    pub max_geometry_output_vertices: u32,
    pub max_geometry_total_output_components: u32,
    pub max_fragment_input_components: u32,
    pub max_fragment_output_attachments: u32,
    pub max_fragment_dual_src_attachments: u32,
    pub max_fragment_combined_output_resources: u32,
    pub max_compute_shared_memory_size: u32,
    pub max_compute_work_group_count: [u32; 3],
    pub max_compute_work_group_invocations: u32,
    pub max_compute_work_group_size: [u32; 3],
    pub sub_pixel_precision_bits: u32,
    pub sub_texel_precision_bits: u32,
    pub mipmap_precision_bits: u32,
    pub max_draw_indexed_index_value: u32,
    pub max_draw_indirect_count: u32,
    pub max_sampler_lod_bias: f32,
    pub max_sampler_anisotropy: f32,
    pub max_viewports: u32,
    pub max_viewport_dimensions: [u32; 2],
    pub viewport_bounds_range: [f32; 2],
    pub viewport_sub_pixel_bits: u32,
    pub min_memory_map_alignment: usize,
    pub min_texel_buffer_offset_alignment: u64,
    pub min_uniform_buffer_offset_alignment: u64,
    pub min_storage_buffer_offset_alignment: u64,
    pub min_texel_offset: i32,
    pub max_texel_offset: u32,
    pub min_texel_gather_offset: i32,
    pub max_texel_gather_offset: u32,
    pub min_interpolation_offset: f32,
    pub max_interpolation_offset: f32,
    pub sub_pixel_interpolation_offset_bits: u32,
    pub max_framebuffer_width: u32,
    pub max_framebuffer_height: u32,
    pub max_framebuffer_layers: u32,
    pub framebuffer_color_sample_counts: RawVkSampleCountFlags,
    pub framebuffer_depth_sample_counts: RawVkSampleCountFlags,
    pub framebuffer_stencil_sample_counts: RawVkSampleCountFlags,
    pub framebuffer_no_attachments_sample_counts: RawVkSampleCountFlags,
    pub max_color_attachments: u32,
    pub sampled_image_color_sample_counts: RawVkSampleCountFlags,
    pub sampled_image_integer_sample_counts: RawVkSampleCountFlags,
    pub sampled_image_depth_sample_counts: RawVkSampleCountFlags,
    pub sampled_image_stencil_sample_counts: RawVkSampleCountFlags,
    pub storage_image_sample_counts: RawVkSampleCountFlags,
    pub max_sample_mask_words: u32,
    pub timestamp_compute_and_graphics: u32,
    pub timestamp_period: f32,
    pub max_clip_distances: u32,
    pub max_cull_distances: u32,
    pub max_combined_clip_and_cull_distances: u32,
    pub discrete_queue_priorities: u32,
    pub point_size_range: [f32; 2],
    pub line_width_range: [f32; 2],
    pub point_size_granularity: f32,
    pub line_width_granularity: f32,
    pub strict_lines: u32,
    pub standard_sample_locations: u32,
    pub optimal_buffer_copy_offset_alignment: u64,
    pub optimal_buffer_copy_row_pitch_alignment: u64,
    pub non_coherent_atom_size: u64,
}

impl VkWrappedType<RawVkPhysicalDeviceLimits> for VkPhysicalDeviceLimits {
    fn vk_to_raw(src: &VkPhysicalDeviceLimits, dst: &mut RawVkPhysicalDeviceLimits) {
        dst.max_image_dimension_1d = vk_to_raw_value(&src.max_image_dimension_1d);
        dst.max_image_dimension_2d = vk_to_raw_value(&src.max_image_dimension_2d);
        dst.max_image_dimension_3d = vk_to_raw_value(&src.max_image_dimension_3d);
        dst.max_image_dimension_cube = vk_to_raw_value(&src.max_image_dimension_cube);
        dst.max_image_array_layers = vk_to_raw_value(&src.max_image_array_layers);
        dst.max_texel_buffer_elements = vk_to_raw_value(&src.max_texel_buffer_elements);
        dst.max_uniform_buffer_range = vk_to_raw_value(&src.max_uniform_buffer_range);
        dst.max_storage_buffer_range = vk_to_raw_value(&src.max_storage_buffer_range);
        dst.max_push_constants_size = vk_to_raw_value(&src.max_push_constants_size);
        dst.max_memory_allocation_count = vk_to_raw_value(&src.max_memory_allocation_count);
        dst.max_sampler_allocation_count = vk_to_raw_value(&src.max_sampler_allocation_count);
        dst.buffer_image_granularity = vk_to_raw_value(&src.buffer_image_granularity);
        dst.sparse_address_space_size = vk_to_raw_value(&src.sparse_address_space_size);
        dst.max_bound_descriptor_sets = vk_to_raw_value(&src.max_bound_descriptor_sets);
        dst.max_per_stage_descriptor_samplers = vk_to_raw_value(&src.max_per_stage_descriptor_samplers);
        dst.max_per_stage_descriptor_uniform_buffers = vk_to_raw_value(&src.max_per_stage_descriptor_uniform_buffers);
        dst.max_per_stage_descriptor_storage_buffers = vk_to_raw_value(&src.max_per_stage_descriptor_storage_buffers);
        dst.max_per_stage_descriptor_sampled_images = vk_to_raw_value(&src.max_per_stage_descriptor_sampled_images);
        dst.max_per_stage_descriptor_storage_images = vk_to_raw_value(&src.max_per_stage_descriptor_storage_images);
        dst.max_per_stage_descriptor_input_attachments = vk_to_raw_value(&src.max_per_stage_descriptor_input_attachments);
        dst.max_per_stage_resources = vk_to_raw_value(&src.max_per_stage_resources);
        dst.max_descriptor_set_samplers = vk_to_raw_value(&src.max_descriptor_set_samplers);
        dst.max_descriptor_set_uniform_buffers = vk_to_raw_value(&src.max_descriptor_set_uniform_buffers);
        dst.max_descriptor_set_uniform_buffers_dynamic = vk_to_raw_value(&src.max_descriptor_set_uniform_buffers_dynamic);
        dst.max_descriptor_set_storage_buffers = vk_to_raw_value(&src.max_descriptor_set_storage_buffers);
        dst.max_descriptor_set_storage_buffers_dynamic = vk_to_raw_value(&src.max_descriptor_set_storage_buffers_dynamic);
        dst.max_descriptor_set_sampled_images = vk_to_raw_value(&src.max_descriptor_set_sampled_images);
        dst.max_descriptor_set_storage_images = vk_to_raw_value(&src.max_descriptor_set_storage_images);
        dst.max_descriptor_set_input_attachments = vk_to_raw_value(&src.max_descriptor_set_input_attachments);
        dst.max_vertex_input_attributes = vk_to_raw_value(&src.max_vertex_input_attributes);
        dst.max_vertex_input_bindings = vk_to_raw_value(&src.max_vertex_input_bindings);
        dst.max_vertex_input_attribute_offset = vk_to_raw_value(&src.max_vertex_input_attribute_offset);
        dst.max_vertex_input_binding_stride = vk_to_raw_value(&src.max_vertex_input_binding_stride);
        dst.max_vertex_output_components = vk_to_raw_value(&src.max_vertex_output_components);
        dst.max_tessellation_generation_level = vk_to_raw_value(&src.max_tessellation_generation_level);
        dst.max_tessellation_patch_size = vk_to_raw_value(&src.max_tessellation_patch_size);
        dst.max_tessellation_control_per_vertex_input_components = vk_to_raw_value(&src.max_tessellation_control_per_vertex_input_components);
        dst.max_tessellation_control_per_vertex_output_components = vk_to_raw_value(&src.max_tessellation_control_per_vertex_output_components);
        dst.max_tessellation_control_per_patch_output_components = vk_to_raw_value(&src.max_tessellation_control_per_patch_output_components);
        dst.max_tessellation_control_total_output_components = vk_to_raw_value(&src.max_tessellation_control_total_output_components);
        dst.max_tessellation_evaluation_input_components = vk_to_raw_value(&src.max_tessellation_evaluation_input_components);
        dst.max_tessellation_evaluation_output_components = vk_to_raw_value(&src.max_tessellation_evaluation_output_components);
        dst.max_geometry_shader_invocations = vk_to_raw_value(&src.max_geometry_shader_invocations);
        dst.max_geometry_input_components = vk_to_raw_value(&src.max_geometry_input_components);
        dst.max_geometry_output_components = vk_to_raw_value(&src.max_geometry_output_components);
        dst.max_geometry_output_vertices = vk_to_raw_value(&src.max_geometry_output_vertices);
        dst.max_geometry_total_output_components = vk_to_raw_value(&src.max_geometry_total_output_components);
        dst.max_fragment_input_components = vk_to_raw_value(&src.max_fragment_input_components);
        dst.max_fragment_output_attachments = vk_to_raw_value(&src.max_fragment_output_attachments);
        dst.max_fragment_dual_src_attachments = vk_to_raw_value(&src.max_fragment_dual_src_attachments);
        dst.max_fragment_combined_output_resources = vk_to_raw_value(&src.max_fragment_combined_output_resources);
        dst.max_compute_shared_memory_size = vk_to_raw_value(&src.max_compute_shared_memory_size);
        dst.max_compute_work_group_count = unsafe { let mut dst_array : [u32; 3] = mem::uninitialized(); vk_to_raw_array(&src.max_compute_work_group_count, &mut dst_array); dst_array };
        dst.max_compute_work_group_invocations = vk_to_raw_value(&src.max_compute_work_group_invocations);
        dst.max_compute_work_group_size = unsafe { let mut dst_array : [u32; 3] = mem::uninitialized(); vk_to_raw_array(&src.max_compute_work_group_size, &mut dst_array); dst_array };
        dst.sub_pixel_precision_bits = src.sub_pixel_precision_bits;
        dst.sub_texel_precision_bits = src.sub_texel_precision_bits;
        dst.mipmap_precision_bits = src.mipmap_precision_bits;
        dst.max_draw_indexed_index_value = vk_to_raw_value(&src.max_draw_indexed_index_value);
        dst.max_draw_indirect_count = vk_to_raw_value(&src.max_draw_indirect_count);
        dst.max_sampler_lod_bias = src.max_sampler_lod_bias;
        dst.max_sampler_anisotropy = src.max_sampler_anisotropy;
        dst.max_viewports = vk_to_raw_value(&src.max_viewports);
        dst.max_viewport_dimensions = unsafe { let mut dst_array : [u32; 2] = mem::uninitialized(); vk_to_raw_array(&src.max_viewport_dimensions, &mut dst_array); dst_array };
        dst.viewport_bounds_range = unsafe { let mut dst_array : [f32; 2] = mem::uninitialized(); to_array(&src.viewport_bounds_range, &mut dst_array); dst_array };
        dst.viewport_sub_pixel_bits = src.viewport_sub_pixel_bits;
        dst.min_memory_map_alignment = src.min_memory_map_alignment;
        dst.min_texel_buffer_offset_alignment = vk_to_raw_value(&src.min_texel_buffer_offset_alignment);
        dst.min_uniform_buffer_offset_alignment = vk_to_raw_value(&src.min_uniform_buffer_offset_alignment);
        dst.min_storage_buffer_offset_alignment = vk_to_raw_value(&src.min_storage_buffer_offset_alignment);
        dst.min_texel_offset = vk_to_raw_value(&src.min_texel_offset);
        dst.max_texel_offset = vk_to_raw_value(&src.max_texel_offset);
        dst.min_texel_gather_offset = vk_to_raw_value(&src.min_texel_gather_offset);
        dst.max_texel_gather_offset = vk_to_raw_value(&src.max_texel_gather_offset);
        dst.min_interpolation_offset = src.min_interpolation_offset;
        dst.max_interpolation_offset = src.max_interpolation_offset;
        dst.sub_pixel_interpolation_offset_bits = src.sub_pixel_interpolation_offset_bits;
        dst.max_framebuffer_width = vk_to_raw_value(&src.max_framebuffer_width);
        dst.max_framebuffer_height = vk_to_raw_value(&src.max_framebuffer_height);
        dst.max_framebuffer_layers = vk_to_raw_value(&src.max_framebuffer_layers);
        dst.framebuffer_color_sample_counts = vk_to_raw_value(&src.framebuffer_color_sample_counts);
        dst.framebuffer_depth_sample_counts = vk_to_raw_value(&src.framebuffer_depth_sample_counts);
        dst.framebuffer_stencil_sample_counts = vk_to_raw_value(&src.framebuffer_stencil_sample_counts);
        dst.framebuffer_no_attachments_sample_counts = vk_to_raw_value(&src.framebuffer_no_attachments_sample_counts);
        dst.max_color_attachments = vk_to_raw_value(&src.max_color_attachments);
        dst.sampled_image_color_sample_counts = vk_to_raw_value(&src.sampled_image_color_sample_counts);
        dst.sampled_image_integer_sample_counts = vk_to_raw_value(&src.sampled_image_integer_sample_counts);
        dst.sampled_image_depth_sample_counts = vk_to_raw_value(&src.sampled_image_depth_sample_counts);
        dst.sampled_image_stencil_sample_counts = vk_to_raw_value(&src.sampled_image_stencil_sample_counts);
        dst.storage_image_sample_counts = vk_to_raw_value(&src.storage_image_sample_counts);
        dst.max_sample_mask_words = src.max_sample_mask_words;
        dst.timestamp_compute_and_graphics = vk_to_raw_value(&src.timestamp_compute_and_graphics);
        dst.timestamp_period = src.timestamp_period;
        dst.max_clip_distances = vk_to_raw_value(&src.max_clip_distances);
        dst.max_cull_distances = vk_to_raw_value(&src.max_cull_distances);
        dst.max_combined_clip_and_cull_distances = vk_to_raw_value(&src.max_combined_clip_and_cull_distances);
        dst.discrete_queue_priorities = vk_to_raw_value(&src.discrete_queue_priorities);
        dst.point_size_range = unsafe { let mut dst_array : [f32; 2] = mem::uninitialized(); to_array(&src.point_size_range, &mut dst_array); dst_array };
        dst.line_width_range = unsafe { let mut dst_array : [f32; 2] = mem::uninitialized(); to_array(&src.line_width_range, &mut dst_array); dst_array };
        dst.point_size_granularity = src.point_size_granularity;
        dst.line_width_granularity = src.line_width_granularity;
        dst.strict_lines = vk_to_raw_value(&src.strict_lines);
        dst.standard_sample_locations = vk_to_raw_value(&src.standard_sample_locations);
        dst.optimal_buffer_copy_offset_alignment = vk_to_raw_value(&src.optimal_buffer_copy_offset_alignment);
        dst.optimal_buffer_copy_row_pitch_alignment = vk_to_raw_value(&src.optimal_buffer_copy_row_pitch_alignment);
        dst.non_coherent_atom_size = vk_to_raw_value(&src.non_coherent_atom_size);
    }
}

impl VkRawType<VkPhysicalDeviceLimits> for RawVkPhysicalDeviceLimits {
    fn vk_to_wrapped(src: &RawVkPhysicalDeviceLimits) -> VkPhysicalDeviceLimits {
        VkPhysicalDeviceLimits {
            max_image_dimension_1d: u32::vk_to_wrapped(&src.max_image_dimension_1d),
            max_image_dimension_2d: u32::vk_to_wrapped(&src.max_image_dimension_2d),
            max_image_dimension_3d: u32::vk_to_wrapped(&src.max_image_dimension_3d),
            max_image_dimension_cube: u32::vk_to_wrapped(&src.max_image_dimension_cube),
            max_image_array_layers: u32::vk_to_wrapped(&src.max_image_array_layers),
            max_texel_buffer_elements: u32::vk_to_wrapped(&src.max_texel_buffer_elements),
            max_uniform_buffer_range: u32::vk_to_wrapped(&src.max_uniform_buffer_range),
            max_storage_buffer_range: u32::vk_to_wrapped(&src.max_storage_buffer_range),
            max_push_constants_size: u32::vk_to_wrapped(&src.max_push_constants_size),
            max_memory_allocation_count: u32::vk_to_wrapped(&src.max_memory_allocation_count),
            max_sampler_allocation_count: u32::vk_to_wrapped(&src.max_sampler_allocation_count),
            buffer_image_granularity: u64::vk_to_wrapped(&src.buffer_image_granularity),
            sparse_address_space_size: u64::vk_to_wrapped(&src.sparse_address_space_size),
            max_bound_descriptor_sets: u32::vk_to_wrapped(&src.max_bound_descriptor_sets),
            max_per_stage_descriptor_samplers: u32::vk_to_wrapped(&src.max_per_stage_descriptor_samplers),
            max_per_stage_descriptor_uniform_buffers: u32::vk_to_wrapped(&src.max_per_stage_descriptor_uniform_buffers),
            max_per_stage_descriptor_storage_buffers: u32::vk_to_wrapped(&src.max_per_stage_descriptor_storage_buffers),
            max_per_stage_descriptor_sampled_images: u32::vk_to_wrapped(&src.max_per_stage_descriptor_sampled_images),
            max_per_stage_descriptor_storage_images: u32::vk_to_wrapped(&src.max_per_stage_descriptor_storage_images),
            max_per_stage_descriptor_input_attachments: u32::vk_to_wrapped(&src.max_per_stage_descriptor_input_attachments),
            max_per_stage_resources: u32::vk_to_wrapped(&src.max_per_stage_resources),
            max_descriptor_set_samplers: u32::vk_to_wrapped(&src.max_descriptor_set_samplers),
            max_descriptor_set_uniform_buffers: u32::vk_to_wrapped(&src.max_descriptor_set_uniform_buffers),
            max_descriptor_set_uniform_buffers_dynamic: u32::vk_to_wrapped(&src.max_descriptor_set_uniform_buffers_dynamic),
            max_descriptor_set_storage_buffers: u32::vk_to_wrapped(&src.max_descriptor_set_storage_buffers),
            max_descriptor_set_storage_buffers_dynamic: u32::vk_to_wrapped(&src.max_descriptor_set_storage_buffers_dynamic),
            max_descriptor_set_sampled_images: u32::vk_to_wrapped(&src.max_descriptor_set_sampled_images),
            max_descriptor_set_storage_images: u32::vk_to_wrapped(&src.max_descriptor_set_storage_images),
            max_descriptor_set_input_attachments: u32::vk_to_wrapped(&src.max_descriptor_set_input_attachments),
            max_vertex_input_attributes: u32::vk_to_wrapped(&src.max_vertex_input_attributes),
            max_vertex_input_bindings: u32::vk_to_wrapped(&src.max_vertex_input_bindings),
            max_vertex_input_attribute_offset: u32::vk_to_wrapped(&src.max_vertex_input_attribute_offset),
            max_vertex_input_binding_stride: u32::vk_to_wrapped(&src.max_vertex_input_binding_stride),
            max_vertex_output_components: u32::vk_to_wrapped(&src.max_vertex_output_components),
            max_tessellation_generation_level: u32::vk_to_wrapped(&src.max_tessellation_generation_level),
            max_tessellation_patch_size: u32::vk_to_wrapped(&src.max_tessellation_patch_size),
            max_tessellation_control_per_vertex_input_components: u32::vk_to_wrapped(&src.max_tessellation_control_per_vertex_input_components),
            max_tessellation_control_per_vertex_output_components: u32::vk_to_wrapped(&src.max_tessellation_control_per_vertex_output_components),
            max_tessellation_control_per_patch_output_components: u32::vk_to_wrapped(&src.max_tessellation_control_per_patch_output_components),
            max_tessellation_control_total_output_components: u32::vk_to_wrapped(&src.max_tessellation_control_total_output_components),
            max_tessellation_evaluation_input_components: u32::vk_to_wrapped(&src.max_tessellation_evaluation_input_components),
            max_tessellation_evaluation_output_components: u32::vk_to_wrapped(&src.max_tessellation_evaluation_output_components),
            max_geometry_shader_invocations: u32::vk_to_wrapped(&src.max_geometry_shader_invocations),
            max_geometry_input_components: u32::vk_to_wrapped(&src.max_geometry_input_components),
            max_geometry_output_components: u32::vk_to_wrapped(&src.max_geometry_output_components),
            max_geometry_output_vertices: u32::vk_to_wrapped(&src.max_geometry_output_vertices),
            max_geometry_total_output_components: u32::vk_to_wrapped(&src.max_geometry_total_output_components),
            max_fragment_input_components: u32::vk_to_wrapped(&src.max_fragment_input_components),
            max_fragment_output_attachments: u32::vk_to_wrapped(&src.max_fragment_output_attachments),
            max_fragment_dual_src_attachments: u32::vk_to_wrapped(&src.max_fragment_dual_src_attachments),
            max_fragment_combined_output_resources: u32::vk_to_wrapped(&src.max_fragment_combined_output_resources),
            max_compute_shared_memory_size: u32::vk_to_wrapped(&src.max_compute_shared_memory_size),
            max_compute_work_group_count: unsafe { let mut dst_array : [usize; 3] = mem::uninitialized(); vk_to_wrapped_array(&src.max_compute_work_group_count, &mut dst_array); dst_array },
            max_compute_work_group_invocations: u32::vk_to_wrapped(&src.max_compute_work_group_invocations),
            max_compute_work_group_size: unsafe { let mut dst_array : [usize; 3] = mem::uninitialized(); vk_to_wrapped_array(&src.max_compute_work_group_size, &mut dst_array); dst_array },
            sub_pixel_precision_bits: src.sub_pixel_precision_bits,
            sub_texel_precision_bits: src.sub_texel_precision_bits,
            mipmap_precision_bits: src.mipmap_precision_bits,
            max_draw_indexed_index_value: u32::vk_to_wrapped(&src.max_draw_indexed_index_value),
            max_draw_indirect_count: u32::vk_to_wrapped(&src.max_draw_indirect_count),
            max_sampler_lod_bias: src.max_sampler_lod_bias,
            max_sampler_anisotropy: src.max_sampler_anisotropy,
            max_viewports: u32::vk_to_wrapped(&src.max_viewports),
            max_viewport_dimensions: unsafe { let mut dst_array : [usize; 2] = mem::uninitialized(); vk_to_wrapped_array(&src.max_viewport_dimensions, &mut dst_array); dst_array },
            viewport_bounds_range: unsafe { let mut dst_array : [f32; 2] = mem::uninitialized(); to_array(&src.viewport_bounds_range, &mut dst_array); dst_array },
            viewport_sub_pixel_bits: src.viewport_sub_pixel_bits,
            min_memory_map_alignment: src.min_memory_map_alignment,
            min_texel_buffer_offset_alignment: u64::vk_to_wrapped(&src.min_texel_buffer_offset_alignment),
            min_uniform_buffer_offset_alignment: u64::vk_to_wrapped(&src.min_uniform_buffer_offset_alignment),
            min_storage_buffer_offset_alignment: u64::vk_to_wrapped(&src.min_storage_buffer_offset_alignment),
            min_texel_offset: i32::vk_to_wrapped(&src.min_texel_offset),
            max_texel_offset: u32::vk_to_wrapped(&src.max_texel_offset),
            min_texel_gather_offset: i32::vk_to_wrapped(&src.min_texel_gather_offset),
            max_texel_gather_offset: u32::vk_to_wrapped(&src.max_texel_gather_offset),
            min_interpolation_offset: src.min_interpolation_offset,
            max_interpolation_offset: src.max_interpolation_offset,
            sub_pixel_interpolation_offset_bits: src.sub_pixel_interpolation_offset_bits,
            max_framebuffer_width: u32::vk_to_wrapped(&src.max_framebuffer_width),
            max_framebuffer_height: u32::vk_to_wrapped(&src.max_framebuffer_height),
            max_framebuffer_layers: u32::vk_to_wrapped(&src.max_framebuffer_layers),
            framebuffer_color_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.framebuffer_color_sample_counts),
            framebuffer_depth_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.framebuffer_depth_sample_counts),
            framebuffer_stencil_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.framebuffer_stencil_sample_counts),
            framebuffer_no_attachments_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.framebuffer_no_attachments_sample_counts),
            max_color_attachments: u32::vk_to_wrapped(&src.max_color_attachments),
            sampled_image_color_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.sampled_image_color_sample_counts),
            sampled_image_integer_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.sampled_image_integer_sample_counts),
            sampled_image_depth_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.sampled_image_depth_sample_counts),
            sampled_image_stencil_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.sampled_image_stencil_sample_counts),
            storage_image_sample_counts: RawVkSampleCountFlags::vk_to_wrapped(&src.storage_image_sample_counts),
            max_sample_mask_words: src.max_sample_mask_words,
            timestamp_compute_and_graphics: u32::vk_to_wrapped(&src.timestamp_compute_and_graphics),
            timestamp_period: src.timestamp_period,
            max_clip_distances: u32::vk_to_wrapped(&src.max_clip_distances),
            max_cull_distances: u32::vk_to_wrapped(&src.max_cull_distances),
            max_combined_clip_and_cull_distances: u32::vk_to_wrapped(&src.max_combined_clip_and_cull_distances),
            discrete_queue_priorities: u32::vk_to_wrapped(&src.discrete_queue_priorities),
            point_size_range: unsafe { let mut dst_array : [f32; 2] = mem::uninitialized(); to_array(&src.point_size_range, &mut dst_array); dst_array },
            line_width_range: unsafe { let mut dst_array : [f32; 2] = mem::uninitialized(); to_array(&src.line_width_range, &mut dst_array); dst_array },
            point_size_granularity: src.point_size_granularity,
            line_width_granularity: src.line_width_granularity,
            strict_lines: u32::vk_to_wrapped(&src.strict_lines),
            standard_sample_locations: u32::vk_to_wrapped(&src.standard_sample_locations),
            optimal_buffer_copy_offset_alignment: u64::vk_to_wrapped(&src.optimal_buffer_copy_offset_alignment),
            optimal_buffer_copy_row_pitch_alignment: u64::vk_to_wrapped(&src.optimal_buffer_copy_row_pitch_alignment),
            non_coherent_atom_size: u64::vk_to_wrapped(&src.non_coherent_atom_size),
        }
    }
}

impl Default for VkPhysicalDeviceLimits {
    fn default() -> VkPhysicalDeviceLimits {
        VkPhysicalDeviceLimits {
            max_image_dimension_1d: 0,
            max_image_dimension_2d: 0,
            max_image_dimension_3d: 0,
            max_image_dimension_cube: 0,
            max_image_array_layers: 0,
            max_texel_buffer_elements: 0,
            max_uniform_buffer_range: 0,
            max_storage_buffer_range: 0,
            max_push_constants_size: 0,
            max_memory_allocation_count: 0,
            max_sampler_allocation_count: 0,
            buffer_image_granularity: 0,
            sparse_address_space_size: 0,
            max_bound_descriptor_sets: 0,
            max_per_stage_descriptor_samplers: 0,
            max_per_stage_descriptor_uniform_buffers: 0,
            max_per_stage_descriptor_storage_buffers: 0,
            max_per_stage_descriptor_sampled_images: 0,
            max_per_stage_descriptor_storage_images: 0,
            max_per_stage_descriptor_input_attachments: 0,
            max_per_stage_resources: 0,
            max_descriptor_set_samplers: 0,
            max_descriptor_set_uniform_buffers: 0,
            max_descriptor_set_uniform_buffers_dynamic: 0,
            max_descriptor_set_storage_buffers: 0,
            max_descriptor_set_storage_buffers_dynamic: 0,
            max_descriptor_set_sampled_images: 0,
            max_descriptor_set_storage_images: 0,
            max_descriptor_set_input_attachments: 0,
            max_vertex_input_attributes: 0,
            max_vertex_input_bindings: 0,
            max_vertex_input_attribute_offset: 0,
            max_vertex_input_binding_stride: 0,
            max_vertex_output_components: 0,
            max_tessellation_generation_level: 0,
            max_tessellation_patch_size: 0,
            max_tessellation_control_per_vertex_input_components: 0,
            max_tessellation_control_per_vertex_output_components: 0,
            max_tessellation_control_per_patch_output_components: 0,
            max_tessellation_control_total_output_components: 0,
            max_tessellation_evaluation_input_components: 0,
            max_tessellation_evaluation_output_components: 0,
            max_geometry_shader_invocations: 0,
            max_geometry_input_components: 0,
            max_geometry_output_components: 0,
            max_geometry_output_vertices: 0,
            max_geometry_total_output_components: 0,
            max_fragment_input_components: 0,
            max_fragment_output_attachments: 0,
            max_fragment_dual_src_attachments: 0,
            max_fragment_combined_output_resources: 0,
            max_compute_shared_memory_size: 0,
            max_compute_work_group_count: unsafe { let mut dst_array : [usize; 3] = mem::uninitialized(); fill_vk_array(&mut dst_array); dst_array },
            max_compute_work_group_invocations: 0,
            max_compute_work_group_size: unsafe { let mut dst_array : [usize; 3] = mem::uninitialized(); fill_vk_array(&mut dst_array); dst_array },
            sub_pixel_precision_bits: 0,
            sub_texel_precision_bits: 0,
            mipmap_precision_bits: 0,
            max_draw_indexed_index_value: 0,
            max_draw_indirect_count: 0,
            max_sampler_lod_bias: 0.0,
            max_sampler_anisotropy: 0.0,
            max_viewports: 0,
            max_viewport_dimensions: unsafe { let mut dst_array : [usize; 2] = mem::uninitialized(); fill_vk_array(&mut dst_array); dst_array },
            viewport_bounds_range: [0.0; 2],
            viewport_sub_pixel_bits: 0,
            min_memory_map_alignment: 0,
            min_texel_buffer_offset_alignment: 0,
            min_uniform_buffer_offset_alignment: 0,
            min_storage_buffer_offset_alignment: 0,
            min_texel_offset: 0,
            max_texel_offset: 0,
            min_texel_gather_offset: 0,
            max_texel_gather_offset: 0,
            min_interpolation_offset: 0.0,
            max_interpolation_offset: 0.0,
            sub_pixel_interpolation_offset_bits: 0,
            max_framebuffer_width: 0,
            max_framebuffer_height: 0,
            max_framebuffer_layers: 0,
            framebuffer_color_sample_counts: VkSampleCountFlags::default(),
            framebuffer_depth_sample_counts: VkSampleCountFlags::default(),
            framebuffer_stencil_sample_counts: VkSampleCountFlags::default(),
            framebuffer_no_attachments_sample_counts: VkSampleCountFlags::default(),
            max_color_attachments: 0,
            sampled_image_color_sample_counts: VkSampleCountFlags::default(),
            sampled_image_integer_sample_counts: VkSampleCountFlags::default(),
            sampled_image_depth_sample_counts: VkSampleCountFlags::default(),
            sampled_image_stencil_sample_counts: VkSampleCountFlags::default(),
            storage_image_sample_counts: VkSampleCountFlags::default(),
            max_sample_mask_words: 0,
            timestamp_compute_and_graphics: false,
            timestamp_period: 0.0,
            max_clip_distances: 0,
            max_cull_distances: 0,
            max_combined_clip_and_cull_distances: 0,
            discrete_queue_priorities: 0,
            point_size_range: [0.0; 2],
            line_width_range: [0.0; 2],
            point_size_granularity: 0.0,
            line_width_granularity: 0.0,
            strict_lines: false,
            standard_sample_locations: false,
            optimal_buffer_copy_offset_alignment: 0,
            optimal_buffer_copy_row_pitch_alignment: 0,
            non_coherent_atom_size: 0,
        }
    }
}

impl VkSetup for VkPhysicalDeviceLimits {
    fn vk_setup(&mut self, fn_table: *mut VkInstanceFunctionTable, instance: RawVkInstance, device: RawVkDevice) {
        
    }
}

impl VkFree for RawVkPhysicalDeviceLimits {
    fn vk_free(&mut self) {
        
    }
}