pub enum ValidationError {
MissingVertexFunction,
UnsupportedRasterSampleCount(UInteger),
MissingComputeFunction,
InvalidTextureDimensions {
width: UInteger,
height: UInteger,
depth: UInteger,
},
InvalidMipmapCount {
requested: UInteger,
max_allowed: UInteger,
},
UnsupportedTextureSampleCount(UInteger),
InvalidArrayLength,
InvalidLodRange {
min: f32,
max: f32,
},
InvalidAnisotropy(UInteger),
InvalidHeapSize,
CreationFailed(Option<Error>),
}Expand description
Validation error returned when resource creation would fail.
Metal’s validation layer sometimes aborts the process instead of returning an error for certain invalid configurations. These safe wrapper methods validate parameters before calling Metal APIs and return this error type instead of allowing the process to abort.
Variants§
MissingVertexFunction
Render pipeline descriptor is missing a required vertex function.
UnsupportedRasterSampleCount(UInteger)
The raster sample count is not supported by the device.
MissingComputeFunction
Compute pipeline descriptor is missing a required compute function.
InvalidTextureDimensions
Texture dimensions are invalid (width, height, or depth is zero).
InvalidMipmapCount
Requested mipmap count exceeds the maximum allowed for the texture dimensions.
UnsupportedTextureSampleCount(UInteger)
The texture sample count is not supported by the device.
InvalidArrayLength
Array length is invalid (must be > 0 for array textures).
InvalidLodRange
LOD clamp range is invalid (min must be <= max).
InvalidAnisotropy(UInteger)
Max anisotropy value is invalid (must be >= 1 and power of 2).
InvalidHeapSize
Heap size is invalid (must be > 0).
CreationFailed(Option<Error>)
Metal failed to create the resource.
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more