Skip to content

Commit

Permalink
Bug 1872658 - Update wgpu to revision 46757372cc02d6608124502104a0c…
Browse files Browse the repository at this point in the history
…225e1744fd7. r=webgpu-reviewers,supply-chain-reviewers,teoxoy

Changelog:

 * #4865 fix present mode for wgl
   By xiaopengli89 in gfx-rs/wgpu#4865
 * #4873 Bump ctor from 0.2.5 to 0.2.6
   By dependabot[bot] in gfx-rs/wgpu#4873
 * #4874 Bump syn from 2.0.40 to 2.0.41
   By dependabot[bot] in gfx-rs/wgpu#4874
 * #4869 [naga wgsl-out] Include the `f` suffix on `f32` literals.
   By jimblandy in gfx-rs/wgpu#4869
 * #4850 [naga wgsl-in] Support abstract operands to binary operators.
   By jimblandy in gfx-rs/wgpu#4850
 * #4850 [naga wgsl-in] Support abstract operands to binary operators.
   By jimblandy in gfx-rs/wgpu#4850
 * #4850 [naga wgsl-in] Support abstract operands to binary operators.
   By jimblandy in gfx-rs/wgpu#4850
 * #4850 [naga wgsl-in] Support abstract operands to binary operators.
   By jimblandy in gfx-rs/wgpu#4850
 * #4850 [naga wgsl-in] Support abstract operands to binary operators.
   By jimblandy in gfx-rs/wgpu#4850
 * #4870 [naga wgsl] Let unary operators accept and produce abstract types.
   By jimblandy in gfx-rs/wgpu#4870
 * #4867 Reintroduce buffer snatching Part 1
   By nical in gfx-rs/wgpu#4867
 * #4882 Bump zerocopy from 0.7.26 to 0.7.31
   By dependabot[bot] in gfx-rs/wgpu#4882
 * #4878 Buffer snatching part 2 - Refactor create_buffer
   By nical in gfx-rs/wgpu#4878
 * #4815 Add `wgpu` crate features for backends
   By daxpedda in gfx-rs/wgpu#4815
 * #4887 Allow clippy::pattern_type_mismatch
   By nical in gfx-rs/wgpu#4887
 * #4886 Document wgpu & wgpu-core features
   By Wumpf in gfx-rs/wgpu#4886
 * #4826 validation: More detailed on incompatible BGL
   By scoopr in gfx-rs/wgpu#4826
 * #4888 Web: add support for more `RawWindowHandle` variants
   By daxpedda in gfx-rs/wgpu#4888
 * #4890 Bump thiserror from 1.0.50 to 1.0.51
   By dependabot[bot] in gfx-rs/wgpu#4890
 * #4880 Simplify `ResourceMaps`
   By nical in gfx-rs/wgpu#4880
 * #4891 Make the naga version in trunk as high as the latest published one
   By nical in gfx-rs/wgpu#4891
 * #4893 Avoid allocating memory every time we might log a label
   By nical in gfx-rs/wgpu#4893
 * #4894 Remove some locks in BindGroup
   By nical in gfx-rs/wgpu#4894
 * #4862 Ensure that DeviceLostCallbackC is always called exactly once
   By bradwerth in gfx-rs/wgpu#4862
 * #4900 Support Device fence sharing with dx12 on Windows
   By sotaroikeda in gfx-rs/wgpu#4900
 * #4903 Bump tokio from 1.35.0 to 1.35.1
   By dependabot[bot] in gfx-rs/wgpu#4903
 * #4895 Check that raw buffers and raw bind groups are valid
   By nical in gfx-rs/wgpu#4895
 * #4901 fix: docs
   By miaobuao in gfx-rs/wgpu#4901
 * #4892 Simplify some code around buffer unmapping
   By nical in gfx-rs/wgpu#4892
 * #4896 Buffer snatching
   By nical in gfx-rs/wgpu#4896
 * #4851 Eagerly release GPU resources when we lose the device.
   By bradwerth in gfx-rs/wgpu#4851
 * #4906 Use nightly for docs
   By cwfitzgerald in gfx-rs/wgpu#4906
 * #4908 Bump syn from 2.0.41 to 2.0.42
   By dependabot[bot] in gfx-rs/wgpu#4908
 * #4909 Bump profiling from 1.0.12 to 1.0.13
   By dependabot[bot] in gfx-rs/wgpu#4909
 * #4910 Bump anyhow from 1.0.75 to 1.0.76
   By dependabot[bot] in gfx-rs/wgpu#4910
 * #4913 Remove id32 Feature
   By cwfitzgerald in gfx-rs/wgpu#4913
 * #4914 Add BGL Deduplication Index Test
   By cwfitzgerald in gfx-rs/wgpu#4914
 * #4921 Fix typo "layout pipeline layout" -> "pipeline layout"
   By HactarCE in gfx-rs/wgpu#4921
 * #4922 Bump winit from 0.29.4 to 0.29.5
   By dependabot[bot] in gfx-rs/wgpu#4922
 * #4924 Inline `document-features` usage, remove dep.
   By ErichDonGubler in gfx-rs/wgpu#4924
 * #4871 Speed up Naga's `cargo xtask validate wgsl` from 12s to 0.8s
   By jimblandy in gfx-rs/wgpu#4871
 * #4871 Speed up Naga's `cargo xtask validate wgsl` from 12s to 0.8s
   By jimblandy in gfx-rs/wgpu#4871
 * #4871 Speed up Naga's `cargo xtask validate wgsl` from 12s to 0.8s
   By jimblandy in gfx-rs/wgpu#4871
 * #4930 Bump winit from 0.29.5 to 0.29.6
   By dependabot[bot] in gfx-rs/wgpu#4930
 * #4929 Bump web-time from 0.2.3 to 0.2.4
   By dependabot[bot] in gfx-rs/wgpu#4929
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4902 [naga xtask] Run validation jobs in parallel, using jobserver.
   By jimblandy in gfx-rs/wgpu#4902
 * #4940 Align `wgpu_types::CompositeAlphaMode` serde serializations to spec
   By littledivy in gfx-rs/wgpu#4940
 * #4936 Bump anyhow from 1.0.76 to 1.0.77
   By dependabot[bot] in gfx-rs/wgpu#4936
 * #4933 Bump thiserror from 1.0.51 to 1.0.52
   By dependabot[bot] in gfx-rs/wgpu#4933
 * #4932 Bump syn from 2.0.42 to 2.0.43
   By dependabot[bot] in gfx-rs/wgpu#4932

