export interface GPUParticleBackendCapabilities {
    supported: boolean;
    backend: "webgpu" | "webgl2" | "none";
    reason?: string;
    adapterName?: string;
}
export interface GPUParticleUpdateInput {
    positions: Float32Array;
    velocities: Float32Array;
    accelerations?: Float32Array;
    deltaTime: number;
    count: number;
}
export interface GPUParticleUpdateResult {
    backend: "webgpu";
    count: number;
    workgroups: number;
    positions: Float32Array;
    velocities: Float32Array;
}
export interface GPUParticleSpawnInput {
    positions: Float32Array;
    velocities: Float32Array;
    accelerations?: Float32Array;
    count: number;
}
export interface GPUParticleSpawnResult {
    backend: "webgpu";
    count: number;
    workgroups: number;
    positions: Float32Array;
    velocities: Float32Array;
    accelerations: Float32Array;
}
export interface GPUParticleBackend {
    readonly capabilities: GPUParticleBackendCapabilities;
    initialize(): Promise<void>;
    spawn?(input: GPUParticleSpawnInput): Promise<GPUParticleSpawnResult>;
    update(input: GPUParticleUpdateInput): Promise<GPUParticleUpdateResult>;
    dispose(): void;
}
interface WebGPULike {
    requestAdapter(): Promise<WebGPUAdapterLike | null>;
}
interface WebGPUAdapterLike {
    requestDevice(): Promise<WebGPUDeviceLike>;
    name?: string;
    info?: {
        vendor?: string;
        architecture?: string;
        device?: string;
        description?: string;
    };
}
interface WebGPUDeviceLike {
    queue: WebGPUQueueLike;
    createShaderModule(descriptor: {
        code: string;
        label?: string;
    }): WebGPUShaderModuleLike;
    createComputePipeline(descriptor: {
        label?: string;
        layout: "auto";
        compute: {
            module: WebGPUShaderModuleLike;
            entryPoint: string;
        };
    }): WebGPUComputePipelineLike;
    createBuffer(descriptor: {
        label?: string;
        size: number;
        usage: number;
        mappedAtCreation?: boolean;
    }): WebGPUBufferLike;
    createBindGroup(descriptor: {
        label?: string;
        layout: unknown;
        entries: readonly WebGPUBindGroupEntryLike[];
    }): WebGPUBindGroupLike;
    createCommandEncoder(descriptor?: {
        label?: string;
    }): WebGPUCommandEncoderLike;
    destroy?(): void;
}
interface WebGPUQueueLike {
    writeBuffer(buffer: WebGPUBufferLike, offset: number, data: ArrayBuffer | ArrayBufferView, dataOffset?: number, size?: number): void;
    submit(commands: readonly unknown[]): void;
}
interface WebGPUShaderModuleLike {
}
interface WebGPUComputePipelineLike {
    getBindGroupLayout(index: number): unknown;
}
interface WebGPUBindGroupLike {
}
interface WebGPUBindGroupEntryLike {
    binding: number;
    resource: {
        buffer: WebGPUBufferLike;
    };
}
interface WebGPUBufferLike {
    mapAsync(mode: number): Promise<void>;
    getMappedRange(): ArrayBuffer;
    unmap(): void;
    destroy(): void;
}
interface WebGPUCommandEncoderLike {
    beginComputePass(descriptor?: {
        label?: string;
    }): WebGPUComputePassEncoderLike;
    copyBufferToBuffer(source: WebGPUBufferLike, sourceOffset: number, destination: WebGPUBufferLike, destinationOffset: number, size: number): void;
    finish(): unknown;
}
interface WebGPUComputePassEncoderLike {
    setPipeline(pipeline: WebGPUComputePipelineLike): void;
    setBindGroup(index: number, bindGroup: WebGPUBindGroupLike): void;
    dispatchWorkgroups(x: number): void;
    end(): void;
}
export interface WebGPUParticleBackendOptions {
    gpu?: WebGPULike;
    shaderSource?: string;
}
export declare function detectGPUParticleBackend(globalScope?: Pick<typeof globalThis, "navigator">): GPUParticleBackendCapabilities;
export declare function queryGPUParticleBackendCapabilities(globalScope?: Pick<typeof globalThis, "navigator">): Promise<GPUParticleBackendCapabilities>;
export declare function createGPUParticleBackend(options?: WebGPUParticleBackendOptions): GPUParticleBackend;
export declare class UnsupportedGPUParticleBackend implements GPUParticleBackend {
    readonly capabilities: GPUParticleBackendCapabilities;
    constructor(capabilities?: GPUParticleBackendCapabilities);
    initialize(): Promise<void>;
    update(): Promise<GPUParticleUpdateResult>;
    dispose(): void;
}
export declare class WebGPUParticleBackend implements GPUParticleBackend {
    readonly capabilities: GPUParticleBackendCapabilities;
    private readonly gpu;
    private readonly shaderSource;
    private adapter;
    private device;
    private updatePipeline;
    private spawnPipeline;
    constructor(options?: WebGPUParticleBackendOptions);
    initialize(): Promise<void>;
    spawn(input: GPUParticleSpawnInput): Promise<GPUParticleSpawnResult>;
    update(input: GPUParticleUpdateInput): Promise<GPUParticleUpdateResult>;
    dispose(): void;
    private requireDevice;
    private requireUpdatePipeline;
    private requireSpawnPipeline;
}
export {};
//# sourceMappingURL=GPUParticleBackend.d.ts.map