mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[api] expose invalid submission index to PollError (#8169)
This commit is contained in:
parent
80a742094c
commit
5d4cf56689
@ -138,6 +138,9 @@ impl WaitIdleError {
|
||||
pub fn to_poll_error(&self) -> Option<wgt::PollError> {
|
||||
match self {
|
||||
WaitIdleError::Timeout => Some(wgt::PollError::Timeout),
|
||||
&WaitIdleError::WrongSubmissionIndex(a, b) => {
|
||||
Some(wgt::PollError::WrongSubmissionIndex(a, b))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@ -4555,6 +4555,12 @@ pub enum PollError {
|
||||
error("The requested Wait timed out before the submission was completed.")
|
||||
)]
|
||||
Timeout,
|
||||
/// The requested Wait was given a wrong submission index.
|
||||
#[cfg_attr(
|
||||
feature = "std",
|
||||
error("Tried to wait using a submission index ({0}) that has not been returned by a successful submission (last successful submission: {1})")
|
||||
)]
|
||||
WrongSubmissionIndex(u64, u64),
|
||||
}
|
||||
|
||||
/// Status of device poll operation.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user