Differential Revision: https://phabricator.services.mozilla.com/D197519
  • Loading branch information
nical committed Jan 3, 2024
1 parent cf11a2f commit 4d8ee9b
Show file tree
Hide file tree
Showing 169 changed files with 5,461 additions and 1,685 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ git = "https://github.com/franziskuskiefer/cose-rust"
rev = "43c22248d136c8b38fe42ea709d08da6355cf04b"
replace-with = "vendored-sources"

[source."git+https://github.com/gfx-rs/wgpu?rev=6dc9ccab8592645fda3204be1cfb5929fd7f924d"]
[source."git+https://github.com/gfx-rs/wgpu?rev=46757372cc02d6608124502104a0c225e1744fd7"]
git = "https://github.com/gfx-rs/wgpu"
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
rev = "46757372cc02d6608124502104a0c225e1744fd7"
replace-with = "vendored-sources"

[source."git+https://github.com/hsivonen/chardetng?rev=3484d3e3ebdc8931493aa5df4d7ee9360a90e76b"]
Expand Down
32 changes: 16 additions & 16 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions gfx/wgpu_bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ default = []
[dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
rev = "46757372cc02d6608124502104a0c225e1744fd7"
#Note: "replay" shouldn't ideally be needed,
# but it allows us to serialize everything across IPC.
features = ["replay", "trace", "serial-pass", "strict_asserts", "wgsl", "api_log_info"]
Expand All @@ -27,36 +27,36 @@ features = ["replay", "trace", "serial-pass", "strict_asserts", "wgsl", "api_log
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
rev = "46757372cc02d6608124502104a0c225e1744fd7"
features = ["metal"]

# We want the wgpu-core Direct3D backends on Windows.
[target.'cfg(windows)'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
rev = "46757372cc02d6608124502104a0c225e1744fd7"
features = ["dx12"]

# We want the wgpu-core Vulkan backend on Linux and Windows.
[target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
rev = "46757372cc02d6608124502104a0c225e1744fd7"
features = ["vulkan"]

[dependencies.wgt]
package = "wgpu-types"
git = "https://github.com/gfx-rs/wgpu"
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
rev = "46757372cc02d6608124502104a0c225e1744fd7"

[dependencies.wgh]
package = "wgpu-hal"
git = "https://github.com/gfx-rs/wgpu"
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
rev = "46757372cc02d6608124502104a0c225e1744fd7"

[target.'cfg(windows)'.dependencies.d3d12]
git = "https://github.com/gfx-rs/wgpu"
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
rev = "46757372cc02d6608124502104a0c225e1744fd7"

[target.'cfg(windows)'.dependencies]
winapi = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions gfx/wgpu_bindings/moz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ origin:

# Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS"
release: commit 6dc9ccab8592645fda3204be1cfb5929fd7f924d
release: commit 46757372cc02d6608124502104a0c225e1744fd7

# Revision to pull in
# Must be a long or short commit SHA (long preferred)
revision: 6dc9ccab8592645fda3204be1cfb5929fd7f924d
revision: 46757372cc02d6608124502104a0c225e1744fd7

license: ['MIT', 'Apache-2.0']

Expand Down
23 changes: 13 additions & 10 deletions supply-chain/audits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1264,9 +1264,12 @@ criteria = "safe-to-deploy"
delta = "0.5.0 -> 0.7.0"

[[audits.d3d12]]
who = "Erich Gubler <[email protected]>"
who = [
"Erich Gubler <[email protected]>",
"Nicolas Silva <[email protected]>",
]
criteria = "safe-to-deploy"
delta = "0.7.0 -> 0.7.0@git:6dc9ccab8592645fda3204be1cfb5929fd7f924d"
delta = "0.7.0 -> 0.7.0@git:46757372cc02d6608124502104a0c225e1744fd7"
importable = false

[[audits.darling]]
Expand Down Expand Up @@ -2536,9 +2539,9 @@ criteria = "safe-to-deploy"
delta = "0.13.0 -> 0.14.0"

[[audits.naga]]
who = "Jim Blandy <[email protected]>"
who = ["Jim Blandy <[email protected]>", "Nicolas Silva <[email protected]>"]
criteria = "safe-to-deploy"
delta = "0.14.0 -> 0.14.0@git:6dc9ccab8592645fda3204be1cfb5929fd7f924d"
delta = "0.14.0 -> 0.14.2@git:46757372cc02d6608124502104a0c225e1744fd7"
importable = false

[[audits.net2]]
Expand Down Expand Up @@ -4303,9 +4306,9 @@ criteria = "safe-to-deploy"
delta = "0.17.0 -> 0.18.0"

[[audits.wgpu-core]]
who = "Jim Blandy <[email protected]>"
who = ["Jim Blandy <[email protected]>", "Nicolas Silva <[email protected]>"]
criteria = "safe-to-deploy"
delta = "0.18.0 -> 0.18.0@git:6dc9ccab8592645fda3204be1cfb5929fd7f924d"
delta = "0.18.0 -> 0.18.0@git:46757372cc02d6608124502104a0c225e1744fd7"
importable = false

[[audits.wgpu-hal]]
Expand Down Expand Up @@ -4352,9 +4355,9 @@ criteria = "safe-to-deploy"
delta = "0.17.0 -> 0.18.0"

[[audits.wgpu-hal]]
who = "Jim Blandy <[email protected]>"
who = ["Jim Blandy <[email protected]>", "Nicolas Silva <[email protected]>"]
criteria = "safe-to-deploy"
delta = "0.18.0 -> 0.18.0@git:6dc9ccab8592645fda3204be1cfb5929fd7f924d"
delta = "0.18.0 -> 0.18.0@git:46757372cc02d6608124502104a0c225e1744fd7"
importable = false

[[audits.wgpu-types]]
Expand Down Expand Up @@ -4401,9 +4404,9 @@ criteria = "safe-to-deploy"
delta = "0.17.0 -> 0.18.0"

[[audits.wgpu-types]]
who = "Jim Blandy <[email protected]>"
who = ["Jim Blandy <[email protected]>", "Nicolas Silva <[email protected]>"]
criteria = "safe-to-deploy"
delta = "0.18.0 -> 0.18.0@git:6dc9ccab8592645fda3204be1cfb5929fd7f924d"
delta = "0.18.0 -> 0.18.0@git:46757372cc02d6608124502104a0c225e1744fd7"
importable = false

[[audits.whatsys]]
Expand Down
35 changes: 35 additions & 0 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,27 @@ user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.proc-macro2]]
version = "1.0.74"
when = "2024-01-02"
user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.quote]]
version = "1.0.28"
when = "2023-05-25"
user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.quote]]
version = "1.0.35"
when = "2024-01-02"
user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.regex]]
version = "1.7.1"
when = "2023-01-09"
Expand Down Expand Up @@ -601,6 +615,13 @@ user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.syn]]
version = "2.0.46"
when = "2024-01-02"
user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.termcolor]]
version = "1.2.0"
when = "2023-01-15"
Expand All @@ -615,6 +636,20 @@ user-id = 189
user-login = "BurntSushi"
user-name = "Andrew Gallant"

