declare global {
    interface GPUBuffer {
        readonly size: number;
        readonly usage: number;
        getMappedRange(): ArrayBuffer;
        unmap(): void;
        destroy(): void;
        mapAsync(mode: number): Promise<void>;
    }
    interface GPUDevice {
        createBuffer(desc: {
            size: number;
            usage: number;
            mappedAtCreation?: boolean;
        }): GPUBuffer;
        createShaderModule(desc: {
            code: string;
        }): GPUShaderModule;
        createComputePipeline(desc: {
            layout: string | GPUPipelineLayout;
            compute: {
                module: GPUShaderModule;
                entryPoint: string;
            };
        }): GPUComputePipeline;
        createCommandEncoder(): GPUCommandEncoder;
        createBindGroup(desc: {
            layout: GPUBindGroupLayout;
            entries: {
                binding: number;
                resource: {
                    buffer: GPUBuffer;
                };
            }[];
        }): GPUBindGroup;
        readonly queue: GPUQueue;
        readonly lost: Promise<GPUDeviceLostInfo>;
        destroy(): void;
    }
    interface GPUAdapter {
        requestDevice(desc?: {
            requiredLimits?: Record<string, number>;
        }): Promise<GPUDevice>;
    }
    interface GPUComputePipeline {
        getBindGroupLayout(index: number): GPUBindGroupLayout;
    }
    interface GPUShaderModule {
    }
    interface GPUPipelineLayout {
    }
    interface GPUBindGroupLayout {
    }
    interface GPUBindGroup {
    }
    interface GPUCommandEncoder {
        beginComputePass(): GPUComputePassEncoder;
        copyBufferToBuffer(src: GPUBuffer, srcOffset: number, dst: GPUBuffer, dstOffset: number, size: number): void;
        finish(): GPUCommandBuffer;
    }
    interface GPUComputePassEncoder {
        setPipeline(pipeline: GPUComputePipeline): void;
        setBindGroup(index: number, bindGroup: GPUBindGroup): void;
        dispatchWorkgroups(x: number, y?: number, z?: number): void;
        end(): void;
    }
    interface GPUCommandBuffer {
    }
    interface GPUQueue {
        submit(buffers: GPUCommandBuffer[]): void;
    }
    interface GPUDeviceLostInfo {
        readonly message: string;
    }
    interface GPU {
        requestAdapter(options?: {
            powerPreference?: string;
        }): Promise<GPUAdapter | null>;
    }
    interface Navigator {
        readonly gpu?: GPU;
    }
}
export interface WebGPUConfig {
    maxWorkGroupSize: number;
    preferredFormat: string;
    powerPreference: 'low-power' | 'high-performance';
}
export interface ComputeBuffer {
    gpuBuffer: GPUBuffer | null;
    size: number;
    usage: number;
    data: Float32Array | Uint32Array;
}
export interface ComputePipeline {
    id: string;
    shaderSource: string;
    entryPoint: string;
    workGroupSize: [number, number, number];
}
export interface PhysicsBroadphaseResult {
    pairs: [number, number][];
    count: number;
}
export declare class WebGPUContext {
    private device;
    private adapter;
    private config;
    private pipelines;
    constructor(config?: Partial<WebGPUConfig>);
    init(): Promise<boolean>;
    get isAvailable(): boolean;
    getDevice(): GPUDevice;
    createBuffer(data: Float32Array | Uint32Array, usage: number): GPUBuffer;
    createComputePipeline(id: string, shaderSource: string, entryPoint?: string): GPUComputePipeline;
    getPipeline(id: string): GPUComputePipeline | undefined;
    readBuffer(buffer: GPUBuffer, size: number): Promise<ArrayBuffer>;
    destroy(): void;
}
export declare class GPUPhysicsBroadphase {
    private ctx;
    private pipeline;
    constructor(ctx: WebGPUContext);
    init(): void;
    computePairs(aabbs: {
        minX: number;
        minY: number;
        maxX: number;
        maxY: number;
    }[]): Promise<PhysicsBroadphaseResult>;
}
export declare class GPUParticleSystem {
    private ctx;
    private pipeline;
    private particleBuffer;
    private maxParticles;
    constructor(ctx: WebGPUContext, maxParticles?: number);
    init(): void;
    update(dt: number, gravity?: {
        x: number;
        y: number;
    }): Promise<void>;
    readParticles(): Promise<Float32Array>;
    destroy(): void;
}
export declare class GPUPathfinder {
    private ctx;
    private pipeline;
    constructor(ctx: WebGPUContext);
    init(): void;
    computeDistanceField(costGrid: number[][], targetX: number, targetY: number, maxIterations?: number): Promise<number[][]>;
}
export declare function isWebGPUAvailable(): Promise<boolean>;
export declare function getWebGPUShaders(): Record<string, string>;
