Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cfg-check lint errors, update glam to 0.29, wgpu to 22.1 (#1157) #9

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
217 changes: 117 additions & 100 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-gpu/rust-gpu"

[workspace.lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }

[workspace.dependencies]
spirv-builder = { path = "./crates/spirv-builder", version = "=0.9.0", default-features = false }
spirv-std = { path = "./crates/spirv-std", version = "=0.9.0" }
Expand All @@ -41,7 +44,7 @@ rustc_codegen_spirv-types = { path = "./crates/rustc_codegen_spirv-types", versi

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

# Enable incremental by default in release mode.
[profile.release]
Expand Down
3 changes: 3 additions & 0 deletions crates/spirv-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ edition.workspace = true
license.workspace = true
repository.workspace = true

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }

[dependencies]
spirv-std-types.workspace = true
spirv-std-macros.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/spirv-std/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ edition.workspace = true
license.workspace = true
repository.workspace = true

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }

[lib]
proc-macro = true

Expand Down
4 changes: 4 additions & 0 deletions crates/spirv-std/shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }

11 changes: 4 additions & 7 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
vulnerability = "deny"
# FIXME(eddyb) `ansi_term` and `xml-rs` prevent this from being `deny`.
unmaintained = "warn"
yanked = "deny"
notice = "deny"
ignore = [
# safemem transitive dependency, old and unmaintained but not critical and stable
"RUSTSEC-2023-0081",
]

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


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

# See note in encoding_rs's readme! This clarification is copied directly from there.
[[licenses.clarify]]
Expand Down
4 changes: 2 additions & 2 deletions examples/runners/wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ cfg-if = "1.0.0"
shared = { path = "../../shaders/shared" }
futures = { version = "0.3", default-features = false, features = ["std", "executor"] }
# Vulkan SDK or MoltenVK needs to be installed for `vulkan-portability` to work on macOS
wgpu = { version = "0.19.0", features = ["spirv", "vulkan-portability"] }
wgpu = { version = "22.1", features = ["spirv", "vulkan-portability"] }
winit = { version = "0.29.0", features = ["android-native-activity", "rwh_05"] }
clap = { version = "4", features = ["derive"] }
strum = { version = "0.25.0", default_features = false, features = ["std", "derive"] }
strum = { version = "0.25.0", default-features = false, features = ["std", "derive"] }
bytemuck = "1.6.3"

[target.'cfg(not(any(target_os = "android", target_arch = "wasm32")))'.dependencies]
Expand Down
3 changes: 3 additions & 0 deletions examples/runners/wgpu/src/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
label: None,
required_features,
required_limits: wgpu::Limits::default(),
memory_hints: wgpu::MemoryHints::Performance,
},
None,
)
Expand Down Expand Up @@ -87,6 +88,8 @@ async fn start_internal(options: &Options, compiled_shader_modules: CompiledShad
});

let compute_pipeline = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor {
compilation_options: Default::default(),
cache: None,
label: None,
layout: Some(&pipeline_layout),
module: &module,
Expand Down
4 changes: 4 additions & 0 deletions examples/runners/wgpu/src/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ async fn run(
label: None,
required_features,
required_limits,
memory_hints: wgpu::MemoryHints::Performance,
},
None,
)
Expand Down Expand Up @@ -379,12 +380,14 @@ fn create_pipeline(
};

device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
cache: None,
label: None,
layout: Some(pipeline_layout),
vertex: wgpu::VertexState {
module: vs_module,
entry_point: vs_entry_point,
buffers: &[],
compilation_options: Default::default(),
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
Expand All @@ -402,6 +405,7 @@ fn create_pipeline(
alpha_to_coverage_enabled: false,
},
fragment: Some(wgpu::FragmentState {
compilation_options: Default::default(),
module: fs_module,
entry_point: fs_entry_point,
targets: &[Some(wgpu::ColorTargetState {
Expand Down
Loading