Struct vulkano::image::immutable::ImmutableImage [−][src]
pub struct ImmutableImage<A = PotentialDedicatedAllocation<StdMemoryPoolAlloc>> { /* fields omitted */ }
Image whose purpose is to be used for read-only purposes. You can write to the image once, but then you must only ever read from it.
Implementations
impl ImmutableImage
[src]
impl ImmutableImage
[src]pub fn new<'a, I>(
device: Arc<Device>,
dimensions: ImageDimensions,
format: Format,
queue_families: I
) -> Result<Arc<ImmutableImage>, ImageCreationError> where
I: IntoIterator<Item = QueueFamily<'a>>,
[src]
device: Arc<Device>,
dimensions: ImageDimensions,
format: Format,
queue_families: I
) -> Result<Arc<ImmutableImage>, ImageCreationError> where
I: IntoIterator<Item = QueueFamily<'a>>,
use ImmutableImage::uninitialized instead
pub fn with_mipmaps<'a, I, M>(
device: Arc<Device>,
dimensions: ImageDimensions,
format: Format,
mipmaps: M,
queue_families: I
) -> Result<Arc<ImmutableImage>, ImageCreationError> where
I: IntoIterator<Item = QueueFamily<'a>>,
M: Into<MipmapsCount>,
[src]
device: Arc<Device>,
dimensions: ImageDimensions,
format: Format,
mipmaps: M,
queue_families: I
) -> Result<Arc<ImmutableImage>, ImageCreationError> where
I: IntoIterator<Item = QueueFamily<'a>>,
M: Into<MipmapsCount>,
use ImmutableImage::uninitialized instead
pub fn uninitialized<'a, I, M>(
device: Arc<Device>,
dimensions: ImageDimensions,
format: Format,
mipmaps: M,
usage: ImageUsage,
flags: ImageCreateFlags,
layout: ImageLayout,
queue_families: I
) -> Result<(Arc<ImmutableImage>, ImmutableImageInitialization), ImageCreationError> where
I: IntoIterator<Item = QueueFamily<'a>>,
M: Into<MipmapsCount>,
[src]
pub fn uninitialized<'a, I, M>(
device: Arc<Device>,
dimensions: ImageDimensions,
format: Format,
mipmaps: M,
usage: ImageUsage,
flags: ImageCreateFlags,
layout: ImageLayout,
queue_families: I
) -> Result<(Arc<ImmutableImage>, ImmutableImageInitialization), ImageCreationError> where
I: IntoIterator<Item = QueueFamily<'a>>,
M: Into<MipmapsCount>,
[src]Builds an uninitialized immutable image.
Returns two things: the image, and a special access that should be used for the initial upload to the image.
pub fn from_iter<Px, I>(
iter: I,
dimensions: ImageDimensions,
mipmaps: MipmapsCount,
format: Format,
queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, PrimaryAutoCommandBuffer>), ImageCreationError> where
Px: Pixel + Send + Sync + Clone + 'static,
I: ExactSizeIterator<Item = Px>,
[src]
pub fn from_iter<Px, I>(
iter: I,
dimensions: ImageDimensions,
mipmaps: MipmapsCount,
format: Format,
queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, PrimaryAutoCommandBuffer>), ImageCreationError> where
Px: Pixel + Send + Sync + Clone + 'static,
I: ExactSizeIterator<Item = Px>,
[src]Construct an ImmutableImage from the contents of iter
.
pub fn from_buffer<B, Px>(
source: B,
dimensions: ImageDimensions,
mipmaps: MipmapsCount,
format: Format,
queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, PrimaryAutoCommandBuffer>), ImageCreationError> where
B: BufferAccess + TypedBufferAccess<Content = [Px]> + 'static + Clone + Send + Sync,
Px: Pixel + Send + Sync + Clone + 'static,
[src]
pub fn from_buffer<B, Px>(
source: B,
dimensions: ImageDimensions,
mipmaps: MipmapsCount,
format: Format,
queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, PrimaryAutoCommandBuffer>), ImageCreationError> where
B: BufferAccess + TypedBufferAccess<Content = [Px]> + 'static + Clone + Send + Sync,
Px: Pixel + Send + Sync + Clone + 'static,
[src]Construct an ImmutableImage containing a copy of the data in source
.
impl<A> ImmutableImage<A>
[src]
impl<A> ImmutableImage<A>
[src]pub fn dimensions(&self) -> ImageDimensions
[src]
pub fn dimensions(&self) -> ImageDimensions
[src]Returns the dimensions of the image.
pub fn mipmap_levels(&self) -> u32
[src]
pub fn mipmap_levels(&self) -> u32
[src]Returns the number of mipmap levels of the image.
Trait Implementations
impl<A: Debug> Debug for ImmutableImage<A>
[src]
impl<A: Debug> Debug for ImmutableImage<A>
[src]impl<A> Hash for ImmutableImage<A>
[src]
impl<A> Hash for ImmutableImage<A>
[src]impl<A> ImageAccess for ImmutableImage<A>
[src]
impl<A> ImageAccess for ImmutableImage<A>
[src]fn inner(&self) -> ImageInner<'_>
[src]
fn inner(&self) -> ImageInner<'_>
[src]Returns the inner unsafe image object used by this image.
fn initial_layout_requirement(&self) -> ImageLayout
[src]
fn initial_layout_requirement(&self) -> ImageLayout
[src]Returns the layout that the image has when it is first used in a primary command buffer. Read more
fn final_layout_requirement(&self) -> ImageLayout
[src]
fn final_layout_requirement(&self) -> ImageLayout
[src]Returns the layout that the image must be returned to before the end of the command buffer. Read more
fn descriptor_layouts(&self) -> Option<ImageDescriptorLayouts>
[src]
fn descriptor_layouts(&self) -> Option<ImageDescriptorLayouts>
[src]Returns an ImageDescriptorLayouts
structure specifying the image layout to use
in descriptors of various kinds. Read more
fn conflicts_buffer(&self, other: &dyn BufferAccess) -> bool
[src]
fn conflicts_buffer(&self, other: &dyn BufferAccess) -> bool
[src]Returns true if an access to self
potentially overlaps the same memory as an
access to other
. Read more
fn conflicts_image(&self, other: &dyn ImageAccess) -> bool
[src]
fn conflicts_image(&self, other: &dyn ImageAccess) -> bool
[src]Returns true if an access to self
potentially overlaps the same memory as an
access to other
. Read more
fn conflict_key(&self) -> u64
[src]
fn conflict_key(&self) -> u64
[src]Returns a key that uniquely identifies the memory content of the image. Two ranges that potentially overlap in memory must return the same key. Read more
fn try_gpu_lock(
&self,
exclusive_access: bool,
expected_layout: ImageLayout
) -> Result<(), AccessError>
[src]
fn try_gpu_lock(
&self,
exclusive_access: bool,
expected_layout: ImageLayout
) -> Result<(), AccessError>
[src]Locks the resource for usage on the GPU. Returns an error if the lock can’t be acquired. Read more
unsafe fn increase_gpu_lock(&self)
[src]
unsafe fn increase_gpu_lock(&self)
[src]Locks the resource for usage on the GPU. Supposes that the resource is already locked, and simply increases the lock by one. Read more
unsafe fn unlock(&self, new_layout: Option<ImageLayout>)
[src]
unsafe fn unlock(&self, new_layout: Option<ImageLayout>)
[src]Unlocks the resource previously acquired with try_gpu_lock
or increase_gpu_lock
. Read more
fn current_miplevels_access(&self) -> Range<u32>
[src]
fn current_miplevels_access(&self) -> Range<u32>
[src]Returns the current mip level that is accessed by the gpu
fn current_layer_levels_access(&self) -> Range<u32>
[src]
fn current_layer_levels_access(&self) -> Range<u32>
[src]Returns the current layer level that is accessed by the gpu
fn has_depth(&self) -> bool
[src]
fn has_depth(&self) -> bool
[src]Returns true if the image has a depth component. In other words, if it is a depth or a depth-stencil format. Read more
fn has_stencil(&self) -> bool
[src]
fn has_stencil(&self) -> bool
[src]Returns true if the image has a stencil component. In other words, if it is a stencil or a depth-stencil format. Read more
fn mipmap_levels(&self) -> u32
[src]
fn mipmap_levels(&self) -> u32
[src]Returns the number of mipmap levels of this image.
fn dimensions(&self) -> ImageDimensions
[src]
fn dimensions(&self) -> ImageDimensions
[src]Returns the dimensions of the image.
fn supports_blit_source(&self) -> bool
[src]
fn supports_blit_source(&self) -> bool
[src]Returns true if the image can be used as a source for blits.
fn supports_blit_destination(&self) -> bool
[src]
fn supports_blit_destination(&self) -> bool
[src]Returns true if the image can be used as a destination for blits.
unsafe fn layout_initialized(&self)
[src]
unsafe fn layout_initialized(&self)
[src]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 more
fn is_layout_initialized(&self) -> bool
[src]
unsafe fn preinitialized_layout(&self) -> bool
[src]
unsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self> where
Self: Sized,
[src]
unsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self> where
Self: Sized,
[src]Wraps around this ImageAccess
and returns an identical ImageAccess
but whose initial
layout requirement is either Undefined
or Preinitialized
. Read more
impl<P, A> ImageContent<P> for ImmutableImage<A>
[src]
impl<P, A> ImageContent<P> for ImmutableImage<A>
[src]fn matches_format(&self) -> bool
[src]
fn matches_format(&self) -> bool
[src]Checks whether pixels of type P
match the format of the image.
impl<A> PartialEq<ImmutableImage<A>> for ImmutableImage<A>
[src]
impl<A> PartialEq<ImmutableImage<A>> for ImmutableImage<A>
[src]impl<A> Eq for ImmutableImage<A>
[src]
Auto Trait Implementations
impl<A> RefUnwindSafe for ImmutableImage<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<A> Send for ImmutableImage<A> where
A: Send,
A: Send,
impl<A> Sync for ImmutableImage<A> where
A: Sync,
A: Sync,
impl<A> Unpin for ImmutableImage<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for ImmutableImage<A> where
A: UnwindSafe,
A: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Content for T
[src]
impl<T> Content for T
[src]pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]
pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]Builds a pointer to this type from a raw pointer.
pub fn is_size_suitable(usize) -> bool
[src]
pub fn is_size_suitable(usize) -> bool
[src]Returns true if the size is suitable to store a type like this.
pub fn indiv_size() -> usize
[src]
pub fn indiv_size() -> usize
[src]Returns the size of an individual element.