pub struct ImageInfo {Show 15 fields
pub alloc_dedicated: bool,
pub array_layer_count: u32,
pub depth: u32,
pub flags: ImageCreateFlags,
pub format: Format,
pub height: u32,
pub host_readable: bool,
pub host_writable: bool,
pub mip_level_count: u32,
pub sample_count: SampleCount,
pub sharing_mode: SharingMode,
pub tiling: ImageTiling,
pub image_type: ImageType,
pub usage: ImageUsageFlags,
pub width: u32,
}Expand description
Information used to create an Image instance.
See VkImageCreateInfo.
Fields§
§alloc_dedicated: boolSpecifies a dedicated memory allocation managed by the Vulkan driver and not by the internal memory allocation pool transient resources share.
The driver may optimize access to dedicated images.
array_layer_count: u32The number of layers in the image.
depth: u32Image extent of the Z axis, when describing a three dimensional image.
flags: ImageCreateFlagsA bitmask describing additional parameters of the image.
format: FormatThe format and type of the texel blocks that will be contained in the image.
height: u32Image extent of the Y axis, when describing a two or three dimensional image.
host_readable: boolSpecifies an image whose memory is host-visible and may be mapped for reads.
Memory optimal for CPU readback of data may be used.
host_writable: boolSpecifies an image whose memory is host-visible and may be mapped for writes.
Memory optimal for uploading data to the GPU may be used.
mip_level_count: u32The number of levels of detail available for minified sampling of the image.
sample_count: SampleCountSpecifies the number of [samples per texel].
See VkImageCreateInfo.
sharing_mode: SharingModeControls whether the image is accessible from a single queue family (EXCLUSIVE) or from
multiple queue families concurrently (CONCURRENT).
EXCLUSIVE (the default) restricts the image to a single queue family. This may enable
driver optimizations but requires ownership transfers to use the image on a different queue
family.
Set to CONCURRENT when the image will be accessed from multiple queue families (e.g.
graphics and compute on separate queues).
See
VkSharingMode
in the Vulkan specification.
tiling: ImageTilingSpecifies the tiling arrangement of the texel blocks in memory.
The default value is vk::ImageTiling::OPTIMAL.
image_type: ImageTypeThe basic dimensionality of the image.
Layers in array textures do not count as a dimension for the purposes of the image type.
usage: ImageUsageFlagsA bitmask describing the intended usage of the image.
See VkImageUsageFlagBits.
width: u32Image extent of the X axis.
Implementations§
Source§impl ImageInfo
impl ImageInfo
Sourcepub const fn cube(
size: u32,
format: Format,
usage: ImageUsageFlags,
) -> ImageInfo
pub const fn cube( size: u32, format: Format, usage: ImageUsageFlags, ) -> ImageInfo
Specifies a cube image.
Sourcepub const fn image_1d(
size: u32,
format: Format,
usage: ImageUsageFlags,
) -> ImageInfo
pub const fn image_1d( size: u32, format: Format, usage: ImageUsageFlags, ) -> ImageInfo
Specifies a one-dimensional image.
Sourcepub const fn image_2d(
width: u32,
height: u32,
format: Format,
usage: ImageUsageFlags,
) -> ImageInfo
pub const fn image_2d( width: u32, height: u32, format: Format, usage: ImageUsageFlags, ) -> ImageInfo
Specifies a two-dimensional image.
Sourcepub const fn image_2d_array(
width: u32,
height: u32,
array_layer_count: u32,
format: Format,
usage: ImageUsageFlags,
) -> ImageInfo
pub const fn image_2d_array( width: u32, height: u32, array_layer_count: u32, format: Format, usage: ImageUsageFlags, ) -> ImageInfo
Specifies a two-dimensional image array.
Sourcepub const fn image_3d(
width: u32,
height: u32,
depth: u32,
format: Format,
usage: ImageUsageFlags,
) -> ImageInfo
pub const fn image_3d( width: u32, height: u32, depth: u32, format: Format, usage: ImageUsageFlags, ) -> ImageInfo
Specifies a three-dimensional image.
Sourcepub fn builder() -> ImageInfoBuilder
pub fn builder() -> ImageInfoBuilder
Creates a default ImageInfoBuilder.
Sourcepub fn into_image_view(self) -> ImageViewInfo
pub fn into_image_view(self) -> ImageViewInfo
Provides an ImageViewInfo for this format, type, aspect, array elements, and mip levels.
Sourcepub fn is_cube_array(self) -> bool
pub fn is_cube_array(self) -> bool
Returns true if this image is a cube array.
Sourcepub fn is_host_visible(self) -> bool
pub fn is_host_visible(self) -> bool
Returns true if this information specifies host-visible memory.
Sourcepub fn into_builder(self) -> ImageInfoBuilder
pub fn into_builder(self) -> ImageInfoBuilder
Converts an ImageInfo into an ImageInfoBuilder.