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: GPUImageCopyBuffer, destination: GPUImageCopyTexture, copySize: GPUExtent3DStrict): undefined;
copyTextureToBuffer(source: GPUImageCopyTexture, destination: GPUImageCopyBuffer, copySize: GPUExtent3DStrict): undefined;
copyTextureToTexture(source: GPUImageCopyTexture, destination: GPUImageCopyTexture, 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 full)
Methods
beginComputePass
- begin
Compute (descriptor?): GPUComputePassEncoderPass Parameters
Optional
descriptor: GPUComputePassDescriptor
Returns GPUComputePassEncoder
beginRenderPass
- begin
Render (descriptor): GPURenderPassEncoderPass Begins encoding a render pass described by
descriptor
.Parameters
- descriptor: GPURenderPassDescriptor
Description of the GPURenderPassEncoder to create.
Returns GPURenderPassEncoder
- descriptor: GPURenderPassDescriptor
clearBuffer
- clear
Buffer (buffer, offset?, size?): undefined Encode a command into the GPUCommandEncoder that fills a sub-region of a GPUBuffer with zeros.
Parameters
Returns undefined
copyBufferToBuffer
- copy
Buffer (source, sourceOffset, destination, destinationOffset, size): undefinedTo Buffer 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
- copy
Buffer (source, destination, copySize): undefinedTo Texture 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: GPUImageCopyBuffer
Combined with
copySize
, defines the region of the source buffer. - destination: GPUImageCopyTexture
Combined with
copySize
, defines the region of the destination texture subresource.copySize
: - copySize: GPUExtent3DStrict
Returns undefined
- source: GPUImageCopyBuffer
copyTextureToBuffer
- copy
Texture (source, destination, copySize): undefinedTo Buffer 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: GPUImageCopyTexture
Combined with
copySize
, defines the region of the source texture subresources. - destination: GPUImageCopyBuffer
Combined with
copySize
, defines the region of the destination buffer.copySize
: - copySize: GPUExtent3DStrict
Returns undefined
- source: GPUImageCopyTexture
copyTextureToTexture
- copy
Texture (source, destination, copySize): undefinedTo Texture 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: GPUImageCopyTexture
Combined with
copySize
, defines the region of the source texture subresources. - destination: GPUImageCopyTexture
Combined with
copySize
, defines the region of the destination texture subresources.copySize
: - copySize: GPUExtent3DStrict
Returns undefined
- source: GPUImageCopyTexture
finish
- finish(descriptor?): GPUCommandBuffer
Completes recording of the commands sequence and returns a corresponding GPUCommandBuffer. descriptor:
Parameters
Optional
descriptor: GPUObjectDescriptorBase
Returns GPUCommandBuffer
insertDebugMarker
popDebugGroup
- pop
Debug (): undefinedGroup Ends the labeled debug group most recently started by GPUDebugCommandsMixin#pushDebugGroup.
Returns undefined
pushDebugGroup
resolveQuerySet
- resolve
Query (querySet, firstQuery, queryCount, destination, destinationOffset): undefinedSet 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