Skip to main content

lava/vulkan/vk/
vk_attachment_reference.rs

1// Generated by `scripts/generate.js`
2
3use 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::{VkImageLayout,RawVkImageLayout};
15
16/// Wrapper for [VkAttachmentReference](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAttachmentReference.html).
17#[derive(Debug, Clone)]
18pub struct VkAttachmentReference {
19    pub attachment: usize,
20    pub layout: VkImageLayout,
21}
22
23#[doc(hidden)]
24#[repr(C)]
25#[derive(Debug, Copy, Clone)]
26pub struct RawVkAttachmentReference {
27    pub attachment: u32,
28    pub layout: RawVkImageLayout,
29}
30
31impl VkWrappedType<RawVkAttachmentReference> for VkAttachmentReference {
32    fn vk_to_raw(src: &VkAttachmentReference, dst: &mut RawVkAttachmentReference) {
33        dst.attachment = vk_to_raw_value(&src.attachment);
34        dst.layout = vk_to_raw_value(&src.layout);
35    }
36}
37
38impl VkRawType<VkAttachmentReference> for RawVkAttachmentReference {
39    fn vk_to_wrapped(src: &RawVkAttachmentReference) -> VkAttachmentReference {
40        VkAttachmentReference {
41            attachment: u32::vk_to_wrapped(&src.attachment),
42            layout: RawVkImageLayout::vk_to_wrapped(&src.layout),
43        }
44    }
45}
46
47impl Default for VkAttachmentReference {
48    fn default() -> VkAttachmentReference {
49        VkAttachmentReference {
50            attachment: 0,
51            layout: Default::default(),
52        }
53    }
54}
55
56impl VkSetup for VkAttachmentReference {
57    fn vk_setup(&mut self, fn_table: *mut VkFunctionTable) {
58        
59    }
60}
61
62impl VkFree for RawVkAttachmentReference {
63    fn vk_free(&self) {
64        
65    }
66}