#[derive(Clone, Debug, Error)] #[non_exhaustive] pubenum SurfaceError { #[error("Surface is invalid")]
Invalid, #[error("Surface is not configured for presentation")]
NotConfigured, #[error(transparent)]
Device(#[from] DeviceError), #[error("Surface image is already acquired")]
AlreadyAcquired, #[error("Texture has been destroyed")]
TextureDestroyed,
}
#[derive(Clone, Debug, Error)] #[non_exhaustive] pubenum ConfigureSurfaceError { #[error(transparent)]
Device(#[from] DeviceError), #[error("Invalid surface")]
InvalidSurface, #[error("The view format {0:?} is not compatible with texture format {1:?}, only changing srgb-ness is allowed.")]
InvalidViewFormat(wgt::TextureFormat, wgt::TextureFormat), #[error(transparent)]
MissingDownlevelFlags(#[from] MissingDownlevelFlags), #[error("`SurfaceOutput` must be dropped before a new `Surface` is made")]
PreviousOutputExists, #[error("Both `Surface` width and height must be non-zero. Wait to recreate the `Surface` until the window has non-zero area.")]
ZeroArea, #[error("`Surface` width and height must be within the maximum supported texture size. Requested was ({width}, {height}), maximum extent for either dimension is {max_texture_dimension_2d}.")]
TooLarge {
width: u32,
height: u32,
max_texture_dimension_2d: u32,
}, #[error("Surface does not support the adapter's queue family")]
UnsupportedQueueFamily, #[error("Requested format {requested:?} is not in list of supported formats: {available:?}")]
UnsupportedFormat {
requested: wgt::TextureFormat,
available: Vec<wgt::TextureFormat>,
}, #[error("Requested present mode {requested:?} is not in the list of supported present modes: {available:?}")]
UnsupportedPresentMode {
requested: wgt::PresentMode,
available: Vec<wgt::PresentMode>,
}, #[error("Requested alpha mode {requested:?} is not in the list of supported alpha modes: {available:?}")]
UnsupportedAlphaMode {
requested: wgt::CompositeAlphaMode,
available: Vec<wgt::CompositeAlphaMode>,
}, #[error("Requested usage {requested:?} is not in the list of supported usages: {available:?}")]
UnsupportedUsage {
requested: hal::TextureUses,
available: hal::TextureUses,
},
}
impl From<WaitIdleError> for ConfigureSurfaceError { fn from(e: WaitIdleError) -> Self { match e {
WaitIdleError::Device(d) => ConfigureSurfaceError::Device(d),
WaitIdleError::WrongSubmissionIndex(..) => unreachable!(),
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.