File tree 8 files changed +57
-67
lines changed
8 files changed +57
-67
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ rust-ini = "0.17"
60
60
serde = " 1.0"
61
61
serde_derive = " 1.0"
62
62
serde_scan = " 0.4"
63
- wgpu = { git = " https://github.com/gfx-rs/wgpu" , rev = " 8f02b73 " , features = [] }
63
+ wgpu = { git = " https://github.com/gfx-rs/wgpu" , rev = " 47fd776 " , features = [] }
64
64
# binaries
65
65
env_logger = " 0.8"
66
66
getopts = " 0.2"
@@ -69,8 +69,8 @@ png = "0.16"
69
69
winit = " 0.25"
70
70
71
71
[dev-dependencies ]
72
- # naga = { git = "https://github.com/gfx-rs/naga", rev = "7613798 ", features = ["wgsl-in"] }
73
- naga = { version = " 0.6" , features = [" wgsl-in" ] }
72
+ naga = { git = " https://github.com/gfx-rs/naga" , rev = " eda078d " , features = [" wgsl-in" ] }
73
+ # naga = { version = "0.6", features = ["wgsl-in"] }
74
74
75
75
[dependencies .profiling ]
76
76
version = " 1.0.1"
@@ -80,6 +80,7 @@ default-features = false
80
80
# naga = { path = "../naga" }
81
81
82
82
[patch ."https://github .com/gfx-rs/wgpu" ]
83
+ # wgpu = { path = "../wgpu/wgpu" }
83
84
# wgpu-hal = { path = "../wgpu/wgpu-hal" }
84
85
# wgpu-core = { path = "../wgpu/wgpu-core" }
85
86
# wgpu-types = { path = "../wgpu/wgpu-types" }
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ impl Harness {
79
79
. run_until ( instance. request_adapter ( & wgpu:: RequestAdapterOptions {
80
80
power_preference : wgpu:: PowerPreference :: HighPerformance ,
81
81
compatible_surface : Some ( & surface) ,
82
+ force_fallback_adapter : false ,
82
83
} ) )
83
84
. expect ( "Unable to initialize GPU via the selected backend." ) ;
84
85
@@ -227,10 +228,9 @@ impl Harness {
227
228
queue. submit ( update_command_buffers) ;
228
229
}
229
230
230
- match surface. get_current_frame ( ) {
231
+ match surface. get_current_texture ( ) {
231
232
Ok ( frame) => {
232
233
let view = frame
233
- . output
234
234
. texture
235
235
. create_view ( & wgpu:: TextureViewDescriptor :: default ( ) ) ;
236
236
let targets = ScreenTargets {
@@ -240,6 +240,7 @@ impl Harness {
240
240
} ;
241
241
let render_command_buffer = app. draw ( & device, targets, & spawner) ;
242
242
queue. submit ( Some ( render_command_buffer) ) ;
243
+ frame. present ( ) ;
243
244
}
244
245
Err ( _) => { }
245
246
} ;
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ struct DragConstants {
36
36
abs_stop : vec2 <f32 >;
37
37
coll : vec2 <f32 >;
38
38
other : vec2 <f32 >; // X = wheel speed, Y = drag Z
39
- _pad : vec2 <f32 >;
39
+ padding : vec2 <f32 >;
40
40
};
41
41
42
42
struct GlobalConstants {
Original file line number Diff line number Diff line change @@ -247,7 +247,8 @@ impl GpuCollider {
247
247
contents : bytemuck:: bytes_of ( & globals) ,
248
248
usage : wgpu:: BufferUsages :: UNIFORM ,
249
249
} ) ;
250
- let locals_size = mem:: size_of :: < Locals > ( ) . max ( wgpu:: BIND_BUFFER_ALIGNMENT as usize ) ;
250
+ //TODO: device.limits().min_uniform_buffer_offset_alignment
251
+ let locals_size = mem:: size_of :: < Locals > ( ) . max ( 256 ) ;
251
252
let locals_total_size = ( settings. max_objects * locals_size) as wgpu:: BufferAddress ;
252
253
let local_uniforms = device. create_buffer ( & wgpu:: BufferDescriptor {
253
254
label : Some ( "Collision Locals" ) ,
Original file line number Diff line number Diff line change @@ -65,10 +65,7 @@ impl Context {
65
65
wgpu:: BindGroupLayoutEntry {
66
66
binding : 1 ,
67
67
visibility : wgpu:: ShaderStages :: all ( ) ,
68
- ty : wgpu:: BindingType :: Sampler {
69
- filtering : true ,
70
- comparison : false ,
71
- } ,
68
+ ty : wgpu:: BindingType :: Sampler ( wgpu:: SamplerBindingType :: Filtering ) ,
72
69
count : None ,
73
70
} ,
74
71
// GPU store
@@ -98,10 +95,7 @@ impl Context {
98
95
wgpu:: BindGroupLayoutEntry {
99
96
binding : 4 ,
100
97
visibility : wgpu:: ShaderStages :: FRAGMENT ,
101
- ty : wgpu:: BindingType :: Sampler {
102
- filtering : true ,
103
- comparison : true ,
104
- } ,
98
+ ty : wgpu:: BindingType :: Sampler ( wgpu:: SamplerBindingType :: Comparison ) ,
105
99
count : None ,
106
100
} ,
107
101
] ,
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ impl Context {
161
161
primitive : wgpu:: PrimitiveState {
162
162
topology : wgpu:: PrimitiveTopology :: TriangleList ,
163
163
front_face : wgpu:: FrontFace :: Ccw ,
164
- clamp_depth : false ,
164
+ unclipped_depth : false ,
165
165
..Default :: default ( )
166
166
} ,
167
167
depth_stencil : Some ( wgpu:: DepthStencilState {
@@ -261,10 +261,7 @@ impl Context {
261
261
wgpu:: BindGroupLayoutEntry {
262
262
binding : 2 ,
263
263
visibility : wgpu:: ShaderStages :: VERTEX ,
264
- ty : wgpu:: BindingType :: Sampler {
265
- filtering : false ,
266
- comparison : false ,
267
- } ,
264
+ ty : wgpu:: BindingType :: Sampler ( wgpu:: SamplerBindingType :: NonFiltering ) ,
268
265
count : None ,
269
266
} ,
270
267
] ,
Original file line number Diff line number Diff line change @@ -645,30 +645,21 @@ impl Context {
645
645
wgpu:: BindGroupLayoutEntry {
646
646
binding : 7 ,
647
647
visibility : wgpu:: ShaderStages :: all ( ) ,
648
- ty : wgpu:: BindingType :: Sampler {
649
- filtering : true ,
650
- comparison : false ,
651
- } ,
648
+ ty : wgpu:: BindingType :: Sampler ( wgpu:: SamplerBindingType :: Filtering ) ,
652
649
count : None ,
653
650
} ,
654
651
// flood sampler
655
652
wgpu:: BindGroupLayoutEntry {
656
653
binding : 8 ,
657
654
visibility : wgpu:: ShaderStages :: FRAGMENT | wgpu:: ShaderStages :: COMPUTE ,
658
- ty : wgpu:: BindingType :: Sampler {
659
- filtering : true ,
660
- comparison : false ,
661
- } ,
655
+ ty : wgpu:: BindingType :: Sampler ( wgpu:: SamplerBindingType :: Filtering ) ,
662
656
count : None ,
663
657
} ,
664
658
// table sampler
665
659
wgpu:: BindGroupLayoutEntry {
666
660
binding : 9 ,
667
661
visibility : wgpu:: ShaderStages :: FRAGMENT ,
668
- ty : wgpu:: BindingType :: Sampler {
669
- filtering : true ,
670
- comparison : false ,
671
- } ,
662
+ ty : wgpu:: BindingType :: Sampler ( wgpu:: SamplerBindingType :: Filtering ) ,
672
663
count : None ,
673
664
} ,
674
665
] ,
You can’t perform that action at this time.
0 commit comments