Merge branch 'update_deps' into 'master'

Clean and update dependencies

See merge request veloren/veloren!1780
This commit is contained in:
Marcel 2021-02-17 10:41:24 +00:00
commit 68990d1a17
12 changed files with 1155 additions and 1579 deletions

2572
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@ num_cpus = "1.10.1"
tracing = { version = "0.1", default-features = false }
rayon = "1.5"
specs = { git = "https://github.com/amethyst/specs.git", rev = "d4435bdf496cf322c74886ca09dd8795984919b4" }
vek = { version = "0.12.0", features = ["serde"] }
vek = { version = "=0.12.0", features = ["serde"] }
hashbrown = { version = "0.9", features = ["rayon", "serde", "nightly"] }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "bffb5181a35c19ddfd33ee0b4aedba741aafb68d" }

View File

@ -27,7 +27,7 @@ rayon = "1.5"
roots = "0.0.6"
spin_sleep = "1.0"
tracing = { version = "0.1", default-features = false }
vek = { version = "0.12.0", features = ["serde"] }
vek = { version = "=0.12.0", features = ["serde"] }
uuid = { version = "0.8.1", default-features = false, features = ["serde", "v4"] }
# Assets

View File

@ -14,7 +14,7 @@ default = ["simd"]
common = {package = "veloren-common", path = "../../common"}
sum_type = "0.2.0"
vek = { version = "0.12.0", features = ["serde"] }
vek = { version = "=0.12.0", features = ["serde"] }
tracing = { version = "0.1", default-features = false }
# Data structures

View File

@ -18,7 +18,7 @@ common-net = { package = "veloren-common-net", path = "../net" }
rand = "0.8"
rayon = "1.5"
tracing = { version = "0.1", default-features = false }
vek = { version = "0.12.0", features = ["serde"] }
vek = { version = "=0.12.0", features = ["serde"] }
# Data structures
hashbrown = { version = "0.9", features = ["rayon", "serde", "nightly"] }

View File

