You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// On wgpu-core based backends, block until the given submission has
71
+
/// completed execution, and any callbacks have been invoked.
72
+
///
73
+
/// On WebGPU, this has no effect. Callbacks are invoked from the
74
+
/// window event loop.
75
+
WaitForSubmissionIndex(T),
76
+
/// Same as WaitForSubmissionIndex but waits for the most recent submission.
77
+
Wait,
78
+
/// Check the device for a single time without blocking.
79
+
Poll,
80
+
}
81
+
82
+
pubenumPollStatus {
83
+
/// There are no active submissions in flight as of the beginning of the poll call.
84
+
/// Other submissions may have been queued on other threads during the call.
85
+
///
86
+
/// This implies that the given Wait was satisfied before the timeout.
87
+
QueueEmpty,
88
+
89
+
/// The requested Wait was satisfied before the timeout.
90
+
WaitSucceeded,
91
+
92
+
/// This was a poll.
93
+
Poll,
94
+
}
95
+
96
+
pubenumPollError {
97
+
/// The requested Wait timed out before the submission was completed.
98
+
Timeout,
99
+
}
100
+
```
101
+
102
+
> [!WARNING]
103
+
> As part of this change, WebGL's default behavior has changed. Previously `device.poll(Wait)` appeared as though it functioned correctly. This was a quirk caused by the bug that these PRs fixed. Now it will always return `Timeout` if the submission has not already completed. As many people rely on this behavior on WebGL, there is a new options in `BackendOptions`. If you want the old behavior, set the following on instance creation:
0 commit comments