lava/vulkan/vk/
vk_image_layout.rs1use utils::vk_traits::*;
4
5#[repr(i32)]
7#[derive(Debug, PartialEq, Copy, Clone)]
8pub enum VkImageLayout {
9 Undefined = 0,
10 General = 1,
11 ColorAttachmentOptimal = 2,
12 DepthStencilAttachmentOptimal = 3,
13 DepthStencilReadOnlyOptimal = 4,
14 ShaderReadOnlyOptimal = 5,
15 TransferSrcOptimal = 6,
16 TransferDstOptimal = 7,
17 Preinitialized = 8,
18 DepthReadOnlyStencilAttachmentOptimal = 1000117000,
19 DepthAttachmentStencilReadOnlyOptimal = 1000117001,
20 DepthAttachmentOptimal = 1000241000,
21 DepthReadOnlyOptimal = 1000241001,
22 StencilAttachmentOptimal = 1000241002,
23 StencilReadOnlyOptimal = 1000241003,
24 PresentSrcKhr = 1000001002,
25 SharedPresentKhr = 1000111000,
26 ShadingRateOptimalNv = 1000164003,
27 FragmentDensityMapOptimalExt = 1000218000,
28}
29
30#[doc(hidden)]
31pub type RawVkImageLayout = i32;
32
33impl VkWrappedType<RawVkImageLayout> for VkImageLayout {
34 fn vk_to_raw(src: &VkImageLayout, dst: &mut RawVkImageLayout) {
35 *dst = *src as i32
36 }
37}
38
39impl VkRawType<VkImageLayout> for RawVkImageLayout {
40 fn vk_to_wrapped(src: &RawVkImageLayout) -> VkImageLayout {
41 unsafe {
42 *((src as *const i32) as *const VkImageLayout)
43 }
44 }
45}
46
47impl Default for VkImageLayout {
48 fn default() -> VkImageLayout {
49 VkImageLayout::Undefined
50 }
51}