Skip to content

Commit 8759e5a

Browse files
atlv24james7132
andauthored
add module doc to bevy_render (#20469)
# Objective - theres no docs regarding our env vars ## Solution - document them in bevy_render module docs (currently nonexistent) ## Testing - --------- Co-authored-by: James Liu <contact@jamessliu.com>
1 parent 7775564 commit 8759e5a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

crates/bevy_render/src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
//! # Useful Environment Variables
2+
//!
3+
//! Both `bevy_render` and `wgpu` have a number of environment variable options for changing the runtime behavior
4+
//! of both crates. Many of these may be useful in development or release environments.
5+
//!
6+
//! - `WGPU_DEBUG=1` enables debug labels, which can be useful in release builds.
7+
//! - `WGPU_VALIDATION=0` disables validation layers. This can help with particularly spammy errors.
8+
//! - `WGPU_FORCE_FALLBACK_ADAPTER=1` attempts to force software rendering. This typically matches what is used in CI.
9+
//! - `WGPU_ADAPTER_NAME` allows selecting a specific adapter by name.
10+
//! - `WGPU_SETTINGS_PRIO=webgl2` uses webgl2 limits.
11+
//! - `WGPU_SETTINGS_PRIO=compatibility` uses webgpu limits.
12+
//! - `VERBOSE_SHADER_ERROR=1` prints more detailed information about WGSL compilation errors, such as shader defs and shader entrypoint.
13+
114
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
215
#![expect(unsafe_code, reason = "Unsafe code is used to improve performance.")]
316
#![cfg_attr(

0 commit comments

Comments
 (0)