mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Implement on_submitted_work_done (#7864)
This commit is contained in:
parent
86e6b1835b
commit
92cda27b41
@ -106,6 +106,7 @@ Bottom level categories:
|
||||
#### WebGPU
|
||||
|
||||
- Fix setting unclipped_depth. By @atlv24 in [#7841](https://github.com/gfx-rs/wgpu/pull/7841)
|
||||
- Implement `on_submitted_work_done` for WebGPU backend. By @drewcrawford in [#7864](https://github.com/gfx-rs/wgpu/pull/7864)
|
||||
|
||||
### Changes
|
||||
|
||||
|
||||
@ -2594,8 +2594,17 @@ impl dispatch::QueueInterface for WebQueue {
|
||||
1.0
|
||||
}
|
||||
|
||||
fn on_submitted_work_done(&self, _callback: dispatch::BoxSubmittedWorkDoneCallback) {
|
||||
unimplemented!("on_submitted_work_done is not yet implemented");
|
||||
fn on_submitted_work_done(&self, callback: dispatch::BoxSubmittedWorkDoneCallback) {
|
||||
let promise = self.inner.on_submitted_work_done();
|
||||
wasm_bindgen_futures::spawn_local(async move {
|
||||
match wasm_bindgen_futures::JsFuture::from(promise).await {
|
||||
Ok(_) => callback(),
|
||||
Err(error) => {
|
||||
log::error!("on_submitted_work_done promise failed: {:?}", error);
|
||||
callback();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
fn compact_blas(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user