/// Copies the data to the destination using a staging buffer
Copies the data to the destination using a staging buffer
Copies the data to the destination using a staging buffer
pub fn copy_to_buffer<T: Copy + 'static>(
    device: &Device,
    encoder: &mut CommandEncoder,
    data: &[T],
    destination: &Buffer,
) -> Result<(), Error> {
    let staging_buffer = create_staging_buffer(device, data)?;
    encoder.copy_buffer_to_buffer(&staging_buffer, 0, destination, 0, self::byte_length(data));
    Ok(())
}
pub fn copy_to_buffer < T : Copy + ' static > ( device : & Device , encoder : & mut CommandEncoder , data : & [ T ] , destination : & Buffer , ) -> Result < ( ) , Error > { let staging_buffer = create_staging_buffer ( device , data ) ? ; encoder . copy_buffer_to_buffer ( & staging_buffer , 0 , destination , 0 , self :: byte_length ( data ) ) ; Ok ( ( ) ) }
Copies the data to the destination using a staging buffer
Copies the data to the destination using a staging buffer
device
&Device
encoder
&mut CommandEncoder
data
&[T]
destination
&Buffer