Skip to content

Commit b58a1a6

Browse files
committed
Bug 1868672 - Update wgpu to revision ff7b2c399301cca9bcbc5b19a869feb3c29ef785. r=webgpu-reviewers,supply-chain-reviewers,jimb
# Changelog * #4807 Bump wasm-bindgen-test from 0.3.38 to 0.3.39 By dependabot[bot] in gfx-rs/wgpu#4807 * #4830 Use Display instead of Debug to log errors. By nical in gfx-rs/wgpu#4830 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers. By jimblandy in gfx-rs/wgpu#4755 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers. By jimblandy in gfx-rs/wgpu#4755 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers. By jimblandy in gfx-rs/wgpu#4755 * #4832 vulkan: fix multi-planar texture creation By xiaopengli89 in gfx-rs/wgpu#4832 * #4758 [vk] remove (old) unused blocklist for dual source blending By teoxoy in gfx-rs/wgpu#4758 * #4828 Remove DX11 backend By valaphee in gfx-rs/wgpu#4828 * #4836 [gl] add support for line and point polygon modes By valaphee in gfx-rs/wgpu#4836 * #4820 Bump futures-lite from 2.0.1 to 2.1.0 By dependabot[bot] in gfx-rs/wgpu#4820 * #4811 Expose shader validation By daxpedda in gfx-rs/wgpu#4811 * #3507 [wgpu-hal] Inline RayQuery Support By daniel-keitel in gfx-rs/wgpu#3507 * #4726 Fix Javascript exception on repeated `BufferSlice::get_mapped_range` calls By DouglasDwyer in gfx-rs/wgpu#4726 * #4841 Remove `expose-ids` Feature By cwfitzgerald in gfx-rs/wgpu#4841 * #4843 Some Minor `wgpu-core` Cleanups By cwfitzgerald in gfx-rs/wgpu#4843 * #4844 Work around cbindgen issue By nical in gfx-rs/wgpu#4844 Differential Revision: https://phabricator.services.mozilla.com/D195735
1 parent 81781df commit b58a1a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2518
-1437
lines changed

.cargo/config.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ git = "https://github.com/franziskuskiefer/cose-rust"
2525
rev = "43c22248d136c8b38fe42ea709d08da6355cf04b"
2626
replace-with = "vendored-sources"
2727

28-
[source."git+https://github.com/gfx-rs/wgpu?rev=767ac03245ee937d3dc552edc13fe7ab0a860eec"]
28+
[source."git+https://github.com/gfx-rs/wgpu?rev=ff7b2c399301cca9bcbc5b19a869feb3c29ef785"]
2929
git = "https://github.com/gfx-rs/wgpu"
30-
rev = "767ac03245ee937d3dc552edc13fe7ab0a860eec"
30+
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
3131
replace-with = "vendored-sources"
3232

