mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 18:18:12 +08:00
Fix the record buffer liveness rule and the index accessor
This commit is contained in:
@@ -148,7 +148,7 @@ fn repeat<T>(
|
|||||||
direction: DVec2,
|
direction: DVec2,
|
||||||
transform: Attr<Transform>,
|
transform: Attr<Transform>,
|
||||||
) -> List<(T, Attr<Transform>)> {
|
) -> List<(T, Attr<Transform>)> {
|
||||||
let offset = direction * ctx.index() as f64;
|
let offset = direction * ctx.innermost_index() as f64;
|
||||||
emit(element, Attr(DAffine2::from_translation(offset) * *transform))
|
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
|
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
|
node's output, so provenance is carried by the value itself: element and
|
||||||
attributes travel together, and returning a result obtained before some
|
attributes travel together, and returning a result obtained before some
|
||||||
later evaluation is well-defined. Re-evaluating the same source
|
later evaluation is well-defined. A value is live until its own source
|
||||||
overwrites that source's buffer with an identical record, by purity, so
|
is evaluated again, which overwrites that source's buffer; a kernel that
|
||||||
stale handles are benign. The values are opaque and unforgeable, and
|
needs two results of one input side by side declares the input twice.
|
||||||
inspecting one requires bounds on the generic, which is element access
|
The values are opaque and unforgeable, and inspecting one requires
|
||||||
and monomorphization as usual.
|
bounds on the generic, which is element access and monomorphization as
|
||||||
|
usual.
|
||||||
|
|
||||||
This is the general form of selection: switch, fallback, N-way
|
This is the general form of selection: switch, fallback, N-way
|
||||||
multiplexers, and per-lane data-driven choice among inputs are all plain
|
multiplexers, and per-lane data-driven choice among inputs are all plain
|
||||||
|
|||||||
Reference in New Issue
Block a user