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§

dispatch_types 🔒
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.
trait_alias 🔒
Create a single trait with the given supertraits and a blanket impl for all types that implement them.

Enums§

DispatchAdapter
DispatchBindGroup
DispatchBindGroupLayout
DispatchBlas
DispatchBuffer
DispatchBufferMappedRange
DispatchCommandBuffer
DispatchCommandEncoder
DispatchComputePass
DispatchComputePipeline
DispatchDevice
DispatchExternalTexture
DispatchInstance
DispatchPipelineCache
DispatchPipelineLayout
DispatchQuerySet
DispatchQueue
DispatchQueueWriteBuffer
DispatchRenderBundle
DispatchRenderBundleEncoder
DispatchRenderPass
DispatchRenderPipeline
DispatchSampler
DispatchShaderModule
DispatchSurface
DispatchSurfaceOutputDetail
DispatchTexture
DispatchTextureView
DispatchTlas

Traits§

AdapterInterface
AsAny
BindGroupInterface
BindGroupLayoutInterface
BlasInterface
BufferInterface
BufferMappedRangeInterface
CommandBufferInterface
CommandEncoderInterface
CommonTraits
ComputePassInterface
ComputePipelineInterface
DeviceInterface
ExternalTextureInterface
InstanceInterface
PipelineCacheInterface
PipelineLayoutInterface
PopErrorScopeFuture
QuerySetInterface
QueueInterface
QueueWriteBufferInterface
RenderBundleEncoderInterface
RenderBundleInterface
RenderPassInterface
RenderPipelineInterface
RequestAdapterFuture
RequestDeviceFuture
SamplerInterface
ShaderCompilationInfoFuture
ShaderModuleInterface
SurfaceInterface
SurfaceOutputDetailInterface
TextureInterface
TextureViewInterface
TlasInterface

Type Aliases§

BlasCompactCallbacksend_sync
BoxDeviceLostCallbacksend_sync
BoxSubmittedWorkDoneCallbacksend_sync
BufferMapCallbacksend_sync