/** * Create a GPU device + adapter you own, to pass to `createShader` via the `gpu` * option. * * **You almost certainly don't need this.** Device sharing is automatic: every * shader on a page already adopts one lazily-created device, so pipelines compile * once for the page and survive component unmounts (which is what keeps SPA route * changes fast). Calling this changes *who owns* the device, not whether sharing * happens. * * Reach for it only when you need explicit control — interoperating with another * WebGPU renderer that must share the same device, requesting a specific * `powerPreference`, or managing the device's lifetime yourself. * * Returns `null` if WebGPU is unavailable on this device — in that case * callers should pass no `gpu` option and let each shader fall back to its * own WebGL renderer. * * @example * ```js * import { createShader, createSharedDevice } from 'shaders/js' * * const gpu = await createSharedDevice() * * const a = await createShader(canvasA, presetA, { gpu }) * const b = await createShader(canvasB, presetB, { gpu }) * const c = await createShader(canvasC, presetC, { gpu }) * // ...all three share the same WebGPU device * ``` */ export declare function createSharedDevice(options?: { /** Power preference for the requested adapter. Default `'high-performance'`. */ powerPreference?: GPUPowerPreference; }): Promise<{ device: GPUDevice; adapter: GPUAdapter; } | null>; //# sourceMappingURL=createSharedDevice.d.ts.map