@@ -12,10 +12,9 @@ pub fn start(options: &Options) {
12
12
}
13
13
14
14
async 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 {
17
17
backends,
18
- dx12_shader_compiler : wgpu:: util:: dx12_shader_compiler_from_env ( ) . unwrap_or_default ( ) ,
19
18
..Default :: default ( )
20
19
} ) ;
21
20
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
43
42
}
44
43
45
44
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
+ } )
55
52
. await
56
53
. expect ( "Failed to create device" ) ;
57
54
drop ( instance) ;
@@ -67,7 +64,11 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
67
64
// FIXME(eddyb) automate this decision by default.
68
65
let module = compiled_shader_modules. spv_module_for_entry_point ( entry_point) ;
69
66
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
+ }
71
72
} else {
72
73
let wgpu:: ShaderModuleDescriptorSpirV { label, source } = module;
73
74
device. create_shader_module ( wgpu:: ShaderModuleDescriptor {
@@ -225,7 +226,7 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
225
226
buffer_slice. map_async ( wgpu:: MapMode :: Read , |r| r. unwrap ( ) ) ;
226
227
// NOTE(eddyb) `poll` should return only after the above callbacks fire
227
228
// (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 ( ) ;
229
230
230
231
if timestamping {
231
232
if let ( Some ( timestamp_readback_buffer) , Some ( timestamp_period) ) =
0 commit comments