/** * Four-resident native WebGPU world-frame graph. * * Each resident records color, motion/depth, and temporal resolve into one * caller-owned encoder. Their persistent output textures feed a zero-copy 2x2 * composite pass before one command-buffer submission. */ import type { CharacterDrawSpec } from '../../native-render/draw-spec'; import type { PixelGrid } from '../../native-render/gpu-verify'; import { type CharacterTemporalFrameGraphInput, type CharacterTemporalFrameGraphReceipt, type CharacterTemporalStageDurations } from './CharacterTemporalFrameGraph'; export interface CharacterWorldResidentDefinition { id: string; initialSpec: CharacterDrawSpec; } export interface CharacterWorldFrameGraphOptions { tileWidth: number; tileHeight: number; enableGpuTimestamps?: boolean; label?: string; } export interface CharacterWorldResidentFrameInput { id: string; input: Omit; } export interface CharacterWorldFrameGraphInput { residents: readonly CharacterWorldResidentFrameInput[]; capturePixels?: boolean; } export interface CharacterWorldResidentDurations extends CharacterTemporalStageDurations { id: string; } export interface CharacterWorldFrameDurations { residents: CharacterWorldResidentDurations[]; compositeNanoseconds: number | null; aggregateNanoseconds: number | null; } export interface CharacterWorldCompositeReceipt { schemaVersion: 'holoscript.webgpu-character-world-composite.v1'; backend: 'webgpu'; layout: 'two-by-two'; inputTextureCount: 4; zeroCopyResidentTextureInputs: true; persistentPipeline: true; persistentBindGroup: true; persistentOutputTexture: true; gpuTimestampWritesEncoded: boolean; workgroupSize: [8, 8, 1]; dispatch: [number, number, 1]; } export interface CharacterWorldResidentReceipt { id: string; temporalFrame: CharacterTemporalFrameGraphReceipt; } export interface CharacterWorldFrameGraphReceipt { schemaVersion: 'holoscript.webgpu-character-world-frame-graph.v1'; backend: 'webgpu'; deviceExecutionMeasured: true; frameIndex: number; residentCount: 4; tileWidth: number; tileHeight: number; outputWidth: number; outputHeight: number; layout: 'two-by-two'; fixedTopology: true; persistentGpuResources: true; residentReceiptsShareCommandBuffer: true; intermediateFrameReadbackCount: 0; evidenceFrameReadbackCount: 0 | 1; timestampMetadataReadbackCount: 0 | 1; commandBufferCount: 1; queueSubmissionCount: 1; gpuTimestampQuerySupported: boolean; gpuTimestampQueryRequested: boolean; gpuTimestampQueryEnabled: boolean; gpuTimestampMeasured: boolean; timingClassification: 'gpu-timestamp-query' | 'feature-not-enabled' | 'not-requested'; timedScope: 'four-character-color-motion-depth-temporal-through-composite-gpu-scope' | 'not-measured'; cpuMotionDerivationExcludedFromTimedScope: true; cpuToGpuUploadsExcludedFromTimedScope: true; historyCopiesExcludedFromTimedScope: true; evidenceAndTimestampReadbackExcludedFromTimedScope: true; durations: CharacterWorldFrameDurations; residents: CharacterWorldResidentReceipt[]; composite: CharacterWorldCompositeReceipt; } export interface CharacterWorldFrameGraphResult { outputTexture: GPUTexture; pixels: PixelGrid | null; receipt: CharacterWorldFrameGraphReceipt; } /** Fixed four-resident, single-submission character world frame. */ export declare class CharacterWorldFrameGraph { readonly tileWidth: number; readonly tileHeight: number; readonly outputWidth: number; readonly outputHeight: number; readonly timestampQuerySupported: boolean; readonly timestampQueryRequested: boolean; readonly timestampQueryEnabled: boolean; private readonly device; private readonly label; private readonly residentIds; private readonly residents; private readonly output; private readonly compositePipeline; private readonly compositeBindGroup; private readonly timestampQuerySet; private readonly timestampResolveBuffer; private readonly timestampReadbackBuffer; private frameIndex; private executing; private destroyed; constructor(device: GPUDevice, initialResidents: readonly CharacterWorldResidentDefinition[], options: CharacterWorldFrameGraphOptions); get outputTexture(): GPUTexture; resetHistory(): void; execute(input: CharacterWorldFrameGraphInput): Promise; destroy(): void; } //# sourceMappingURL=CharacterWorldFrameGraph.d.ts.map