Skip to content

Commit

Permalink
Update glam to 0.29 and nalgebra to 0.33 (#66)
Browse files Browse the repository at this point in the history
* Update glam to 0.29 and nalgebra to 0.33

* Update `crevice-tests` dependencies

* Update MSRV to 1.74
  • Loading branch information
a1phyr authored Sep 18, 2024
1 parent b6b2688 commit 343c9d3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- label: Stable
rust_version: stable
- label: MSRV
rust_version: 1.58.0
rust_version: 1.74
- label: Stable (All Features)
rust_version: stable
flags: --features test-all-math-libraries
Expand Down Expand Up @@ -79,4 +79,4 @@ jobs:
profile: minimal

- name: Run Validation Tests
run: cargo test --package crevice-tests --features wgpu-validation --no-fail-fast --verbose
run: cargo test --package crevice-tests --features wgpu-validation --no-fail-fast --verbose
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ bytemuck = "1.12.3"
mint = "0.5.9"

cgmath = { version = "0.18.0", default-features = false, optional = true }
glam = { version = "^0.27", default-features = false, features = ["mint"], optional = true }
nalgebra = { version = "0.32.3", default-features = false, features = ["mint"], optional = true }
glam = { version = "^0.29", default-features = false, features = ["mint"], optional = true }
nalgebra = { version = "0.33", default-features = false, features = ["mint"], optional = true }

[dev-dependencies]
insta = "1.21.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ unmap_gpu_buffer();

### Minimum Supported Rust Version (MSRV)

Crevice supports Rust 1.58.0 and newer due to use of new `const fn` features.
Crevice supports Rust 1.74.0 and newer.

[glsl-layout]: https://github.com/rustgd/glsl-layout

Expand Down
6 changes: 3 additions & 3 deletions crevice-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ crevice-derive = { path = "../crevice-derive", features = ["debug-methods"] }

anyhow = "1.0.44"
bytemuck = "1.7.2"
memoffset = "0.6.4"
memoffset = "0.9"
mint = "0.5.5"

futures = { version = "0.3.17", features = ["executor"], optional = true }
naga = { version = "0.9.0", features = ["glsl-in", "wgsl-out"], optional = true }
wgpu = { version = "0.13.0", optional = true }
naga = { version = "22", features = ["glsl-in", "wgsl-out"], optional = true }
wgpu = { version = "22", optional = true }
14 changes: 8 additions & 6 deletions crevice-tests/src/gpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ where
layout: None,
module: &cs_module,
entry_point: "main",
cache: None,
compilation_options: Default::default(),
});

let bind_group_layout = compute_pipeline.get_bind_group_layout(0);
Expand All @@ -212,8 +214,7 @@ where
.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None });

{
let mut cpass =
encoder.begin_compute_pass(&wgpu::ComputePassDescriptor { label: None });
let mut cpass = encoder.begin_compute_pass(&wgpu::ComputePassDescriptor::default());
cpass.set_pipeline(&compute_pipeline);
cpass.set_bind_group(0, &bind_group, &[]);
cpass.dispatch_workgroups(1, 1, 1);
Expand Down Expand Up @@ -243,7 +244,7 @@ where
}

fn setup() -> (wgpu::Device, wgpu::Queue) {
let instance = wgpu::Instance::new(wgpu::Backends::all());
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor::default());
let adapter =
block_on(instance.request_adapter(&wgpu::RequestAdapterOptions::default())).unwrap();

Expand All @@ -252,16 +253,17 @@ fn setup() -> (wgpu::Device, wgpu::Queue) {
block_on(adapter.request_device(
&wgpu::DeviceDescriptor {
label: None,
features: wgpu::Features::empty(),
limits: wgpu::Limits::downlevel_defaults(),
required_features: wgpu::Features::empty(),
required_limits: wgpu::Limits::downlevel_defaults(),
memory_hints: wgpu::MemoryHints::Performance,
},
None,
))
.unwrap()
}

fn compile(glsl_source: &str) -> anyhow::Result<String> {
let mut parser = naga::front::glsl::Parser::default();
let mut parser = naga::front::glsl::Frontend::default();

let module = parser
.parse(
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ unmap_gpu_buffer();
## Minimum Supported Rust Version (MSRV)
Crevice supports Rust 1.58.0 and newer due to use of new `const fn` features.
Crevice supports Rust 1.74.
[glsl-layout]: https://github.com/rustgd/glsl-layout
*/
Expand Down

0 comments on commit 343c9d3

Please sign in to comment.