Interface GPUCommandEncoder

    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

    Properties

    __brand: "GPUCommandEncoder"
    label: string

    Methods

    • Encode a command into the GPUCommandEncoder that fills a sub-region of a GPUBuffer with zeros.

      Parameters

      • buffer: GPUBuffer

        The GPUBuffer to clear.

      • Optionaloffset: number

        Offset in bytes into buffer where the sub-region to clear begins.

      • Optionalsize: number

        Size in bytes of the sub-region to clear. Defaults to the size of the buffer minus offset.

      Returns 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

      • source: GPUBuffer

        The GPUBuffer to copy from.

      • sourceOffset: number

        Offset in bytes into source to begin copying from.

      • destination: GPUBuffer

        The GPUBuffer to copy to.

      • destinationOffset: number

        Offset in bytes into destination to place the copied data.

      • size: number

        Bytes to copy.

      Returns 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

      Returns 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

      Returns 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

      Returns undefined

    • Marks a point in a stream of commands with a label.

      Parameters

      • markerLabel: string

        The label to insert.

      Returns undefined

    • Begins a labeled debug group containing subsequent commands.

      Parameters

      • groupLabel: string

        The label for the command group.

      Returns 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