From 888b3e9aacdb8f789a02dfb33971bddf7957b474 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Sun, 30 Jun 2024 10:14:18 +0200 Subject: [PATCH] reduce number of draws & computes when only running tests --- benches/benches/computepass.rs | 4 ++++ benches/benches/renderpass.rs | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/benches/benches/computepass.rs b/benches/benches/computepass.rs index 6feea404ab4..0f435cebfee 100644 --- a/benches/benches/computepass.rs +++ b/benches/benches/computepass.rs @@ -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, diff --git a/benches/benches/renderpass.rs b/benches/benches/renderpass.rs index fcb35c38641..c1a8aa7479f 100644 --- a/benches/benches/renderpass.rs +++ b/benches/benches/renderpass.rs @@ -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;