#[non_exhaustive]pub enum EncoderStateError {
Invalid,
Ended,
Locked,
Unlocked,
Submitted,
}
Expand description
Errors related to the state of a command or pass encoder.
The exact behavior of these errors may change based on the resolution of https://github.com/gpuweb/gpuweb/issues/5207.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Invalid
Used internally by wgpu functions to indicate the encoder already contained an error. This variant should usually not be seen by users of the API, since an effort should be made to provide the caller with a more specific reason for the encoder being invalid.
Ended
Returned immediately when an attempt is made to encode a command using an encoder that has already finished.
Locked
Returned by a subsequent call to encoder.finish()
, if there was an
attempt to open a second pass on the encoder while it was locked for
a first pass (i.e. the first pass was still open).
Note: only command encoders can be locked (not pass encoders).
Unlocked
Returned when attempting to end a pass if the parent encoder is not locked. This can only happen if pass begin/end calls are mismatched.
Submitted
The command buffer has already been submitted.
Although command encoders and command buffers are distinct WebGPU
objects, we use CommandEncoderStatus
for both.
Trait Implementations§
Source§impl Clone for EncoderStateError
impl Clone for EncoderStateError
Source§fn clone(&self) -> EncoderStateError
fn clone(&self) -> EncoderStateError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EncoderStateError
impl Debug for EncoderStateError
Source§impl Display for EncoderStateError
impl Display for EncoderStateError
Source§impl Error for EncoderStateError
impl Error for EncoderStateError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<EncoderStateError> for BuildAccelerationStructureError
impl From<EncoderStateError> for BuildAccelerationStructureError
Source§fn from(source: EncoderStateError) -> Self
fn from(source: EncoderStateError) -> Self
Source§impl From<EncoderStateError> for ClearError
impl From<EncoderStateError> for ClearError
Source§fn from(source: EncoderStateError) -> Self
fn from(source: EncoderStateError) -> Self
Source§impl From<EncoderStateError> for CommandEncoderError
impl From<EncoderStateError> for CommandEncoderError
Source§fn from(source: EncoderStateError) -> Self
fn from(source: EncoderStateError) -> Self
Source§impl From<EncoderStateError> for CompactBlasError
impl From<EncoderStateError> for CompactBlasError
Source§fn from(source: EncoderStateError) -> Self
fn from(source: EncoderStateError) -> Self
Source§impl From<EncoderStateError> for ComputePassErrorInner
impl From<EncoderStateError> for ComputePassErrorInner
Source§fn from(source: EncoderStateError) -> Self
fn from(source: EncoderStateError) -> Self
Source§impl From<EncoderStateError> for QueryError
impl From<EncoderStateError> for QueryError
Source§fn from(source: EncoderStateError) -> Self
fn from(source: EncoderStateError) -> Self
Source§impl From<EncoderStateError> for RenderPassErrorInner
impl From<EncoderStateError> for RenderPassErrorInner
Source§fn from(source: EncoderStateError) -> Self
fn from(source: EncoderStateError) -> Self
Source§impl WebGpuError for EncoderStateError
impl WebGpuError for EncoderStateError
Source§fn webgpu_error_type(&self) -> ErrorType
fn webgpu_error_type(&self) -> ErrorType
ErrorType
.