Skip to content

Commit

Permalink
Fix wasm
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <[email protected]>
  • Loading branch information
sagudev committed Dec 6, 2024
1 parent cb8206d commit 4e44757
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion wgpu/src/backend/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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<wgt::BufferAddress>,
) -> Option<js_sys::ArrayBuffer> {
unimplemented!()
}
}

#[derive(Debug)]
Expand Down

0 comments on commit 4e44757

Please sign in to comment.