Struct vulkano::image::StorageImage
[−]
[src]
pub struct StorageImage<F, A = Arc<StdMemoryPool>> where
A: MemoryPool, { /* fields omitted */ }
General-purpose image in device memory. Can be used for any usage, but will be slower than a specialized image.
Methods
impl<F> StorageImage<F>
[src]
fn new<'a, I>(
device: Arc<Device>,
dimensions: Dimensions,
format: F,
queue_families: I
) -> Result<Arc<StorageImage<F>>, ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
[src]
device: Arc<Device>,
dimensions: Dimensions,
format: F,
queue_families: I
) -> Result<Arc<StorageImage<F>>, ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
Creates a new image with the given dimensions and format.
fn with_usage<'a, I>(
device: Arc<Device>,
dimensions: Dimensions,
format: F,
usage: ImageUsage,
queue_families: I
) -> Result<Arc<StorageImage<F>>, ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
[src]
device: Arc<Device>,
dimensions: Dimensions,
format: F,
usage: ImageUsage,
queue_families: I
) -> Result<Arc<StorageImage<F>>, ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
Same as new
, but allows specifying the usage.
impl<F, A> StorageImage<F, A> where
A: MemoryPool,
[src]
A: MemoryPool,
fn dimensions(&self) -> Dimensions
[src]
Returns the dimensions of the image.
Trait Implementations
impl<F: Debug, A: Debug> Debug for StorageImage<F, A> where
A: MemoryPool,
A::Alloc: Debug,
[src]
A: MemoryPool,
A::Alloc: Debug,
impl<F, A> ImageAccess for StorageImage<F, A> where
F: 'static + Send + Sync,
A: MemoryPool,
[src]
F: 'static + Send + Sync,
A: MemoryPool,
fn inner(&self) -> ImageInner
[src]
Returns the inner unsafe image object used by this image.
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]
Returns the layout that the image must be returned to before the end of the command buffer. Read more
fn conflicts_buffer(&self, other: &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: &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]
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,
_: bool,
expected_layout: ImageLayout
) -> Result<(), AccessError>
[src]
&self,
_: bool,
expected_layout: ImageLayout
) -> Result<(), AccessError>
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]
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]
Unlocks the resource previously acquired with try_gpu_lock
or increase_gpu_lock
. Read more
fn format(&self) -> Format
[src]
Returns the format of this image.
fn has_color(&self) -> bool
[src]
Returns true if the image is a color image.
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]
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]
Returns the number of mipmap levels of this image.
fn samples(&self) -> u32
[src]
Returns the number of samples of this image.
fn dimensions(&self) -> ImageDimensions
[src]
Returns the dimensions of the image.
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]
Returns true if the image can be used as a destination for blits.
unsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self> where
Self: Sized,
[src]
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self> where
Self: Sized,
Wraps around this ImageAccess
and returns an identical ImageAccess
but whose initial layout requirement is either Undefined
or Preinitialized
. Read more
impl<F, A> ImageClearValue<F::ClearValue> for StorageImage<F, A> where
F: FormatDesc + 'static + Send + Sync,
A: MemoryPool,
[src]
F: FormatDesc + 'static + Send + Sync,
A: MemoryPool,
fn decode(&self, value: F::ClearValue) -> Option<ClearValue>
[src]
impl<P, F, A> ImageContent<P> for StorageImage<F, A> where
F: 'static + Send + Sync,
A: MemoryPool,
[src]
F: 'static + Send + Sync,
A: MemoryPool,
fn matches_format(&self) -> bool
[src]
Checks whether pixels of type P
match the format of the image.
impl<F, A> ImageViewAccess for StorageImage<F, A> where
F: 'static + Send + Sync,
A: MemoryPool,
[src]
F: 'static + Send + Sync,
A: MemoryPool,
fn parent(&self) -> &ImageAccess
[src]
fn dimensions(&self) -> Dimensions
[src]
Returns the dimensions of the image view.
fn inner(&self) -> &UnsafeImageView
[src]
Returns the inner unsafe image view object used by this image view.
fn descriptor_set_storage_image_layout(&self) -> ImageLayout
[src]
Returns the image layout to use in a descriptor with the given subresource.
fn descriptor_set_combined_image_sampler_layout(&self) -> ImageLayout
[src]
Returns the image layout to use in a descriptor with the given subresource.
fn descriptor_set_sampled_image_layout(&self) -> ImageLayout
[src]
Returns the image layout to use in a descriptor with the given subresource.
fn descriptor_set_input_attachment_layout(&self) -> ImageLayout
[src]
Returns the image layout to use in a descriptor with the given subresource.
fn identity_swizzle(&self) -> bool
[src]
Returns true if the view doesn't use components swizzling. Read more
fn format(&self) -> Format
[src]
Returns the format of this view. This can be different from the parent's format.
fn samples(&self) -> u32
[src]
fn can_be_sampled(&self, _sampler: &Sampler) -> bool
[src]
Returns true if the given sampler can be used with this image view. Read more