File tree Expand file tree Collapse file tree 2 files changed +9
-15
lines changed Expand file tree Collapse file tree 2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -434,20 +434,13 @@ impl Player {
434434 }
435435 }
436436
437- fn resolve_buffer_id (
437+ pub fn resolve_buffer_id (
438438 & self ,
439439 id : wgc:: id:: PointerId < wgc:: id:: markers:: Buffer > ,
440440 ) -> Arc < wgc:: resource:: Buffer > {
441441 self . buffers . get ( & id) . expect ( "invalid buffer" ) . clone ( )
442442 }
443443
444- pub fn get_buffer (
445- & self ,
446- id : wgc:: id:: PointerId < wgc:: id:: markers:: Buffer > ,
447- ) -> Arc < wgc:: resource:: Buffer > {
448- self . resolve_buffer_id ( id)
449- }
450-
451444 fn resolve_texture_id (
452445 & self ,
453446 id : wgc:: id:: PointerId < wgc:: id:: markers:: Texture > ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ impl Test<'_> {
103103 println ! ( "\t \t \t Mapping..." ) ;
104104 for expect in & self . expectations {
105105 player
106- . get_buffer ( expect. buffer )
106+ . resolve_buffer_id ( expect. buffer )
107107 . map_async (
108108 expect. offset ,
109109 Some ( expect. data . len ( ) as u64 ) ,
@@ -116,16 +116,17 @@ impl Test<'_> {
116116 }
117117
118118 println ! ( "\t \t \t Waiting..." ) ;
119- device. poll ( wgt:: PollType :: Wait {
120- submission_index : None ,
121- timeout : Some ( std:: time:: Duration :: from_secs ( 1 ) ) , // Tests really shouldn't need longer than that!
122- } )
123- . unwrap ( ) ;
119+ device
120+ . poll ( wgt:: PollType :: Wait {
121+ submission_index : None ,
122+ timeout : Some ( std:: time:: Duration :: from_secs ( 1 ) ) , // Tests really shouldn't need longer than that!
123+ } )
124+ . unwrap ( ) ;
124125
125126 for expect in self . expectations {
126127 println ! ( "\t \t \t Checking {}" , expect. name) ;
127128 let ( ptr, size) = player
128- . get_buffer ( expect. buffer )
129+ . resolve_buffer_id ( expect. buffer )
129130 . get_mapped_range ( expect. offset , Some ( expect. data . len ( ) as wgt:: BufferAddress ) )
130131 . unwrap ( ) ;
131132 let contents = unsafe { slice:: from_raw_parts ( ptr. as_ptr ( ) , size as usize ) } ;
You can’t perform that action at this time.
0 commit comments