diff --git a/crates/wasi-webgpu-wasmtime/src/lib.rs b/crates/wasi-webgpu-wasmtime/src/lib.rs index 140cb6f..25f0e8c 100644 --- a/crates/wasi-webgpu-wasmtime/src/lib.rs +++ b/crates/wasi-webgpu-wasmtime/src/lib.rs @@ -493,7 +493,8 @@ impl webgpu::HostNonStandardBuffer for WasiWebGpuImpl { buffer.slice_mut().copy_from_slice(&val); } - fn drop(&mut self, _rep: Resource) -> wasmtime::Result<()> { + fn drop(&mut self, buffer: Resource) -> wasmtime::Result<()> { + self.table().delete(buffer).unwrap(); Ok(()) } } @@ -2189,7 +2190,7 @@ impl webgpu::HostGpuRenderBundleEncoder for WasiWebGpuImpl } fn drop(&mut self, encoder: Resource) -> wasmtime::Result<()> { - self.table().push(encoder).unwrap(); + self.table().delete(encoder).unwrap(); Ok(()) } } @@ -2218,7 +2219,7 @@ impl webgpu::HostGpuComputePipeline for WasiWebGpuImpl { } fn drop(&mut self, pipeline: Resource) -> wasmtime::Result<()> { - self.table().push(pipeline).unwrap(); + self.table().delete(pipeline).unwrap(); Ok(()) } }