diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 719ffa4e3..e7ba4789d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,7 @@ jobs: - if: matrix.channel == 'nightly' run: cargo test -p wgpu-core -- --nocapture - if: matrix.channel == 'nightly' - run: cargo run --example wgpu-info -- cargo test -p wgpu -- --nocapture + run: cargo run --bin wgpu-info -- cargo test -p wgpu -- --nocapture docs: diff --git a/Cargo.lock b/Cargo.lock index 4b9cb1f54..6f97c04c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1891,7 +1891,7 @@ checksum = "d8b77fdfd5a253be4ab714e4ffa3c49caf146b4de743e97510c0656cf90f1e8e" [[package]] name = "wgpu" -version = "0.8.0" +version = "0.9.0" dependencies = [ "arrayvec", "async-executor", @@ -1925,7 +1925,7 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.8.0" +version = "0.9.0" dependencies = [ "arrayvec", "bitflags", @@ -1947,7 +1947,7 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.1.0" +version = "0.9.0" dependencies = [ "arrayvec", "ash", @@ -1983,7 +1983,7 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.8.0" +version = "0.9.0" dependencies = [ "bitflags", "serde", diff --git a/Cargo.toml b/Cargo.toml index 22cf39d31..964a706ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ members = [ "wgpu-info", "wgpu-types", ] -default-members = ["wgpu", "player", "wgpu-hal"] +default-members = ["wgpu", "player", "wgpu-hal", "wgpu-info"] [patch."https://github.com/gfx-rs/naga"] #naga = { path = "../naga" } diff --git a/README.md b/README.md index e0687304e..4fa927d96 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ The repository hosts the following parts: - [![Crates.io](https://img.shields.io/crates/v/wgpu.svg?label=wgpu)](https://crates.io/crates/wgpu) [![docs.rs](https://docs.rs/wgpu/badge.svg)](https://docs.rs/wgpu/) - public Rust API for users - [![Crates.io](https://img.shields.io/crates/v/wgpu-core.svg?label=wgpu-core)](https://crates.io/crates/wgpu-core) [![docs.rs](https://docs.rs/wgpu-core/badge.svg)](https://docs.rs/wgpu-core/) - internal Rust API for WebGPU implementations to use - [![Crates.io](https://img.shields.io/crates/v/wgpu-hal.svg?label=wgpu-hal)](https://crates.io/crates/wgpu-hal) [![docs.rs](https://docs.rs/wgpu-hal/badge.svg)](https://docs.rs/wgpu-hal/) - internal unsafe GPU abstraction API + - [![Crates.io](https://img.shields.io/crates/v/wgpu-info.svg?label=wgpu-types)](https://crates.io/crates/wgpu-info) - Program that prints out information about all the adapters on the system or invokes a command for every adapter. - [![Crates.io](https://img.shields.io/crates/v/wgpu-types.svg?label=wgpu-types)](https://crates.io/crates/wgpu-types) [![docs.rs](https://docs.rs/wgpu-types/badge.svg)](https://docs.rs/wgpu-types/) - Rust types shared between `wgpu-core` and `wgpu-rs` - `player` - standalone application for replaying the API traces, uses `winit` @@ -25,11 +26,11 @@ If you are looking for the native implementation or bindings to the API in other API | Windows 7/10 | Linux & Android | macOS & iOS | ----- | ------------------ | ------------------ | ------------------ | - DX11 | | | | - DX12 | | | | + DX11 | :construction: | | | + DX12 | :construction: | | | Vulkan | :white_check_mark: | :white_check_mark: | | Metal | | | :white_check_mark: | - GLes3 | | | | + GLes3 | | :construction: | | :white_check_mark: = Primary support — :ok: = Secondary support — :construction: = Unsupported, but support in progress @@ -40,7 +41,7 @@ wgpu features a set of unit, integration, and example based tests. All framework To run the test suite, run the following command: ``` -cargo run --example wgpu-info -- cargo test +cargo run --bin wgpu-info -- cargo test ``` To run any individual test on a specific adapter, populate the following environment variables: diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 84a3a8ca5..1239f105b 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-core" -version = "0.8.0" +version = "0.9.0" authors = ["wgpu developers"] edition = "2018" description = "WebGPU core logic on gfx-hal" @@ -42,12 +42,12 @@ features = ["wgsl-in"] [dependencies.wgt] path = "../wgpu-types" package = "wgpu-types" -version = "0.8" +version = "0.9" [dependencies.hal] path = "../wgpu-hal" package = "wgpu-hal" -version = "0.1" +version = "0.9" [target.'cfg(all(not(target_arch = "wasm32"), any(target_os = "ios", target_os = "macos")))'.dependencies] hal = { path = "../wgpu-hal", package = "wgpu-hal", features = ["metal"] } diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 2363f920f..9fc1c2746 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-hal" -version = "0.1.0" +version = "0.9.0" authors = ["wgpu developers"] edition = "2018" description = "WebGPU hardware abstraction layer" diff --git a/wgpu-info/Cargo.toml b/wgpu-info/Cargo.toml index aed93f71d..c0aa877c9 100644 --- a/wgpu-info/Cargo.toml +++ b/wgpu-info/Cargo.toml @@ -10,4 +10,4 @@ keywords = ["graphics"] license = "MIT OR Apache-2.0" [dependencies] -wgpu = { version = "0.8", path = "../wgpu" } +wgpu = { version = "0.9", path = "../wgpu" } diff --git a/wgpu-info/README.md b/wgpu-info/README.md index 186577163..7d3d703a9 100644 --- a/wgpu-info/README.md +++ b/wgpu-info/README.md @@ -1,13 +1,13 @@ # wgpu-info -This example is a command line utility that does two different functions. +This is a command line utility that does two different functions. #### Listing Adapters When called with no arguments, wgpu-info will list all adapters visible to wgpu and all the information about them we have. ``` -cargo run --example wgpu-info +cargo run --bin wgpu-info ``` #### Running Test on many Adapters diff --git a/wgpu-types/Cargo.toml b/wgpu-types/Cargo.toml index b36f942ec..e5610b607 100644 --- a/wgpu-types/Cargo.toml +++ b/wgpu-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-types" -version = "0.8.0" +version = "0.9.0" authors = ["wgpu developers"] edition = "2018" description = "WebGPU types" diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 575c3fe01..e1ae2adb6 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu" -version = "0.8.0" +version = "0.9.0" authors = ["wgpu developers"] edition = "2018" description = "Rusty WebGPU API wrapper" @@ -108,10 +108,6 @@ test = true name="hello-compute" test = true -[[example]] -name="texture-arrays" -required-features = ["spirv"] - [[example]] name="mipmap" test = true @@ -130,6 +126,7 @@ test = true [[example]] name="texture-arrays" +required-features = ["spirv"] test = true [[example]] diff --git a/wgpu/examples/framework.rs b/wgpu/examples/framework.rs index c08f18727..f74aa48a9 100644 --- a/wgpu/examples/framework.rs +++ b/wgpu/examples/framework.rs @@ -468,7 +468,7 @@ pub fn test(mut params: FrameworkRefTest) { let bytes = dst_buffer_slice.get_mapped_range().to_vec(); test_common::image::compare_image_output( - env!("CARGO_MANIFEST_DIR").to_string() + ¶ms.image_path, + env!("CARGO_MANIFEST_DIR").to_string() + params.image_path, params.width, params.height, &bytes, diff --git a/wgpu/examples/water/main.rs b/wgpu/examples/water/main.rs index 2cdd780ee..6a375ce6c 100644 --- a/wgpu/examples/water/main.rs +++ b/wgpu/examples/water/main.rs @@ -792,5 +792,13 @@ fn main() { #[test] fn shadow() { - framework::test::( framework::FrameworkRefTest {image_path: "/examples/water/screenshot.png", width: 1024, height: 768, optional_features: wgpu::Features::default(), base_test_parameters: framework::test_common::TestParameters::default(), tollerance: 5, max_outliers: 10, }); + framework::test::(framework::FrameworkRefTest { + image_path: "/examples/water/screenshot.png", + width: 1024, + height: 768, + optional_features: wgpu::Features::default(), + base_test_parameters: framework::test_common::TestParameters::default(), + tollerance: 5, + max_outliers: 10, + }); } diff --git a/wgpu/tests/common/mod.rs b/wgpu/tests/common/mod.rs index cb455c051..3c5e215ab 100644 --- a/wgpu/tests/common/mod.rs +++ b/wgpu/tests/common/mod.rs @@ -154,7 +154,7 @@ pub fn initialize_test(parameters: TestParameters, test_function: impl FnOnce(Te // We don't actually care if it fails let _ = env_logger::try_init(); - let backend_bits = util::backend_bits_from_env().unwrap_or(BackendBit::all()); + let backend_bits = util::backend_bits_from_env().unwrap_or_else(BackendBit::all); let instance = Instance::new(backend_bits); let adapter = pollster::block_on(util::initialize_adapter_from_env_or_default( &instance, @@ -254,12 +254,10 @@ pub fn initialize_test(parameters: TestParameters, test_function: impl FnOnce(Te // Print out reason for the failure println!("GOT EXPECTED TEST FAILURE: {:?}", reason); } + } else if let Some(reason) = failure_reason { + // We expected to fail, but things passed + panic!("UNEXPECTED TEST PASS: {:?}", reason); } else { - if let Some(reason) = failure_reason { - // We expected to fail, but things passed - panic!("UNEXPECTED TEST PASS: {:?}", reason); - } else { - panic!("UNEXPECTED TEST FAILURE") - } + panic!("UNEXPECTED TEST FAILURE") } }