GPUComputePassEncoder
public final class GPUComputePassEncoder implements AutoCloseable
An object used to record commands for a compute pass.
Summary
Public methods |
|
|---|---|
external void |
close()Decrements the reference count of the object and frees resources when the count reaches zero. |
final external void |
@FastNativeDispatches a compute shader. |
final external void |
@FastNativeDispatches a compute shader with parameters from a buffer. |
final external void |
Ends the compute pass. |
boolean |
|
final long |
|
int |
hashCode() |
final external void |
@FastNativeInserts a debug marker into the command stream. |
final external void |
Pops the current debug group. |
final external void |
@FastNativePushes a new debug group. |
final external void |
@FastNativeSets a bind group for the pipeline. |
final external void |
@FastNativeSets a human-readable label for debugging. |
final external void |
@FastNativeSets the current compute pipeline. |
Public methods
close
public external void close()
Decrements the reference count of the object and frees resources when the count reaches zero.
This is the standard way to manage object lifetimes and should be used in use blocks. After calling this, the object is no longer usable.
dispatchWorkgroups
@FastNative
public final external void dispatchWorkgroups(
int workgroupCountX,
int workgroupCountY,
int workgroupCountZ
)
Dispatches a compute shader.
| Parameters | |
|---|---|
int workgroupCountX |
The number of workgroups in the X dimension. |
int workgroupCountY |
The number of workgroups in the Y dimension. |
int workgroupCountZ |
The number of workgroups in the Z dimension. |
dispatchWorkgroupsIndirect
@FastNative
public final external void dispatchWorkgroupsIndirect(
@NonNull GPUBuffer indirectBuffer,
long indirectOffset
)
Dispatches a compute shader with parameters from a buffer.
insertDebugMarker
@FastNative
public final external void insertDebugMarker(@NonNull String markerLabel)
Inserts a debug marker into the command stream.
popDebugGroup
@FastNative
public final external void popDebugGroup()
Pops the current debug group.
pushDebugGroup
@FastNative
public final external void pushDebugGroup(@NonNull String groupLabel)
Pushes a new debug group.
setBindGroup
@FastNative
public final external void setBindGroup(
int groupIndex,
GPUBindGroup group,
@NonNull int[] dynamicOffsets
)
Sets a bind group for the pipeline.
| Parameters | |
|---|---|
int groupIndex |
The index of the bind group. |
GPUBindGroup group |
The bind group to set. |
@NonNull int[] dynamicOffsets |
An array of dynamic offsets. |
setLabel
@FastNative
public final external void setLabel(@NonNull String label)
Sets a human-readable label for debugging.
setPipeline
@FastNative
public final external void setPipeline(@NonNull GPUComputePipeline pipeline)
Sets the current compute pipeline.
| Parameters | |
|---|---|
@NonNull GPUComputePipeline pipeline |
The compute pipeline to set. |