Expand description
This library safely implements WebGPU on native platforms. It is designed for integration into browsers, as well as wrapping into other language-specific user-friendly libraries.
§Feature flags
See docuemntation for the wgpu
crate for more in-depth information on these features.
§Logging Configuration
api_log_info
— Log all API entry points at info instead of trace level. Also, promotes certain debug log calls to info.resource_log_info
— Log resource lifecycle management at info instead of trace level.
§Runtime Checks
indirect-validation
— Validates indirect draw/dispatch calls. This will also enable naga’s WGSL frontend since we use a WGSL compute shader to do the validation.strict_asserts
— Apply run-time checks, even in release builds. These are in addition to the validation carried out at public APIs in all builds.
§Debugging
observe_locks
— Enable lock order observation.
§Serialization
serde
— Enables serialization viaserde
on common wgpu types.trace
— Enable API tracing.replay
— Enable API replaying
§Surface Support
raw-window-handle
— Enable creating surfaces using raw-window-handle
§Shading Language Support
wgsl
— EnableShaderModuleSource::Wgsl
glsl
— EnableShaderModuleSource::Glsl
spirv
— EnableShaderModuleSource::SpirV
§Other
counters
— Internally count resources and events for debugging purposes. If the counters feature is disabled, the counting infrastructure is removed from the build and the exposed counters always return 0.fragile-send-sync-non-atomic-wasm
— ImplementSend
andSync
on Wasm, but only if atomics are not enabled.
§External libraries
The following features facilitate integration with third-party supporting libraries.
static-dxc
— Enable using themach-dxcompiler-rs
crate to compile DX12 shaders.
§Target Conditional Features
dx12
— DX12 backendmetal
— Metal backendvulkan
— Vulkan backend, only available on Windows, Linux, Androidgles
— OpenGL backend, only available on Windows, Linux, Android, and Emscriptenwebgl
— WebGL backend, only available on Emscriptenangle
— OpenGL backend, on macOS onlyvulkan-portability
— Vulkan portability backend, only available on macOSrenderdoc
— Renderdoc integration, only available on Windows, Linux, and Androidnoop
— Enable thenoop
backend.
Re-exports§
pub use validation::map_storage_format_from_naga;
pub use validation::map_storage_format_to_naga;
pub use naga;
Modules§
- conv 🔒
- Module for hashing utilities.
- Allocating resource ids, and tracking the resources they refer to.
- Lazy initialization of texture and buffer memory.
- lock 🔒Instrumented lock types.
- pool 🔒
- Presentation.
- scratch 🔒
- snatch 🔒
- track 🔒Resource State and Lifetime Trackers
- weak_
vec 🔒Module containing theWeakVec
API.