code wiki / _hdl_build / nx_swgpu_showcase.nx

nx_swgpu_showcase.nx

buildroot/runtime/_hdl_build/nx_swgpu_showcase.nx

8043 B109 linesdepth 9pulls 38 transitivereach 0 importersview sourcekind tooltopic swgpu
docsdependenciesstructsconstsfunctions

about

nx_swgpu_showcase.nx -- SHOW the sovereign software GPU (operator 2026-07-04: "show me where i can see this"). Renders a TURNTABLE of the SMOOTH-UNION SDF body (nx_sdfrender: one continuous raymarched surface, per-pixel lit), bakes each yaw frame to a PNG, base64s it, and emits a SELF-CONTAINED page (zero libs, our own JS cycles the frames = a rotating continuous 3D character). Proves: a continuous, per-pixel-lit 3D body rendered ENTIRELY by our own software GPU (no WebGL, no library), shown live. license_tier: ORIGINAL expect_exit: 0

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_png.nx nx_base64.nx nx_sdfrender_mt.nx nx_makeup.nx nx_jpeg_ascii.nx nx_swgpu_showcase.nx

imports: nx_syscalls.nxnx_png.nxnx_base64.nxnx_sdfrender_mt.nxnx_makeup.nxnx_jpeg_ascii.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_wr hw sys_write 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 ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_jpeg_decode_rgb sys_mmap ↻ nx_jpeg_dec_ctx_init sys_mmap ↻ nx_jpeg_ctx_tables_reset nx_jpeg_ctx_htable_at nx_jpeg_ctx_htable_bind nx_jpeg_ctx_htable_at ↻ nx_jpeg_ctx_qtable_at _jpeg_ascii_probe_sof sys_mmap ↻ nx_jpeg_seg_init nx_jpeg_seg_next nx_jpeg_classify_marker

structs

none

consts

12const K_MAGIC_1608: i64 = 1608
13const K_MAGIC_1360: i64 = 1360
14const K_MAGIC_1330: i64 = 1330
15const K_MAGIC_1024: i64 = 1024

functions

17func hw(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 2: emit_framemain calls 1: sys_write
20func emit_frame(base: i64, fd: i64, tmp: *u8) -> i64
34func main() -> i64