lava 0.4.9

Rust wrapper to manipulate Vulkan more conveniently than with bindings.
Documentation
// 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::{VkStructureType,RawVkStructureType};

/// Wrapper for [VkDeviceGroupSubmitInfo](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceGroupSubmitInfo.html).
#[derive(Debug, Clone)]
pub struct VkDeviceGroupSubmitInfo {
    pub wait_semaphore_device_indices: Vec<usize>,
    pub command_buffer_device_masks: Vec<u32>,
    pub signal_semaphore_device_indices: Vec<usize>,
}

#[doc(hidden)]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RawVkDeviceGroupSubmitInfo {
    pub s_type: RawVkStructureType,
    pub next: *mut c_void,
    pub wait_semaphore_count: u32,
    pub wait_semaphore_device_indices: *mut u32,
    pub command_buffer_count: u32,
    pub command_buffer_device_masks: *mut u32,
    pub signal_semaphore_count: u32,
    pub signal_semaphore_device_indices: *mut u32,
}

impl VkWrappedType<RawVkDeviceGroupSubmitInfo> for VkDeviceGroupSubmitInfo {
    fn vk_to_raw(src: &VkDeviceGroupSubmitInfo, dst: &mut RawVkDeviceGroupSubmitInfo) {
        dst.s_type = vk_to_raw_value(&VkStructureType::DeviceGroupSubmitInfo);
        dst.next = ptr::null_mut();
        dst.wait_semaphore_count = src.wait_semaphore_device_indices.len() as u32;
        dst.wait_semaphore_device_indices = new_ptr_vk_array(&src.wait_semaphore_device_indices);
        dst.command_buffer_count = src.command_buffer_device_masks.len() as u32;
        dst.command_buffer_device_masks = get_vec_ptr(&src.command_buffer_device_masks);
        dst.signal_semaphore_count = src.signal_semaphore_device_indices.len() as u32;
        dst.signal_semaphore_device_indices = new_ptr_vk_array(&src.signal_semaphore_device_indices);
    }
}

impl VkRawType<VkDeviceGroupSubmitInfo> for RawVkDeviceGroupSubmitInfo {
    fn vk_to_wrapped(src: &RawVkDeviceGroupSubmitInfo) -> VkDeviceGroupSubmitInfo {
        VkDeviceGroupSubmitInfo {
            wait_semaphore_device_indices: new_vk_array(src.wait_semaphore_count, src.wait_semaphore_device_indices),
            command_buffer_device_masks: vec_from_ptr(src.command_buffer_count as usize, src.command_buffer_device_masks),
            signal_semaphore_device_indices: new_vk_array(src.signal_semaphore_count, src.signal_semaphore_device_indices),
        }
    }
}

impl Default for VkDeviceGroupSubmitInfo {
    fn default() -> VkDeviceGroupSubmitInfo {
        VkDeviceGroupSubmitInfo {
            wait_semaphore_device_indices: Vec::new(),
            command_buffer_device_masks: Vec::new(),
            signal_semaphore_device_indices: Vec::new(),
        }
    }
}

impl VkSetup for VkDeviceGroupSubmitInfo {
    fn vk_setup(&mut self, fn_table: *mut VkFunctionTable) {
        
    }
}

impl VkFree for RawVkDeviceGroupSubmitInfo {
    fn vk_free(&self) {
        free_ptr(self.wait_semaphore_device_indices);
        free_ptr(self.signal_semaphore_device_indices);
    }
}