pub struct ImageType {
pub scalar_ty: ScalarType,
pub dim: Dim,
pub is_depth: Option<bool>,
pub is_array: bool,
pub is_multisampled: bool,
pub is_sampled: Option<bool>,
pub fmt: ImageFormat,
}
Fields§
§scalar_ty: ScalarType
Scalar type of image access result.
dim: Dim
Dimension of the image.
is_depth: Option<bool>
Whether the image is a depth image, or None
if it’s unknown at compile
time.
is_array: bool
Whether the image is an array of images. In Vulkan, it means that the
image can have multiple layers. In Vulkan, only Dim1D
, Dim2D
, and
DimCube
can be arrayed.
is_multisampled: bool
Whether the image is multisampled. In Vulkan, only 2D images and 2D image arrays can be multi sampled.
is_sampled: Option<bool>
Whether the image is sampled, or None
if it’s unknown at compile time.
fmt: ImageFormat
Matches VkImageCreateInfo::format
. Can be ImageFormat::Unknown
in
case of a sampled image.
Trait Implementations§
source§impl PartialEq for ImageType
impl PartialEq for ImageType
source§impl SpirvType for ImageType
impl SpirvType for ImageType
source§fn min_nbyte(&self) -> Option<usize>
fn min_nbyte(&self) -> Option<usize>
Minimum size of the type in bytes if it can be represented in-memory.
It’s the size of all static members and plus one element if it’s an array.
Same as
wgpu::BindingType::Buffer::min_binding_size
.source§fn nbyte(&self) -> Option<usize>
fn nbyte(&self) -> Option<usize>
Size of the type in bytes if it can be represented in-memory.
source§fn is_sized(&self) -> bool
fn is_sized(&self) -> bool
Returns true if the type is sized. A sized type can be represented
in-memory. Otherwise the type can only be used as a descriptor resource.
source§fn member_offset(&self, _member_index: usize) -> Option<usize>
fn member_offset(&self, _member_index: usize) -> Option<usize>
Returns the offset of the i-th member in bytes if it’s a composite type.
source§fn access_ty(&self) -> Option<AccessType>
fn access_ty(&self) -> Option<AccessType>
Returns how the type can be accessed:
ReadOnly
, WriteOnly
or
ReadWrite
.impl Eq for ImageType
impl StructuralPartialEq for ImageType
Auto Trait Implementations§
impl Freeze for ImageType
impl RefUnwindSafe for ImageType
impl Send for ImageType
impl Sync for ImageType
impl Unpin for ImageType
impl UnwindSafe for ImageType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more