pub trait Api: Clone + Debug + Sized {
Show 21 associated items
type Instance: Instance<A = Self>;
type Surface: Surface<A = Self>;
type Adapter: Adapter<A = Self>;
type Device: Device<A = Self>;
type Queue: Queue<A = Self>;
type CommandEncoder: CommandEncoder<A = Self>;
type CommandBuffer: WasmNotSendSync + Debug;
type Buffer: Debug + WasmNotSendSync + 'static;
type Texture: Debug + WasmNotSendSync + 'static;
type SurfaceTexture: Debug + WasmNotSendSync + Borrow<Self::Texture>;
type TextureView: Debug + WasmNotSendSync;
type Sampler: Debug + WasmNotSendSync;
type QuerySet: Debug + WasmNotSendSync;
type Fence: Debug + WasmNotSendSync;
type BindGroupLayout: Debug + WasmNotSendSync;
type BindGroup: Debug + WasmNotSendSync;
type PipelineLayout: Debug + WasmNotSendSync;
type ShaderModule: Debug + WasmNotSendSync;
type RenderPipeline: Debug + WasmNotSendSync;
type ComputePipeline: Debug + WasmNotSendSync;
type AccelerationStructure: Debug + WasmNotSendSync + 'static;
}
Required Associated Types§
type Instance: Instance<A = Self>
type Surface: Surface<A = Self>
type Adapter: Adapter<A = Self>
type Device: Device<A = Self>
type Queue: Queue<A = Self>
type CommandEncoder: CommandEncoder<A = Self>
sourcetype CommandBuffer: WasmNotSendSync + Debug
type CommandBuffer: WasmNotSendSync + Debug
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: Debug + WasmNotSendSync + 'static
type Texture: Debug + WasmNotSendSync + 'static
type SurfaceTexture: Debug + WasmNotSendSync + Borrow<Self::Texture>
type TextureView: Debug + WasmNotSendSync
type Sampler: Debug + WasmNotSendSync
type QuerySet: Debug + WasmNotSendSync
sourcetype Fence: Debug + WasmNotSendSync
type Fence: Debug + WasmNotSendSync
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: Debug + WasmNotSendSync
type BindGroup: Debug + WasmNotSendSync
type PipelineLayout: Debug + WasmNotSendSync
type ShaderModule: Debug + WasmNotSendSync
type RenderPipeline: Debug + WasmNotSendSync
type ComputePipeline: Debug + WasmNotSendSync
type AccelerationStructure: Debug + WasmNotSendSync + 'static
Object Safety§
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 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.type Instance = Instance
type Surface = Surface
type Adapter = Adapter
type Device = Device
type Queue = Queue
type CommandEncoder = CommandEncoder
type CommandBuffer = CommandBuffer
type Buffer = Buffer
type Texture = Texture
type SurfaceTexture = Texture
type TextureView = TextureView
type Sampler = Sampler
type QuerySet = QuerySet
type Fence = Fence
type AccelerationStructure = ()
type BindGroupLayout = BindGroupLayout
type BindGroup = BindGroup
type PipelineLayout = PipelineLayout
type ShaderModule = ShaderModule
type RenderPipeline = RenderPipeline
type ComputePipeline = ComputePipeline
source§impl Api for wgpu_hal::vulkan::Api
Available on vulkan
only.
impl Api for wgpu_hal::vulkan::Api
vulkan
only.