export interface WebGPUContextOptions { powerPreference?: 'low-power' | 'high-performance'; requiredFeatures?: GPUFeatureName[]; requiredLimits?: Record; width?: number; height?: number; } export interface WebGPUContextState { adapter: GPUAdapter; device: GPUDevice; context?: GPUCanvasContext; format: GPUTextureFormat; depthFormat: GPUTextureFormat; features: Set; limits: GPUSupportedLimits; isHeadless: boolean; width: number; height: number; } export interface WebGPUCapabilities { hasTimestampQuery: boolean; hasDepthClipControl: boolean; hasTextureCompressionBC: boolean; hasTextureCompressionETC2: boolean; hasTextureCompressionASTC: boolean; maxTextureDimension2D: number; maxBindGroups: number; maxUniformBufferBindingSize: number; maxStorageBufferBindingSize: number; } export type ContextLostHandler = (reason: GPUDeviceLostReason) => void; /** * Creates and initializes a WebGPU context and device. */ export declare function createWebGPUContext(canvas?: HTMLCanvasElement, options?: WebGPUContextOptions): Promise; /** * Queries capabilities of the created context/device. */ export declare function queryCapabilities(state: WebGPUContextState): WebGPUCapabilities; /** * Sets up handling for device loss. */ export declare function setupDeviceLossHandling(device: GPUDevice, onLost: ContextLostHandler): void; //# sourceMappingURL=context.d.ts.map