code wiki / _hdl_build / nx_gltf_load_gate.nx

nx_gltf_load_gate.nx

buildroot/runtime/_hdl_build/nx_gltf_load_gate.nx

14006 B267 linesdepth 8pulls 18 transitivereach 0 importersview sourcekind gate/prooftopic gltf
docsdependenciesstructsconstsfunctions

about

nx_gltf_load_gate.nx -- ★NATIVE sovereign glTF viewer gate: load our exported nishi_being.glb back into the Nishi renderer and render it (round-trip on OUR OWN stack), AND ★D1 FAIL-CLOSED teeth (debt 1785902685, 2026-08-12): T5-T10 feed malformed/unsupported glbs assembled AT RUNTIME in /tmp -> the loader must REFUSE with the exact NAMED reason, never segfault. T7 is the POSITIVE CONTROL (a valid minimal Khronos-shaped glb with u16 indices MUST load) so a refuse-everything guard cannot pass. gv-migrated (D001): verdict comes from nx_gate_verdict, exit carries it. license_tier: ORIGINAL expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_png.nx nx_trimesh.nx nx_gltf_load.nx nx_gate_verdict.nx nx_gltf_load_gate.nx

imports: nx_syscalls.nxnx_png.nxnx_trimesh.nxnx_gltf_load.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_openat_rd sys_close gv_need gv_puts ↻ gltf_load sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ↻ gll_refuse sys_write ↻ gll_slen sys_mmap ↻ gll_ru32 gll_inb gll_nth_num

structs

none

consts

157const BG: i64 = 24 + 26*256 + 34*65536
158const W: i64 = 300
159const H: i64 = 460

functions

13func clearfb(fb: *i64, n: i64, c: i64) -> i64 { var i: i64=0; while i<n { fb[i]=c; i=i+1 } return 0 }
called by 1: main
14func filled(fb: *i64, n: i64, bg: i64) -> i64 { var c: i64=0; var i: i64=0; while i<n { if fb[i]!=bg { c=c+1 } i=i+1 } return c }
called by 1: main
17func gstreq(a: *u8, b: *u8) -> i64
called by 2: refuse_toothmain
28func gwfile(path: *u8, b: *u8, n: i64) -> i64
35func gw32(b: *u8, at: i64, v: i64) -> i64
called by 3: mkglbmk2glbmain
42func gw16(b: *u8, at: i64, v: i64) -> i64
called by 2: mkglbmk2glb
47func gputs(b: *u8, at: i64, s: *u8) -> i64
called by 2: mkglbmk2glb
52func gputn(b: *u8, at: i64, v: i64) -> i64
called by 1: mkglb calls 1: sys_mmap
64func mkglb(path: *u8, ct: i64, io: i64, ia: i64, ibb: i64, ic: i64) -> i64
98func refuse_tooth(path: *u8, want: *u8) -> i64
114func mk2glb(path: *u8) -> i64
called by 1: main calls 5: sys_mmapgputsgw32gw16gwfile
161func main() -> i64