#[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
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Backend
impl<'de> Deserialize<'de> for Backend
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Backend, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Backend, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Serialize for Backend
impl Serialize for Backend
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for Backend
impl Eq for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnwindSafe for Backend
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.