Struct basalt::image_view::BstImageView
source · [−]pub struct BstImageView { /* private fields */ }
Implementations
sourceimpl BstImageView
impl BstImageView
sourcepub fn from_storage(
image: Arc<StorageImage>
) -> Result<Arc<Self>, ImageViewCreationError>
pub fn from_storage(
image: Arc<StorageImage>
) -> Result<Arc<Self>, ImageViewCreationError>
Create a BstImageView
from a vulkano StorageImage
.
sourcepub fn from_immutable(
image: Arc<ImmutableImage>
) -> Result<Arc<Self>, ImageViewCreationError>
pub fn from_immutable(
image: Arc<ImmutableImage>
) -> Result<Arc<Self>, ImageViewCreationError>
Create a BstImageView
from a vulkano ImmutableImage
.
sourcepub fn from_attachment(
image: Arc<AttachmentImage>
) -> Result<Arc<Self>, ImageViewCreationError>
pub fn from_attachment(
image: Arc<AttachmentImage>
) -> Result<Arc<Self>, ImageViewCreationError>
Create a BstImageView
from a vulkano AttachmentImage
.
sourcepub fn set_drop_fn<F: FnMut() + Send + 'static>(&self, drop_fn_op: Option<F>)
pub fn set_drop_fn<F: FnMut() + Send + 'static>(&self, drop_fn_op: Option<F>)
Set function to be called with all temporary views are dropped.
Overwrites existing drop function if it was previously set.
Panics
Panics if this method is called on a temporary view.
sourcepub fn create_tmp(self: &Arc<Self>) -> Arc<Self>
pub fn create_tmp(self: &Arc<Self>) -> Arc<Self>
Create a clone of this view that is intented to be temporary.
sourcepub fn is_temporary(&self) -> bool
pub fn is_temporary(&self) -> bool
Check whether this view is temporary. In the case it is the method that provided this view intended for it be dropped after use.
sourcepub fn temporary_views(self: &Arc<Self>) -> usize
pub fn temporary_views(self: &Arc<Self>) -> usize
Amount of temporary views this image has.
sourcepub fn mark_stale(&self)
pub fn mark_stale(&self)
sourcepub fn is_stale(&self) -> bool
pub fn is_stale(&self) -> bool
Check if this view is stale. Always returns false for Parent views.
sourcepub fn dimensions(&self) -> ImageDimensions
pub fn dimensions(&self) -> ImageDimensions
Fetch the dimensions of this image.
Trait Implementations
sourceimpl Debug for BstImageView
impl Debug for BstImageView
sourceimpl DeviceOwned for BstImageView
impl DeviceOwned for BstImageView
sourceimpl Drop for BstImageView
impl Drop for BstImageView
sourceimpl ImageAccess for BstImageView
impl ImageAccess for BstImageView
sourcefn inner(&self) -> ImageInner<'_>
fn inner(&self) -> ImageInner<'_>
Returns the inner unsafe image object used by this image.
sourcefn initial_layout_requirement(&self) -> ImageLayout
fn initial_layout_requirement(&self) -> ImageLayout
Returns the layout that the image has when it is first used in a primary command buffer. Read more
sourcefn final_layout_requirement(&self) -> ImageLayout
fn final_layout_requirement(&self) -> ImageLayout
Returns the layout that the image must be returned to before the end of the command buffer. Read more
sourcefn descriptor_layouts(&self) -> Option<ImageDescriptorLayouts>
fn descriptor_layouts(&self) -> Option<ImageDescriptorLayouts>
Returns an
ImageDescriptorLayouts
structure specifying the image layout to use
in descriptors of various kinds. Read moresourceunsafe fn layout_initialized(&self)
unsafe fn layout_initialized(&self)
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. Read morefn is_layout_initialized(&self) -> bool
sourcefn dimensions(&self) -> ImageDimensions
fn dimensions(&self) -> ImageDimensions
Returns the dimensions of the image.
sourcefn format_features(&self) -> &FormatFeatures
fn format_features(&self) -> &FormatFeatures
Returns the features supported by the image’s format.
sourcefn mip_levels(&self) -> u32
fn mip_levels(&self) -> u32
Returns the number of mipmap levels of this image.
sourcefn samples(&self) -> SampleCount
fn samples(&self) -> SampleCount
Returns the number of samples of this image.
sourcefn usage(&self) -> &ImageUsage
fn usage(&self) -> &ImageUsage
Returns the usage the image was created with.
sourcefn stencil_usage(&self) -> &ImageUsage
fn stencil_usage(&self) -> &ImageUsage
Returns the stencil usage the image was created with.
sourcefn subresource_layers(&self) -> ImageSubresourceLayers
fn subresource_layers(&self) -> ImageSubresourceLayers
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. Read moresourcefn subresource_range(&self) -> ImageSubresourceRange
fn subresource_range(&self) -> ImageSubresourceRange
Returns an
ImageSubresourceRange
covering the whole image. If the image is multi-planar,
only the color
aspect is selected. Read morefn initial_layout(&self) -> ImageLayout
sourceunsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> Arc<ImageAccessFromUndefinedLayout<Self>>
unsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> Arc<ImageAccessFromUndefinedLayout<Self>>
Wraps around this
ImageAccess
and returns an identical ImageAccess
but whose initial
layout requirement is either Undefined
or Preinitialized
. Read moresourceimpl ImageViewAbstract for BstImageView
impl ImageViewAbstract for BstImageView
sourcefn image(&self) -> Arc<dyn ImageAccess>
fn image(&self) -> Arc<dyn ImageAccess>
Returns the wrapped image that this image view was created from.
sourcefn component_mapping(&self) -> ComponentMapping
fn component_mapping(&self) -> ComponentMapping
Returns the component mapping of this view.
sourcefn filter_cubic(&self) -> bool
fn filter_cubic(&self) -> bool
sourcefn filter_cubic_minmax(&self) -> bool
fn filter_cubic_minmax(&self) -> bool
sourcefn format(&self) -> Option<Format>
fn format(&self) -> Option<Format>
Returns the format of this view. This can be different from the parent’s format.
sourcefn format_features(&self) -> &FormatFeatures
fn format_features(&self) -> &FormatFeatures
Returns the features supported by the image view’s format.
sourcefn sampler_ycbcr_conversion(&self) -> Option<&Arc<SamplerYcbcrConversion>>
fn sampler_ycbcr_conversion(&self) -> Option<&Arc<SamplerYcbcrConversion>>
Returns the sampler YCbCr conversion that this image view was created with, if any.
sourcefn subresource_range(&self) -> &ImageSubresourceRange
fn subresource_range(&self) -> &ImageSubresourceRange
Returns the subresource range of the wrapped image that this view exposes.
sourcefn usage(&self) -> &ImageUsage
fn usage(&self) -> &ImageUsage
Returns the usage of the image view.
sourcefn view_type(&self) -> ImageViewType
fn view_type(&self) -> ImageViewType
Returns the
ImageViewType
of this image view.sourcefn dimensions(&self) -> ImageDimensions
fn dimensions(&self) -> ImageDimensions
Returns the dimensions of this view.
sourceimpl PartialEq<BstImageView> for BstImageView
impl PartialEq<BstImageView> for BstImageView
sourceimpl VulkanObject for BstImageView
impl VulkanObject for BstImageView
sourcefn internal_object(&self) -> ImageView
fn internal_object(&self) -> ImageView
Returns a reference to the object.
impl Eq for BstImageView
Auto Trait Implementations
impl !RefUnwindSafe for BstImageView
impl Send for BstImageView
impl Sync for BstImageView
impl Unpin for BstImageView
impl !UnwindSafe for BstImageView
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more