mirror of
https://github.com/storytold/materialcraft.git
synced 2026-11-28 17:19:17 +01:00
Preserve completed quadrant batches across later trees
This commit is contained in:
1 parent
940080d551
commit
31f70aa6c6
4 files changed
+34
-4
No files matched your search
@@ -331,6 +331,17 @@ fn a_receiving_batch_precedes_the_upper_pair_after_a_sibling_transfer() {
|
||||
assert_eq!(sample(896, 768, &[832]).to_bits(), small.to_bits());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn subsequent_trees_keep_completed_quadrant_batches_ahead_of_unfinished_groups() {
|
||||
let small = 2.0_f32.powi(-25).to_bits();
|
||||
for trees in [3, 4] {
|
||||
let sample =
|
||||
|first, second| marked_tree_pixel((5, first), (5, second), Continuation::ActiveTrees(trees), &[832, 896, 897], Some([2, 2]), Some(2)).to_bits();
|
||||
assert_eq!(sample(896, 768), small, "{trees} trees");
|
||||
assert_eq!(sample(336, 80), small, "{trees} trees");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unfinished_quadrant_groups_receive_children_after_the_full_batches() {
|
||||
let sample = |first, second| marked_tree_pixel((5, first), (5, second), Continuation::ActiveTrees(2), &[832, 896, 897], Some([2, 2]), Some(2)).to_bits();
|
||||
|
||||
@@ -200,7 +200,7 @@ impl UnderfilledQuadrants {
|
||||
// With no pending sibling in either pair, both paired batches precede the last child.
|
||||
next.extend(upper_batch);
|
||||
Self::append_receiver_and_last(&first, full_receiver, last_batch, &mut next)?;
|
||||
} else if !more_trees && full_receiver && Self::piece_count(&first[..2])? < COPIES_PER_BATCH && Self::piece_count(&first[..3])? >= COPIES_PER_BATCH {
|
||||
} else if full_receiver && Self::piece_count(&first[..2])? < COPIES_PER_BATCH && Self::piece_count(&first[..3])? >= COPIES_PER_BATCH {
|
||||
// The first child handed over by the second group completes the receiver.
|
||||
// How many siblings the lower pair gives up determines when that batch submits.
|
||||
match self.repeated[0].branches.unvisited_subtrees(lower.before.start) {
|
||||
@@ -217,7 +217,8 @@ impl UnderfilledQuadrants {
|
||||
Self::append_copy_window(&first, 0, COPIES_PER_BATCH, &mut next)?;
|
||||
next.extend(upper_batch);
|
||||
next.extend(last_batch);
|
||||
if let Some(tail) = self.unfinished_receivers(collecting, [&lower, &upper, &last], pair_offsets[2], middle_used) {
|
||||
// The completed batches precede the next tree. Unfinished groups can receive its draws.
|
||||
if !more_trees && let Some(tail) = self.unfinished_receivers(collecting, [&lower, &upper, &last], pair_offsets[2], middle_used) {
|
||||
next.extend(tail);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,24 @@ The first pass classifies all 546 roots: 166 Parity and 380 Too hard. These meas
|
||||
|
||||
## 2026-11-26 root comparisons
|
||||
|
||||
### Completed quadrant batches before a later tree
|
||||
|
||||
Noise BNW Spots 1 matches 825,023/841,728 pixels across its 86 established settings on one processor, up from 824,634. The eight-processor result is 776,739/841,728, down from 776,818. The 19 ordinary saves give 196,200/196,352, up from 196,193. Whole-frame counts are 66/86, 38/86 and 16/19 respectively. In F32 the corresponding maxima are 2⁻²², 3 × 2⁻²³ and 2⁻²³. The eight-processor F16 maximum is 2⁻¹¹. Integer formats differ by at most one stored level. The second version retains all 87 original and 19 saved frame digests. [Previous measurements for both roots](#final-transfers-between-unfinished-quadrant-groups)
|
||||
|
||||
In the measured eight-level trees, when a transferred child completes a receiving batch, the lower and upper pairs and the last child submit their full batches in the same order with later trees present. The first thirty complete batches can therefore be submitted before the evaluator returns to the unfinished groups. Repeat the four-format graph comparison at scale 2 with the following settings. The 64² case disables non-square expansion. All other controls use their defaults. The arrows compare the preceding and current release cooks with the same reference frame.
|
||||
|
||||
| Size, seed, disorder, roughness | One processor, F32 | Ordinary save on one, F32 | Eight processors, F32 | Maximum after, one / saved / eight |
|
||||
|---|---:|---:|---:|---:|
|
||||
| 32², 113, .37, .6 | 909 → 914/1,024 | 894 → 901/1,024 | 778/1,024 | 2⁻²³ / 2⁻²³ / 3 × 2⁻²⁴ |
|
||||
| 64², 194536, .53125, .53125 | 3,685 → 3,700/4,096 | 3,723 → 3,736/4,096 | 3,302 → 3,297/4,096 | 2⁻²³ / 2⁻²² / 2⁻²³ |
|
||||
| 32 × 16, 456654, .28125, .375 | 440/512 | 438/512 | 439/512 | 2⁻²⁴ / 3 × 2⁻²⁵ / 2⁻²³ |
|
||||
|
||||
U8 and F16 each match 5,632/5,632 on all three routes, maximum zero. U16 gives 5,631/5,632 on one processor, 5,630/5,632 on reopening and 5,629/5,632 on eight, maximum one level. The rectangle has eight active trees and no pending sibling in either paired group. Across five one-processor captures of the 32² and 64² originals, the reference agreed at 847 and 3,471 positions. The renderer matches 821 and 3,348 of those, up from 815 and 3,334. Across four saved captures it matches 803/829 and 3,403/3,508 positions invariant in the reference. The corresponding eight-processor counts are 601/666 and 2,600/2,810 across four captures. Two single-processor captures of the 32² original differed at 101 pixels. The later batches and differences between repeated reference renders remain open.
|
||||
|
||||
Use an outer Iterate with three, four, six or eight complete eight-level quadrant trees and a connected inactive depth-ten branch. Apply the edge and corner copy procedure in second-tree depth-three quadrants 52, 56 and 48. In that order use extra copy counts (165,400,0), (166,400,0) and (95,120,0) for three trees, (165,165,0) and (260,480,0) for four, (250,245,200) for six, and (165,400,0) and (166,400,0) for eight. Also use the two four-tree fields from the square settings above. Compare successive single-copy draws from the end of batch 26 through batch 30, then compare draws in those batches with unsubmitted draws in the first two trees and in later trees. Exchange gains −1 and 2⁻²⁵ at each intersection. Across the ten fields, 425,278/425,278 order measurements agree in both gain directions. The initial three-tree (165,400,0) acquisition had three reversed and 1,971 inconsistent relations. Two independent reacquisitions in opposite request orders agreed on all 42,291 relations in that field. [Copy-count procedure](#quadrant-batch-order-after-a-sibling-transfer)
|
||||
|
||||
For whole-image controls, use the same four sizes, formats, gains and seeds as in the two-tree comparison. In the second tree of a three-, four- or eight-tree graph, wrap the leaves of depth-five subtrees 832, 896 and 897. Repeat with three and four trees wrapping the depth-six ranges 3328–3330 and 3584–3586, and with six trees wrapping 3328–3333 and 3584–3593. For each field put signed markers in second-tree depth-five subtrees (336,896), (896,336), (768,336), (896,768), (768,896) and (336,80). Across 144 frames on each route, originals went from 147,432 to 147,456/147,456 and ordinary saves from 147,432 to 147,456/147,456, maximum zero. The three-tree regression failed on the preceding release. All 552 node and evaluator release tests, formatting, workspace Clippy, layer checks and WebAssembly checks passed. [Four-format control settings](#quadrant-batch-order-after-a-sibling-transfer) · [Shared batch ordering](../crates/nodes/src/pattern/underfilled_quadrants/remaining.rs) · [Regression graph](../crates/nodes/src/pattern/tests/underfilled_quadrants.rs)
|
||||
|
||||
### Final transfers between unfinished quadrant groups
|
||||
|
||||
At 64 × 32, seed 162172, scale 1, disorder .5625 and roughness .6015625, Noise BNW Spots 1 now matches all 2,048 F32 pixels on one processor, up from 2,045. A fresh ordinary SBS save reopened on one processor also matches 2,048/2,048. At 32 × 16, seed 161954, scale 1, disorder .34375 and roughness .46484375, both routes match 512/512. Each of the four requested formats (U8, U16, F16 and F32) matches 2,560/2,560 across the two sizes on each route, maximum zero. The four recent single-processor F32 captures agree at every position on each route.
|
||||
|
||||
@@ -41,7 +41,7 @@ Writable quadrant tints now match 16,896/16,896 pixels in 44 settings across fou
|
||||
|
||||
Six upstream filters now match 27,648/27,648 original and 27,648/27,648 reopened pixels across four output formats, up from 24,192 on each side. Both directions of an image connection through a graph instance also match 4,608/4,608 F32 pixels on each side. [Published filter properties, fixed controls and raw errors](parity-fixes.md#published-filter-properties-upstream-of-a-quadrant-draw)
|
||||
|
||||
Noise BNW Spots 1 matches 66/86 whole original frames on one processor and 38/86 on eight. The established counts are 824,634/841,728 pixels on one processor, 776,818/841,728 on eight and 196,193/196,352 in 19 ordinary saves. The 32 × 16 and 64 × 32 rectangular settings now match all 2,560 pixels in each of four formats on one processor and after reopening. Their fresh eight-processor F32 captures give 411/512 and 1,589/2,048. All 72 new procedural controls and all 72 earlier controls match 73,728/73,728 on each original and saved panel. [Final subtree transfers, raw counts and remaining errors](parity-fixes.md#final-transfers-between-unfinished-quadrant-groups) · [Earlier sibling transfer](parity-fixes.md#quadrant-batch-order-after-a-sibling-transfer)
|
||||
Noise BNW Spots 1 matches 66/86 whole original frames on one processor, 38/86 on eight and 16/19 ordinary saves. The totals are 825,023/841,728, 776,739/841,728 and 196,200/196,352 pixels respectively. In the fresh four-tree 32² and 64² settings the F32 counts rose to 914/1,024 and 3,700/4,096 on one processor. All 144 new procedural frames and their 144 ordinary saves match 147,456/147,456 pixels on each route. The two earlier rectangular settings match all 2,560 pixels in each of four formats on one processor and on reopening. [Completed batches before a later tree](parity-fixes.md#completed-quadrant-batches-before-a-later-tree) · [Two-tree transfers and rectangular comparisons](parity-fixes.md#final-transfers-between-unfinished-quadrant-groups)
|
||||
|
||||
Noise BNW Spots 1 v2 has 62/87 exact original frames on one processor, 58/87 on eight and 13/19 exact ordinary saves in the established settings. Three 16 × 32 settings with two active quadrant trees improved from 1,420 to 1,478/1,536 F32 pixels on one processor and on reopening. Against the fresh eight-processor capture the total went from 1,417 to 1,397/1,536. The maximum is 2⁻²³ on each route. The 64 procedural controls match 1,048,572/1,048,576 original pixels and all 1,048,576 reopened pixels. Four earlier F32 settings still match all 2,304 pixels on one processor and on reopening, and three further seeds match 2,048/2,048 on both routes. [Two-tree boundary, original settings and repeats](parity-fixes.md#finishing-a-quadrant-copy-batch-in-the-next-tree) · [Single-tree cut child](parity-fixes.md#returning-the-cut-child-of-a-completed-outer-quadrant) · [Earlier four-format totals](parity-fixes.md#completing-partial-copy-batches-above-inactive-quadrants)
|
||||
|
||||
@@ -417,7 +417,7 @@ Creased matches 10,947,840/10,947,840 pixels across 100 distinct settings throug
|
||||
| [multiangle_to_normal.sbs/angle_weight](../assets/sbs/multiangle_to_normal.sbs) | 1 | Yes | [Parity: 4 cases](parity-fixes.md#verified-cases) |
|
||||
| [noise_anisotropic_noise.sbs/anisotropic_noise](../assets/sbs/noise_anisotropic_noise.sbs) | 0 | Yes | [Parity · 18 renders, all 171,264 pixels exact](parity-fixes.md#quarter-turn-directional-blur) · [Saved graph seed and output-format checks](parity-fixes.md#graph-random-seed-inheritance-on-save-and-in-nested-graphs) |
|
||||
| [noise_anisotropic_noise_v2.sbs/anisotropic_noise_v2](../assets/sbs/noise_anisotropic_noise_v2.sbs) | 0 | No | [Parity · 18 renders, all 171,264 pixels exact](parity-fixes.md#high-pass-anisotropic-noise-and-triangle-grid-controls) |
|
||||
| [noise_bnw_spots_1.sbs/bnw_spots_1](../assets/sbs/noise_bnw_spots_1.sbs) | 0 | Yes | [In progress · 66/86 on one processor, 38/86 on eight, 16/19 ordinary saves](parity-fixes.md#final-transfers-between-unfinished-quadrant-groups) · [Earlier sibling transfer](parity-fixes.md#quadrant-batch-order-after-a-sibling-transfer) · [Earlier receiving groups](parity-fixes.md#full-copy-batches-received-across-repeated-quadrant-trees) · [Two rectangular F32 settings across repeated captures and saves](parity-fixes.md#finishing-a-quadrant-copy-batch-in-the-next-tree) · [Two more exact F32 settings on one processor and after reopen](parity-fixes.md#pending-quadrant-siblings-and-the-first-full-receiving-batch) · [Third carried pair and outer routing](parity-fixes.md#carrying-the-third-quadrant-pair-through-an-outer-iteration) · [Earlier cross-tree measurements](parity-fixes.md#full-copy-batches-spanning-successive-quadrant-trees) · [Neighboring quadrants](parity-fixes.md#physical-copy-batches-across-neighboring-quadrants) · [Ninth-batch comparison](parity-fixes.md#connected-graph-depth-and-the-ninth-quadrant-batch) · [Eighth-batch comparison](parity-fixes.md#the-next-full-batch-in-an-eight-level-quadrant-tree) · [Previous 86-setting comparison and 19 saves](parity-fixes.md#a-full-copy-batch-in-the-last-root-quadrant) · [Earlier six batches](parity-fixes.md#leading-copy-batches-in-complete-quadrant-trees) · [Measured physical copy boundary](parity-fixes.md#physical-copy-boundaries-in-dense-quadrant-subtrees) · [Inactive descendants affect draw order, 21/21 independently replayed F32 values](parity-fixes.md#connected-inactive-descendants-and-dense-quadrant-draw-order) · [Eight additional 64 × 32 F32 isolates cook](parity-fixes.md#bounded-work-for-empty-terminal-quadrants) · [Five levels combined, original and reopened, each 8,192/8,192 F32](parity-fixes.md#wide-first-level-shapes-in-additive-quadrant-trees) · [Depths 3–6 match 32,768/32,768 isolated F32 pixels](parity-fixes.md#submission-order-in-underfilled-eight-level-quadrant-trees) · [Earlier 60-setting comparison](parity-fixes.md#connected-quadrant-depth-and-amplified-spot-patterns) · [Zero roughness exact in U16 and F32](parity-fixes.md#grayscale-pattern-output-at-zero-roughness) · [Draw order, 18 changed-format comparisons](parity-fixes.md#draw-order-for-overlapping-procedural-grayscale-stamps) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [Explicit renderer workers and repeatability](parity-fixes.md#patterns-with-an-explicit-reference-worker-count) |
|
||||
| [noise_bnw_spots_1.sbs/bnw_spots_1](../assets/sbs/noise_bnw_spots_1.sbs) | 0 | Yes | [In progress · 66/86 on one processor, 38/86 on eight, 16/19 ordinary saves](parity-fixes.md#completed-quadrant-batches-before-a-later-tree) · [Two-tree transfers](parity-fixes.md#final-transfers-between-unfinished-quadrant-groups) · [Earlier sibling transfer](parity-fixes.md#quadrant-batch-order-after-a-sibling-transfer) · [Earlier receiving groups](parity-fixes.md#full-copy-batches-received-across-repeated-quadrant-trees) · [Two rectangular F32 settings across repeated captures and saves](parity-fixes.md#finishing-a-quadrant-copy-batch-in-the-next-tree) · [Two more exact F32 settings on one processor and after reopen](parity-fixes.md#pending-quadrant-siblings-and-the-first-full-receiving-batch) · [Third carried pair and outer routing](parity-fixes.md#carrying-the-third-quadrant-pair-through-an-outer-iteration) · [Earlier cross-tree measurements](parity-fixes.md#full-copy-batches-spanning-successive-quadrant-trees) · [Neighboring quadrants](parity-fixes.md#physical-copy-batches-across-neighboring-quadrants) · [Ninth-batch comparison](parity-fixes.md#connected-graph-depth-and-the-ninth-quadrant-batch) · [Eighth-batch comparison](parity-fixes.md#the-next-full-batch-in-an-eight-level-quadrant-tree) · [Previous 86-setting comparison and 19 saves](parity-fixes.md#a-full-copy-batch-in-the-last-root-quadrant) · [Earlier six batches](parity-fixes.md#leading-copy-batches-in-complete-quadrant-trees) · [Measured physical copy boundary](parity-fixes.md#physical-copy-boundaries-in-dense-quadrant-subtrees) · [Inactive descendants affect draw order, 21/21 independently replayed F32 values](parity-fixes.md#connected-inactive-descendants-and-dense-quadrant-draw-order) · [Eight additional 64 × 32 F32 isolates cook](parity-fixes.md#bounded-work-for-empty-terminal-quadrants) · [Five levels combined, original and reopened, each 8,192/8,192 F32](parity-fixes.md#wide-first-level-shapes-in-additive-quadrant-trees) · [Depths 3–6 match 32,768/32,768 isolated F32 pixels](parity-fixes.md#submission-order-in-underfilled-eight-level-quadrant-trees) · [Earlier 60-setting comparison](parity-fixes.md#connected-quadrant-depth-and-amplified-spot-patterns) · [Zero roughness exact in U16 and F32](parity-fixes.md#grayscale-pattern-output-at-zero-roughness) · [Draw order, 18 changed-format comparisons](parity-fixes.md#draw-order-for-overlapping-procedural-grayscale-stamps) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [Explicit renderer workers and repeatability](parity-fixes.md#patterns-with-an-explicit-reference-worker-count) |
|
||||
| [noise_bnw_spots_1_v2.sbs/bnw_spots_1](../assets/sbs/noise_bnw_spots_1_v2.sbs) | 0 | No | [In progress · 839,460/842,752 on one processor, 830,536/842,752 on eight and 137,715/139,008 in 19 saves](parity-fixes.md#finishing-a-quadrant-copy-batch-in-the-next-tree) · [Three additional F32 settings exact on one processor and ordinary reopens](parity-fixes.md#returning-the-cut-child-of-a-completed-outer-quadrant) · [Earlier two-child measurements](parity-fixes.md#filling-a-quadrant-batch-from-two-transferred-children) · [512/512 at 32 × 16 on one processor and reopening](parity-fixes.md#drawing-the-children-of-a-transferred-quadrant) · [Repeated parents, three new seeds and processor repeats](parity-fixes.md#repeated-drawing-quadrants-and-full-batches-in-the-outer-pair) · [Earlier half-quadrants and reference repeats](parity-fixes.md#which-half-quadrant-completes-the-next-copy-batch) · [Previous tile-copy fix](parity-fixes.md#tile-copies-in-the-last-two-active-quadrant-levels) · [Earlier 87-setting comparison](parity-fixes.md#copy-batches-from-the-final-quadrant-pair-and-the-following-group) · [Final pattern stage and 16² addition-order replay](parity-fixes.md#final-pattern-draws-above-inactive-quadrants-in-spots-1-v2) · [Parameters and earlier comparison](parity-fixes.md#whole-root-precision-and-saved-comparisons-for-the-three-neighboring-spot-graphs) · [All 87 original settings and 19 saves rechecked](parity-fixes.md#dense-settings-recovered-in-the-third-spots-graph) · [Depth-local variable writes fixed, 28,082/28,160 on twelve whole guards](parity-fixes.md#inherited-and-writable-variables-across-quadrant-depths) · [Two additional 64 × 32 isolates, each 2,048/2,048 F32](parity-fixes.md#bounded-work-for-empty-terminal-quadrants) · [Levels 7–8, 8,047/8,192 F32 on original, 8,048/8,192 reopened](parity-fixes.md#wide-first-level-shapes-in-additive-quadrant-trees) · [Earlier spot comparison](parity-fixes.md#connected-quadrant-depth-and-amplified-spot-patterns) · [Zero roughness exact in U16 and F32](parity-fixes.md#grayscale-pattern-output-at-zero-roughness) · [Draw order, 18 changed-format comparisons](parity-fixes.md#draw-order-for-overlapping-procedural-grayscale-stamps) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [Explicit renderer workers and repeatability](parity-fixes.md#patterns-with-an-explicit-reference-worker-count) |
|
||||
| [noise_bnw_spots_3.sbs/bnw_spots_3](../assets/sbs/noise_bnw_spots_3.sbs) | 0 | Yes | [In progress · six more settings render, 49,131/49,152 on one processor, 49,132/49,152 on eight](parity-fixes.md#dense-settings-recovered-in-the-third-spots-graph) · [Earlier 48 settings, 671,452/671,744 pixels on one processor, 671,526/671,744 on eight](parity-fixes.md#whole-root-precision-and-saved-comparisons-for-the-three-neighboring-spot-graphs) · [Earlier spot comparison](parity-fixes.md#deep-pattern-samples-in-custom-render-and-tiling-regions) · [Earlier matrix](parity-fixes.md#bnw-spots-3-and-cells-1-pattern-sources) · [64² precision and remaining traversal limits](parity-fixes.md#precision-of-two-dense-noise-generators-in-custom-regions) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [Explicit worker counts](parity-fixes.md#branch-offsets-center-culling-and-two-dense-spot-graphs) · [Four-format square and reopened comparisons](parity-fixes.md#two-dense-spots-packages-across-storage-formats) |
|
||||
| [noise_bnw_spots_3_v2.sbs/bnw_spots_3](../assets/sbs/noise_bnw_spots_3_v2.sbs) | 0 | No | [In progress · 16 of 32 blocked settings now render, 185,202/193,536 on one processor and 184,698/193,536 on eight](parity-fixes.md#recovered-settings-in-the-second-version-of-the-third-spots-graph) · [Three recovered saves, 5,999/6,144](parity-fixes.md#recovered-settings-in-the-second-version-of-the-third-spots-graph) · [Dense 32² comparison](parity-fixes.md#bounded-work-for-terminal-quadrant-siblings) · [Earlier comparison · 339,986/347,136 pixels on one processor, 341,093/347,136 on eight · 30 of 62 settings rendered](parity-fixes.md#whole-root-precision-and-saved-comparisons-for-the-three-neighboring-spot-graphs) · [Earlier spot comparison](parity-fixes.md#bnw-spots-3-and-cells-1-pattern-sources) · [12 settings and four attempted reopens](parity-fixes.md#moisture-spot-and-cell-fields-across-processors-and-saved-packages) · [bounded stage counts at scale two](parity-fixes.md#four-cloud-noise-generators-and-repeated-saved-file-comparisons) · [Explicit worker counts](parity-fixes.md#branch-offsets-center-culling-and-two-dense-spot-graphs) · [Dense F32 traversal and worker repeats](parity-fixes.md#dense-quadrant-traversal-and-reference-worker-counts) · [Four-format square and reopened comparisons](parity-fixes.md#two-dense-spots-packages-across-storage-formats) |
|
||||
|
||||
Reference in new issue
Block a user