Skip to content

Commit 20f1d60

Browse files
authored
Fix cfg-check lint errors, update glam to 0.29, wgpu to 22.1 (#1157)
* bump glam to 0.29 * fix cargo deny * upgrade wgpu * fix cfg-check lints
1 parent 54f6978 commit 20f1d60

File tree

10 files changed

+144
-110
lines changed

10 files changed

+144
-110
lines changed

.cargo/config .cargo/config.toml

File renamed without changes.

Cargo.lock

+117-100
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ edition = "2021"
3030
license = "MIT OR Apache-2.0"
3131
repository = "https://github.com/EmbarkStudios/rust-gpu"
3232

33+
[workspace.lints.rust]
34+
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }
35+
3336
[workspace.dependencies]
3437
spirv-builder = { path = "./crates/spirv-builder", version = "=0.9.0", default-features = false }
3538
spirv-std = { path = "./crates/spirv-std", version = "=0.9.0" }
@@ -41,7 +44,7 @@ rustc_codegen_spirv-types = { path = "./crates/rustc_codegen_spirv-types", versi
4144

4245
# External dependencies that need to be mentioned more than once.
4346
num-traits = { version = "0.2.15", default-features = false }
44-
glam = { version = ">=0.22, <=0.25", default-features = false }
47+
glam = { version = ">=0.22, <=0.29", default-features = false }
4548

4649
# Enable incremental by default in release mode.
4750
[profile.release]

crates/spirv-std/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ edition.workspace = true
77
license.workspace = true
88
repository.workspace = true
99

10+
[lints.rust]
11+
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }
12+
1013
[dependencies]
1114
spirv-std-types.workspace = true
1215
spirv-std-macros.workspace = true

crates/spirv-std/macros/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ edition.workspace = true
77
license.workspace = true
88
repository.workspace = true
99

10+
[lints.rust]
11+
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }
12+
1013
[lib]
1114
proc-macro = true
1215

crates/spirv-std/shared/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ authors.workspace = true
66
edition.workspace = true
77
license.workspace = true
88
repository.workspace = true
9+
10+
[lints.rust]
11+
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }
12+

deny.toml

+4-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
# More documentation for the advisories section can be found here:
33
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
44
[advisories]
5-
vulnerability = "deny"
6-
# FIXME(eddyb) `ansi_term` and `xml-rs` prevent this from being `deny`.
7-
unmaintained = "warn"
8-
yanked = "deny"
9-
notice = "deny"
5+
ignore = [
6+
# safemem transitive dependency, old and unmaintained but not critical and stable
7+
"RUSTSEC-2023-0081",
8+
]
109

1110
# This section is considered when running `cargo deny check bans`.
1211
# More documentation about the 'bans' section can be found here:
@@ -44,7 +43,6 @@ skip-tree = [
4443

4544

4645
[licenses]
47-
unlicensed = "deny"
4846
# List of explictly allowed licenses
4947
# See https://spdx.org/licenses/ for list of possible licenses
5048
# [possible values: any SPDX 3.7 short identifier (+ optional exception)].
@@ -69,7 +67,6 @@ exceptions = [
6967
{ allow = ["CC0-1.0"], name = "notify", version = "5.0.0-pre.13" },
7068
{ allow = ["CC0-1.0"], name = "hexf-parse" },
7169
]
72-
copyleft = "deny"
7370

7471
# See note in encoding_rs's readme! This clarification is copied directly from there.
7572
[[licenses.clarify]]

examples/runners/wgpu/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ cfg-if = "1.0.0"
2121
shared = { path = "../../shaders/shared" }
2222
futures = { version = "0.3", default-features = false, features = ["std", "executor"] }
2323
# Vulkan SDK or MoltenVK needs to be installed for `vulkan-portability` to work on macOS
24-
wgpu = { version = "0.19.0", features = ["spirv", "vulkan-portability"] }
24+
wgpu = { version = "22.1", features = ["spirv", "vulkan-portability"] }
2525
winit = { version = "0.29.0", features = ["android-native-activity", "rwh_05"] }
2626
clap = { version = "4", features = ["derive"] }
27-
strum = { version = "0.25.0", default_features = false, features = ["std", "derive"] }
27+
strum = { version = "0.25.0", default-features = false, features = ["std", "derive"] }
2828
bytemuck = "1.6.3"
2929

3030
[target.'cfg(not(any(target_os = "android", target_arch = "wasm32")))'.dependencies]

examples/runners/wgpu/src/compute.rs

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
3434
label: None,
3535
required_features,
3636
required_limits: wgpu::Limits::default(),
37+
memory_hints: wgpu::MemoryHints::Performance,
3738
},
3839
None,
3940
)
@@ -87,6 +88,8 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
8788
});
8889

8990
let compute_pipeline = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor {
91+
compilation_options: Default::default(),
92+
cache: None,
9093
label: None,
9194
layout: Some(&pipeline_layout),
9295
module: &module,

examples/runners/wgpu/src/graphics.rs

+4
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ async fn run(
8888
label: None,
8989
required_features,
9090
required_limits,
91+
memory_hints: wgpu::MemoryHints::Performance,
9192
},
9293
None,
9394
)
@@ -379,12 +380,14 @@ fn create_pipeline(
379380
};
380381

381382
device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
383+
cache: None,
382384
label: None,
383385
layout: Some(pipeline_layout),
384386
vertex: wgpu::VertexState {
385387
module: vs_module,
386388
entry_point: vs_entry_point,
387389
buffers: &[],
390+
compilation_options: Default::default(),
388391
},
389392
primitive: wgpu::PrimitiveState {
390393
topology: wgpu::PrimitiveTopology::TriangleList,
@@ -402,6 +405,7 @@ fn create_pipeline(
402405
alpha_to_coverage_enabled: false,
403406
},
404407
fragment: Some(wgpu::FragmentState {
408+
compilation_options: Default::default(),
405409
module: fs_module,
406410
entry_point: fs_entry_point,
407411
targets: &[Some(wgpu::ColorTargetState {

0 commit comments

Comments
 (0)