@@ -286,7 +286,7 @@ pub struct Buffer<T: Value> {
286
286
impl < T : Value > BufferView < T > {
287
287
pub fn copy_async < ' a > ( & self , s : & ' a Scope < ' a > ) -> Buffer < T > {
288
288
let copy = self . device . create_buffer ( self . len ) ;
289
- s. submit ( [ self . copy_to_buffer_async ( copy. view ( .. ) ) ] ) ;
289
+ s. submit ( [ self . copy_to_buffer_async ( & copy) ] ) ;
290
290
copy
291
291
}
292
292
pub fn copy ( & self ) -> Buffer < T > {
@@ -443,7 +443,7 @@ impl<T: Value> BufferView<T> {
443
443
pub fn fill ( & self , value : T ) {
444
444
self . fill_fn ( |_| value) ;
445
445
}
446
- pub fn copy_to_buffer_async ( & self , dst : BufferView < T > ) -> Command < ' static , ' static > {
446
+ pub fn copy_to_buffer_async ( & self , dst : & BufferView < T > ) -> Command < ' static , ' static > {
447
447
assert_eq ! ( self . len, dst. len) ;
448
448
let mut rt = ResourceTracker :: new ( ) ;
449
449
rt. add ( self . _handle ( ) ) ;
@@ -461,7 +461,7 @@ impl<T: Value> BufferView<T> {
461
461
callback : None ,
462
462
}
463
463
}
464
- pub fn copy_to_buffer ( & self , dst : BufferView < T > ) {
464
+ pub fn copy_to_buffer ( & self , dst : & BufferView < T > ) {
465
465
submit_default_stream_and_sync ( & self . device , [ self . copy_to_buffer_async ( dst) ] ) ;
466
466
}
467
467
pub fn view < S : RangeBounds < usize > > ( & self , range : S ) -> BufferView < T > {
0 commit comments