[−][src]Struct vulkano::image::immutable::ImmutableImage
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.
Methods
impl<F> ImmutableImage<F>
[src]
pub fn new<'a, I>(
device: Arc<Device>,
dimensions: Dimensions,
format: F,
queue_families: I
) -> Result<Arc<ImmutableImage<F>>, ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
[src]
device: Arc<Device>,
dimensions: Dimensions,
format: F,
queue_families: I
) -> Result<Arc<ImmutableImage<F>>, ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
Deprecated:
use ImmutableImage::uninitialized instead
pub fn with_mipmaps<'a, I, M>(
device: Arc<Device>,
dimensions: Dimensions,
format: F,
mipmaps: M,
queue_families: I
) -> Result<Arc<ImmutableImage<F>>, ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
M: Into<MipmapsCount>,
[src]
device: Arc<Device>,
dimensions: Dimensions,
format: F,
mipmaps: M,
queue_families: I
) -> Result<Arc<ImmutableImage<F>>, ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
M: Into<MipmapsCount>,
Deprecated:
use ImmutableImage::uninitialized instead
pub fn uninitialized<'a, I, M>(
device: Arc<Device>,
dimensions: Dimensions,
format: F,
mipmaps: M,
usage: ImageUsage,
layout: ImageLayout,
queue_families: I
) -> Result<(Arc<ImmutableImage<F>>, ImmutableImageInitialization<F>), ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
M: Into<MipmapsCount>,
[src]
device: Arc<Device>,
dimensions: Dimensions,
format: F,
mipmaps: M,
usage: ImageUsage,
layout: ImageLayout,
queue_families: I
) -> Result<(Arc<ImmutableImage<F>>, ImmutableImageInitialization<F>), ImageCreationError> where
F: FormatDesc,
I: IntoIterator<Item = QueueFamily<'a>>,
M: Into<MipmapsCount>,
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<P, I>(
iter: I,
dimensions: Dimensions,
format: F,
queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, AutoCommandBuffer>), ImageCreationError> where
P: Send + Sync + Clone + 'static,
F: FormatDesc + AcceptsPixels<P> + 'static + Send + Sync,
I: ExactSizeIterator<Item = P>,
Format: AcceptsPixels<P>,
[src]
iter: I,
dimensions: Dimensions,
format: F,
queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, AutoCommandBuffer>), ImageCreationError> where
P: Send + Sync + Clone + 'static,
F: FormatDesc + AcceptsPixels<P> + 'static + Send + Sync,
I: ExactSizeIterator<Item = P>,
Format: AcceptsPixels<P>,
Construct an ImmutableImage from the contents of iter
.
TODO: Support mipmaps
pub fn from_buffer<B, P>(
source: B,
dimensions: Dimensions,
format: F,
queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, AutoCommandBuffer>), ImageCreationError> where
B: BufferAccess + TypedBufferAccess<Content = [P]> + 'static + Clone + Send + Sync,
P: Send + Sync + Clone + 'static,
F: FormatDesc + AcceptsPixels<P> + 'static + Send + Sync,
Format: AcceptsPixels<P>,
[src]
source: B,
dimensions: Dimensions,
format: F,
queue: Arc<Queue>
) -> Result<(Arc<Self>, CommandBufferExecFuture<NowFuture, AutoCommandBuffer>), ImageCreationError> where
B: BufferAccess + TypedBufferAccess<Content = [P]> + 'static + Clone + Send + Sync,
P: Send + Sync + Clone + 'static,
F: FormatDesc + AcceptsPixels<P> + 'static + Send + Sync,
Format: AcceptsPixels<P>,
Construct an ImmutableImage containing a copy of the data in source
.
TODO: Support mipmaps
impl<F, A> ImmutableImage<F, A>
[src]
pub fn dimensions(&self) -> Dimensions
[src]
Returns the dimensions of the image.
pub fn mipmap_levels(&self) -> u32
[src]
Returns the number of mipmap levels of the image.
Trait Implementations
impl<F, A> ImageAccess for ImmutableImage<F, A> where
F: 'static + Send + Sync,
[src]
F: 'static + Send + Sync,
fn inner(&self) -> ImageInner
[src]
fn initial_layout_requirement(&self) -> ImageLayout
[src]
fn final_layout_requirement(&self) -> ImageLayout
[src]
fn conflicts_buffer(&self, other: &dyn BufferAccess) -> bool
[src]
fn conflicts_image(&self, other: &dyn ImageAccess) -> bool
[src]
fn conflict_key(&self) -> u64
[src]
fn try_gpu_lock(
&self,
exclusive_access: bool,
expected_layout: ImageLayout
) -> Result<(), AccessError>
[src]
&self,
exclusive_access: bool,
expected_layout: ImageLayout
) -> Result<(), AccessError>
unsafe fn increase_gpu_lock(&self)
[src]
unsafe fn unlock(&self, new_layout: Option<ImageLayout>)
[src]
fn format(&self) -> Format
[src]
fn has_color(&self) -> bool
[src]
fn has_depth(&self) -> bool
[src]
fn has_stencil(&self) -> bool
[src]
fn mipmap_levels(&self) -> u32
[src]
fn samples(&self) -> u32
[src]
fn dimensions(&self) -> ImageDimensions
[src]
fn supports_blit_source(&self) -> bool
[src]
fn supports_blit_destination(&self) -> bool
[src]
unsafe fn layout_initialized(&self)
[src]
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]
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self> where
Self: Sized,
impl<P, F, A> ImageContent<P> for ImmutableImage<F, A> where
F: 'static + Send + Sync,
[src]
F: 'static + Send + Sync,
fn matches_format(&self) -> bool
[src]
impl<F: 'static, A> ImageViewAccess for ImmutableImage<F, A> where
F: 'static + Send + Sync,
[src]
F: 'static + Send + Sync,
fn parent(&self) -> &dyn ImageAccess
[src]
fn dimensions(&self) -> Dimensions
[src]
fn inner(&self) -> &UnsafeImageView
[src]
fn descriptor_set_storage_image_layout(&self) -> ImageLayout
[src]
fn descriptor_set_combined_image_sampler_layout(&self) -> ImageLayout
[src]
fn descriptor_set_sampled_image_layout(&self) -> ImageLayout
[src]
fn descriptor_set_input_attachment_layout(&self) -> ImageLayout
[src]
fn identity_swizzle(&self) -> bool
[src]
fn format(&self) -> Format
[src]
fn samples(&self) -> u32
[src]
fn can_be_sampled(&self, _sampler: &Sampler) -> bool
[src]
impl<F: Debug, A: Debug> Debug for ImmutableImage<F, A>
[src]
Auto Trait Implementations
impl<F, A> Send for ImmutableImage<F, A> where
A: Send,
F: Send,
A: Send,
F: Send,
impl<F, A> Unpin for ImmutableImage<F, A> where
A: Unpin,
F: Unpin,
A: Unpin,
F: Unpin,
impl<F, A> Sync for ImmutableImage<F, A> where
A: Sync,
F: Sync,
A: Sync,
F: Sync,
impl<F, A> UnwindSafe for ImmutableImage<F, A> where
A: UnwindSafe,
F: UnwindSafe,
A: UnwindSafe,
F: UnwindSafe,
impl<F, A> RefUnwindSafe for ImmutableImage<F, A> where
A: RefUnwindSafe,
F: RefUnwindSafe,
A: RefUnwindSafe,
F: RefUnwindSafe,
Blanket Implementations
impl<T> ImageAccess for T where
T: SafeDeref,
<T as Deref>::Target: ImageAccess,
[src]
T: SafeDeref,
<T as Deref>::Target: ImageAccess,
fn inner(&Self) -> ImageInner
[src]
fn initial_layout_requirement(&Self) -> ImageLayout
[src]
fn final_layout_requirement(&Self) -> ImageLayout
[src]
fn conflicts_buffer(&Self, &dyn BufferAccess) -> bool
[src]
fn conflicts_image(&Self, &dyn ImageAccess) -> bool
[src]
fn conflict_key(&Self) -> u64
[src]
fn try_gpu_lock(&Self, bool, ImageLayout) -> Result<(), AccessError>
[src]
unsafe fn increase_gpu_lock(&Self)
[src]
unsafe fn unlock(&Self, Option<ImageLayout>)
[src]
unsafe fn layout_initialized(&Self)
[src]
fn is_layout_initialized(&Self) -> bool
[src]
fn format(&self) -> Format
[src]
fn has_color(&self) -> bool
[src]
fn has_depth(&self) -> bool
[src]
fn has_stencil(&self) -> bool
[src]
fn mipmap_levels(&self) -> u32
[src]
fn samples(&self) -> u32
[src]
fn dimensions(&self) -> ImageDimensions
[src]
fn supports_blit_source(&self) -> bool
[src]
fn supports_blit_destination(&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]
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self> where
Self: Sized,
impl<T> ImageViewAccess for T where
T: SafeDeref,
<T as Deref>::Target: ImageViewAccess,
[src]
T: SafeDeref,
<T as Deref>::Target: ImageViewAccess,
fn parent(&Self) -> &dyn ImageAccess
[src]
fn inner(&Self) -> &UnsafeImageView
[src]
fn dimensions(&Self) -> Dimensions
[src]
fn descriptor_set_storage_image_layout(&Self) -> ImageLayout
[src]
fn descriptor_set_combined_image_sampler_layout(&Self) -> ImageLayout
[src]
fn descriptor_set_sampled_image_layout(&Self) -> ImageLayout
[src]
fn descriptor_set_input_attachment_layout(&Self) -> ImageLayout
[src]
fn identity_swizzle(&Self) -> bool
[src]
fn can_be_sampled(&Self, &Sampler) -> bool
[src]
fn format(&self) -> Format
[src]
fn samples(&self) -> u32
[src]
impl<T> Content for T
[src]
fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]
fn is_size_suitable(usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,