Struct vulkano::image::sys::Image

source ·
pub struct Image { /* private fields */ }
Expand description

A multi-dimensioned storage for texel data.

Unlike RawImage, an Image has memory backing it, and can be used normally.

Implementations

Returns the type of memory that is backing this image.

Returns the memory requirements for this image.

  • If self.flags().disjoint is not set, this returns a slice with a length of 1.
  • If self.flags().disjoint is set, this returns a slice with a length equal to self.format().unwrap().planes().len().

Returns the flags the image was created with.

Returns the dimensions of the image.

Returns the image’s format.

Returns the features supported by the image’s format.

Returns the number of mipmap levels in the image.

Returns the initial layout of the image.

Returns the number of samples for the image.

Returns the tiling of the image.

Returns the usage the image was created with.

Returns the stencil usage the image was created with.

Returns the sharing the image was created with.

Returns the external memory handle types that are supported with this image.

Returns an ImageSubresourceLayers covering the first mip level of the image. All aspects of the image are selected, or plane0 if the image is multi-planar.

Returns an ImageSubresourceRange covering the whole image. If the image is multi-planar, only the color aspect is selected.

Queries the memory layout of a single subresource of the image.

Only images with linear tiling are supported, if they do not have a format with both a depth and a stencil format. Images with optimal tiling have an opaque image layout that is not suitable for direct memory accesses, and likewise for combined depth/stencil formats. Multi-planar formats are supported, but you must specify one of the planes as the aspect, not ImageAspect::Color.

The layout is invariant for each image. However it is not cached, as this would waste memory in the case of non-linear-tiling images. You are encouraged to store the layout somewhere in order to avoid calling this semi-expensive function at every single memory access.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the device that owns Self.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type of the object.
Returns the raw Vulkan handle of the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.