pub trait Api:
Clone
+ Debug
+ Sized {
Show 22 associated items
type Instance: DynInstance + Instance<A = Self>;
type Surface: DynSurface + Surface<A = Self>;
type Adapter: DynAdapter + Adapter<A = Self>;
type Device: DynDevice + Device<A = Self>;
type Queue: DynQueue + Queue<A = Self>;
type CommandEncoder: DynCommandEncoder + CommandEncoder<A = Self>;
type CommandBuffer: DynCommandBuffer;
type Buffer: DynBuffer;
type Texture: DynTexture;
type SurfaceTexture: DynSurfaceTexture + Borrow<Self::Texture>;
type TextureView: DynTextureView;
type Sampler: DynSampler;
type QuerySet: DynQuerySet;
type Fence: DynFence;
type BindGroupLayout: DynBindGroupLayout;
type BindGroup: DynBindGroup;
type PipelineLayout: DynPipelineLayout;
type ShaderModule: DynShaderModule;
type RenderPipeline: DynRenderPipeline;
type ComputePipeline: DynComputePipeline;
type PipelineCache: DynPipelineCache;
type AccelerationStructure: DynAccelerationStructure + 'static;
}
Required Associated Types§
type Instance: DynInstance + Instance<A = Self>
type Surface: DynSurface + Surface<A = Self>
type Adapter: DynAdapter + Adapter<A = Self>
type Device: DynDevice + Device<A = Self>
type Queue: DynQueue + Queue<A = Self>
type CommandEncoder: DynCommandEncoder + CommandEncoder<A = Self>
Sourcetype CommandBuffer: DynCommandBuffer
type CommandBuffer: DynCommandBuffer
This API’s command buffer type.
The only thing you can do with CommandBuffer
s is build them
with a CommandEncoder
and then pass them to
Queue::submit
for execution, or destroy them by passing
them to CommandEncoder::reset_all
.
type Buffer: DynBuffer
type Texture: DynTexture
type SurfaceTexture: DynSurfaceTexture + Borrow<Self::Texture>
type TextureView: DynTextureView
type Sampler: DynSampler
type QuerySet: DynQuerySet
Sourcetype Fence: DynFence
type Fence: DynFence
A value you can block on to wait for something to finish.
A Fence
holds a monotonically increasing FenceValue
. You can call
Device::wait
to block until a fence reaches or passes a value you
choose. Queue::submit
can take a Fence
and a FenceValue
to
store in it when the submitted work is complete.
Attempting to set a fence to a value less than its current value has no effect.
Waiting on a fence returns as soon as the fence reaches or passes the requested value. This implies that, in order to reliably determine when an operation has completed, operations must finish in order of increasing fence values: if a higher-valued operation were to finish before a lower-valued operation, then waiting for the fence to reach the lower value could return before the lower-valued operation has actually finished.
type BindGroupLayout: DynBindGroupLayout
type BindGroup: DynBindGroup
type PipelineLayout: DynPipelineLayout
type ShaderModule: DynShaderModule
type RenderPipeline: DynRenderPipeline
type ComputePipeline: DynComputePipeline
type PipelineCache: DynPipelineCache
type AccelerationStructure: DynAccelerationStructure + 'static
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl Api for wgpu_hal::empty::Api
impl Api for wgpu_hal::empty::Api
type Instance = Context
type Surface = Context
type Adapter = Context
type Device = Context
type Queue = Context
type CommandEncoder = Encoder
type CommandBuffer = Resource
type Buffer = Resource
type Texture = Resource
type SurfaceTexture = Resource
type TextureView = Resource
type Sampler = Resource
type QuerySet = Resource
type Fence = Resource
type AccelerationStructure = Resource
type PipelineCache = Resource
type BindGroupLayout = Resource
type BindGroup = Resource
type PipelineLayout = Resource
type ShaderModule = Resource
type RenderPipeline = Resource
type ComputePipeline = Resource
Source§impl Api for wgpu_hal::gles::Api
Available on gles
only.
impl Api for wgpu_hal::gles::Api
gles
only.