pub type PollType = PollType<SubmissionIndex>;Available on crate feature
unstable-wgpu-27 only.Expand description
Passed to Device::poll to control how and if it should block.
Aliased Type§
pub enum PollType {
Wait {
submission_index: Option<SubmissionIndex>,
timeout: Option<Duration>,
},
Poll,
}Variants§
Wait
On wgpu-core based backends, block until the given submission has completed execution, and any callbacks have been invoked.
On WebGPU, this has no effect. Callbacks are invoked from the window event loop.
Fields
§
submission_index: Option<SubmissionIndex>Submission index to wait for.
If not specified, will wait for the most recent submission at the time of the poll. By the time the method returns, more submissions may have taken place.
§
timeout: Option<Duration>Max time to wait for the submission to complete.
If not specified, will wait indefinitely (or until an error is detected).
If waiting for the GPU device takes this long or longer, the poll will return PollError::Timeout.
Poll
Check the device for a single time without blocking.