logo
pub enum SamplerCreationError {
Show 18 variants OomError(OomError), TooManyObjects, RequirementNotMet { required_for: &'static str, requires_one_of: RequiresOneOf, }, 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: [SamplerAddressMode; 3], }, SamplerYcbcrConversionInvalidReductionMode { reduction_mode: SamplerReductionMode, }, SamplerYcbcrConversionUnnormalizedCoordinatesEnabled, UnnormalizedCoordinatesAnisotropyEnabled, UnnormalizedCoordinatesCompareEnabled, UnnormalizedCoordinatesFiltersNotEqual { mag_filter: Filter, min_filter: Filter, }, UnnormalizedCoordinatesInvalidAddressMode { address_mode: [SamplerAddressMode; 2], }, 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.

RequirementNotMet

Fields

required_for: &'static str
requires_one_of: RequiresOneOf

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

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

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
👎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

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.