526: Expose more copy commands to the wgpu-remote r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
bors[bot] 2020-03-18 12:51:19 +00:00 committed by GitHub
commit 08e8d406c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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