/** * WebGPU Device Management * Handles GPU adapter discovery, device creation, and resource management */ export interface GPUCapabilities { vendor: string; architecture: string; device: string; description: string; maxBufferSize: number; maxStorageBufferBindingSize: number; maxComputeWorkgroupSizeX: number; maxComputeWorkgroupSizeY: number; maxComputeWorkgroupSizeZ: number; maxComputeInvocationsPerWorkgroup: number; maxComputeWorkgroupsPerDimension: number; } export interface DeviceOptions { powerPreference?: 'low-power' | 'high-performance'; requiredFeatures?: GPUFeatureName[]; requiredLimits?: Record; } /** * WebGPU Device Manager * Singleton pattern for managing GPU device lifecycle */ export declare class WebGPUDevice { private static instance; private gpu; private adapter; private device; private capabilities; private initialized; private initPromise; private constructor(); /** * Get the singleton instance */ static getInstance(): WebGPUDevice; /** * Check if WebGPU is available in this environment */ static isAvailable(): Promise; /** * Get the GPU object (handles Node.js vs browser) */ private static getGPU; /** * Initialize the WebGPU device */ init(options?: DeviceOptions): Promise; private doInit; /** * Handle device lost event */ private handleDeviceLost; /** * Get the GPU device */ getDevice(): GPUDevice; /** * Get GPU capabilities */ getCapabilities(): GPUCapabilities; /** * Check if device is initialized */ isInitialized(): boolean; /** * Create a command encoder */ createCommandEncoder(label?: string): GPUCommandEncoder; /** * Submit commands to the GPU queue */ submit(commandBuffers: GPUCommandBuffer[]): void; /** * Wait for all pending GPU operations to complete */ sync(): Promise; /** * Destroy the device and release resources */ destroy(): void; } /** * Get the global WebGPU device instance */ export declare function getWebGPUDevice(): WebGPUDevice; /** * Initialize WebGPU and return the device */ export declare function initWebGPU(options?: DeviceOptions): Promise; //# sourceMappingURL=device.d.ts.map