Skip to content

Commit

Permalink
Bug 1917102: Update wgpu crates to ec2100052 (2024-09-05). r=supply-c…
Browse files Browse the repository at this point in the history
…hain-reviewers,webgpu-reviewers,nical,ErichDonGubler

Demote some tests to backlog (filed as gfx-rs/wgpu#6232):

- webgpu:shader,validation,const_assert,const_assert:constant_expression_assert:*
- webgpu:shader,validation,const_assert,const_assert:constant_expression_logical_and_assert:*
- webgpu:shader,validation,const_assert,const_assert:constant_expression_logical_or_assert:*

Differential Revision: https://phabricator.services.mozilla.com/D221272
  • Loading branch information
jimblandy committed Sep 6, 2024
1 parent 0a90213 commit b2b3b15
Show file tree
Hide file tree
Showing 64 changed files with 1,824 additions and 1,131 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml.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=bbdbafdf8a947b563b46f632a778632b906d9eb4"]
[source."git+https://github.com/gfx-rs/wgpu?rev=ec2100052132a047fe0799c084696d6c0ee7629d"]
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "ec2100052132a047fe0799c084696d6c0ee7629d"
replace-with = "vendored-sources"

[source."git+https://github.com/hsivonen/any_all_workaround?rev=7fb1b7034c9f172aade21ee1c8554e8d8a48af80"]
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

12 changes: 6 additions & 6 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 = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "ec2100052132a047fe0799c084696d6c0ee7629d"
# TODO: remove the replay feature on the next update containing https://github.com/gfx-rs/wgpu/pull/5182
features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info"]

Expand All @@ -26,32 +26,32 @@ features = ["serde", "replay", "trace", "strict_asserts", "wgsl", "api_log_info"
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "ec2100052132a047fe0799c084696d6c0ee7629d"
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 = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "ec2100052132a047fe0799c084696d6c0ee7629d"
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 = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "ec2100052132a047fe0799c084696d6c0ee7629d"
features = ["vulkan"]

[dependencies.wgt]
package = "wgpu-types"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "ec2100052132a047fe0799c084696d6c0ee7629d"

[dependencies.wgh]
package = "wgpu-hal"
git = "https://github.com/gfx-rs/wgpu"
rev = "bbdbafdf8a947b563b46f632a778632b906d9eb4"
rev = "ec2100052132a047fe0799c084696d6c0ee7629d"
features = ["oom_panic", "device_lost_panic", "internal_error_panic"]

[target.'cfg(windows)'.dependencies]
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: bbdbafdf8a947b563b46f632a778632b906d9eb4 (2024-08-29T02:44:20Z).
release: ec2100052132a047fe0799c084696d6c0ee7629d (Thu Sep 5 11:08:51 2024).

# Revision to pull in
# Must be a long or short commit SHA (long preferred)
revision: bbdbafdf8a947b563b46f632a778632b906d9eb4
revision: ec2100052132a047fe0799c084696d6c0ee7629d

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

Expand Down
16 changes: 8 additions & 8 deletions supply-chain/audits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3112,12 +3112,12 @@ delta = "0.20.0 -> 22.0.0"

[[audits.naga]]
who = [
"Jim Blandy <jimb@red-bean.com>",
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
"Erich Gubler <erichdongubler@gmail.com>",
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "22.0.0 -> 22.0.0@git:bbdbafdf8a947b563b46f632a778632b906d9eb4"
delta = "22.0.0 -> 22.0.0@git:ec2100052132a047fe0799c084696d6c0ee7629d"
importable = false

[[audits.net2]]
Expand Down Expand Up @@ -5096,12 +5096,12 @@ delta = "0.20.0 -> 22.0.0"

[[audits.wgpu-core]]
who = [
"Jim Blandy <jimb@red-bean.com>",
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
"Erich Gubler <erichdongubler@gmail.com>",
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "22.0.0 -> 22.0.0@git:bbdbafdf8a947b563b46f632a778632b906d9eb4"
delta = "22.0.0 -> 22.0.0@git:ec2100052132a047fe0799c084696d6c0ee7629d"
importable = false

[[audits.wgpu-hal]]
Expand Down Expand Up @@ -5169,12 +5169,12 @@ delta = "0.20.0 -> 22.0.0"

[[audits.wgpu-hal]]
who = [
"Jim Blandy <jimb@red-bean.com>",
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
"Erich Gubler <erichdongubler@gmail.com>",
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "22.0.0 -> 22.0.0@git:bbdbafdf8a947b563b46f632a778632b906d9eb4"
delta = "22.0.0 -> 22.0.0@git:ec2100052132a047fe0799c084696d6c0ee7629d"
importable = false

[[audits.wgpu-types]]
Expand Down Expand Up @@ -5242,12 +5242,12 @@ delta = "0.20.0 -> 22.0.0"

[[audits.wgpu-types]]
who = [
"Jim Blandy <jimb@red-bean.com>",
"Teodor Tanasoaia <ttanasoaia@mozilla.com>",
"Erich Gubler <erichdongubler@gmail.com>",
"Jim Blandy <jimb@red-bean.com>",
]
criteria = "safe-to-deploy"
delta = "22.0.0 -> 22.0.0@git:bbdbafdf8a947b563b46f632a778632b906d9eb4"
delta = "22.0.0 -> 22.0.0@git:ec2100052132a047fe0799c084696d6c0ee7629d"
importable = false

[[audits.whatsys]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
[cts.https.html?q=webgpu:shader,validation,const_assert,const_assert:constant_expression_assert:*]
implementation-status: backlog
[:scope="function"]
expected: FAIL

[:scope="module"]
expected: FAIL


[cts.https.html?q=webgpu:shader,validation,const_assert,const_assert:constant_expression_logical_and_assert:*]
implementation-status: backlog
[:scope="function"]
expected: FAIL

[:scope="module"]
expected: FAIL


[cts.https.html?q=webgpu:shader,validation,const_assert,const_assert:constant_expression_logical_and_no_assert:*]
Expand All @@ -20,9 +26,12 @@


[cts.https.html?q=webgpu:shader,validation,const_assert,const_assert:constant_expression_logical_or_assert:*]
implementation-status: backlog
[:scope="function"]
expected: FAIL

[:scope="module"]
expected: FAIL


[cts.https.html?q=webgpu:shader,validation,const_assert,const_assert:constant_expression_logical_or_no_assert:*]
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/naga/.cargo-checksum.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion third_party/rust/naga/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ optional = true
version = "1.1.0"

[dependencies.serde]
version = "1.0.208"
version = "1.0.209"
features = ["derive"]
optional = true

Expand Down Expand Up @@ -120,6 +120,9 @@ version = "0.11"
[dev-dependencies.hlsl-snapshots]
path = "./hlsl-snapshots"

[dev-dependencies.itertools]
version = "0.10.5"

[dev-dependencies.rspirv]
version = "0.11"
git = "https://github.com/gfx-rs/rspirv"
Expand Down
17 changes: 11 additions & 6 deletions third_party/rust/naga/src/back/glsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub use features::Features;

use crate::{
back::{self, Baked},
proc::{self, NameKey},
proc::{self, ExpressionKindTracker, NameKey},
valid, Handle, ShaderStage, TypeInner,
};
use features::FeaturesManager;
Expand Down Expand Up @@ -498,6 +498,9 @@ pub enum Error {
Custom(String),
#[error("overrides should not be present at this stage")]
Override,
/// [`crate::Sampling::First`] is unsupported.
#[error("`{:?}` sampling is unsupported", crate::Sampling::First)]
FirstSamplingNotSupported,
}

/// Binary operation with a different logic on the GLSL side.
Expand Down Expand Up @@ -1534,7 +1537,7 @@ impl<'a, W: Write> Writer<'a, W> {
// here, regardless of the version.
if let Some(sampling) = sampling {
if emit_interpolation_and_auxiliary {
if let Some(qualifier) = glsl_sampling(sampling) {
if let Some(qualifier) = glsl_sampling(sampling)? {
write!(self.out, "{qualifier} ")?;
}
}
Expand Down Expand Up @@ -1584,6 +1587,7 @@ impl<'a, W: Write> Writer<'a, W> {
info,
expressions: &func.expressions,
named_expressions: &func.named_expressions,
expr_kind_tracker: ExpressionKindTracker::from_arena(&func.expressions),
};

self.named_expressions.clear();
Expand Down Expand Up @@ -4770,14 +4774,15 @@ const fn glsl_interpolation(interpolation: crate::Interpolation) -> &'static str
}

/// Return the GLSL auxiliary qualifier for the given sampling value.
const fn glsl_sampling(sampling: crate::Sampling) -> Option<&'static str> {
const fn glsl_sampling(sampling: crate::Sampling) -> BackendResult<Option<&'static str>> {
use crate::Sampling as S;

match sampling {
S::Center => None,
Ok(match sampling {
S::First => return Err(Error::FirstSamplingNotSupported),
S::Center | S::Either => None,
S::Centroid => Some("centroid"),
S::Sample => Some("sample"),
}
})
}

/// Helper function that returns the glsl dimension string of [`ImageDimension`](crate::ImageDimension)
Expand Down
2 changes: 1 addition & 1 deletion third_party/rust/naga/src/back/hlsl/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl crate::Sampling {
/// Return the HLSL auxiliary qualifier for the given sampling value.
pub(super) const fn to_hlsl_str(self) -> Option<&'static str> {
match self {
Self::Center => None,
Self::Center | Self::First | Self::Either => None,
Self::Centroid => Some("centroid"),
Self::Sample => Some("sample"),
}
Expand Down
4 changes: 3 additions & 1 deletion third_party/rust/naga/src/back/hlsl/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::{
};
use crate::{
back::{self, Baked},
proc::{self, NameKey},
proc::{self, ExpressionKindTracker, NameKey},
valid, Handle, Module, Scalar, ScalarKind, ShaderStage, TypeInner,
};
use std::{fmt, mem};
Expand Down Expand Up @@ -346,6 +346,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
info,
expressions: &function.expressions,
named_expressions: &function.named_expressions,
expr_kind_tracker: ExpressionKindTracker::from_arena(&function.expressions),
};
let name = self.names[&NameKey::Function(handle)].clone();

Expand Down Expand Up @@ -386,6 +387,7 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
info,
expressions: &ep.function.expressions,
named_expressions: &ep.function.named_expressions,
expr_kind_tracker: ExpressionKindTracker::from_arena(&ep.function.expressions),
};

self.write_wrapped_functions(module, &ctx)?;
Expand Down
4 changes: 4 additions & 0 deletions third_party/rust/naga/src/back/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Backend functions that export shader [`Module`](super::Module)s into binary and
*/
#![allow(dead_code)] // can be dead if none of the enabled backends need it

use crate::proc::ExpressionKindTracker;

#[cfg(dot_out)]
pub mod dot;
#[cfg(glsl_out)]
Expand Down Expand Up @@ -118,6 +120,8 @@ pub struct FunctionCtx<'a> {
pub expressions: &'a crate::Arena<crate::Expression>,
/// Map of expressions that have associated variable names
pub named_expressions: &'a crate::NamedExpressions,
/// For constness checks
pub expr_kind_tracker: ExpressionKindTracker,
}

impl FunctionCtx<'_> {
Expand Down
1 change: 1 addition & 0 deletions third_party/rust/naga/src/back/msl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ impl ResolvedInterpolation {
(I::Linear, S::Centroid) => Self::CentroidNoPerspective,
(I::Linear, S::Sample) => Self::SampleNoPerspective,
(I::Flat, _) => Self::Flat,
_ => unreachable!(),
}
}

Expand Down
1 change: 1 addition & 0 deletions third_party/rust/naga/src/back/pipeline_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ fn process_function(
&mut local_expression_kind_tracker,
&mut emitter,
&mut block,
false,
);

for (old_h, mut expr, span) in expressions.drain() {
Expand Down
7 changes: 6 additions & 1 deletion third_party/rust/naga/src/back/spv/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,12 @@ impl Writer {
}
match sampling {
// Center sampling is the default in SPIR-V.
None | Some(crate::Sampling::Center) => (),
None
| Some(
crate::Sampling::Center
| crate::Sampling::First
| crate::Sampling::Either,
) => (),
Some(crate::Sampling::Centroid) => {
self.decorate(id, Decoration::Centroid, &[]);
}
Expand Down
Loading

0 comments on commit b2b3b15

Please sign in to comment.