File tree Expand file tree Collapse file tree
examples/standalone/custom_backend/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,7 +244,10 @@ impl DeviceInterface for CustomDevice {
244244 unimplemented ! ( )
245245 }
246246
247- fn poll ( & self , _maintain : wgpu:: PollType ) -> Result < wgpu:: PollStatus , wgpu:: PollError > {
247+ fn poll (
248+ & self ,
249+ _maintain : wgpu:: wgt:: PollType < u64 > ,
250+ ) -> Result < wgpu:: PollStatus , wgpu:: PollError > {
248251 unimplemented ! ( )
249252 }
250253
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ impl Device {
8686 ///
8787 /// When running on WebGPU, this is a no-op. `Device`s are automatically polled.
8888 pub fn poll ( & self , poll_type : PollType ) -> Result < crate :: PollStatus , crate :: PollError > {
89- self . inner . poll ( poll_type)
89+ self . inner . poll ( poll_type. map_index ( |s| s . index ) )
9090 }
9191
9292 /// The features which can be used on this device.
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ crate::cmp::impl_eq_ord_hash_proxy!(Queue => .inner);
2727/// There is no analogue in the WebGPU specification.
2828#[ derive( Debug , Clone ) ]
2929pub struct SubmissionIndex {
30- #[ cfg_attr( not( wgpu_core) , expect( dead_code) ) ]
3130 pub ( crate ) index : u64 ,
3231}
3332#[ cfg( send_sync) ]
Original file line number Diff line number Diff line change @@ -2402,7 +2402,7 @@ impl dispatch::DeviceInterface for WebDevice {
24022402 // No capturing api in webgpu
24032403 }
24042404
2405- fn poll ( & self , _poll_type : crate :: PollType ) -> Result < crate :: PollStatus , crate :: PollError > {
2405+ fn poll ( & self , _poll_type : wgt :: PollType < u64 > ) -> Result < crate :: PollStatus , crate :: PollError > {
24062406 // Device is polled automatically
24072407 Ok ( crate :: PollStatus :: QueueEmpty )
24082408 }
Original file line number Diff line number Diff line change @@ -1686,9 +1686,8 @@ impl dispatch::DeviceInterface for CoreDevice {
16861686 } ;
16871687 }
16881688
1689- fn poll ( & self , poll_type : crate :: PollType ) -> Result < crate :: PollStatus , crate :: PollError > {
1690- let maintain_inner = poll_type. map_index ( |i| i. index ) ;
1691- match self . context . 0 . device_poll ( self . id , maintain_inner) {
1689+ fn poll ( & self , poll_type : wgt:: PollType < u64 > ) -> Result < crate :: PollStatus , crate :: PollError > {
1690+ match self . context . 0 . device_poll ( self . id , poll_type) {
16921691 Ok ( status) => Ok ( status) ,
16931692 Err ( err) => {
16941693 if let Some ( poll_error) = err. to_poll_error ( ) {
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ pub trait DeviceInterface: CommonTraits {
166166 unsafe fn start_graphics_debugger_capture ( & self ) ;
167167 unsafe fn stop_graphics_debugger_capture ( & self ) ;
168168
169- fn poll ( & self , poll_type : crate :: PollType ) -> Result < crate :: PollStatus , crate :: PollError > ;
169+ fn poll ( & self , poll_type : wgt :: PollType < u64 > ) -> Result < crate :: PollStatus , crate :: PollError > ;
170170
171171 fn get_internal_counters ( & self ) -> crate :: InternalCounters ;
172172 fn generate_allocator_report ( & self ) -> Option < crate :: AllocatorReport > ;
You can’t perform that action at this time.
0 commit comments