pub struct UnsafeImageCreateInfo {Show 14 fields
pub dimensions: ImageDimensions,
pub format: Option<Format>,
pub mip_levels: u32,
pub samples: SampleCount,
pub tiling: ImageTiling,
pub usage: ImageUsage,
pub sharing: Sharing<SmallVec<[u32; 4]>>,
pub initial_layout: ImageLayout,
pub external_memory_handle_types: ExternalMemoryHandleTypes,
pub mutable_format: bool,
pub cube_compatible: bool,
pub array_2d_compatible: bool,
pub block_texel_view_compatible: bool,
pub _ne: NonExhaustive,
}
Expand description
Parameters to create a new UnsafeImage
.
Fields
dimensions: ImageDimensions
The type, extent and number of array layers to create the image with.
The default value is ImageDimensions::Dim2d { width: 0, height: 0, array_layers: 1 }
,
which must be overridden.
format: Option<Format>
The format used to store the image data.
The default value is None
, which must be overridden.
mip_levels: u32
The number of mip levels to create the image with.
The default value is 1
.
samples: SampleCount
The number of samples per texel that the image should use.
The default value is SampleCount::Sample1
.
tiling: ImageTiling
The memory arrangement of the texel blocks.
The default value is ImageTiling::Optimal
.
usage: ImageUsage
How the image is going to be used.
The default value is ImageUsage::none()
, which must be overridden.
sharing: Sharing<SmallVec<[u32; 4]>>
Whether the image can be shared across multiple queues, or is limited to a single queue.
The default value is Sharing::Exclusive
.
initial_layout: ImageLayout
The image layout that the image will have when it is created.
The default value is ImageLayout::Undefined
.
external_memory_handle_types: ExternalMemoryHandleTypes
The external memory handle types that are going to be used with the image.
If any of the fields in this value are set, the device must either support API version 1.1
or the khr_external_memory
extension must be enabled, and initial_layout
must be set to
ImageLayout::Undefined
.
The default value is ExternalMemoryHandleTypes::none()
.
mutable_format: bool
For non-multi-planar formats, whether an image view wrapping the image can have a different format.
For multi-planar formats, whether an image view wrapping the image can be created from a single plane of the image.
The default value is false
.
cube_compatible: bool
For 2D images, whether an image view of type
ImageViewType::Cube
or
ImageViewType::CubeArray
can be created
from the image.
The default value is false
.
array_2d_compatible: bool
For 3D images, whether an image view of type
ImageViewType::Dim2d
or
ImageViewType::Dim2dArray
can be created
from the image.
The default value is false
.
block_texel_view_compatible: bool
For images with a compressed format, whether an image view with an uncompressed format can be created from the image, where each texel in the view will correspond to a compressed texel block in the image.
Requires mutable_format
.
The default value is false
.
_ne: NonExhaustive
Trait Implementations
sourceimpl Clone for UnsafeImageCreateInfo
impl Clone for UnsafeImageCreateInfo
sourcefn clone(&self) -> UnsafeImageCreateInfo
fn clone(&self) -> UnsafeImageCreateInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UnsafeImageCreateInfo
impl Debug for UnsafeImageCreateInfo
Auto Trait Implementations
impl RefUnwindSafe for UnsafeImageCreateInfo
impl Send for UnsafeImageCreateInfo
impl Sync for UnsafeImageCreateInfo
impl Unpin for UnsafeImageCreateInfo
impl UnwindSafe for UnsafeImageCreateInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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