[[publisher.thiserror]]
version = "1.0.56"
when = "2024-01-02"
user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.thiserror-impl]]
version = "1.0.56"
when = "2024-01-02"
user-id = 3618
user-login = "dtolnay"
user-name = "David Tolnay"

[[publisher.threadbound]]
version = "0.1.5"
when = "2022-12-17"
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/naga/.cargo-checksum.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions third_party/rust/naga/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.65"
name = "naga"
version = "0.14.0"
version = "0.14.2"
authors = ["gfx-rs developers"]
exclude = [
"bin/**/*",
Expand Down Expand Up @@ -51,7 +51,7 @@ bitflags = "2.2"
log = "0.4"
num-traits = "0.2"
rustc-hash = "1.1.0"
thiserror = "1.0.21"
thiserror = "1.0.52"

[dependencies.arbitrary]
version = "1.3"
Expand Down
39 changes: 22 additions & 17 deletions third_party/rust/naga/src/back/wgsl/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1087,25 +1087,30 @@ impl<W: Write> Writer<W> {
use crate::Expression;

match expressions[expr] {
Expression::Literal(literal) => {
match literal {
// Floats are written using `Debug` instead of `Display` because it always appends the
// decimal part even it's zero
crate::Literal::F32(value) => write!(self.out, "{:?}", value)?,
crate::Literal::U32(value) => write!(self.out, "{}u", value)?,
crate::Literal::I32(value) => write!(self.out, "{}i", value)?,
crate::Literal::Bool(value) => write!(self.out, "{}", value)?,
crate::Literal::F64(value) => write!(self.out, "{:?}lf", value)?,
crate::Literal::I64(_) => {
return Err(Error::Custom("unsupported i64 literal".to_string()));
}
crate::Literal::AbstractInt(_) | crate::Literal::AbstractFloat(_) => {
return Err(Error::Custom(
"Abstract types should not appear in IR presented to backends".into(),
));
Expression::Literal(literal) => match literal {
crate::Literal::F32(value) => write!(self.out, "{}f", value)?,
crate::Literal::U32(value) => write!(self.out, "{}u", value)?,
crate::Literal::I32(value) => {
// `-2147483648i` is not valid WGSL. The most negative `i32`
// value can only be expressed in WGSL using AbstractInt and
// a unary negation operator.
if value == i32::MIN {
write!(self.out, "i32(-2147483648)")?;
} else {
write!(self.out, "{}i", value)?;
}
}
}
crate::Literal::Bool(value) => write!(self.out, "{}", value)?,
crate::Literal::F64(value) => write!(self.out, "{:?}lf", value)?,
crate::Literal::I64(_) => {
return Err(Error::Custom("unsupported i64 literal".to_string()));
}
crate::Literal::AbstractInt(_) | crate::Literal::AbstractFloat(_) => {
return Err(Error::Custom(
"Abstract types should not appear in IR presented to backends".into(),
));
}
},
Expression::Constant(handle) => {
let constant = &module.constants[handle];
if constant.name.is_some() {
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/naga/src/front/glsl/token.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub use pp_rs::token::{Float, Integer, Location, PreprocessorError, Token as PPToken};
pub use pp_rs::token::{Float, Integer, Location, Token as PPToken};

use super::ast::Precision;
use crate::{Interpolation, Sampling, Span, Type};
Expand Down
Loading

0 comments on commit 4d8ee9b

Please sign in to comment.