diff --git a/voxygen/benches/meshing_benchmark.rs b/voxygen/benches/meshing_benchmark.rs index c58dd6f143..74085505d2 100644 --- a/voxygen/benches/meshing_benchmark.rs +++ b/voxygen/benches/meshing_benchmark.rs @@ -15,7 +15,7 @@ const GEN_SIZE: i32 = 4; pub fn criterion_benchmark(c: &mut Criterion) { // Generate chunks here to test let mut terrain = TerrainGrid::new().unwrap(); - let world = World::generate(42, sim::WorldOpts { + let (world, index) = World::generate(42, sim::WorldOpts { // NOTE: If this gets too expensive, we can turn it off. // TODO: Consider an option to turn off all erosion as well, or even provide altitude // directly with a closure. @@ -23,10 +23,11 @@ pub fn criterion_benchmark(c: &mut Criterion) { world_file: sim::FileOpts::LoadAsset(sim::DEFAULT_WORLD_MAP.into()), ..Default::default() }); + let index = index.as_index_ref(); (0..GEN_SIZE) .flat_map(|x| (0..GEN_SIZE).map(move |y| Vec2::new(x, y))) .map(|offset| offset + CENTER) - .map(|pos| (pos, world.generate_chunk(pos, || false).unwrap())) + .map(|pos| (pos, world.generate_chunk(index, pos, || false).unwrap())) .for_each(|(key, chunk)| { terrain.insert(key, Arc::new(chunk.0)); });