nx_scene_contract_test.nx
buildroot/runtime/nx_scene_contract_test.nx
about
nx_scene_contract_test.nx -- KATs for the R0 style-spanning scene
contract. Exit 0 = all pass; the failing KAT's number is the exit code.
KAT 1 identity determinism: same seed -> identical entity, twice.
KAT 2 style never touches identity: entity record byte-equal after
rendering under all four styles.
KAT 3 render determinism: same (world, human, style) -> byte-identical
framebuffers.
KAT 4 terrain anchoring: the figure's lowest outfit pixel sits on the
ground row at the anchor, in EVERY style.
KAT 5 styles genuinely differ: framebuffer hashes pairwise distinct.
KAT 6 cross-world reuse: the SAME human renders into two different
worlds; both visible, both deterministic.
KAT 7 proportion tables are style-distinct (head ratios all differ).
KAT 8 speed: full Tier-0 quickstart under NX_SCN_RENDER_BUDGET_MS
(the measured beat-them-on-speed number, printed every run).
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_tier.nxnx_scene_contract.nxnx_scene_render.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
| 37 | const FB_BYTES: nx_int = 147456 // NX_SCN_W * NX_SCN_H * 3 |
functions
| 24 | func t_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 25 | func t_putn(v: i64) -> i64 |
| 39 | func t_fnv(fb: *u8, n: nx_int) -> nx_int called by 1: main |
| 51 | func t_lowest_of_color(fb: *u8, x0: nx_int, x1: nx_int, rgb: nx_int) -> nx_int called by 1: main |
| 73 | func t_count_of_color(fb: *u8, rgb: nx_int) -> nx_int called by 1: main |
| 91 | func t_render_to(world_seed: nx_int, human_seed: nx_int, style: nx_int, fb: *u8) -> *i64 |
| 100 | func main() -> i64 |