|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
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 |
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).
| 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.
| workgroupCountX | Workgroups along X. |
| workgroupCountY | Workgroups along Y. |
| workgroupCountZ | Workgroups along Z. |
| 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.
| index | Bind group index; must be below kMaxBindGroups. |
| bindGroup | Bind group to bind; must be a live handle of the encoder's device. |
| Status donner::gpu::ComputePassEncoder::setPipeline | ( | const ComputePipeline & | pipeline | ) |
Sets the active compute pipeline.
| pipeline | Pipeline to bind; must be a live handle of the encoder's device. |