|
3 | 3 | //! To start using the API, create an [`Instance`].
|
4 | 4 | //!
|
5 | 5 | //! ## Feature flags
|
6 |
| -#![doc = document_features::document_features!()] |
| 6 | +// NOTE: the above should be kept in sync. with `Cargo.toml`! |
| 7 | +//! |
| 8 | +//! ### Backends |
| 9 | +//! |
| 10 | +//! ⚠️ WIP: Not all backends can be manually configured today. On Windows & Linux the Vulkan & GLES |
| 11 | +//! backends are always enabled. See [#3514](https://github.com/gfx-rs/wgpu/issues/3514) for more |
| 12 | +//! details. |
| 13 | +//! |
| 14 | +//! - **`dx12`** _(enabled by default)_ --- Enables the DX12 backend on Windows. |
| 15 | +//! - **`metal`** _(enabled by default)_ --- Enables the Metal backend on macOS & iOS. |
| 16 | +//! - **`angle`** --- Enables the GLES backend via [ANGLE](https://github.com/google/angle) on macOS |
| 17 | +//! using. |
| 18 | +//! - **`vulkan-portability`** --- Enables the Vulkan backend on macOS & iOS. |
| 19 | +//! - **`webgl`** --- Enables the GLES backend on Wasm |
| 20 | +//! |
| 21 | +//! - ⚠️ WIP: Currently will also enable GLES dependencies on any other targets. |
| 22 | +//! - ⚠️ WIP: This automatically disables use of WebGPU. See |
| 23 | +//! [#2804](https://github.com/gfx-rs/wgpu/issues/3514). |
| 24 | +//! |
| 25 | +//! ### Shading language support |
| 26 | +//! |
| 27 | +//! - **`spirv`** --- Enable accepting SPIR-V shaders as input. |
| 28 | +//! - **`glsl`** --- Enable accepting GLSL shaders as input. |
| 29 | +//! - **`wgsl`** _(enabled by default)_ --- Enable accepting WGSL shaders as input. |
| 30 | +//! |
| 31 | +//! ### Logging & Tracing |
| 32 | +//! |
| 33 | +//! The following features do not have any effect on the WebGPU backend. |
| 34 | +//! |
| 35 | +//! - **`strict_asserts`** --- Apply run-time checks, even in release builds. These are in addition |
| 36 | +//! to the validation carried out at public APIs in all builds. |
| 37 | +//! - **`api_log_info`** --- Log all API entry points at info instead of trace level. |
| 38 | +//! - **`trace`** --- Allow writing of trace capture files. See [`Adapter::request_device`]. |
| 39 | +//! - **`replay`** --- Allow deserializing of trace capture files that were written with the `trace` |
| 40 | +//! feature. To replay a trace file use the [wgpu |
| 41 | +//! player](https://github.com/gfx-rs/wgpu/tree/trunk/player). |
| 42 | +//! |
| 43 | +//! ### Other |
| 44 | +//! |
| 45 | +//! - **`fragile-send-sync-non-atomic-wasm`** --- Implement `Send` and `Sync` on Wasm, but only if |
| 46 | +//! atomics are not enabled. |
| 47 | +//! |
| 48 | +//! WebGL/WebGPU objects can not be shared between threads. However, it can be useful to |
| 49 | +//! artificially mark them as `Send` and `Sync` anyways to make it easier to write cross-platform |
| 50 | +//! code. This is technically _very_ unsafe in a multithreaded environment, but on a wasm binary |
| 51 | +//! compiled without atomics we know we are definitely not in a multithreaded environment. |
7 | 52 | //!
|
8 | 53 |
|
9 | 54 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
|
0 commit comments