#[repr(u8)]pub enum Backend {
Noop = 0,
Vulkan = 1,
Metal = 2,
Dx12 = 3,
Gl = 4,
BrowserWebGpu = 5,
}
Expand description
Backends supported by wgpu.
See also Backends
.
Variants§
Noop = 0
Dummy backend, which may be used for testing.
It performs no rendering or computation, but allows creation of stub GPU resource types, so that code which manages GPU resources can be tested without an available GPU. Specifically, the following operations are implemented:
- Enumerating adapters will always return one noop adapter, which can be used to create devices.
- Buffers may be created, written, mapped, and copied to other buffers.
- Command encoders may be created, but only buffer operations are useful.
Other resources can be created but are nonfunctional; notably,
- Render passes and compute passes are not executed.
- Textures may be created, but do not store any texels.
- There are no compatible surfaces.
An adapter using the noop backend can only be obtained if NoopBackendOptions
enables it, in addition to the ordinary requirement of Backends::NOOP
being set.
This ensures that applications not desiring a non-functional backend will not receive it.
Vulkan = 1
Vulkan API (Windows, Linux, Android, MacOS via vulkan-portability
/MoltenVK)
Metal = 2
Metal API (Apple platforms)
Dx12 = 3
Direct3D-12 (Windows)
Gl = 4
OpenGL 3.3+ (Windows), OpenGL ES 3.0+ (Linux, Android, MacOS via Angle), and WebGL2
BrowserWebGpu = 5
WebGPU in the browser