Assorted touchups

This commit is contained in:
Connor Fitzgerald 2021-06-23 19:09:26 -04:00
parent 3356f5f993
commit b060bf1afe
13 changed files with 36 additions and 32 deletions

View File

@ -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:

8
Cargo.lock generated
View File

@ -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",

View File

@ -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" }

View File

@ -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:

View File

@ -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"] }

View File

@ -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"

View File

@ -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" }

View File

@ -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

View File

@ -1,6 +1,6 @@
[package]
name = "wgpu-types"
version = "0.8.0"
version = "0.9.0"
authors = ["wgpu developers"]
edition = "2018"
description = "WebGPU types"

View File

@ -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]]

View File

@ -468,7 +468,7 @@ pub fn test<E: Example>(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() + &params.image_path,
env!("CARGO_MANIFEST_DIR").to_string() + params.image_path,
params.width,
params.height,
&bytes,

View File

@ -792,5 +792,13 @@ fn main() {
#[test]
fn shadow() {
framework::test::<Example>( 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::<Example>(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,
});
}

View File

@ -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")
}
}