Skip to content

Commit

Permalink
Upgrade smallvec to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ishitatsuyuki committed Nov 18, 2019
1 parent 64da375 commit aa8f43b
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion command/Cargo.toml
Expand Up @@ -16,6 +16,6 @@ profiler = ["thread_profiler/thread_profiler"]

[dependencies]
relevant = { version = "0.4.0", features = ["log", "backtrace"] }
smallvec = "0.6"
smallvec = "1.0"
rendy-core = { version = "0.5.1", path = "../core" }
thread_profiler = "0.3"
12 changes: 6 additions & 6 deletions core/Cargo.toml
Expand Up @@ -26,9 +26,9 @@ vulkan = ["gfx-backend-vulkan"]
no-slow-safety-checks = []

[dependencies]
gfx-hal = { version = "0.4.1" }
gfx-backend-empty = { version = "0.4", optional = true }
gfx-backend-gl = { version = "0.4", features = ["glutin"], optional = true }
gfx-hal = { git = "https://github.com/gfx-rs/gfx", rev = "3641183231f16877d4ea2fbdb2ff208ce736d6c4" }
gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "3641183231f16877d4ea2fbdb2ff208ce736d6c4", optional = true }
gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "3641183231f16877d4ea2fbdb2ff208ce736d6c4", features = ["glutin"], optional = true }
lazy_static = "1.0"
log = "0.4"
parking_lot = "0.9"
Expand All @@ -37,10 +37,10 @@ thread_profiler = "0.3"
raw-window-handle = "0.3"

[target.'cfg(all(target_os = "windows", not(target_arch = "wasm32")))'.dependencies]
gfx-backend-dx12 = { version = "0.4", optional = true }
gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "3641183231f16877d4ea2fbdb2ff208ce736d6c4", optional = true }

[target.'cfg(any(all(not(target_arch = "wasm32"), target_os = "macos"), all(target_arch = "aarch64", target_os = "ios")))'.dependencies]
gfx-backend-metal = { version = "0.4", optional = true }
gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "3641183231f16877d4ea2fbdb2ff208ce736d6c4", optional = true }

[target.'cfg(all(any(target_os = "windows", all(unix, not(any(target_os = "macos", target_os = "ios")))), not(target_arch = "wasm32")))'.dependencies]
gfx-backend-vulkan = { version = "0.4", features = ["x11"], optional = true }
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "3641183231f16877d4ea2fbdb2ff208ce736d6c4", features = ["x11"], optional = true }
4 changes: 2 additions & 2 deletions descriptor/Cargo.toml
Expand Up @@ -11,7 +11,7 @@ categories = ["rendering"]
description = "Rendy's descriptor allocator"

[dependencies]
gfx-hal = { version = "0.4" }
gfx-hal = { git = "https://github.com/gfx-rs/gfx", rev = "3641183231f16877d4ea2fbdb2ff208ce736d6c4" }
log = "0.4"
relevant = { version = "0.4", features = ["log"] }
smallvec = "0.6"
smallvec = "1.0"
9 changes: 4 additions & 5 deletions descriptor/src/allocator.rs
Expand Up @@ -308,7 +308,7 @@ where
extend.extend(
Iterator::zip(
self.allocation.pools.drain(..),
self.allocation.sets.drain(),
self.allocation.sets.drain(..),
)
.map(|(pool, set)| DescriptorSet {
raw: set,
Expand All @@ -327,16 +327,15 @@ where
// same pool, continue
}
Some(last) => {
let sets = &mut self.allocation.sets;
// Free contiguous range of sets from one pool in one go.
bucket.free((index + 1..sets.len()).map(|_| sets.pop().unwrap()), last);
bucket.free(self.allocation.sets.drain(index + 1..), last);
}
None => last = Some(pool),
}
}

if let Some(last) = last {
bucket.free(self.allocation.sets.drain(), last);
bucket.free(self.allocation.sets.drain(0..), last);
}

Err(err)
Expand Down Expand Up @@ -370,7 +369,7 @@ where
.expect("Set should be allocated from this allocator");
debug_assert!(bucket.total >= raw_sets.len() as u64);

