code wiki / (root) / nx_gsplat_perf.nx

nx_gsplat_perf.nx

buildroot/runtime/nx_gsplat_perf.nx

18613 B361 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind tooltopic gsplat
docsdependenciesstructsconstsfunctions

about

nx_gsplat_perf.nx -- THE SPLAT RENDER BASELINE: a number for every performance claim to beat. WHY THIS ORGAN EXISTS. On 2026-08-23 the sovereign splat rasterizer's viewport stopped being a compile-time 512x384 and became a parameter. Every performance claim made after that moment needs a measured baseline, per stage, at the resolutions we actually intend to deliver. WITHOUT A BASELINE AN IMPROVEMENT CLAIM IS UNFALSIFIABLE -- so this organ ships before any optimisation does. WHAT IT REPORTS, per viewport: total frame microseconds, plus the microseconds of each of the four stages the renderer is COMPOSED FROM (project+sort, clear, blend, resolve), and the CONIC EVALUATION count -- the deterministic cost unit gs_blend_rect already returns. Two renderers can be compared in that currency without a stopwatch at all, which is what makes an optimisation provable on a loaded box. THE BLEND FIGURE IS DERIVED (total - project - clear - resolve), never measured directly: measuring it directly would require a second copy of the full-screen policy, and a second policy is a second ruler. The subtraction is stated here so nobody reads it as an independent measurement. TIMING IS THE MINIMUM OF PF_ITERS RUNS. A minimum is the least contaminated estimator of the true cost on a shared box -- the mean absorbs every interfering lane, and this box carries many. The spread (max-min) is printed beside it so the reader can see how noisy the sample was rather than trusting the minimum blindly. THE VIEWPORT LADDER IS NOT PICKED. Each rung is a resolution the estate already has a reason for: the historic cap it just escaped, the derived gallery target read from the capture wire's own recorded frame, and the 4K rung the beauty tier is aimed at.

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_itrig.nx nx_gsplat.nx nx_gsplat_tile_lib.nx nx_gate_verdict.nx nx_gsplat_perf.nx

imports: nx_syscalls.nxnx_itrig.nxnx_gsplat.nxnx_gsplat_tile_lib.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_puts sys_write gs_stride_aniso 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 ↻ gs_nb gs_expn gs_build_explut gv_num sys_mmap ↻ sys_write ↻ sys_munmap pf_scene gs_set_aniso gs_fxa pf_w_at pf_h_at gs_focal_for sys_clock_now_us sys_now_us sys_mmap ↻ sys_clock_gettime_mono gs_render_aniso_at gs_project_sort_at it_sin4096 it_cos4096

structs

none

consts

33const PF_W64: i64 = 8
34const PF_ITERS: i64 = 3 // min-of-3; see header on why the minimum and not the mean
38const PF_CAMZ: i64 = 30
39const PF_RTAN: i64 = 250
40const PF_XSPAN: i64 = 10000
41const PF_YSPAN: i64 = 8000
44const PF_GRID_A: i64 = 8
45const PF_GRID_B: i64 = 32
48const PF_NRES: i64 = 5
49const PF_W0: i64 = 3840
50const PF_H0: i64 = 2160
51const PF_W1: i64 = 1920
52const PF_H1: i64 = 1200
53const PF_W2: i64 = 1920
54const PF_H2: i64 = 1080
55const PF_W3: i64 = 1280
56const PF_H3: i64 = 720
57const PF_W4: i64 = 512
58const PF_H4: i64 = 384
103const PF_WORKERS: i64 = 4
104const PF_NEDGE: i64 = 3
105const PF_EDGE0: i64 = 32
106const PF_EDGE1: i64 = 64
107const PF_EDGE2: i64 = 128
108const PF_TILE_BUDGET: i64 = 4000000
109const PF_SUM_RADIX: i64 = 31
110const PF_SUM_MOD: i64 = 1000000007

functions

60func pf_w_at(i: i64) -> i64
called by 1: main
67func pf_h_at(i: i64) -> i64
called by 1: main
76func pf_scene(gauss: *i64, grid: i64) -> i64
called by 1: main calls 2: gs_set_anisogs_fxa
111func pf_sum(fb: *i64, n: i64) -> i64
called by 1: main
118func pf_pad(v: i64, width: i64) -> i64
called by 1: main calls 1: gv_puts
126func main() -> i64