code wiki / _hdl_build / nx_look_compose_gate.nx

nx_look_compose_gate.nx

buildroot/runtime/_hdl_build/nx_look_compose_gate.nx

8348 B182 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_look_compose_gate.nx -- pixel-truth gate for the sovereign LOOK composer (2026-07-29). Builds three tiny synthetic panes IN MEMORY, writes them as BMPs, runs the real composer twice (full strip + 2x crop), reads the composites back and asserts: T1 full strip: pane0==src, pane1==a, pane2==b pixel-for-pixel; gutters + row-pad are WHITE T2 crop+2x: every 2x2 output block == its source pixel (nearest, no resampling opinions) T3 (negative) dim-mismatched inputs are REFUSED (nonzero rc), output absent The composer is forked as a real process (the gate tests the SHIPPED path, not a code copy). license: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_look_compose_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gw sys_write sys_mmap bmp_write sys_mmap ↻ wr32le wr16le sys_openat_wr sys_write ↻ sys_close run_composer sys_mmap ↻ sys_fork sys_execve sys_exit sys_wait4 bmp_read sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ rd32le gn sys_mmap ↻ sys_write ↻ sys_exit ↻

structs

none

consts

11const GW2: i64 = 16
12const GH2: i64 = 8
13const GUT: i64 = 4
14const HDRB: i64 = 1078

functions

16func gw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
17func gn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
21func wr32le(b: *u8, off: i64, v: i64) -> i64
called by 1: bmp_write
24func wr16le(b: *u8, off: i64, v: i64) -> i64
called by 1: bmp_write
26func rd32le(b: *u8, off: i64) -> i64
called by 1: bmp_read
29func bmp_write(path: *u8, luma: *u8, w: i64, h: i64) -> i64
52func bmp_read(path: *u8, wh: *i64) -> *u8
called by 1: main calls 3: sys_mmapsys_read_filerd32le
66func run_composer(a1: *u8, a2: *u8, a3: *u8, a4: *u8, cx: i64, cy: i64, cw: i64, ch: i64) -> i64
100func main() -> i64