@@ -22,10 +22,6 @@ use wgpu::util::DeviceExt;
2222
2323use bytemuck;
2424
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-
2925const USE_SPIRV : bool = false ;
3026
3127async fn run ( ) {
@@ -83,7 +79,7 @@ async fn run() {
8379 } ) ;
8480 let config_buf = device. create_buffer_init ( & wgpu:: util:: BufferInitDescriptor {
8581 label : None ,
86- contents : bytemuck:: bytes_of ( & [ STRATEGY , 0 ] ) ,
82+ contents : bytemuck:: bytes_of ( & [ 0u32 ] ) ,
8783 usage : wgpu:: BufferUsages :: STORAGE | wgpu:: BufferUsages :: MAP_READ ,
8884 } ) ;
8985 // This works if the buffer is initialized, otherwise reads all 0, for some reason.
@@ -152,12 +148,11 @@ async fn run() {
152148 let mut cpass = encoder. begin_compute_pass ( & Default :: default ( ) ) ;
153149 cpass. set_pipeline ( & pipeline) ;
154150 cpass. set_bind_group ( 0 , & bind_group, & [ ] ) ;
155- cpass. dispatch ( 256 , 1 , 1 ) ;
151+ cpass. dispatch ( 512 , 1 , 1 ) ;
156152 }
157153 if let Some ( query_set) = & query_set {
158154 encoder. write_timestamp ( query_set, 1 ) ;
159155 }
160- //encoder.copy_buffer_to_buffer(&input_buf, 0, &output_buf, 0, input.len() as u64);
161156 if let Some ( query_set) = & query_set {
162157 encoder. resolve_query_set ( query_set, 0 ..2 , & query_buf, 0 ) ;
163158 }
@@ -171,7 +166,7 @@ async fn run() {
171166 if buf_future. await . is_ok ( ) {
172167 let data_raw = & * buf_slice. get_mapped_range ( ) ;
173168 let data: & [ u32 ] = bytemuck:: cast_slice ( data_raw) ;
174- println ! ( "failures with strategy {} : {}" , data[ 0 ] , data [ 1 ] ) ;
169+ println ! ( "failures: {}" , data[ 0 ] ) ;
175170 }
176171 if features. contains ( wgpu:: Features :: TIMESTAMP_QUERY ) {
177172 let ts_period = queue. get_timestamp_period ( ) ;
0 commit comments