Skip to content

Commit

Permalink
Adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Jan 25, 2025
1 parent ea62144 commit 78a7044
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions benches/benches/loop_workaround.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,24 @@ impl LoopWorkaroundState {
fn new() -> Self {
let device_state = DeviceState::new();

let shader_module = device_state.device.create_shader_module({
wgpu::ShaderModuleDescriptor {
label: Some("loop_workaround.wgsl"),
source: wgpu::ShaderSource::Wgsl(std::borrow::Cow::Owned(
std::fs::read_to_string(concat!(
env!("CARGO_MANIFEST_DIR"),
"/benches/loop_workaround.wgsl"
))
.unwrap(),
)),
}
});
let shader_module = unsafe {
device_state.device.create_shader_module_trusted(
wgpu::ShaderModuleDescriptor {
label: Some("loop_workaround.wgsl"),
source: wgpu::ShaderSource::Wgsl(std::borrow::Cow::Owned(
std::fs::read_to_string(concat!(
env!("CARGO_MANIFEST_DIR"),
"/benches/loop_workaround.wgsl"
))
.unwrap(),
)),
},
wgpu::ShaderRuntimeChecks {
bounds_checks: true,
force_loop_bounding: true,
},
)
};

let pipeline =
device_state
Expand Down Expand Up @@ -220,6 +226,6 @@ fn run_bench(ctx: &mut Criterion) {

criterion_group! {
name = loop_workaround;
config = Criterion::default().measurement_time(Duration::from_secs(10));
config = Criterion::default().measurement_time(Duration::from_secs(20)).sample_size(10);
targets = run_bench,
}

0 comments on commit 78a7044

Please sign in to comment.