logo
pub enum SamplerCreationError {
Show 19 variants OomError(OomError), TooManyObjects, ExtensionNotEnabled { extension: &'static str, reason: &'static str, }, FeatureNotEnabled { feature: &'static str, reason: &'static str, }, AnisotropyInvalidFilter { mag_filter: Filter, min_filter: Filter, }, CompareInvalidReductionMode { reduction_mode: SamplerReductionMode, }, MaxSamplerAnisotropyExceeded { requested: f32, maximum: f32, }, MaxSamplerLodBiasExceeded { requested: f32, maximum: f32, }, SamplerYcbcrConversionAnisotropyEnabled, SamplerYcbcrConversionChromaFilterMismatch { chroma_filter: Filter, mag_filter: Filter, min_filter: Filter, }, SamplerYcbcrConversionInvalidAddressMode { address_mode_u: SamplerAddressMode, address_mode_v: SamplerAddressMode, address_mode_w: SamplerAddressMode, }, SamplerYcbcrConversionInvalidReductionMode { reduction_mode: SamplerReductionMode, }, SamplerYcbcrConversionUnnormalizedCoordinatesEnabled, UnnormalizedCoordinatesAnisotropyEnabled, UnnormalizedCoordinatesCompareEnabled, UnnormalizedCoordinatesFiltersNotEqual { mag_filter: Filter, min_filter: Filter, }, UnnormalizedCoordinatesInvalidAddressMode { address_mode_u: SamplerAddressMode, address_mode_v: SamplerAddressMode, }, UnnormalizedCoordinatesInvalidMipmapMode { mipmap_mode: SamplerMipmapMode, }, UnnormalizedCoordinatesNonzeroLod { lod: RangeInclusive<f32>, },
}
Expand description

Error that can happen when creating an instance.

Variants

OomError(OomError)

Not enough memory.

TooManyObjects

Too many sampler objects have been created. You must destroy some before creating new ones. Note the specs guarantee that at least 4000 samplers can exist simultaneously.

ExtensionNotEnabled

Fields

extension: &'static str
reason: &'static str

FeatureNotEnabled

Fields

feature: &'static str
reason: &'static str

AnisotropyInvalidFilter

Fields

mag_filter: Filter
min_filter: Filter

Anisotropy was enabled with an invalid filter.

CompareInvalidReductionMode

Fields

reduction_mode: SamplerReductionMode

Depth comparison was enabled with an invalid reduction mode.

MaxSamplerAnisotropyExceeded

Fields

requested: f32

The value that was requested.

maximum: f32

The maximum supported value.

The requested anisotropy level exceeds the device’s limits.

MaxSamplerLodBiasExceeded

Fields

requested: f32

The value that was requested.

maximum: f32

The maximum supported value.

The requested mip lod bias exceeds the device’s limits.

SamplerYcbcrConversionAnisotropyEnabled

Sampler YCbCr conversion was enabled together with anisotropy.

SamplerYcbcrConversionChromaFilterMismatch

Fields

chroma_filter: Filter
mag_filter: Filter
min_filter: Filter

Sampler YCbCr conversion was enabled, and its format does not support sampled_image_ycbcr_conversion_separate_reconstruction_filter, but mag_filter or min_filter did not match the conversion’s chroma_filter.

SamplerYcbcrConversionInvalidAddressMode

Fields

address_mode_u: SamplerAddressMode
address_mode_v: SamplerAddressMode
address_mode_w: SamplerAddressMode

Sampler YCbCr conversion was enabled, but the address mode for u, v or w was something other than ClampToEdge.

SamplerYcbcrConversionInvalidReductionMode

Fields

reduction_mode: SamplerReductionMode

Sampler YCbCr conversion was enabled, but the reduction mode was something other than WeightedAverage.

SamplerYcbcrConversionUnnormalizedCoordinatesEnabled

Sampler YCbCr conversion was enabled together with unnormalized coordinates.

UnnormalizedCoordinatesAnisotropyEnabled

Unnormalized coordinates were enabled together with anisotropy.

UnnormalizedCoordinatesCompareEnabled

Unnormalized coordinates were enabled together with depth comparison.

UnnormalizedCoordinatesFiltersNotEqual

Fields

mag_filter: Filter
min_filter: Filter

Unnormalized coordinates were enabled, but the min and mag filters were not equal.

UnnormalizedCoordinatesInvalidAddressMode

Fields

address_mode_u: SamplerAddressMode
address_mode_v: SamplerAddressMode

Unnormalized coordinates were enabled, but the address mode for u or v was something other than ClampToEdge or ClampToBorder.

UnnormalizedCoordinatesInvalidMipmapMode

Fields

mipmap_mode: SamplerMipmapMode

Unnormalized coordinates were enabled, but the mipmap mode was not Nearest.

UnnormalizedCoordinatesNonzeroLod

Fields

Unnormalized coordinates were enabled, but the LOD range was not zero.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Builds a pointer to this type from a raw pointer.

Returns true if the size is suitable to store a type like this.

Returns the size of an individual element.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.