Interface GPUComputePassEncoder

Hierarchy

Properties

label: string

Methods

  • Dispatch work to be performed with the current GPUComputePipeline. See https://www.w3.org/TR/webgpu/#computing-operations for the detailed specification.

    Parameters

    • workgroupCountX: number

      X dimension of the grid of workgroups to dispatch.

    • Optional workgroupCountY: number

      Y dimension of the grid of workgroups to dispatch.

    • Optional workgroupCountZ: number

      Z dimension of the grid of workgroups to dispatch.

    Returns undefined

  • Completes recording of the compute pass commands sequence.

    Returns undefined

  • Sets the current GPUBindGroup for the given index.

    Parameters

    • index: number

      The index to set the bind group at.

    • bindGroup: undefined | null | GPUBindGroup

      Bind group to use for subsequent render or compute commands.

    • Optional dynamicOffsets: Iterable<number>

      Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset.-->

    Returns undefined

  • Sets the current GPUBindGroup for the given index, specifying dynamic offsets as a subset of a Uint32Array.

    Parameters

    • index: number

      The index to set the bind group at.

    • bindGroup: undefined | null | GPUBindGroup

      Bind group to use for subsequent render or compute commands.

    • dynamicOffsetsData: Uint32Array

      Array containing buffer offsets in bytes for each entry in bindGroup marked as buffer.hasDynamicOffset.

    • dynamicOffsetsDataStart: number

      Offset in elements into dynamicOffsetsData where the buffer offset data begins.

    • dynamicOffsetsDataLength: number

      Number of buffer offsets to read from dynamicOffsetsData.

    Returns undefined

  • Sets immediate data for subsequent render or compute commands

    Parameters

    • rangeOffset: number

      Offset in bytes into the immediate data range to begin writing at.

    • data: GPUAllowSharedBufferSource

      Data to write into the immediate data range.

    • Optional dataOffset: number

      Offset into data to begin writing from. Given in elements if data is a TypedArray and bytes otherwise. Defaults to 0.

    • Optional size: number

      Size of content to write from data to buffer. Given in elements if data is a TypedArray and bytes otherwise.

    Returns undefined

Generated using TypeDoc