Log inGet started
Package

stored.module

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

generator.stored

A Generator's stored result: what its cook stood in the scene, written into the world as engine-native records and stood again from there in any process that shows the same graph with the same params, with procgen not loaded.

  • key(graphGuid, params, output) names a result from the manifest and the params alone: the graph's checksum, the checksum of every asset it references (world content followed at any depth, library content by its own checksum), procgen's own version (its package's checksum), the params in canonical form and the output named.
  • write(owner, graphGuid, key, opts) writes what stands under the Generator's entity: each entity it realized as a record (its components, its native components with each mesh and material by address), each instance set with its placements, and what moves with time on the device as the compute lists that rewrite it (remainder). Blobs are named by the SHA-256 of their bytes and written before the record; a blob already present, or a record already filed under the key, is not written again.
  • read(graphGuid, key) answers the record filed under a key, stand(owner, record) stands it (meshes from their stored bytes, materials from their records, entities born temporary, instance sets at their placements, the device runs and their programs), tick(standing, time) runs the stored rewrites at a time of the result's timeline, frameWork(standing) states what a frame of them queues on the device, and release(standing, ownerGone) takes it all down.

A frame of the stored rewrites is one dispatch (fused): stand makes one kernel of every program the rewrites dispatch and a command table of every entry they recorded, in order (each dispatch's program, threads, the page, first word and length of each run it binds, and its parameters; each write's words and where they go). The kernel binds the result's pages and the table, and runs every entry in its one workgroup with a storage barrier between each and the next; each frame writes the values the curves give into the table's slot area and dispatches it. The table is built again when the page group moves this result's runs. While the kernel compiles, the rewrites replay as recorded. Rewrites the kernel cannot state (a program that synchronizes its workgroup, reads where its thread stands in it, or binds anything but arrays of words, scalars and vectors; runs standing in more pages than it can bind) replay as recorded, one dispatch per recorded dispatch, and frameWork names why.

A result lives under /zero/source/_cache/procgen/<graph guid>/: <key>.result (the record), <sha256>.zmsh (meshes), <sha256>.bin (instance placements and device runs) and <sha256>.wgsl (program sources).

The Generator component requires this module itself, and loads the parts ~.generator installs only once it cooks.