From 4e44757ac4d6b33195af2c034a3bed3d117aa51d Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Thu, 5 Dec 2024 06:51:00 +0100 Subject: [PATCH] Fix wasm Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- wgpu/src/backend/custom.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/wgpu/src/backend/custom.rs b/wgpu/src/backend/custom.rs index a37854d7e2..dd27535198 100644 --- a/wgpu/src/backend/custom.rs +++ b/wgpu/src/backend/custom.rs @@ -30,7 +30,7 @@ impl DynContext { } #[cfg(webgpu)] - pub fn from_webgpu(instance: super::ContextWebGpu) -> Self { + pub(crate) fn from_webgpu(instance: super::ContextWebGpu) -> Self { Self(Arc::new(instance)) } } @@ -324,6 +324,16 @@ impl QueueInterface for DynQueue { fn on_submitted_work_done(&self, callback: dispatch::BoxSubmittedWorkDoneCallback) { self.0.on_submitted_work_done(callback); } + + #[cfg(any(webgpu, webgl))] + fn copy_external_image_to_texture( + &self, + _source: &wgt::CopyExternalImageSourceInfo, + _dest: wgt::CopyExternalImageDestInfo<&crate::api::Texture>, + _size: crate::Extent3d, + ) { + unimplemented!() + } } #[derive(Debug)] @@ -388,6 +398,14 @@ impl BufferInterface for DynBuffer { fn destroy(&self) { self.0.destroy(); } + + #[cfg(webgpu)] + fn get_mapped_range_as_array_buffer( + &self, + _sub_range: Range, + ) -> Option { + unimplemented!() + } } #[derive(Debug)]