3333
[source."git+https://github.com/hsivonen/chardetng?rev=3484d3e3ebdc8931493aa5df4d7ee9360a90e76b"]

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dom/webgpu/Adapter.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ void AdapterInfo::GetWgpuBackend(nsString& s) const {
7777
case ffi::WGPUBackend_Dx12:
7878
s.AssignLiteral("Dx12");
7979
return;
80-
case ffi::WGPUBackend_Dx11:
81-
s.AssignLiteral("Dx11");
82-
return;
8380
case ffi::WGPUBackend_Gl:
8481
s.AssignLiteral("Gl");
8582
return;

gfx/wgpu_bindings/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ default = []
1717
[dependencies.wgc]
1818
package = "wgpu-core"
1919
git = "https://github.com/gfx-rs/wgpu"
20-
rev = "767ac03245ee937d3dc552edc13fe7ab0a860eec"
20+
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
2121
#Note: "replay" shouldn't ideally be needed,
2222
# but it allows us to serialize everything across IPC.
2323
features = ["replay", "trace", "serial-pass", "strict_asserts", "wgsl", "api_log_info"]
@@ -27,36 +27,36 @@ features = ["replay", "trace", "serial-pass", "strict_asserts", "wgsl", "api_log
2727
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
2828
package = "wgpu-core"
2929
git = "https://github.com/gfx-rs/wgpu"
30-
rev = "767ac03245ee937d3dc552edc13fe7ab0a860eec"
30+
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
3131
features = ["metal"]
3232

3333
# We want the wgpu-core Direct3D backends on Windows.
3434
[target.'cfg(windows)'.dependencies.wgc]
3535
package = "wgpu-core"
3636
git = "https://github.com/gfx-rs/wgpu"
37-
rev = "767ac03245ee937d3dc552edc13fe7ab0a860eec"
37+
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
3838
features = ["dx12"]
3939

4040
# We want the wgpu-core Vulkan backend on Linux and Windows.
4141
[target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgc]
4242
package = "wgpu-core"
4343
git = "https://github.com/gfx-rs/wgpu"
44-
rev = "767ac03245ee937d3dc552edc13fe7ab0a860eec"
44+
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
4545
features = ["vulkan"]
4646

4747
[dependencies.wgt]
4848
package = "wgpu-types"
4949
git = "https://github.com/gfx-rs/wgpu"
50-
rev = "767ac03245ee937d3dc552edc13fe7ab0a860eec"
50+
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
5151

5252
[dependencies.wgh]
5353
package = "wgpu-hal"
5454
git = "https://github.com/gfx-rs/wgpu"
55-
rev = "767ac03245ee937d3dc552edc13fe7ab0a860eec"
55+
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
5656

5757
[target.'cfg(windows)'.dependencies.d3d12]
5858
git = "https://github.com/gfx-rs/wgpu"
59-
rev = "767ac03245ee937d3dc552edc13fe7ab0a860eec"
59+
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
6060

6161
[target.'cfg(windows)'.dependencies]
6262
winapi = "0.3"

gfx/wgpu_bindings/moz.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ origin:
2020

2121
# Human-readable identifier for this version/release
2222
# Generally "version NNN", "tag SSS", "bookmark SSS"
23-
release: commit 767ac03245ee937d3dc552edc13fe7ab0a860eec
23+
release: commit ff7b2c399301cca9bcbc5b19a869feb3c29ef785
2424

2525
# Revision to pull in
2626
# Must be a long or short commit SHA (long preferred)
27-
revision: 767ac03245ee937d3dc552edc13fe7ab0a860eec
27+
revision: ff7b2c399301cca9bcbc5b19a869feb3c29ef785
2828

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

supply-chain/audits.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,11 @@ who = "Erich Gubler <[email protected]>"
12011201
criteria = "safe-to-deploy"
12021202
delta = "0.7.0@git:6e21f7a9291db4395192d6b510d906978ae2d251 -> 0.7.0@git:a820a3ffba468cbb87c2a7e7bbe37065ed5207ee"
12031203

1204+
[[audits.d3d12]]
1205+
who = "Nicolas Silva <[email protected]>"
1206+
criteria = "safe-to-deploy"
1207+
delta = "0.7.0@git:767ac03245ee937d3dc552edc13fe7ab0a860eec -> 0.7.0@git:ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
1208+
12041209
[[audits.d3d12]]
12051210
who = "Nicolas Silva <[email protected]>"
12061211
criteria = "safe-to-deploy"
@@ -2497,6 +2502,11 @@ who = "Erich Gubler <[email protected]>"
24972502
criteria = "safe-to-deploy"
24982503
delta = "0.14.0@git:6e21f7a9291db4395192d6b510d906978ae2d251 -> 0.14.0@git:a820a3ffba468cbb87c2a7e7bbe37065ed5207ee"
24992504

2505+
[[audits.naga]]
2506+
who = "Nicolas Silva <[email protected]>"
2507+
criteria = "safe-to-deploy"
2508+
delta = "0.14.0@git:767ac03245ee937d3dc552edc13fe7ab0a860eec -> 0.14.0@git:ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
2509+
25002510
[[audits.naga]]
25012511
who = "Nicolas Silva <[email protected]>"
25022512
criteria = "safe-to-deploy"
@@ -4270,6 +4280,11 @@ who = "Erich Gubler <[email protected]>"
42704280
criteria = "safe-to-deploy"
42714281
delta = "0.18.0@git:6e21f7a9291db4395192d6b510d906978ae2d251 -> 0.18.0@git:a820a3ffba468cbb87c2a7e7bbe37065ed5207ee"
42724282

4283+
[[audits.wgpu-core]]
4284+
who = "Nicolas Silva <[email protected]>"
4285+
criteria = "safe-to-deploy"
4286+
delta = "0.18.0@git:767ac03245ee937d3dc552edc13fe7ab0a860eec -> 0.18.0@git:ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
4287+
42734288
[[audits.wgpu-core]]
42744289
who = "Nicolas Silva <[email protected]>"
42754290
criteria = "safe-to-deploy"
@@ -4343,6 +4358,11 @@ who = "Erich Gubler <[email protected]>"
43434358
criteria = "safe-to-deploy"
43444359
delta = "0.18.0@git:6e21f7a9291db4395192d6b510d906978ae2d251 -> 0.18.0@git:a820a3ffba468cbb87c2a7e7bbe37065ed5207ee"
43454360

4361+
[[audits.wgpu-hal]]
4362+
who = "Nicolas Silva <[email protected]>"
4363+
criteria = "safe-to-deploy"
4364+
delta = "0.18.0@git:767ac03245ee937d3dc552edc13fe7ab0a860eec -> 0.18.0@git:ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
4365+
43464366
[[audits.wgpu-hal]]
43474367
who = "Nicolas Silva <[email protected]>"
43484368
criteria = "safe-to-deploy"
@@ -4416,6 +4436,11 @@ who = "Erich Gubler <[email protected]>"
44164436
criteria = "safe-to-deploy"
44174437
delta = "0.18.0@git:6e21f7a9291db4395192d6b510d906978ae2d251 -> 0.18.0@git:a820a3ffba468cbb87c2a7e7bbe37065ed5207ee"
44184438

4439+
[[audits.wgpu-types]]
4440+
who = "Nicolas Silva <[email protected]>"
4441+
criteria = "safe-to-deploy"
4442+
delta = "0.18.0@git:767ac03245ee937d3dc552edc13fe7ab0a860eec -> 0.18.0@git:ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
4443+
44194444
[[audits.wgpu-types]]
44204445
who = "Nicolas Silva <[email protected]>"
44214446
criteria = "safe-to-deploy"

third_party/rust/naga/.cargo-checksum.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

third_party/rust/naga/src/front/wgsl/lower/mod.rs

Lines changed: 61 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -875,10 +875,30 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {
875875
ast::GlobalDeclKind::Var(ref v) => {
876876
let ty = self.resolve_ast_type(v.ty, &mut ctx)?;
877877

878-
let init = v
879-
.init
880-
.map(|init| self.expression(init, &mut ctx.as_const()))
881-
.transpose()?;
878+
let init;
879+
if let Some(init_ast) = v.init {
880+
let mut ectx = ctx.as_const();
881+
let lowered = self.expression_for_abstract(init_ast, &mut ectx)?;
882+
let ty_res = crate::proc::TypeResolution::Handle(ty);
883+
let converted = ectx
884+
.try_automatic_conversions(lowered, &ty_res, v.name.span)
885+
.map_err(|error| match error {
886+
Error::AutoConversion {
887+
dest_span: _,
888+
dest_type,
889+
source_span: _,
890+
source_type,
891+
} => Error::InitializationTypeMismatch {
892+
name: v.name.span,
893+
expected: dest_type,
894+
got: source_type,
895+
},
896+
other => other,
897+
})?;
898+
init = Some(converted);
899+
} else {
900+
init = None;
901+
}
882902

883903
let binding = if let Some(ref binding) = v.binding {
884904
Some(crate::ResourceBinding {
@@ -1142,45 +1162,49 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {
11421162
return Ok(());
11431163
}
11441164
ast::LocalDecl::Var(ref v) => {
1145-
let mut emitter = Emitter::default();
1146-
emitter.start(&ctx.function.expressions);
1147-
1148-
let initializer = match v.init {
1149-
Some(init) => Some(
1150-
self.expression(init, &mut ctx.as_expression(block, &mut emitter))?,
1151-
),
1152-
None => None,
1153-
};
1154-
11551165
let explicit_ty =
1156-
v.ty.map(|ty| self.resolve_ast_type(ty, &mut ctx.as_global()))
1166+
v.ty.map(|ast| self.resolve_ast_type(ast, &mut ctx.as_global()))
11571167
.transpose()?;
11581168

1159-
let ty = match (explicit_ty, initializer) {
1160-
(Some(explicit), Some(initializer)) => {
1161-
let mut ctx = ctx.as_expression(block, &mut emitter);
1162-
let initializer_ty = resolve_inner!(ctx, initializer);
1163-
if !ctx.module.types[explicit]
1164-
.inner
1165-
.equivalent(initializer_ty, &ctx.module.types)
1166-
{
1167-
let gctx = &ctx.module.to_ctx();
1168-
return Err(Error::InitializationTypeMismatch {
1169+
let mut emitter = Emitter::default();
1170+
emitter.start(&ctx.function.expressions);
1171+
let mut ectx = ctx.as_expression(block, &mut emitter);
1172+
1173+
let ty;
1174+
let initializer;
1175+
match (v.init, explicit_ty) {
1176+
(Some(init), Some(explicit_ty)) => {
1177+
let init = self.expression_for_abstract(init, &mut ectx)?;
1178+
let ty_res = crate::proc::TypeResolution::Handle(explicit_ty);
1179+
let init = ectx
1180+
.try_automatic_conversions(init, &ty_res, v.name.span)
1181+
.map_err(|error| match error {
1182+
Error::AutoConversion {
1183+
dest_span: _,
1184+
dest_type,
1185+
source_span: _,
1186+
source_type,
1187+
} => Error::InitializationTypeMismatch {
11691188
name: v.name.span,
1170-
expected: explicit.to_wgsl(gctx),
1171-
got: initializer_ty.to_wgsl(gctx),
1172-
});
1173-
}
1174-
explicit
1189+
expected: dest_type,
1190+
got: source_type,
1191+
},
1192+
other => other,
1193+
})?;
1194+
ty = explicit_ty;
1195+
initializer = Some(init);
11751196
}
1176-
(Some(explicit), None) => explicit,
1177-
(None, Some(initializer)) => ctx
1178-
.as_expression(block, &mut emitter)
1179-
.register_type(initializer)?,
1180-
(None, None) => {
1181-
return Err(Error::MissingType(v.name.span));
1197+
(Some(init), None) => {
1198+
let concretized = self.expression(init, &mut ectx)?;
1199+
ty = ectx.register_type(concretized)?;
1200+
initializer = Some(concretized);
11821201
}
1183-
};
1202+
(None, Some(explicit_ty)) => {
1203+
ty = explicit_ty;
1204+
initializer = None;
1205+
}
1206+
(None, None) => return Err(Error::MissingType(v.name.span)),
1207+
}
11841208

11851209
let (const_initializer, initializer) = {
11861210
match initializer {

0 commit comments

Comments
 (0)