import type * as THREE from 'three/webgpu'; /** One resident range moving toward row 0 during pool compaction. */ export interface PoolRowMove { readonly fromRow: number; readonly toRow: number; readonly rowCount: number; } interface GpuTextureLike { readonly format: string; } interface GpuBufferLike { destroy(): void; } interface GpuCopyBuffer { buffer: GpuBufferLike; bytesPerRow: number; rowsPerImage: number; } interface GpuCopyTexture { texture: GpuTextureLike; origin: { x: number; y: number; }; } interface GpuCopySize { width: number; height: number; } interface GpuDeviceLike { createBuffer(descriptor: { label?: string; size: number; usage: number; }): GpuBufferLike; createCommandEncoder(descriptor?: { label?: string; }): { copyTextureToBuffer(source: GpuCopyTexture, destination: GpuCopyBuffer, size: GpuCopySize): void; copyBufferToTexture(source: GpuCopyBuffer, destination: GpuCopyTexture, size: GpuCopySize): void; finish(): unknown; }; readonly queue: { submit(commandBuffers: unknown[]): void; }; } /** * Resolves every pool texture to its live GPU texture, or `null` when any one * cannot be copied on the GPU (WebGL2 backend or an unexpected format). * Callers then keep the CPU re-upload path for all rows. */ export declare function resolvePoolGpuTextures(renderer: THREE.WebGPURenderer | null | undefined, textures: readonly THREE.DataTexture[]): { device: GpuDeviceLike; textures: GpuTextureLike[]; } | null; /** * Moves pool rows inside the GPU textures in one submission, so compaction * does not re-upload the moved rows from CPU backing. WebGPU forbids a copy * within one subresource, so each hop stages through a small scratch buffer. * * `moves` must be in ascending row order with `toRow <= fromRow` (as * `SplatPool.compact` produces); copying each range front to back then never * reads a row an earlier copy already overwrote. Commands in one encoder run * in order, so the shared scratch buffer is safe to reuse between hops. */ export declare function relocatePoolRowsOnGpu(device: GpuDeviceLike, textures: readonly GpuTextureLike[], width: number, moves: readonly PoolRowMove[]): void; export {};