/** * A WebGPU implementation of the Compute. * * @ignore */ export class WebgpuCompute { /** * @param {Compute} compute - The compute instance. */ constructor(compute: Compute); /** @type {UniformBuffer[]} */ uniformBuffers: UniformBuffer[]; /** * Bind groups, indexed by bind group index. A caller-provided format occupies group 0; * auto-reflected resources occupy their own group (0 when no caller format, otherwise 1). * The array is dense (no gaps), as required by WebGPU pipeline layouts. * * @type {BindGroup[]} */ bindGroups: BindGroup[]; /** * The parameters of the slots of each bind group, see {@link SlotParameters}. * * @type {SlotParameters[]} */ slotParameters: SlotParameters[]; /** * The version of the parameters of the compute the slot parameters were looked up for. * * @type {number} */ slotParametersVersion: number; /** * The names of the missing parameters already reported, so that each is reported once. * * @type {Set|null} */ reportedMissing: Set | null; /** * The submit version of the device when the compute was last dispatched, to detect a second * dispatch in the same submit. Debug only. * * @type {number} */ dispatchSubmitVersion: number; compute: Compute; pipeline: any; destroy(): void; loseContext(): void; restoreContext(): void; /** * Looks up the parameters of the slots of the bind groups. * * @private */ private _lookUpSlotParameters; /** * Reports a uniform or resource the shader declares, but the compute has no value for. * * @param {string} name - The name of the parameter. * @private */ private _reportMissing; updateBindGroup(): void; dispatch(x: any, y: any, z: any): void; } import { UniformBuffer } from '../uniform-buffer.js'; import { BindGroup } from '../bind-group.js'; /** * The parameters of the slots of a bind group, in the order of the slots of its format, looked up * once instead of by name on each dispatch. Entries are undefined for slots without a parameter. * * @ignore */ declare class SlotParameters { textures: any[]; storageTextures: any[]; storageBuffers: any[]; /** * The parameters of the uniforms of each uniform buffer of the bind group. * * @type {Array>} */ uniforms: Array>; } import type { Compute } from '../compute.js'; export {};