Skip to content

ZenFG TypeScript API / webgpu / snapshot

snapshot ​

Converts a full @zenfg/webgpu compilation report, execution timing result, and resource-pool snapshot into the portable ZenFG Snapshot 1.2 wire model.

Capture inputs from the same compiled frame: compile with { report: true }, execute with explicit timing, and optionally save CPU results and pool statistics before awaiting GPU readback and calling createFrameGraphSnapshot. Report provenance is a caller-owned convention because independently supplied report values do not carry a shared compiled-frame identity. This entrypoint also exposes the portable Snapshot type and canonical serializer needed by WebGPU producers.

Classes ​

Type Aliases ​

Functions ​

Open source / MIT licensed