@@ -73,7 +73,7 @@ impl GraphicsState {
73
73
pub ( crate ) async fn new ( window : Arc < Window > ) -> Self {
74
74
let size = window. inner_size ( ) ;
75
75
76
- let instance = wgpu:: Instance :: new ( wgpu:: InstanceDescriptor {
76
+ let instance = wgpu:: Instance :: new ( & wgpu:: InstanceDescriptor {
77
77
backends : wgpu:: Backends :: PRIMARY ,
78
78
..Default :: default ( )
79
79
} ) ;
@@ -90,15 +90,13 @@ impl GraphicsState {
90
90
. unwrap ( ) ;
91
91
92
92
let ( device, queue) = adapter
93
- . request_device (
94
- & wgpu:: DeviceDescriptor {
95
- required_features : wgpu:: Features :: empty ( ) ,
96
- required_limits : wgpu:: Limits :: default ( ) ,
97
- label : None ,
98
- memory_hints : Default :: default ( ) ,
99
- } ,
100
- None ,
101
- )
93
+ . request_device ( & wgpu:: DeviceDescriptor {
94
+ required_features : wgpu:: Features :: empty ( ) ,
95
+ required_limits : wgpu:: Limits :: default ( ) ,
96
+ label : None ,
97
+ memory_hints : Default :: default ( ) ,
98
+ ..Default :: default ( )
99
+ } )
102
100
. await
103
101
. unwrap ( ) ;
104
102
@@ -260,14 +258,14 @@ impl GraphicsState {
260
258
} ) ;
261
259
262
260
self . queue . write_texture (
263
- wgpu:: ImageCopyTexture {
261
+ wgpu:: TexelCopyTextureInfo {
264
262
texture : & texture,
265
263
mip_level : 0 ,
266
264
origin : wgpu:: Origin3d :: ZERO ,
267
265
aspect : wgpu:: TextureAspect :: All ,
268
266
} ,
269
267
data,
270
- wgpu:: ImageDataLayout {
268
+ wgpu:: TexelCopyBufferLayout {
271
269
offset : 0 ,
272
270
bytes_per_row : Some ( 4 * width) ,
273
271
rows_per_image : Some ( height) ,
0 commit comments