From f01429ff0bb9b10d90458a74b78701560f511a24 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Tue, 4 Aug 2026 23:56:16 +0200 Subject: [PATCH] Fix the record buffer liveness rule and the index accessor --- node-graph/rfcs/attribute-model.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/node-graph/rfcs/attribute-model.md b/node-graph/rfcs/attribute-model.md index 8653a60737..1c757234cf 100644 --- a/node-graph/rfcs/attribute-model.md +++ b/node-graph/rfcs/attribute-model.md @@ -148,7 +148,7 @@ fn repeat( direction: DVec2, transform: Attr, ) -> List<(T, Attr)> { - let offset = direction * ctx.index() as f64; + let offset = direction * ctx.innermost_index() as f64; emit(element, Attr(DAffine2::from_translation(offset) * *transform)) } ``` @@ -396,11 +396,12 @@ buffers keep them valid side by side), pass them through helper functions, and return any of them. The returned value's record is the node's output, so provenance is carried by the value itself: element and attributes travel together, and returning a result obtained before some -later evaluation is well-defined. Re-evaluating the same source -overwrites that source's buffer with an identical record, by purity, so -stale handles are benign. The values are opaque and unforgeable, and -inspecting one requires bounds on the generic, which is element access -and monomorphization as usual. +later evaluation is well-defined. A value is live until its own source +is evaluated again, which overwrites that source's buffer; a kernel that +needs two results of one input side by side declares the input twice. +The values are opaque and unforgeable, and inspecting one requires +bounds on the generic, which is element access and monomorphization as +usual. This is the general form of selection: switch, fallback, N-way multiplexers, and per-lane data-driven choice among inputs are all plain