diff options
author | Samson <16504129+sagudev@users.noreply.github.com> | 2024-04-26 09:04:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-26 07:04:15 +0000 |
commit | 4af413cd04a962eb46e60005a1958622629e4a4f (patch) | |
tree | f2113d3bc7398bcc574ee8ad44e72a5aaf476836 /components/script/dom/gpubuffer.rs | |
parent | 81c4f2ae7a0b605befae652c0feeea03caba6292 (diff) | |
download | servo-4af413cd04a962eb46e60005a1958622629e4a4f.tar.gz servo-4af413cd04a962eb46e60005a1958622629e4a4f.zip |
webgpu: Update wgpu to 0.19 (#31995)
* Update wgpu to https://github.com/gfx-rs/wgpu/commit/32e70bc1635905c508d408eb1cf22b2aa062ffe1 (0.19)
* Update expect only good
* reexpect
* remove dbg stuff
* Remove all occurrences of dx11_hub
Diffstat (limited to 'components/script/dom/gpubuffer.rs')
-rw-r--r-- | components/script/dom/gpubuffer.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/components/script/dom/gpubuffer.rs b/components/script/dom/gpubuffer.rs index efdc2e87a77..bfffb98bd73 100644 --- a/components/script/dom/gpubuffer.rs +++ b/components/script/dom/gpubuffer.rs @@ -130,8 +130,18 @@ impl GPUBuffer { impl Drop for GPUBuffer { fn drop(&mut self) { - if let Err(e) = self.Destroy() { - error!("GPUBuffer destruction failed with {e:?}!"); // TODO: should we allow panic here? + if matches!(self.state(), GPUBufferState::Destroyed) { + return; + } + if let Err(e) = self + .channel + .0 + .send((None, WebGPURequest::DropBuffer(self.buffer.0))) + { + warn!( + "Failed to send WebGPURequest::DropBuffer({:?}) ({})", + self.buffer.0, e + ); }; } } |