@@ -12,10 +12,9 @@ pub fn start(options: &Options) {
1212}
1313
1414async fn start_internal ( options : & Options , compiled_shader_modules : CompiledShaderModules ) {
15- let backends = wgpu:: util :: backend_bits_from_env ( ) . unwrap_or ( wgpu:: Backends :: PRIMARY ) ;
16- let instance = wgpu:: Instance :: new ( wgpu:: InstanceDescriptor {
15+ let backends = wgpu:: Backends :: from_env ( ) . unwrap_or ( wgpu:: Backends :: PRIMARY ) ;
16+ let instance = wgpu:: Instance :: new ( & wgpu:: InstanceDescriptor {
1717 backends,
18- dx12_shader_compiler : wgpu:: util:: dx12_shader_compiler_from_env ( ) . unwrap_or_default ( ) ,
1918 ..Default :: default ( )
2019 } ) ;
2120 let adapter = wgpu:: util:: initialize_adapter_from_env_or_default ( & instance, None )
@@ -43,15 +42,13 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
4342 }
4443
4544 let ( device, queue) = adapter
46- . request_device (
47- & wgpu:: DeviceDescriptor {
48- label : None ,
49- required_features,
50- required_limits : wgpu:: Limits :: default ( ) ,
51- memory_hints : wgpu:: MemoryHints :: Performance ,
52- } ,
53- None ,
54- )
45+ . request_device ( & wgpu:: DeviceDescriptor {
46+ label : None ,
47+ required_features,
48+ required_limits : wgpu:: Limits :: default ( ) ,
49+ memory_hints : wgpu:: MemoryHints :: Performance ,
50+ trace : Default :: default ( ) ,
51+ } )
5552 . await
5653 . expect ( "Failed to create device" ) ;
5754 drop ( instance) ;
@@ -67,7 +64,11 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
6764 // FIXME(eddyb) automate this decision by default.
6865 let module = compiled_shader_modules. spv_module_for_entry_point ( entry_point) ;
6966 let module = if options. force_spirv_passthru {
70- unsafe { device. create_shader_module_spirv ( & module) }
67+ unsafe {
68+ device. create_shader_module_passthrough ( wgpu:: ShaderModuleDescriptorPassthrough :: SpirV (
69+ module,
70+ ) )
71+ }
7172 } else {
7273 let wgpu:: ShaderModuleDescriptorSpirV { label, source } = module;
7374 device. create_shader_module ( wgpu:: ShaderModuleDescriptor {
@@ -225,7 +226,7 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
225226 buffer_slice. map_async ( wgpu:: MapMode :: Read , |r| r. unwrap ( ) ) ;
226227 // NOTE(eddyb) `poll` should return only after the above callbacks fire
227228 // (see also https://github.com/gfx-rs/wgpu/pull/2698 for more details).
228- device. poll ( wgpu:: Maintain :: Wait ) ;
229+ device. poll ( wgpu:: PollType :: Wait ) . unwrap ( ) ;
229230
230231 if timestamping {
231232 if let ( Some ( timestamp_readback_buffer) , Some ( timestamp_period) ) =
0 commit comments