Skip to content

Commit

Permalink
Update wgpu to v0.15.3 (#1682)
Browse files Browse the repository at this point in the history
* Update to wgpu v0.15.3
cargo update -p wgpu
cargo update -p wgpu-hal
cargo update -p wgpu-core
cargo update -p wgpu-types

* remove alpha to coverage web workaround

* explicitly specify patch versions of wgpu hal/core/main in cargo.toml
  • Loading branch information
Wumpf authored Mar 23, 2023
1 parent 6e77012 commit 0f2569d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 56 deletions.
52 changes: 19 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ puffin = "0.14"
thiserror = "1.0"
time = { version = "0.3", features = ["wasm-bindgen"] }
tokio = "1.24"
wgpu = { version = "0.15", default-features = false }
wgpu-core = { version = "0.15", default-features = false }
wgpu = { version = "0.15.1", default-features = false }
wgpu-core = { version = "0.15.1", default-features = false }
wgpu-hal = { version = "0.15.4", default-features = false }


[profile.dev]
Expand Down
1 change: 1 addition & 0 deletions crates/re_renderer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ notify = "5.0"
puffin.workspace = true
wgpu = { workspace = true, default-features = false, features = ["wgsl"] }
wgpu-core.workspace = true
wgpu-hal.workspace = true

# wasm
[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand Down
9 changes: 0 additions & 9 deletions crates/re_renderer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ pub enum HardwareTier {
}

impl HardwareTier {
/// Temporary workaround until [this GL state leaking fix](https://github.com/gfx-rs/wgpu/pull/3589) is landed.
/// All our target platforms should support alpha to coverage.
pub fn support_alpha_to_coverage(&self) -> bool {
match self {
HardwareTier::Basic => false,
HardwareTier::Native => true,
}
}

/// Whether the current hardware tier supports sampling from textures with a sample count higher than 1.
pub fn support_sampling_msaa_texture(&self) -> bool {
match self {
Expand Down
5 changes: 1 addition & 4 deletions crates/re_renderer/src/renderer/depth_cloud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,7 @@ impl Renderer for DepthCloudRenderer {
multisample: wgpu::MultisampleState {
// We discard pixels to do the round cutout, therefore we need to
// calculate our own sampling mask.
alpha_to_coverage_enabled: shared_data
.config
.hardware_tier
.support_alpha_to_coverage(),
alpha_to_coverage_enabled: true,
..ViewBuilder::MAIN_TARGET_DEFAULT_MSAA_STATE
},
};
Expand Down
5 changes: 1 addition & 4 deletions crates/re_renderer/src/renderer/lines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,10 +742,7 @@ impl Renderer for LineRenderer {
depth_stencil: ViewBuilder::MAIN_TARGET_DEFAULT_DEPTH_STATE,
multisample: wgpu::MultisampleState {
// We discard pixels to do the round cutout, therefore we need to calculate our own sampling mask.
alpha_to_coverage_enabled: shared_data
.config
.hardware_tier
.support_alpha_to_coverage(),
alpha_to_coverage_enabled: true,
..ViewBuilder::MAIN_TARGET_DEFAULT_MSAA_STATE
},
},
Expand Down
5 changes: 1 addition & 4 deletions crates/re_renderer/src/renderer/point_cloud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,7 @@ impl Renderer for PointCloudRenderer {
multisample: wgpu::MultisampleState {
// We discard pixels to do the round cutout, therefore we need to calculate
// our own sampling mask.
alpha_to_coverage_enabled: shared_data
.config
.hardware_tier
.support_alpha_to_coverage(),
alpha_to_coverage_enabled: true,
..ViewBuilder::MAIN_TARGET_DEFAULT_MSAA_STATE
},
};
Expand Down

1 comment on commit 0f2569d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: 0f2569d Previous: 2055d15 Ratio
datastore/insert/batch/rects/insert 554901 ns/iter (± 4763) 572834 ns/iter (± 2482) 0.97
datastore/latest_at/batch/rects/query 1832 ns/iter (± 13) 1890 ns/iter (± 6) 0.97
datastore/latest_at/missing_components/primary 288 ns/iter (± 2) 287 ns/iter (± 0) 1.00
datastore/latest_at/missing_components/secondaries 436 ns/iter (± 4) 437 ns/iter (± 1) 1.00
datastore/range/batch/rects/query 148470 ns/iter (± 1851) 151723 ns/iter (± 808) 0.98
mono_points_arrow/generate_message_bundles 46902333 ns/iter (± 1574851) 45567162 ns/iter (± 900943) 1.03
mono_points_arrow/generate_messages 136243044 ns/iter (± 1733045) 124748933 ns/iter (± 1046711) 1.09
mono_points_arrow/encode_log_msg 163260809 ns/iter (± 1274405) 152866147 ns/iter (± 651339) 1.07
mono_points_arrow/encode_total 350047046 ns/iter (± 3121600) 326999632 ns/iter (± 1761463) 1.07
mono_points_arrow/decode_log_msg 183563257 ns/iter (± 1719775) 174834787 ns/iter (± 813080) 1.05
mono_points_arrow/decode_message_bundles 70807602 ns/iter (± 1262660) 63925864 ns/iter (± 654755) 1.11
mono_points_arrow/decode_total 253857416 ns/iter (± 2680007) 236938445 ns/iter (± 1394136) 1.07
batch_points_arrow/generate_message_bundles 335181 ns/iter (± 4048) 339168 ns/iter (± 1293) 0.99
batch_points_arrow/generate_messages 6233 ns/iter (± 75) 6359 ns/iter (± 27) 0.98
batch_points_arrow/encode_log_msg 363065 ns/iter (± 3186) 367183 ns/iter (± 1327) 0.99
batch_points_arrow/encode_total 739927 ns/iter (± 6685) 732378 ns/iter (± 2442) 1.01
batch_points_arrow/decode_log_msg 341720 ns/iter (± 2605) 345974 ns/iter (± 1734) 0.99
batch_points_arrow/decode_message_bundles 2001 ns/iter (± 24) 2025 ns/iter (± 5) 0.99
batch_points_arrow/decode_total 348933 ns/iter (± 2676) 356256 ns/iter (± 978) 0.98
arrow_mono_points/insert 6910039741 ns/iter (± 23446336) 6037039696 ns/iter (± 12470035) 1.14
arrow_mono_points/query 1747989 ns/iter (± 19555) 1838621 ns/iter (± 11684) 0.95
arrow_batch_points/insert 2566653 ns/iter (± 19991) 2650401 ns/iter (± 18299) 0.97
arrow_batch_points/query 16219 ns/iter (± 127) 16310 ns/iter (± 50) 0.99
arrow_batch_vecs/insert 41553 ns/iter (± 388) 42958 ns/iter (± 136) 0.97
arrow_batch_vecs/query 384700 ns/iter (± 4077) 389691 ns/iter (± 988) 0.99
tuid/Tuid::random 34 ns/iter (± 1) 34 ns/iter (± 0) 1

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.