luft/render/live-artifact.lisp
luft shader source changed while renderer revision ~D was ~
building (now ~D); the unpublished cohort was discarded.
The complete last-known-good renderer cohort owned by one luft viewer.
Mirror diagnostic into viewer's presentation state without owning it.
Best-effort observer update outside artifact's ownership outcome.
A diagnostic surface is secondary to publication. Its failure must never turn an already-installed cohort into an apparent failed build.
Call function while collecting its folded live shader values.
Return function's primary value, the collected references, and source
revisions immediately before and after the call.
make-renderer with live source values and revision boundaries.
Attach viewer's already-installed renderer as its one live cohort.
Build artifact's complete unpublished renderer and semantic mesh cohort.
Publish candidate and return a non-fatal retirement diagnostic, or NIL.
Publication succeeded. Backends retain failed native retirement custody; expose it without rolling the viewer back to a dead cohort.
Release an unpublished renderer candidate.
Refresh artifact while its mutation lock is held.
Failed source is inspectable state, not an outage.
Never replace the source/build condition while unwinding an unpublished cohort. Native backends keep failed retirement custody; retain the cleanup detail on the artifact when it is the only diagnostic.
Request and synchronously perform one complete renderer-cohort rebuild.
Adopt a complete renderer installed by an explicit scene rebuild.
Release artifact's installed renderer cohort.
Relinquish the application-visible borrow before native retirement. Backends retain custody of a failed native destruction, while leaving the renderer installed here would invite a later frame or release to use or retire the same cohort twice.
Release is terminal even when native retirement reports a failure: the backend owns that failed retirement and the application must not resurrect or double-destroy the detached cohort.
The complete last-known-good renderer cohort owned by one LUFT viewer.
(artifact)Return ARTIFACT's lifecycle status. Concrete artifacts normally use :BUILDING, :INSTALLED, :FAILED, :RELEASING, and :RELEASED. :FAILED means that the last attempt failed while the previous installed artifact, when any, remains usable.
(artifact)Return ARTIFACT's newest build or retirement diagnostic, or NIL.
(artifact)Return ARTIFACT's monotonically increasing installed revision.
(viewer diagnostic)Mirror DIAGNOSTIC into VIEWER's presentation state without owning it.
(artifact diagnostic)(viewer)(application)Return APPLICATION's live artifacts as a fresh list. The list is an enumeration, not a transfer of ownership. Applications with no live artifacts inherit the empty default. An artifact may represent one GPU pipeline, a complete renderer cohort, or another transactionally replaced application derivative; the…
(function)Call FUNCTION while collecting its folded live shader values. Return FUNCTION's primary value, the collected references, and source revisions immediately before and after the call.
When bound to a cons cell, its car collects (NAME . VALUE) for every live named value folded while parsing, so the parser's caller can remember what its artifact depends on.
(device color-format extent)(device color-format extent)(viewer source-values source-revision)Logical disjunction of tests and raw truth values.
(artifact)Build ARTIFACT's complete unpublished renderer and semantic mesh cohort.
(context)Return CONTEXT's configured drawable extent as (WIDTH HEIGHT), or NIL.
(renderer key mesh)(renderer)(artifact candidate)Publish CANDIDATE and return a non-fatal retirement diagnostic, or NIL.
(artifact candidate)Release an unpublished renderer CANDIDATE.
(artifact source-revision)Test whether one compatible scalar is greater than another.
Logical negation of one test or raw truth value.
(references)(artifact)Test whether two compatible scalars are equal.
(artifact)Attempt pending source for ARTIFACT at its owning application boundary. Implementations must build away from installed state, publish only a complete candidate, preserve the last-known-good artifact on failure, and coalesce newer invalidations without performing GPU work in definition callbacks. Explicitly released…
(viewer source-values source-revision)(artifact)Explicitly and idempotently release ARTIFACT and its subscriptions. Release is terminal. Application owners remain responsible for calling this at a boundary where no new encoding can borrow the installed GPU resources.
luft's renderer is one live artifact cohort.Its pipelines share layouts, targets, and meshes, so replacing individual stages would publish an ABI mixture. Build a complete renderer beside the installed one, copy its semantic meshes, and cross the viewer boundary only after every shader module and pipeline exists.