1599: Fix Limits for lava/llvmpipe and re-enable and re-work CI r=kvark,groves,wumpf a=cwfitzgerald **Connections** No longer fixes #1551. **Description** This PR has a couple things going on at once. - Fixes limits for llvmpipe, lavapipe, and rpi4. - Added a downlevel limit to express that RPI4 does not allow storage buffers in vertex shaders on GL. - Added a `Limits::downlevel_default()` that takes minimum limits from GLES and adds some more documentation on how to choose limits. - Moved all examples to the new downlevel limits - Reworks CI to re-enable software testing and unify instructions. **Testing** It is Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
wgpu
This is an implementation of WebGPU API in Rust, targeting both native and the Web. See the upstream WebGPU specification (work in progress).
The repository hosts the following parts:
- public Rust API for users
- internal Rust API for WebGPU implementations to use
- internal unsafe GPU abstraction API
- program that prints out information about all the adapters on the system or invokes a command for every adapter.
- Rust types shared between
wgpu-coreandwgpu-rsplayer- standalone application for replaying the API traces, useswinit
Rust examples can be found at wgpu/examples. wgpu is a default member, so you can run the examples directly from the root, e.g. cargo run --example boids.
If you are looking for the native implementation or bindings to the API in other languages, you need wgpu-native.
Supported Platforms
| API | Windows 7/10 | Linux & Android | macOS & iOS |
|---|---|---|---|
| DX11 | 🚧 | ||
| DX12 | 🚧 | ||
| Vulkan | ✅ | ✅ | |
| Metal | ✅ | ||
| GLes3 | 🆗 |
✅ = Primary support — 🆗 = Secondary support — 🚧 = Unsupported, but support in progress
Testing Infrastructure
wgpu features a set of unit, integration, and example based tests. All framework based examples are automatically reftested against the screenshot in the example directory. The wgpu-info example contains the logic which can automatically run the tests multiple times for all the adapters present on the system. These tests are also run on CI on windows and linux over Vulkan/DX12/DX11/GL on software adapters.
To run the test suite, run the following command:
cargo run --bin wgpu-info -- cargo test --no-fail-fast
To run any individual test on a specific adapter, populate the following environment variables:
WGPU_ADAPTER_NAMEwith a substring of the name of the adapter you want to use (ex. "1080" will match "NVIDIA GeForce 1080ti").WGPU_BACKENDwith the name of the backend you want to use (vulkan,metal,dx12,dx11, orgl).
Then to run an example's reftests, run:
cargo test --example <example-name> --no-fail-fast
Or run a part of the integration test suite:
cargo test -p wgpu -- <name-of-test>
If you are a user and want a way to help contribute to wgpu, we always need more help writing test cases.