Skip to main content

mln_webgpu/
lib.rs

1//! The WebGPU backend, on the `wgpu` crate: [`WebGpu`], the backend's
2//! [`Gpu`](mln_gfx::gpu::Gpu), with its shaders, and the targets the
3//! renderer draws frames into.
4//!
5//! A [`RendererBackend`] renders on a [`Device`], into an
6//! [`OffscreenTarget`], a [`SurfaceTarget`] or a [`BorrowedTarget`] built on
7//! it.
8
9#[cfg(feature = "bench")]
10#[doc(hidden)]
11pub mod bench;
12mod borrowed_target;
13mod custom_layer;
14mod device;
15mod gpu;
16mod index_table;
17mod renderer_backend;
18mod shaders;
19mod surface_target;
20mod writes;
21
22pub use borrowed_target::{BorrowedTarget, BorrowedTextures, depth_stencil_format};
23pub use custom_layer::{CustomLayerEncoder, CustomLayerPass};
24pub use device::Device;
25pub use gpu::WebGpu;
26pub use renderer_backend::RendererBackend;
27pub use surface_target::{Overlay, OverlayTarget, SurfaceOptions, SurfaceTarget};
28
29/// Frames drawn into textures of the library's and read back.
30pub type OffscreenTarget = mln_gfx::offscreen_target::OffscreenTarget<WebGpu>;
31
32#[cfg(test)]
33mod tests;