Trilium Frontend API
    Preparing search index...

    Interface GPUComputePassEncoder

    The GPUComputePassEncoder interface of the WebGPU API encodes commands related to controlling the compute shader stage, as issued by a GPUComputePipeline. It forms part of the overall encoding activity of a GPUCommandEncoder. Available only in secure contexts.

    MDN Reference

    interface GPUComputePassEncoder {
        label: string;
        dispatchWorkgroups(
            workgroupCountX: number,
            workgroupCountY?: number,
            workgroupCountZ?: number,
        ): void;
        dispatchWorkgroupsIndirect(
            indirectBuffer: GPUBuffer,
            indirectOffset: number,
        ): void;
        end(): void;
        insertDebugMarker(markerLabel: string): void;
        popDebugGroup(): void;
        pushDebugGroup(groupLabel: string): void;
        setBindGroup(
            index: number,
            bindGroup: GPUBindGroup,
            dynamicOffsets?: number[],
        ): void;
        setBindGroup(
            index: number,
            bindGroup: GPUBindGroup,
            dynamicOffsetsData: Uint32Array<ArrayBufferLike>,
            dynamicOffsetsDataStart: number,
            dynamicOffsetsDataLength: number,
        ): void;
        setBindGroup(
            index: number,
            bindGroup: GPUBindGroup,
            dynamicOffsets?: Iterable<number>,
        ): void;
        setPipeline(pipeline: GPUComputePipeline): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    label: string

    Methods

    • The dispatchWorkgroups() method of the GPUComputePassEncoder interface dispatches a specific grid of workgroups to perform the work being done by the current GPUComputePipeline (i.e., set via GPUComputePassEncoder.setPipeline()).

      MDN Reference

      Parameters

      • workgroupCountX: number
      • OptionalworkgroupCountY: number
      • OptionalworkgroupCountZ: number

      Returns void

    • The dispatchWorkgroupsIndirect() method of the GPUComputePassEncoder interface dispatches a grid of workgroups, defined by the parameters of a GPUBuffer, to perform the work being done by the current GPUComputePipeline (i.e., set via GPUComputePassEncoder.setPipeline()).

      MDN Reference

      Parameters

      • indirectBuffer: GPUBuffer
      • indirectOffset: number

      Returns void

    • The end() method of the GPUComputePassEncoder interface completes recording of the current compute pass command sequence.

      MDN Reference

      Returns void

    • The setPipeline() method of the GPUComputePassEncoder interface sets the GPUComputePipeline to use for this compute pass.

      MDN Reference

      Parameters

      Returns void