Skip to content

Commit

Permalink
reduce number of draws & computes when only running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jun 30, 2024
1 parent a40d268 commit 888b3e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions benches/benches/computepass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ use rayon::iter::{IntoParallelIterator, ParallelIterator};

use crate::DeviceState;

#[cfg(feature = "testing")]
const DISPATCH_COUNT: usize = 1;

#[cfg(not(feature = "testing"))]
const DISPATCH_COUNT: usize = 10_000;

// Currently bindless is _much_ slower than with regularly resources,
Expand Down
5 changes: 5 additions & 0 deletions benches/benches/renderpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ use rayon::iter::{IntoParallelIterator, ParallelIterator};

use crate::DeviceState;

#[cfg(feature = "testing")]
const DRAW_COUNT: usize = 1;

#[cfg(not(feature = "testing"))]
const DRAW_COUNT: usize = 10_000;

// Must match the number of textures in the renderpass.wgsl shader
const TEXTURES_PER_DRAW: usize = 7;
const VERTEX_BUFFERS_PER_DRAW: usize = 2;
Expand Down

0 comments on commit 888b3e9

Please sign in to comment.