@@ -22,10 +22,6 @@ use wgpu::util::DeviceExt;
22
22
23
23
use bytemuck;
24
24
25
- // A strategy of 0 is just atomic loads.
26
- // A strategy of 1 replaces the flag load with an atomicOr.
27
- const STRATEGY : u32 = 0 ;
28
-
29
25
const USE_SPIRV : bool = false ;
30
26
31
27
async fn run ( ) {
@@ -83,7 +79,7 @@ async fn run() {
83
79
} ) ;
84
80
let config_buf = device. create_buffer_init ( & wgpu:: util:: BufferInitDescriptor {
85
81
label : None ,
86
- contents : bytemuck:: bytes_of ( & [ STRATEGY , 0 ] ) ,
82
+ contents : bytemuck:: bytes_of ( & [ 0u32 ] ) ,
87
83
usage : wgpu:: BufferUsages :: STORAGE | wgpu:: BufferUsages :: MAP_READ ,
88
84
} ) ;
89
85
// This works if the buffer is initialized, otherwise reads all 0, for some reason.
@@ -152,12 +148,11 @@ async fn run() {
152
148
let mut cpass = encoder. begin_compute_pass ( & Default :: default ( ) ) ;
153
149
cpass. set_pipeline ( & pipeline) ;
154
150
cpass. set_bind_group ( 0 , & bind_group, & [ ] ) ;
155
- cpass. dispatch ( 256 , 1 , 1 ) ;
151
+ cpass. dispatch ( 512 , 1 , 1 ) ;
156
152
}
157
153
if let Some ( query_set) = & query_set {
158
154
encoder. write_timestamp ( query_set, 1 ) ;
159
155
}
160
- //encoder.copy_buffer_to_buffer(&input_buf, 0, &output_buf, 0, input.len() as u64);
161
156
if let Some ( query_set) = & query_set {
162
157
encoder. resolve_query_set ( query_set, 0 ..2 , & query_buf, 0 ) ;
163
158
}
@@ -171,7 +166,7 @@ async fn run() {
171
166
if buf_future. await . is_ok ( ) {
172
167
let data_raw = & * buf_slice. get_mapped_range ( ) ;
173
168
let data: & [ u32 ] = bytemuck:: cast_slice ( data_raw) ;
174
- println ! ( "failures with strategy {} : {}" , data[ 0 ] , data [ 1 ] ) ;
169
+ println ! ( "failures: {}" , data[ 0 ] ) ;
175
170
}
176
171
if features. contains ( wgpu:: Features :: TIMESTAMP_QUERY ) {
177
172
let ts_period = queue. get_timestamp_period ( ) ;
0 commit comments