ferroui_vulkan/vulkan_image_info.rs
1use ferroui_base::PixelSize;
2
3/// A Vulkan image as a render backend needs to know it: the handles are
4/// those of the device of the context that hands the value out, the other
5/// members are the numeric values of the Vulkan enumerations.
6#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
7pub struct VulkanImageInfo {
8 /// The `VkFormat`.
9 pub format: u32,
10 /// The size in pixels.
11 pub pixel_size: PixelSize,
12 /// The `VkImage`.
13 pub handle: u64,
14 /// The `VkImageLayout` the image is in.
15 pub layout: u32,
16 /// The `VkImageTiling`.
17 pub tiling: u32,
18 /// The `VkImageUsageFlags` the image was created with.
19 pub usage_flags: u32,
20 /// The number of mip levels.
21 pub level_count: u32,
22 /// The number of samples per pixel.
23 pub sample_count: u32,
24 /// The `VkDeviceMemory` bound to the image.
25 pub memory_handle: u64,
26 /// The `VkImageView` of the image.
27 pub view_handle: u64,
28 /// The size of the memory in bytes.
29 pub memory_size: u64,
30 /// Whether the image is a protected one.
31 pub is_protected: bool,
32}