Interface GPUCommandEncoder
__brand: "GPUCommandEncoder";
label: string;
beginComputePass(
descriptor?: GPUComputePassDescriptor,
): GPUComputePassEncoder;
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
clearBuffer(buffer: GPUBuffer, offset?: number, size?: number): undefined;
copyBufferToBuffer(
source: GPUBuffer,
sourceOffset: number,
destination: GPUBuffer,
destinationOffset: number,
size: number,
): undefined;
copyBufferToTexture(
source: GPUTexelCopyBufferInfo,
destination: GPUTexelCopyTextureInfo,
copySize: GPUExtent3DStrict,
): undefined;
copyTextureToBuffer(
source: GPUTexelCopyTextureInfo,
destination: GPUTexelCopyBufferInfo,
copySize: GPUExtent3DStrict,
): undefined;
copyTextureToTexture(
source: GPUTexelCopyTextureInfo,
destination: GPUTexelCopyTextureInfo,
copySize: GPUExtent3DStrict,
): undefined;
finish(descriptor?: GPUObjectDescriptorBase): GPUCommandBuffer;
insertDebugMarker(markerLabel: string): undefined;
popDebugGroup(): undefined;
pushDebugGroup(groupLabel: string): undefined;
resolveQuerySet(
querySet: GPUQuerySet,
firstQuery: number,
queryCount: number,
destination: GPUBuffer,
destinationOffset: number,
): undefined;
}
Hierarchy
- GPUObjectBase
- GPUCommandsMixin
- GPUDebugCommandsMixin
- GPUCommandEncoder (View Summary)
Methods
beginComputePass
- beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder
Parameters
Optional
descriptor: GPUComputePassDescriptor
Returns GPUComputePassEncoder
beginRenderPass
- beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder
Begins encoding a render pass described by
descriptor
.Parameters
- descriptor: GPURenderPassDescriptor
Description of the GPURenderPassEncoder to create.
Returns GPURenderPassEncoder
- descriptor: GPURenderPassDescriptor
clearBuffer
- clearBuffer(buffer: GPUBuffer, offset?: number, size?: number): undefined
Encode a command into the GPUCommandEncoder that fills a sub-region of a GPUBuffer with zeros.
Parameters
Returns undefined
copyBufferToBuffer
- copyBufferToBuffer(
source: GPUBuffer,
sourceOffset: number,
destination: GPUBuffer,
destinationOffset: number,
size: number,
): undefined Encode a command into the GPUCommandEncoder that copies data from a sub-region of a GPUBuffer to a sub-region of another GPUBuffer.
Parameters
Returns undefined
copyBufferToTexture
- copyBufferToTexture(
source: GPUTexelCopyBufferInfo,
destination: GPUTexelCopyTextureInfo,
copySize: GPUExtent3DStrict,
): undefined Encode a command into the GPUCommandEncoder that copies data from a sub-region of a GPUBuffer to a sub-region of one or multiple continuous texture subresources.
Parameters
- source: GPUTexelCopyBufferInfo
Combined with
copySize
, defines the region of the source buffer. - destination: GPUTexelCopyTextureInfo
Combined with
copySize
, defines the region of the destination texture subresource.copySize
: - copySize: GPUExtent3DStrict
Returns undefined
- source: GPUTexelCopyBufferInfo
copyTextureToBuffer
- copyTextureToBuffer(
source: GPUTexelCopyTextureInfo,
destination: GPUTexelCopyBufferInfo,
copySize: GPUExtent3DStrict,
): undefined Encode a command into the GPUCommandEncoder that copies data from a sub-region of one or multiple continuous texture subresources to a sub-region of a GPUBuffer.
Parameters
- source: GPUTexelCopyTextureInfo
Combined with
copySize
, defines the region of the source texture subresources. - destination: GPUTexelCopyBufferInfo
Combined with
copySize
, defines the region of the destination buffer.copySize
: - copySize: GPUExtent3DStrict
Returns undefined
- source: GPUTexelCopyTextureInfo
copyTextureToTexture
- copyTextureToTexture(
source: GPUTexelCopyTextureInfo,
destination: GPUTexelCopyTextureInfo,
copySize: GPUExtent3DStrict,
): undefined Encode a command into the GPUCommandEncoder that copies data from a sub-region of one or multiple contiguous texture subresources to another sub-region of one or multiple continuous texture subresources.
Parameters
- source: GPUTexelCopyTextureInfo
Combined with
copySize
, defines the region of the source texture subresources. - destination: GPUTexelCopyTextureInfo
Combined with
copySize
, defines the region of the destination texture subresources.copySize
: - copySize: GPUExtent3DStrict
Returns undefined
- source: GPUTexelCopyTextureInfo
finish
- finish(descriptor?: GPUObjectDescriptorBase): GPUCommandBuffer
Completes recording of the commands sequence and returns a corresponding GPUCommandBuffer. descriptor:
Parameters
Optional
descriptor: GPUObjectDescriptorBase
Returns GPUCommandBuffer
insertDebugMarker
popDebugGroup
- popDebugGroup(): undefined
Ends the labeled debug group most recently started by GPUDebugCommandsMixin#pushDebugGroup.
Returns undefined
pushDebugGroup
resolveQuerySet
- resolveQuerySet(
querySet: GPUQuerySet,
firstQuery: number,
queryCount: number,
destination: GPUBuffer,
destinationOffset: number,
): undefined Resolves query results from a GPUQuerySet out into a range of a GPUBuffer. querySet: firstQuery: queryCount: destination: destinationOffset:
Parameters
- querySet: GPUQuerySet
- firstQuery: number
- queryCount: number
- destination: GPUBuffer
- destinationOffset: number
Returns undefined
Nominal type branding. https://github.com/microsoft/TypeScript/pull/33038