logo
pub unsafe trait ImageAccess: DeviceOwned + Send + Sync {
Show 16 methods fn inner(&self) -> ImageInner<'_>; fn initial_layout_requirement(&self) -> ImageLayout; fn final_layout_requirement(&self) -> ImageLayout; fn descriptor_layouts(&self) -> Option<ImageDescriptorLayouts>; fn dimensions(&self) -> ImageDimensions { ... } fn format(&self) -> Format { ... } fn format_features(&self) -> &FormatFeatures { ... } fn mip_levels(&self) -> u32 { ... } fn samples(&self) -> SampleCount { ... } fn usage(&self) -> &ImageUsage { ... } fn subresource_layers(&self) -> ImageSubresourceLayers { ... } fn subresource_range(&self) -> ImageSubresourceRange { ... } unsafe fn layout_initialized(&self) { ... } fn is_layout_initialized(&self) -> bool { ... } fn initial_layout(&self) -> ImageLayout { ... } unsafe fn forced_undefined_initial_layout(
        self,
        preinitialized: bool
    ) -> Arc<ImageAccessFromUndefinedLayout<Self>>
    where
        Self: Sized
, { ... }
}
Expand description

Trait for types that represent the way a GPU can access an image.

Required Methods

Returns the inner unsafe image object used by this image.

Returns the layout that the image has when it is first used in a primary command buffer.

The first time you use an image in an AutoCommandBufferBuilder, vulkano will suppose that the image is in the layout returned by this function. Later when the command buffer is submitted vulkano will check whether the image is actually in this layout, and if it is not the case then an error will be returned. TODO: ^ that check is not yet implemented

Returns the layout that the image must be returned to before the end of the command buffer.

When an image is used in an AutoCommandBufferBuilder vulkano will automatically transition this image to the layout returned by this function at the end of the command buffer, if necessary.

Except for special cases, this value should likely be the same as the one returned by initial_layout_requirement so that the user can submit multiple command buffers that use this image one after the other.

Returns an ImageDescriptorLayouts structure specifying the image layout to use in descriptors of various kinds.

This must return Some if the image is to be used to create an image view.

Provided Methods

Returns the dimensions of the image.

Returns the format of this image.

Returns the features supported by the image’s format.

Returns the number of mipmap levels of this image.

Returns the number of samples of this image.

Returns the usage the image was created with.

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.

When images are created their memory layout is initially Undefined or Preinitialized. This method allows the image memory barrier creation process to signal when an image has been transitioned out of its initial Undefined or Preinitialized state. This allows vulkano to avoid creating unnecessary image memory barriers between future uses of the image.

Unsafe

If a user calls this method outside of the intended context and signals that the layout is no longer Undefined or Preinitialized when it is still in an Undefined or Preinitialized state, this may result in the vulkan implementation attempting to use an image in an invalid layout. The same problem must be considered by the implementer of the method.

Wraps around this ImageAccess and returns an identical ImageAccess but whose initial layout requirement is either Undefined or Preinitialized.

Trait Implementations

Formats the value using the given formatter. Read more

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 !=.

Implementors