wgpu

Module dispatch

source
Expand description

Infrastructure for dispatching calls to the appropriate “backend”. The “backends” are:

  • wgpu_core: An implementation of the the wgpu api on top of various native graphics APIs.
  • webgpu: An implementation of the wgpu api which calls WebGPU directly.

The interface traits are all object safe and listed in the InterfaceTypes trait.

The method for dispatching should optimize well if only one backend is compiled in, as-if there was no dispatching at all.

Macros§

  • Generates Dispatch types for each of the interfaces. Each type is a wrapper around the wgpu_core and webgpu types, and derefs to the appropriate interface trait-object.
  • Create a single trait with the given supertraits and a blanket impl for all types that implement them.

Enums§

Traits§

Type Aliases§