@ -40,5 +40,5 @@ tracing-subscriber = { version = "0.2.3", default-features = false, features = [
uvth = { version = ">= 3.0, <= 4.0", default-features = false }
clap = { version = "2.33", default-features = false }
shellexpand = "2.0.0"
tiny_http = "0.7.0"
tiny_http = "0.8.0"
serde = { version = "1.0", features = ["derive"] }

View File

@ -9,7 +9,6 @@ worldgen = ["server/worldgen"]
default = ["worldgen"]
tracy = ["common/tracy", "tracing-tracy"]
plugins = ["server/plugins"]
tweak = ["server/tweak"]
[dependencies]
server = { package = "veloren-server", path = "../server", default-features = false }

View File

@ -8,7 +8,6 @@ edition = "2018"
worldgen = []
simd = ["vek/platform_intrinsics"]
plugins = ["common-sys/plugins"]
tweak = ["const-tweaker"]
default = ["worldgen", "plugins", "simd"]
@ -41,7 +40,7 @@ hashbrown = { version = "0.9", features = ["rayon", "serde", "nightly"] }
rayon = "1.5"
crossbeam-channel = "0.5"
prometheus = { version = "0.11", default-features = false}
tiny_http = "0.7.0"
tiny_http = "0.8.0"
portpicker = { git = "https://github.com/xMAC94x/portpicker-rs", rev = "df6b37872f3586ac3b21d08b56c8ec7cd92fb172" }
authc = { git = "https://gitlab.com/veloren/auth.git", rev = "bffb5181a35c19ddfd33ee0b4aedba741aafb68d" }
libsqlite3-sys = { version = "0.18", features = ["bundled"] }
@ -49,7 +48,6 @@ diesel = { version = "1.4.3", features = ["sqlite"] }
diesel_migrations = "1.4.0"
dotenv = "0.15.0"
slab = "0.4"
const-tweaker = {version = "0.3.1", optional = true}
# Plugins
plugin-api = { package = "veloren-plugin-api", path = "../plugin/api"}

View File

@ -12,7 +12,6 @@ version = "0.8.0"
gl = ["gfx_device_gl", "gfx_gl"]
hot-anim = ["anim/use-dyn-lib"]
singleplayer = ["server"]
tweak = ["const-tweaker"]
simd = ["vek/platform_intrinsics"]
tracy = ["tracing-tracy", "common/tracy"]
plugins = ["client/plugins"]
@ -38,7 +37,7 @@ winit = {version = "0.24.0", features = ["serde"]}
# Ui
conrod_core = {git = "https://gitlab.com/veloren/conrod.git", branch="copypasta_0.7"}
conrod_winit = {git = "https://gitlab.com/veloren/conrod.git", branch="copypasta_0.7"}
euc = {git = "https://github.com/zesterer/euc.git"}
euc = "=0.5.0"
iced = {package = "iced_native", git = "https://github.com/hecrj/iced", rev = "8d882d787e6b7fd7c2435f42f82933e2ed904edf"}
iced_winit = {git = "https://github.com/hecrj/iced", rev = "8d882d787e6b7fd7c2435f42f82933e2ed904edf"}
window_clipboard = "0.1.1"
@ -49,10 +48,10 @@ specs = {git = "https://github.com/amethyst/specs.git", rev = "d4435bdf496cf322c
specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git", rev = "9fab7b396acd6454585486e50ae4bfe2069858a9" }
# Mathematics
vek = {version = "0.12.0", features = ["serde"]}
vek = {version = "=0.12.0", features = ["serde"]}
# Controller
gilrs = {version = "0.7", features = ["serde"]}
gilrs = {version = "0.8.0", features = ["serde-serialize"]}
# Singleplayer
server = {package = "veloren-server", path = "../server", optional = true}
@ -84,7 +83,6 @@ serde = {version = "1.0", features = [ "rc", "derive" ]}
treeculler = "0.1.0"
uvth = "3.1.1"
# vec_map = { version = "0.8.2" }
const-tweaker = {version = "0.3.1", optional = true}
inline_tweak = "1.0.2"
itertools = "0.10.0"

View File

@ -25,4 +25,4 @@ lazy_static = {version = "1.4.0", optional = true}
libloading = {version = "0.6.2", optional = true}
notify = {version = "5.0.0-pre.2", optional = true}
tracing = {version = "0.1", optional = true}
vek = {version = "0.12.0", features = ["serde"]}
vek = {version = "=0.12.0", features = ["serde"]}

View File

@ -2,7 +2,7 @@ use common::{
terrain::{Block, SpriteKind, TerrainGrid},
vol::SampleVol,
};
use criterion::{black_box, criterion_group, criterion_main, Benchmark, Criterion};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use std::sync::Arc;
use vek::*;
use veloren_voxygen::{mesh::Meshable, scene::terrain::BlocksOfInterest};
@ -63,81 +63,82 @@ pub fn criterion_benchmark(c: &mut Criterion) {
(volume, aabb)
};
let mut meshing_benches = c.benchmark_group("meshing");
// Lower sample size to save time
meshing_benches.sample_size(15);
// Test speed of cloning voxel sample into a flat array
let (volume, range) = sample(Vec2::new(1, 1));
c.bench(
"meshing",
Benchmark::new("copying 1,1 into flat array", move |b| {
b.iter(|| {
let mut flat = vec![Block::air(SpriteKind::Empty); range.size().product() as usize];
let mut i = 0;
let mut volume = volume.cached();
for x in 0..range.size().w {
for y in 0..range.size().h {
for z in 0..range.size().d {
flat[i] = *volume.get(range.min + Vec3::new(x, y, z)).unwrap();
i += 1;
}
meshing_benches.bench_function("copying 1,1 into flat array", move |b| {
b.iter(|| {
let mut flat = vec![Block::air(SpriteKind::Empty); range.size().product() as usize];
let mut i = 0;
let mut volume = volume.cached();
for x in 0..range.size().w {
for y in 0..range.size().h {
for z in 0..range.size().d {
flat[i] = *volume.get(range.min + Vec3::new(x, y, z)).unwrap();
i += 1;
}
}
/*let (w, h, d) = range.size().into_tuple();
for (chunk_key, chunk) in volume.iter() {
let chunk_pos = volume.key_pos(chunk_key);
let min = chunk_pos.map2(
Vec2::new(range.min.x, range.min.y),
|cmin: i32, rmin: i32| (rmin - cmin).max(0),
);
// Chunk not in area of interest
if min
.map2(TerrainGrid::chunk_size(), |m, size| m >= size as i32)
.reduce_and()
{
// TODO: comment after ensuing no panics
panic!("Shouldn't happen in this case");
continue;
}
let min = min.map(|m| m.min(31));
// TODO: Don't hardcode 31
let max = chunk_pos.map2(Vec2::new(range.max.x, range.max.y), |cmin, rmax| {
(rmax - cmin).min(31)
});
if max.map(|m| m < 0).reduce_and() {
panic!("Shouldn't happen in this case: {:?}", max);
continue;
}
let max = max.map(|m| m.max(0));
// Add z dims
let min = Vec3::new(min.x, min.y, range.min.z);
let max = Vec3::new(max.x, max.y, range.max.z);
// Offset of chunk in sample being cloned
let offset = Vec3::new(
chunk_pos.x - range.min.x,
chunk_pos.y - range.min.y,
-range.min.z,
);
for (pos, &block) in chunk.vol_iter(min, max) {
let pos = pos + offset;
flat[(w * h * pos.z + w * pos.y + pos.x) as usize] = block;
}
}*/
black_box(flat);
});
})
// Lower sample size to save time
.sample_size(15),
);
}
/*let (w, h, d) = range.size().into_tuple();
for (chunk_key, chunk) in volume.iter() {
let chunk_pos = volume.key_pos(chunk_key);
let min = chunk_pos.map2(
Vec2::new(range.min.x, range.min.y),
|cmin: i32, rmin: i32| (rmin - cmin).max(0),
);
// Chunk not in area of interest
if min
.map2(TerrainGrid::chunk_size(), |m, size| m >= size as i32)
.reduce_and()
{
// TODO: comment after ensuing no panics
panic!("Shouldn't happen in this case");
continue;
}
let min = min.map(|m| m.min(31));
// TODO: Don't hardcode 31
let max = chunk_pos.map2(Vec2::new(range.max.x, range.max.y), |cmin, rmax| {
(rmax - cmin).min(31)
});
if max.map(|m| m < 0).reduce_and() {
panic!("Shouldn't happen in this case: {:?}", max);
continue;
}
let max = max.map(|m| m.max(0));
// Add z dims
let min = Vec3::new(min.x, min.y, range.min.z);
let max = Vec3::new(max.x, max.y, range.max.z);
// Offset of chunk in sample being cloned
let offset = Vec3::new(
chunk_pos.x - range.min.x,
chunk_pos.y - range.min.y,
-range.min.z,
);
for (pos, &block) in chunk.vol_iter(min, max) {
let pos = pos + offset;
flat[(w * h * pos.z + w * pos.y + pos.x) as usize] = block;
}
} */
black_box(flat);
});
});
for x in 1..GEN_SIZE - 1 {
for y in 1..GEN_SIZE - 1 {
let (volume, range) = sample(Vec2::new(x, y));
c.bench(
"meshing",
Benchmark::new(&format!("Terrain mesh {}, {}", x, y), move |b| {
b.iter(|| volume.generate_mesh(black_box((range, Vec2::new(8192, 8192), &BlocksOfInterest::default()))))
meshing_benches.bench_function(&format!("Terrain mesh {}, {}", x, y), move |b| {
b.iter(|| {
volume.generate_mesh(black_box((
range,
Vec2::new(8192, 8192),
&BlocksOfInterest::default(),
)))
})
// Lower sample size to save time
.sample_size(15),
);
});
}
}
}

View File

@ -13,7 +13,7 @@ default = ["simd"]
common = { package = "veloren-common", path = "../common" }
common-net = { package = "veloren-common-net", path = "../common/net" }
bincode = "1.3.1"
bitvec = "0.20.1"
bitvec = "0.21.0"
fxhash = "0.2.1"
image = { version = "0.23.12", default-features = false, features = ["png"] }
itertools = "0.10"