lava/vulkan/vk/
vk_command_buffer_allocate_info.rs1use std::os::raw::c_char;
4use std::ops::Deref;
5use std::ptr;
6use std::cmp;
7use std::mem;
8use utils::c_bindings::*;
9use utils::vk_convert::*;
10use utils::vk_null::*;
11use utils::vk_ptr::*;
12use utils::vk_traits::*;
13use vulkan::vk::*;
14use vulkan::vk::{VkStructureType,RawVkStructureType};
15use vulkan::vk::{VkCommandPool,RawVkCommandPool};
16use vulkan::vk::{VkCommandBufferLevel,RawVkCommandBufferLevel};
17
18#[derive(Debug, Clone)]
20pub struct VkCommandBufferAllocateInfo {
21 pub command_pool: VkCommandPool,
22 pub level: VkCommandBufferLevel,
23 pub command_buffer_count: usize,
24}
25
26#[doc(hidden)]
27#[repr(C)]
28#[derive(Debug, Copy, Clone)]
29pub struct RawVkCommandBufferAllocateInfo {
30 pub s_type: RawVkStructureType,
31 pub next: *mut c_void,
32 pub command_pool: RawVkCommandPool,
33 pub level: RawVkCommandBufferLevel,
34 pub command_buffer_count: u32,
35}
36
37impl VkWrappedType<RawVkCommandBufferAllocateInfo> for VkCommandBufferAllocateInfo {
38 fn vk_to_raw(src: &VkCommandBufferAllocateInfo, dst: &mut RawVkCommandBufferAllocateInfo) {
39 dst.s_type = vk_to_raw_value(&VkStructureType::CommandBufferAllocateInfo);
40 dst.next = ptr::null_mut();
41 dst.command_pool = vk_to_raw_value(&src.command_pool);
42 dst.level = vk_to_raw_value(&src.level);
43 dst.command_buffer_count = vk_to_raw_value(&src.command_buffer_count);
44 }
45}
46
47impl VkRawType<VkCommandBufferAllocateInfo> for RawVkCommandBufferAllocateInfo {
48 fn vk_to_wrapped(src: &RawVkCommandBufferAllocateInfo) -> VkCommandBufferAllocateInfo {
49 VkCommandBufferAllocateInfo {
50 command_pool: RawVkCommandPool::vk_to_wrapped(&src.command_pool),
51 level: RawVkCommandBufferLevel::vk_to_wrapped(&src.level),
52 command_buffer_count: u32::vk_to_wrapped(&src.command_buffer_count),
53 }
54 }
55}
56
57impl Default for VkCommandBufferAllocateInfo {
58 fn default() -> VkCommandBufferAllocateInfo {
59 VkCommandBufferAllocateInfo {
60 command_pool: Default::default(),
61 level: Default::default(),
62 command_buffer_count: 0,
63 }
64 }
65}
66
67impl VkSetup for VkCommandBufferAllocateInfo {
68 fn vk_setup(&mut self, fn_table: *mut VkFunctionTable) {
69 VkSetup::vk_setup(&mut self.command_pool, fn_table);
70 }
71}
72
73impl VkFree for RawVkCommandBufferAllocateInfo {
74 fn vk_free(&self) {
75
76 }
77}