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 mipmaps;
18mod renderer_backend;
19mod shaders;
20mod surface_target;
21mod writes;
22
23/// The `tracing` targets of this crate's events (`mln_gfx`'s crate docs).
24mod log_target {
25    pub(crate) const RENDER: &str = "mln_webgpu::render";
26}
27
28pub use borrowed_target::{BorrowedTarget, BorrowedTextures, depth_stencil_format};
29pub use custom_layer::{CustomLayerEncoder, CustomLayerPass};
30pub use device::Device;
31pub use gpu::WebGpu;
32pub use renderer_backend::RendererBackend;
33pub use surface_target::{Overlay, OverlayTarget, SurfaceOptions, SurfaceTarget};
34
35/// Frames drawn into textures of the library's and read back.
36pub type OffscreenTarget = mln_gfx::offscreen_target::OffscreenTarget<WebGpu>;
37
38#[cfg(test)]
39mod tests;