From 481b0db24deebedca7e4d5ee940e0361ef53b32f Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 17 Mar 2020 16:32:26 -0400 Subject: [PATCH] Expose more copy commands to the wgpu-remote --- wgpu-remote/src/server.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/wgpu-remote/src/server.rs b/wgpu-remote/src/server.rs index 25b1a9582..3aa25ced4 100644 --- a/wgpu-remote/src/server.rs +++ b/wgpu-remote/src/server.rs @@ -190,6 +190,39 @@ pub unsafe extern "C" fn wgpu_server_encoder_copy_buffer_to_buffer( gfx_select!(self_id => global.command_encoder_copy_buffer_to_buffer(self_id, source_id, source_offset, destination_id, destination_offset, size)); } +#[no_mangle] +pub unsafe extern "C" fn wgpu_server_encoder_copy_texture_to_buffer( + global: &Global, + self_id: id::CommandEncoderId, + source: &core::command::TextureCopyView, + destination: &core::command::BufferCopyView, + size: wgt::Extent3d, +) { + gfx_select!(self_id => global.command_encoder_copy_texture_to_buffer(self_id, source, destination, size)); +} + +#[no_mangle] +pub unsafe extern "C" fn wgpu_server_encoder_copy_buffer_to_texture( + global: &Global, + self_id: id::CommandEncoderId, + source: &core::command::BufferCopyView, + destination: &core::command::TextureCopyView, + size: wgt::Extent3d, +) { + gfx_select!(self_id => global.command_encoder_copy_buffer_to_texture(self_id, source, destination, size)); +} + +#[no_mangle] +pub unsafe extern "C" fn wgpu_server_encoder_copy_texture_to_texture( + global: &Global, + self_id: id::CommandEncoderId, + source: &core::command::TextureCopyView, + destination: &core::command::TextureCopyView, + size: wgt::Extent3d, +) { + gfx_select!(self_id => global.command_encoder_copy_texture_to_texture(self_id, source, destination, size)); +} + /// # Safety /// /// This function is unsafe as there is no guarantee that the given pointers are