code wiki / _hdl_build / nx_swgpu_showcase.nx

nx_swgpu_showcase.nx

buildroot/runtime/_hdl_build/nx_swgpu_showcase.nx

8043 B109 linesdepth 9pulls 35 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 sdf_bytes sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_jpeg_decode_rgb sys_mmap ↻ nx_jpeg_dec_ctx_init sys_mmap ↻ _jpeg_ascii_probe_sof sys_mmap ↻ nx_jpeg_seg_init nx_jpeg_seg_next nx_jpeg_classify_marker nx_jpeg_marker_is_lengthle nx_jpeg_sof_parse nx_jpeg_is_progressive prog_be16 nx_jpeg_prog_decode sys_mmap ↻ prog_be16 ↻ nx_jpeg_dqt_parse nx_jpeg_dht_parse nx_jpeg_dht_build_decode_t nx_jpeg_sos_parse prog_next_marker prog_scan sys_mmap ↻ nx_jpeg_huff_decode_symbol nx_jpeg_ent_extend nx_jpeg_ent_receive prog_refine_nz nx_jpeg_mcu_scratch_init

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