code wiki / _hdl_build / nx_craft_tile_gate.nx
nx_craft_tile_gate.nx
buildroot/runtime/_hdl_build/nx_craft_tile_gate.nx
about
nx_craft_tile_gate.nx -- GE30 REFEREE: the frame cut into row bands is BIT-IDENTICAL to the frame
drawn by one thread, and a band writes NOTHING outside the rows it owns.
WHY THIS SUBJECT NEEDS ITS OWN GATE. nx_wasm_craft_gate proves the WORLD (raycast ground truth,
causal edits, determinism, the input edge contract) and nx_wasm_craft_vm_gate proves the SHIPPED
WASM fits and paints inside the memory it declares. Neither can see the defect GE30 introduces:
a frame assembled by N workers over ONE shared linear memory is correct only if the band pass
writes disjoint pixels and reads no scratch its neighbour writes. The old renderer failed the
second half by construction -- five wray outputs lived in ONE shared slot (O_ST 46-50), which is
invisible with one thread and a race with two -- so the decomposition is the subject here.
THE LOAD-BEARING TOOTH IS A FULL PIXEL COMPARE, NOT A DIGEST. Two fresh arenas, same seed, same
camera: arena A drawn by render_impl (one thread, the shipped path), arena B drawn as N bands plus
one overlay. Every word of the WRITTEN EXTENT must agree -- rw x rh, the compact buffer the
one-pixel-per-ray law made the single owner of, never W*H, because a comparison over unwritten
memory is a claim about uninitialised bytes. A tiling defect lives at BAND SEAMS, so the band
counts include ones that do NOT divide the row count evenly, and a stride-sampling checksum is
deliberately not used anywhere in this file.
ANTI-VACUITY, STATED BECAUSE "IDENTICAL" IS THE EASIEST GREEN TO FAKE: two blank frames are also
identical. So the gate first proves the frame is VARIED (many distinct colours) and that the
overlay pass genuinely CHANGES pixels; only then does agreement mean anything.
nx_craft_tile_gate
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_wasm_craft.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 29 | const CT_SEED: i64 = 20260728 // craft's shipped identity seed (wc_spec v0) |
| 30 | const CT_SLACK: i64 = 4096 // arena slack, matching the sibling gates' allocation shape |
| 31 | const CT_SENTINEL: i64 = 123456789 // a colour word the renderer never writes |
| 32 | const CT_MIN_DISTINCT: i64 = 40 // the varied-frame floor the world gate already uses |
| 33 | const CT_BUCKETS: i64 = 4096 |
| 34 | const CT_WARM: i64 = 12 // ticks before measuring: the camera settles onto the ground |
| 35 | const CT_BANDS_A: i64 = 2 |
| 36 | const CT_BANDS_B: i64 = 3 |
| 37 | const CT_BANDS_C: i64 = 5 |
| 38 | const CT_BANDS_D: i64 = 7 |
| 39 | const CT_BANDS_E: i64 = 16 |
functions
| 41 | func ct_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 42 | func ct_n(v: i64) -> i64 { return gv_num(v) } |
| 44 | func ct_arena() -> i64 |
| 54 | func ct_fill(base: i64, v: i64) -> i64 called by 1: main |
| 60 | func ct_extent(base: i64) -> i64 { return wc_rw(base) * wc_rh(base) } |
| 62 | func ct_diff(a: i64, b: i64) -> i64 |
| 72 | func ct_untouched(base: i64, v: i64) -> i64 |
| 81 | func ct_untouched_past(base: i64, v: i64) -> i64 |
| 90 | func ct_untouched_rows(base: i64, v: i64, y0: i64, y1: i64) -> i64 called by 1: main |
| 102 | func ct_distinct(base: i64) -> i64 |
| 118 | func ct_banded(base: i64, nb: i64) -> i64 |
| 131 | func ct_identical(nb: i64, ctr: *i64, name: *u8) -> i64 |
| 142 | func main(argc: i64, argv: *i64) -> i64 |