Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ This release has an [MSRV][] of 1.86.
- `push_luminance_mask_layer`, content within which is used as a luminance mask. ([#1183][] by [@DJMcNab][]).
This is a breaking change to Vello Encoding.

## Changed

- Breaking: Put `wgpu`'s default features behind a `wgpu_default` feature flag. ([#1229][] by [@StT191][])
If you're using Vello with default features enabled, then no change is needed.

## Fixed

- Examples crashing when window is resized to zero. ([#1182][] by [@xStrom][])
Expand All @@ -44,7 +49,7 @@ This release has an [MSRV][] of 1.85.
- Implement `Default` for `RendererOptions`. ([#524][] by [@DJMcNab][])

```diff
RendererOptions {
RendererOptions {
// ...
+ ..Default::default()
}
Expand Down Expand Up @@ -233,6 +238,7 @@ This release has an [MSRV][] of 1.75.
[@ratmice]: https://github.com/ratmice
[@simbleau]: https://github.com/simbleau
[@songhuaixu]: https://github.com/songhuaixu
[@StT191]: https://github.com/StT191
[@TheNachoBIT]: https://github.com/TheNachoBIT
[@timtom-dev]: https://github.com/timtom-dev
[@tomcur]: https://github.com/tomcur
Expand Down Expand Up @@ -320,6 +326,7 @@ This release has an [MSRV][] of 1.75.
[#1182]: https://github.com/linebender/vello/pull/1182
[#1183]: https://github.com/linebender/vello/pull/1183
[#1187]: https://github.com/linebender/vello/pull/1187
[#1229]: https://github.com/linebender/vello/pull/1229

<!-- Note that this still comparing against 0.5.0, because 0.5.1 is a cherry-picked patch -->
[Unreleased]: https://github.com/linebender/vello/compare/v0.5.0...HEAD
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ vello_hybrid_scenes = { path = "sparse_strips/vello_hybrid/examples/scenes" }
vello_dev_macros = { path = "sparse_strips/vello_dev_macros" }

# NOTE: Make sure to keep this in sync with the version badge in README.md and vello/README.md
wgpu = { version = "26.0.1" }
wgpu = { version = "26.0.1", default-features = false, features = ["std", "wgsl"] }
log = "0.4.27"
image = { version = "0.25.6", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion sparse_strips/vello_cpu/examples/wasm_cpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ web-sys = { version = "0.3.77", features = [
"KeyboardEvent",
"CanvasRenderingContext2d",
] }
wgpu = { workspace = true, features = ["webgl"] }
wgpu = { workspace = true, features = ["webgl"], default-features = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
parley = { version = "0.5.0", default-features = false, features = ["std"] }
Expand Down
8 changes: 6 additions & 2 deletions sparse_strips/vello_hybrid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true
bytemuck = { workspace = true, features = ["derive"] }
thiserror = { workspace = true }
vello_common = { workspace = true, features = ["std", "text"] }
wgpu = { workspace = true, optional = true }
wgpu = { workspace = true, default-features = false, optional = true }
vello_sparse_shaders = { workspace = true, optional = true }
log = { workspace = true }
guillotiere = "0.6.2"
Expand Down Expand Up @@ -51,7 +51,11 @@ vello_common = { workspace = true, features = ["pico_svg"] }
roxmltree = "0.20.0"

[features]
default = ["wgpu"]
default = ["wgpu", "wgpu_default"]
std = ["wgpu", "vello_common/std"]
wgpu = ["dep:wgpu", "dep:vello_sparse_shaders"]
# Enable wgpu with its default features. If you need to customise the set of enabled wgpu features,
# please disable this crate's default features, enable its "wgpu" feature, then depend on wgpu directly
# with the features which you need enabled.
wgpu_default = ["wgpu", "wgpu/default"]
webgl = ["dep:js-sys", "dep:web-sys", "dep:vello_sparse_shaders", "vello_sparse_shaders/glsl"]
2 changes: 1 addition & 1 deletion sparse_strips/vello_hybrid/examples/wgpu_webgl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ web-sys = { version = "0.3.77", features = [
"WheelEvent",
"KeyboardEvent",
] }
wgpu = { workspace = true, features = ["webgl"] }
wgpu = { workspace = true, default-features = true, features = ["webgl"] }

[dev-dependencies]
wasm-bindgen-test = "0.3.50"
2 changes: 1 addition & 1 deletion sparse_strips/vello_hybrid/examples/winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ workspace = true

[dependencies]
winit = { workspace = true }
wgpu = { workspace = true }
wgpu = { workspace = true, default-features = true }
vello_common = { workspace = true }
vello_hybrid = { workspace = true }
vello_hybrid_scenes = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion sparse_strips/vello_sparse_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ vello_api = { workspace = true }
vello_common = { workspace = true, features = ["std"] }
vello_cpu = { workspace = true, features = ["multithreading", "std"] }
vello_hybrid = { workspace = true }
wgpu = { workspace = true }
wgpu = { workspace = true, default-features = true }
pollster = { workspace = true }
vello_dev_macros = { workspace = true }
bytemuck = { workspace = true }
Expand Down
8 changes: 6 additions & 2 deletions vello/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ default-target = "x86_64-unknown-linux-gnu"
targets = []

[features]
default = ["wgpu"]
default = ["wgpu", "wgpu_default"]
# Enables GPU memory usage estimation. This performs additional computations
# in order to estimate the minimum required allocations for buffers backing
# bump-allocated GPU memory.
# TODO: Turn this into a runtime option used at resolve time and remove the feature.
bump_estimate = ["vello_encoding/bump_estimate"]
wgpu = ["dep:wgpu", "dep:vello_shaders", "dep:futures-intrusive"]
# Enable wgpu with its default features. If you need to customise the set of enabled wgpu features,
# please disable this crate's default features, enable its "wgpu" feature, then depend on wgpu directly
# with the features which you need enabled.
wgpu_default = ["wgpu", "wgpu/default"]
Comment thread
StT191 marked this conversation as resolved.

# Development only features

Expand All @@ -46,7 +50,7 @@ vello_shaders = { workspace = true, optional = true }
bytemuck = { workspace = true }
skrifa = { workspace = true, features = ["std"] }
peniko = { workspace = true, default-features = true }
wgpu = { workspace = true, optional = true }
wgpu = { workspace = true, default-features = false, optional = true }
log = { workspace = true }
static_assertions = { workspace = true }
futures-intrusive = { workspace = true, optional = true }
Expand Down
4 changes: 1 addition & 3 deletions vello/src/wgpu_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,10 +767,8 @@ impl WgpuEngine {
}
}
for id in free_images {
if let Some((texture, view)) = self.bind_map.image_map.remove(&id) {
if let Some((_texture, _view)) = self.bind_map.image_map.remove(&id) {
// TODO: have a pool to avoid needless re-allocation
drop(texture);
drop(view);
}
}
Ok(())
Expand Down
Loading