Device

An open connection to a graphics and/or compute device.

The Device is the responsible for the creation of most rendering and compute resources, as well as exposing Queue objects.

Members

Functions

createBindGroup
BindGroup createBindGroup(BindGroupDescriptor descriptor)

Creates a new bind group.

createBindGroupLayout
BindGroupLayout createBindGroupLayout(BindGroupLayoutDescriptor descriptor)

Creates a bind group layout.

createBuffer
Buffer createBuffer(BufferDescriptor descriptor)

Creates a new buffer.

createCommandEncoder
CommandEncoder createCommandEncoder(CommandEncoderDescriptor descriptor)

Creates an empty CommandEncoder.

createComputePipeline
ComputePipeline createComputePipeline(ComputePipelineDescriptor descriptor)

Creates a compute pipeline.

createPipelineLayout
PipelineLayout createPipelineLayout(PipelineLayoutDescriptor descriptor)

Creates a bind group layout.

createRenderPipeline
RenderPipeline createRenderPipeline(RenderPipelineDescriptor descriptor)

Creates a render pipeline.

createSampler
Sampler createSampler(SamplerDescriptor descriptor)

Creates a new Sampler.

createShaderModule
ShaderModule createShaderModule(byte[] spv)

Creates a shader module from SPIR-V source code.

createSwapChain
SwapChain createSwapChain(Surface surface, SwapChainDescriptor descriptor)

Create a new SwapChain which targets surface.

createTexture
Texture createTexture(TextureDescriptor descriptor)

Creates a new Texture.

destroy
void destroy()

Release the given handle.

limits
Limits limits()

List all limits that were requested of this device.

poll
void poll(bool forceWait)

Check for resource cleanups and mapping callbacks.

queue
Queue queue()

Obtains a queue which can accept CommandBuffer submissions.

ready
bool ready()

Whether this Device handle is valid and ready for use.

Variables

id
WgpuId id;

Handle identifier.

label
string label;

Label for this Device.

See Also

Meta