bucket.free(raw_sets.drain(), *pool);
bucket.free(raw_sets.drain(..), *pool);
*pool = set.pool;
*ranges = set.ranges;
raw_sets.push(set.raw);
Expand Down
2 changes: 1 addition & 1 deletion factory/Cargo.toml
Expand Up @@ -37,5 +37,5 @@ log = "0.4"
parking_lot = "0.9"
relevant = { version = "0.4", features = ["log"] }
serde = { version = "1.0", optional = true, features = ["derive"] }
smallvec = "0.6"
smallvec = "1.0"
thread_profiler = "0.3"
2 changes: 1 addition & 1 deletion frame/Cargo.toml
Expand Up @@ -24,5 +24,5 @@ rendy-core = { version = "0.5.1", path = "../core" }
either = "1.5"
log = "0.4"
relevant = { version = "0.4", features = ["log"] }
smallvec = "0.6"
smallvec = "1.0"
thread_profiler = "0.3"
2 changes: 1 addition & 1 deletion graph/Cargo.toml
Expand Up @@ -36,5 +36,5 @@ bitflags = "1.0"
log = "0.4"
relevant = { version = "0.4", features = ["log"] }
serde = { version = "1.0", optional = true, features = ["derive"] }
smallvec = "0.6"
smallvec = "1.0"
thread_profiler = "0.3"
2 changes: 1 addition & 1 deletion init/Cargo.toml
Expand Up @@ -25,4 +25,4 @@ rendy-core = { version = "0.5.1", path = "../core" }
rendy-wsi = { version = "0.5.1", path = "../wsi" }
winit = { version = "0.20.0-alpha4", optional = true, features = ["web-sys"] }
log = "0.4"
smallvec = "0.6"
smallvec = "1.0"
4 changes: 2 additions & 2 deletions memory/Cargo.toml
Expand Up @@ -14,12 +14,12 @@ description = "Rendy's memory manager"
serde-1 = ["serde", "gfx-hal/serde"]

[dependencies]
gfx-hal = { version = "0.4.1" }
gfx-hal = { git = "https://github.com/gfx-rs/gfx", rev = "3641183231f16877d4ea2fbdb2ff208ce736d6c4" }
log = "0.4"
hibitset = {version = "0.6", default-features = false}
relevant = { version = "0.4", features = ["log"] }
serde = { version = "1.0", optional = true, features = ["derive"] }
smallvec = "0.6"
smallvec = "1.0"
slab = "0.4"
colorful = "0.2"

Expand Down
2 changes: 1 addition & 1 deletion mesh/Cargo.toml
Expand Up @@ -25,7 +25,7 @@ rendy-core = { version = "0.5.1", path = "../core" }

serde = { version = "1.0", optional = true, features = ["derive"] }
wavefront_obj = { version = "6.0", optional = true }
smallvec = { version = "0.6" }
smallvec = "1.0"
serde_bytes = { version = "0.11", optional = true }

log = "0.4.6"
2 changes: 1 addition & 1 deletion resource/Cargo.toml
Expand Up @@ -20,4 +20,4 @@ relevant = { version = "0.4", features = ["log"] }
rendy-descriptor = { version = "0.5.1", path = "../descriptor" }
rendy-memory = { version = "0.5.2", path = "../memory" }
rendy-core = { version = "0.5.1", path = "../core" }
smallvec = "0.6"
smallvec = "1.0"
2 changes: 1 addition & 1 deletion shader/Cargo.toml
Expand Up @@ -16,7 +16,7 @@ spirv-reflection = [ "spirv-reflect" ]
serde-1 = ["serde", "rendy-core/serde-1"]

[dependencies]
smallvec = "0.6"
smallvec = "1.0"
log = "0.4"
rendy-factory = { version = "0.5.1", path = "../factory" }
rendy-core = { version = "0.5.1", path = "../core" }
Expand Down
2 changes: 1 addition & 1 deletion wsi/Cargo.toml
Expand Up @@ -25,4 +25,4 @@ rendy-core = { version = "0.5.1", path = "../core" }

log = "0.4"
relevant = { version = "0.4", features = ["log"] }
smallvec = "0.6"
smallvec = "1.0"

0 comments on commit aa8f43b

Please sign in to comment.