Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::gpu::ComputePassEncoder Class Reference

Encodes commands inside an active compute pass. More...

#include "donner/gpu/CommandEncoder.h"

Public Member Functions

 ComputePassEncoder (const ComputePassEncoder &)=delete
ComputePassEncoder & operator= (const ComputePassEncoder &)=delete
 ComputePassEncoder (ComputePassEncoder &&)=delete
ComputePassEncoder & operator= (ComputePassEncoder &&)=delete
Status setPipeline (const ComputePipeline &pipeline)
 Sets the active compute pipeline.
Status setBindGroup (uint32_t index, const BindGroup &bindGroup)
 Binds bindGroup at index.
Status dispatchWorkgroups (uint32_t workgroupCountX, uint32_t workgroupCountY=1, uint32_t workgroupCountZ=1)
 Records a dispatch.
Status end ()
 Ends the compute pass. Further pass operations fail with GpuErrorType::InvalidState until a new pass begins.

Friends

class CommandEncoder

Detailed Description

Encodes commands inside an active compute pass.

Obtained from CommandEncoder::beginComputePass; owned by the encoder and valid until the encoder is destroyed (operations after end fail with GpuErrorType::InvalidState).

Member Function Documentation

◆ dispatchWorkgroups()

Status donner::gpu::ComputePassEncoder::dispatchWorkgroups ( uint32_t workgroupCountX,
uint32_t workgroupCountY = 1,
uint32_t workgroupCountZ = 1 )

Records a dispatch.

Fails closed unless a pipeline is set, every bind group index the pipeline layout declares holds a bind group created against the same layout, and every workgroup count is nonzero and within kMaxComputeWorkgroupsPerDimension.

Parameters
workgroupCountXWorkgroups along X.
workgroupCountYWorkgroups along Y.
workgroupCountZWorkgroups along Z.

◆ setBindGroup()

Status donner::gpu::ComputePassEncoder::setBindGroup ( uint32_t index,
const BindGroup & bindGroup )

Binds bindGroup at index.

Compatibility with the active pipeline's layout is checked at dispatchWorkgroups time, so bind groups may be set before the pipeline.

Parameters
indexBind group index; must be below kMaxBindGroups.
bindGroupBind group to bind; must be a live handle of the encoder's device.

◆ setPipeline()

Status donner::gpu::ComputePassEncoder::setPipeline ( const ComputePipeline & pipeline)

Sets the active compute pipeline.

Parameters
pipelinePipeline to bind; must be a live handle of the encoder's device.

The documentation for this class was generated from the following file: