@@ -7,7 +7,7 @@ use anyhow::Context;
77use bytemuck:: Pod ;
88use futures:: executor:: block_on;
99use std:: { borrow:: Cow , sync:: Arc } ;
10- use wgpu:: { PipelineCompilationOptions , util:: DeviceExt } ;
10+ use wgpu:: { ExperimentalFeatures , PipelineCompilationOptions , util:: DeviceExt } ;
1111
1212pub type BufferConfig = backend:: BufferConfig ;
1313pub type BufferUsage = backend:: BufferUsage ;
@@ -81,13 +81,14 @@ where
8181 . request_device ( & wgpu:: DeviceDescriptor {
8282 label : Some ( "wgpu Device" ) ,
8383 #[ cfg( target_os = "linux" ) ]
84- required_features : wgpu:: Features :: SPIRV_SHADER_PASSTHROUGH | features,
84+ required_features : wgpu:: Features :: EXPERIMENTAL_PASSTHROUGH_SHADERS | features,
8585 #[ cfg( not( target_os = "linux" ) ) ]
8686 required_features : features,
8787 required_limits : wgpu:: Limits {
8888 max_push_constant_size : 128 ,
8989 ..wgpu:: Limits :: default ( )
9090 } ,
91+ experimental_features : unsafe { ExperimentalFeatures :: enabled ( ) } ,
9192 memory_hints : Default :: default ( ) ,
9293 trace : Default :: default ( ) ,
9394 } )
@@ -193,7 +194,7 @@ where
193194 buffer_slice. map_async ( wgpu:: MapMode :: Read , move |res| {
194195 let _ = sender. send ( res) ;
195196 } ) ;
196- device. poll ( wgpu:: PollType :: Wait ) ?;
197+ device. poll ( wgpu:: PollType :: wait_indefinitely ( ) ) ?;
197198 block_on ( receiver)
198199 . context ( "mapping canceled" ) ?
199200 . context ( "mapping failed" ) ?;
@@ -387,7 +388,7 @@ impl ComputeBackend for WgpuBackend {
387388 buffer_slice. map_async ( wgpu:: MapMode :: Read , move |res| {
388389 let _ = sender. send ( res) ;
389390 } ) ;
390- self . device . poll ( wgpu:: PollType :: Wait ) ?;
391+ self . device . poll ( wgpu:: PollType :: wait_indefinitely ( ) ) ?;
391392 block_on ( receiver)
392393 . context ( "mapping canceled" ) ?
393394 . context ( "mapping failed" ) ?;
@@ -543,7 +544,7 @@ where
543544 buffer_slice. map_async ( wgpu:: MapMode :: Read , move |res| {
544545 let _ = sender. send ( res) ;
545546 } ) ;
546- device. poll ( wgpu:: PollType :: Wait ) ?;
547+ device. poll ( wgpu:: PollType :: wait_indefinitely ( ) ) ?;
547548 block_on ( receiver)
548549 . context ( "mapping canceled" ) ?
549550 . context ( "mapping failed" ) ?;
@@ -752,7 +753,7 @@ where
752753 buffer_slice. map_async ( wgpu:: MapMode :: Read , move |res| {
753754 let _ = sender. send ( res) ;
754755 } ) ;
755- device. poll ( wgpu:: PollType :: Wait ) ?;
756+ device. poll ( wgpu:: PollType :: wait_indefinitely ( ) ) ?;
756757 block_on ( receiver)
757758 . context ( "mapping canceled" ) ?
758759 . context ( "mapping failed" ) ?;
0 commit comments