pub enum ImageCreationError {
Show 27 variants
AllocError(DeviceMemoryAllocationError),
ExtensionNotEnabled {
extension: &'static str,
reason: &'static str,
},
FeatureNotEnabled {
feature: &'static str,
reason: &'static str,
},
Array2dCompatibleNot3d,
BlockTexelViewCompatibleNotCompressed,
CubeCompatibleNot2d,
CubeCompatibleNotEnoughArrayLayers,
CubeCompatibleNotSquare,
CubeCompatibleMultisampling,
ExternalMemoryInvalidInitialLayout,
FormatNotSupported,
FormatUsageNotSupported {
usage: &'static str,
},
ImageFormatPropertiesNotSupported,
MaxArrayLayersExceeded {
array_layers: u32,
max: u32,
},
MaxDimensionsExceeded {
extent: [u32; 3],
max: [u32; 3],
},
MaxFramebufferDimensionsExceeded {
extent: [u32; 2],
max: [u32; 2],
},
MaxMipLevelsExceeded {
mip_levels: u32,
max: u32,
},
MultisampleCubeCompatible,
MultisampleLinearTiling,
MultisampleMultipleMipLevels,
MultisampleNot2d,
SampleCountNotSupported {
samples: SampleCount,
supported: SampleCounts,
},
SharingInvalidQueueFamilyId {
id: u32,
},
YcbcrFormatInvalidDimensions,
YcbcrFormatMultipleMipLevels,
YcbcrFormatMultisampling,
YcbcrFormatNot2d,
}
Expand description
Error that can happen when creating an instance.
Variants
AllocError(DeviceMemoryAllocationError)
Allocating memory failed.
ExtensionNotEnabled
FeatureNotEnabled
Array2dCompatibleNot3d
The array_2d_compatible flag was enabled, but the image type was not 3D.
BlockTexelViewCompatibleNotCompressed
The block_texel_view_compatible flag was enabled, but the given format was not compressed.
CubeCompatibleNot2d
The cube_compatible flag was enabled, but the image type was not 2D.
CubeCompatibleNotEnoughArrayLayers
The cube_compatible flag was enabled, but the number of array layers was less than 6.
CubeCompatibleNotSquare
The cube_compatible flag was enabled, but the image dimensions were not square.
CubeCompatibleMultisampling
The cube_compatible flag was enabled together with multisampling.
ExternalMemoryInvalidInitialLayout
One or more external memory handle types were provided, but the initial layout was not
Undefined
.
FormatNotSupported
The given format was not supported by the device.
FormatUsageNotSupported
Fields
usage: &'static str
A requested usage flag was not supported by the given format.
ImageFormatPropertiesNotSupported
The image configuration as queried through the image_format_properties
function was not
supported by the device.
MaxArrayLayersExceeded
The number of array layers exceeds the maximum supported by the device for this image configuration.
MaxDimensionsExceeded
The specified dimensions exceed the maximum supported by the device for this image configuration.
MaxFramebufferDimensionsExceeded
The usage included one of the attachment types, and the specified width and height exceeded
the max_framebuffer_width
or max_framebuffer_height
limits.
MaxMipLevelsExceeded
The maximum number of mip levels for the given dimensions has been exceeded.
MultisampleCubeCompatible
Multisampling was enabled, and the cube_compatible
flag was set.
MultisampleLinearTiling
Multisampling was enabled, and tiling was Linear
.
MultisampleMultipleMipLevels
Multisampling was enabled, and multiple mip levels were specified.
MultisampleNot2d
Multisampling was enabled, but the image type was not 2D.
SampleCountNotSupported
The sample count is not supported by the device for this image configuration.
SharingInvalidQueueFamilyId
Fields
id: u32
The sharing mode was set to Concurrent
, but one of the specified queue family ids was not
valid.
YcbcrFormatInvalidDimensions
A YCbCr format was given, but the specified width and/or height was not a multiple of 2 as required by the format’s chroma subsampling.
YcbcrFormatMultipleMipLevels
A YCbCr format was given, and multiple mip levels were specified.
YcbcrFormatMultisampling
A YCbCr format was given, and multisampling was enabled.
YcbcrFormatNot2d
A YCbCr format was given, but the image type was not 2D.
Trait Implementations
sourceimpl Clone for ImageCreationError
impl Clone for ImageCreationError
sourcefn clone(&self) -> ImageCreationError
fn clone(&self) -> ImageCreationError
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 ImageCreationError
impl Debug for ImageCreationError
sourceimpl Display for ImageCreationError
impl Display for ImageCreationError
sourceimpl Error for ImageCreationError
impl Error for ImageCreationError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<DeviceMemoryAllocationError> for ImageCreationError
impl From<DeviceMemoryAllocationError> for ImageCreationError
sourcefn from(err: DeviceMemoryAllocationError) -> Self
fn from(err: DeviceMemoryAllocationError) -> Self
Performs the conversion.
sourceimpl From<OomError> for ImageCreationError
impl From<OomError> for ImageCreationError
sourceimpl PartialEq<ImageCreationError> for ImageCreationError
impl PartialEq<ImageCreationError> for ImageCreationError
sourcefn eq(&self, other: &ImageCreationError) -> bool
fn eq(&self, other: &ImageCreationError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ImageCreationError) -> bool
fn ne(&self, other: &ImageCreationError) -> bool
This method tests for !=
.
impl Eq for ImageCreationError
impl StructuralEq for ImageCreationError
impl StructuralPartialEq for ImageCreationError
Auto Trait Implementations
impl RefUnwindSafe for ImageCreationError
impl Send for ImageCreationError
impl Sync for ImageCreationError
impl Unpin for ImageCreationError
impl UnwindSafe for ImageCreationError
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more