GPUComputePassEncoder
public final class GPUComputePassEncoder implements AutoCloseable
Used to record compute pipeline dispatch commands within a command encoder.
Summary
Public methods |
|
|---|---|
external void |
close() |
final external void |
@FastNativeDispatches compute workgroups with explicitly defined counts. |
final external void |
@FastNativeDispatches compute workgroups using arguments from a buffer. |
final external void |
Ends the compute pass. |
boolean |
|
final long |
|
int |
hashCode() |
final external void |
@FastNativeInserts a debug marker command into the pass. |
final external void |
Ends the most recently pushed debug group. |
final external void |
@FastNativeStarts a new named debug group. |
final external void |
@FastNativeSets the bind group for a given index. |
final external void |
@FastNativeSets a debug label for the compute pass encoder. |
final external void |
@FastNativeSets the active compute pipeline. |
Public methods
dispatchWorkgroups
@FastNative
public final external void dispatchWorkgroups(
int workgroupCountX,
int workgroupCountY,
int workgroupCountZ
)
Dispatches compute workgroups with explicitly defined counts.
| Parameters | |
|---|---|
int workgroupCountX |
The number of workgroups to dispatch in the X dimension. |
int workgroupCountY |
The number of workgroups to dispatch in the Y dimension. |
int workgroupCountZ |
The number of workgroups to dispatch in the Z dimension. |
dispatchWorkgroupsIndirect
@FastNative
public final external void dispatchWorkgroupsIndirect(
@NonNull GPUBuffer indirectBuffer,
long indirectOffset
)
Dispatches compute workgroups using arguments from a buffer.
insertDebugMarker
@FastNative
public final external void insertDebugMarker(@NonNull String markerLabel)
Inserts a debug marker command into the pass.
popDebugGroup
@FastNative
public final external void popDebugGroup()
Ends the most recently pushed debug group.
pushDebugGroup
@FastNative
public final external void pushDebugGroup(@NonNull String groupLabel)
Starts a new named debug group.
setBindGroup
@FastNative
public final external void setBindGroup(
int groupIndex,
GPUBindGroup group,
@NonNull int[] dynamicOffsets
)
Sets the bind group for a given index.
| Parameters | |
|---|---|
int groupIndex |
The index of the bind group to set. |
GPUBindGroup group |
The bind group object to set. |
@NonNull int[] dynamicOffsets |
An array of dynamic offsets for uniform/storage buffers. |
setLabel
@FastNative
public final external void setLabel(@NonNull String label)
Sets a debug label for the compute pass encoder.
setPipeline
@FastNative
public final external void setPipeline(@NonNull GPUComputePipeline pipeline)
Sets the active compute pipeline.
| Parameters | |
|---|---|
@NonNull GPUComputePipeline pipeline |
The compute pipeline to use for subsequent dispatch calls. |