Interface GPUComputePassEncoder
__brand: "GPUComputePassEncoder";
label: string;
dispatchWorkgroups(workgroupCountX: number, workgroupCountY?: number, workgroupCountZ?: number): undefined;
dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): undefined;
end(): undefined;
insertDebugMarker(markerLabel: string): undefined;
popDebugGroup(): undefined;
pushDebugGroup(groupLabel: string): undefined;
setBindGroup(index: number, bindGroup: GPUBindGroup, dynamicOffsets?: Iterable<number, any, any>): undefined;
setBindGroup(index: number, bindGroup: GPUBindGroup, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: number, dynamicOffsetsDataLength: number): undefined;
setPipeline(pipeline: GPUComputePipeline): undefined;
}
Hierarchy
- GPUObjectBase
- GPUCommandsMixin
- GPUDebugCommandsMixin
- GPUBindingCommandsMixin
- GPUComputePassEncoder (view full)
Methods
dispatchWorkgroups
- dispatch
Workgroups (workgroupCountX, workgroupCountY?, workgroupCountZ?): undefined Dispatch work to be performed with the current GPUComputePipeline. See [[#computing-operations]] for the detailed specification.
Parameters
- workgroupCountX: number
X dimension of the grid of workgroups to dispatch.
Optional
workgroupCountY: numberY dimension of the grid of workgroups to dispatch.
Optional
workgroupCountZ: numberZ dimension of the grid of workgroups to dispatch.
Returns undefined
- workgroupCountX: number
dispatchWorkgroupsIndirect
- dispatch
Workgroups (indirectBuffer, indirectOffset): undefinedIndirect Dispatch work to be performed with the current GPUComputePipeline using parameters read from a GPUBuffer. See [[#computing-operations]] for the detailed specification. packed block of three 32-bit unsigned integer values (12 bytes total), given in the same order as the arguments for GPUComputePassEncoder#dispatchWorkgroups. For example:
Parameters
- indirectBuffer: GPUBuffer
Buffer containing the indirect dispatch parameters.
- indirectOffset: number
Offset in bytes into
indirectBuffer
where the dispatch data begins.
Returns undefined
- indirectBuffer: GPUBuffer
end
insertDebugMarker
popDebugGroup
- pop
Debug (): undefinedGroup Ends the labeled debug group most recently started by GPUDebugCommandsMixin#pushDebugGroup.
Returns undefined
pushDebugGroup
setBindGroup
- set
Bind (index, bindGroup, dynamicOffsets?): undefinedGroup Sets the current GPUBindGroup for the given index.
Parameters
- index: number
The index to set the bind group at.
- bindGroup: GPUBindGroup
Bind group to use for subsequent render or compute commands. <!--The overload appears to be confusing bikeshed, and it ends up expecting this to define the arguments for the 5-arg variant of the method, despite the "for" explicitly pointing at the 3-arg variant. See
Optional
dynamicOffsets: Iterable<number, any, any>Array containing buffer offsets in bytes for each entry in
bindGroup
marked as GPUBindGroupLayoutEntry#buffer.GPUBufferBindingLayout#hasDynamicOffset.-->
Returns undefined
- index: number
- set
Bind (index, bindGroup, dynamicOffsetsData, dynamicOffsetsDataStart, dynamicOffsetsDataLength): undefinedGroup Sets the current GPUBindGroup for the given index, specifying dynamic offsets as a subset of a Uint32Array.
Parameters
- index: number
The index to set the bind group at.
- bindGroup: GPUBindGroup
Bind group to use for subsequent render or compute commands.
- dynamicOffsetsData: Uint32Array
Array containing buffer offsets in bytes for each entry in
bindGroup
marked as GPUBindGroupLayoutEntry#buffer.GPUBufferBindingLayout#hasDynamicOffset. - dynamicOffsetsDataStart: number
Offset in elements into
dynamicOffsetsData
where the buffer offset data begins. - dynamicOffsetsDataLength: number
Number of buffer offsets to read from
dynamicOffsetsData
.
Returns undefined
- index: number
setPipeline
- set
Pipeline (pipeline): undefined Sets the current GPUComputePipeline.
Parameters
- pipeline: GPUComputePipeline
The compute pipeline to use for subsequent dispatch commands.
Returns undefined
- pipeline: GPUComputePipeline
Nominal type branding. https://github.com/microsoft/TypeScript/pull/33038