740: First Phase of Tracing Transition r=kvark a=cwfitzgerald ## Connections First step in the implementation of #491. https://github.com/gfx-rs/wgpu-rs/pull/395 ## Description This adds the tracing crate, implements a tracing "layer" for chrome tracing, and instruments every entrypoint into wgpu. Tracing is added as a main dependency. A feature is added called `subscriber` which guards the tracing and default logger implementation, as that adds 3 dependencies. The main macro is there to make creating a span a simple one line process. This macro will come in useful in the next couple stages. Use of this macro is used unqualified with it imported into scope as that style allows IntelliJ ides to actually find the macro. I also removed a really annoying warning that was driving me crazy. This PR does not make sure the logging output from tracing is up to snuff, that will be done when logging output and conversion is the priority. Both commits should compile individually, so shouldn't need to be squashed. ## Testing This PR was tested with the wgpu-rs PR on various examples, as well as my personal project. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This is an active GitHub mirror of the WebGPU implementation in Rust, which now lives in "gfx/wgpu" of Mozilla-central. Issues and pull requests are accepted, but some bidirectional synchronization may be involved.
WebGPU
This is the core logic of an experimental WebGPU implementation. It's written in Rust and is based on gfx-hal with help of gfx-extras. See the upstream WebGPU specification (work in progress).
The implementation consists of the following parts:
- internal Rust API for WebGPU implementations to use
- Rust types shared between
wgpu-core,wgpu-native, andwgpu-rsplayer- standalone application for replaying the API traces, useswinit
This repository contains the core of wgpu, and is not usable directly by applications.
If you are looking for the user-facing Rust API, you need wgpu-rs.
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 | ✔️ | ||
| OpenGL | 🚧 | 🚧 | 🚧 |
✔️ = Primary support — ✅ = Secondary support — 🚧 = Unsupported, but support in progress