/** * Persistent, texture-native temporal frame graph. * * The graph keeps resolved color and depth history on the GPU, records the * resolve and history copies in one command buffer, and optionally reads back * only the final resolved image as an evidence artifact. GPU timestamp queries * measure the compute pass itself; evidence and query-buffer mapping occur * after that timestamp scope. */ import type { PixelGrid } from '../../native-render/gpu-verify'; import { type TemporalTextureResolveReceipt } from './TemporalConvergence'; export interface TemporalFrameGraphOptions { width: number; height: number; /** Request timestamps when the device was created with timestamp-query. */ enableGpuTimestamps?: boolean; label?: string; } export interface TemporalFrameGraphInput { currentColor: GPUTexture; currentDepth: GPUTexture; motionVectors?: GPUTexture; reactiveMask?: GPUTexture; feedback: number; /** Admission decision from TemporalConvergenceController. */ historyValid: boolean; disocclusionDepthThreshold?: number; /** Copy the final color texture to CPU after the GPU work completes. */ capturePixels?: boolean; } export interface TemporalFrameGraphReceipt { schemaVersion: 'holoscript.webgpu-temporal-frame-graph.v1'; backend: 'webgpu'; width: number; height: number; frameIndex: number; historyInitializedBeforeFrame: boolean; historyConsumed: boolean; historyCommitted: true; zeroCopyTextureInputs: true; zeroCopyHistory: true; intermediateFrameReadbackCount: 0; evidenceFrameReadbackCount: 0 | 1; timestampMetadataReadbackCount: 0 | 1; commandBufferCount: 1; queueSubmissionCount: 1; gpuTimestampQuerySupported: boolean; gpuTimestampQueryRequested: boolean; gpuTimestampQueryEnabled: boolean; gpuTimestampMeasured: boolean; resolveDurationNanoseconds: number | null; timingClassification: 'gpu-timestamp-query' | 'feature-not-enabled' | 'not-requested'; timedScope: 'temporal-resolve-compute-pass' | 'not-measured'; readbackExcludedFromTimedScope: true; resolve: TemporalTextureResolveReceipt; } export interface TemporalFrameGraphResult { outputTexture: GPUTexture; pixels: PixelGrid | null; receipt: TemporalFrameGraphReceipt; } /** * One-device temporal graph. Calls are deliberately serialized because the * persistent query/readback buffers and history textures are frame resources. */ export declare class TemporalFrameGraph { readonly width: number; readonly height: number; readonly timestampQuerySupported: boolean; readonly timestampQueryRequested: boolean; readonly timestampQueryEnabled: boolean; private readonly device; private readonly outputColor; private readonly historyColor; private readonly historyDepth; private readonly neutralMotion; private readonly neutralReactiveMask; private readonly resolvePipeline; private readonly timestampQuerySet; private readonly timestampResolveBuffer; private readonly timestampReadbackBuffer; private historyInitialized; private frameIndex; private executing; private destroyed; constructor(device: GPUDevice, options: TemporalFrameGraphOptions); resetHistory(): void; execute(input: TemporalFrameGraphInput): Promise; destroy(): void; } //# sourceMappingURL=TemporalFrameGraph.d.ts.map