code wiki / _hdl_build / nx_raster_bench.nx
nx_raster_bench.nx
buildroot/runtime/_hdl_build/nx_raster_bench.nx
about
nx_raster_bench.nx -- ARC-10/S12 PERF RUNG-0: the MEASURED sovereign-rasterizer baseline on the
REAL textured-Draw path (txtri_render: 3 edge fns + barycentric UV + 4-tap bilinear nx_txs_sample
per fragment -- the realistic pixel workload, NOT a null loop). Hardware clock CLOCK_MONOTONIC,
best-of-N reps. NEG-CONTROLS: (a) quarter-pixel scene must take materially less time (the timer
tracks the PIXEL workload, kills the synthetic-fps lie); (b) FLAT texture -> uniform fill (the
per-fragment sample path is live inside the timed frame). Baseline numbers gate every later
rasterizer optimization claim (ratchet). license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_textured_tri.nxnx_textured_tri_fast.nxnx_pteam.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
| 12 | const RB_MAGIC_1000000000: i64 = 1000000000 |
| 13 | const RB_MAGIC_1400: i64 = 1400 |
| 14 | const RB_MAGIC_10000: i64 = 10000 |
| 15 | const RB_MAGIC_4096: i64 = 4096 |
| 17 | const RB_W: i64 = 512 |
| 18 | const RB_H: i64 = 384 |
| 19 | const RB_QW: i64 = 256 |
| 20 | const RB_QH: i64 = 192 |
| 21 | const RB_FRAMES: i64 = 20 |
| 22 | const RB_REPS: i64 = 5 |
| 23 | const RB_TEXW: i64 = 64 |
| 24 | const RB_TEXH: i64 = 64 |
| 25 | const RB_SQ: i64 = 8 |
functions
| 27 | func hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 28 | func pn(v: i64) -> i64 { let b: *u8=sys_mmap(32) as *u8; var x: i64=v; var ng: i64=0; if x<0{ng=1;x=0-x} var i: i64=31; if x==0{b[i]=48 as u8;i=i-1} while x>0{b[i]=(48+x%10) as u8;x=x/10;i=i-1} if ng==1{b[i]=45 as u8;i=i-1} sys_write(1,(b as i64+i+1) as *u8,31-i); return 0 } |
| 30 | func pd2(v100: i64) -> i64 |
| 39 | func sput(dst: *u8, pos: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[pos+i]=s[i]; i=i+1 } return pos+i } called by 1: main |
| 40 | func nput(dst: *u8, pos: i64, v: i64) -> i64 |
| 55 | func rb_now(ts: *i64) -> i64 |
| 60 | func rb_clear(fb: *Image) -> i64 |
| 70 | func rb_quad(fb: *Image, tex: *Image) -> i64 |
| 78 | func rb_frame(fb: *Image, tex: *Image) -> i64 |
| 85 | func rb_quad_fast(fb: *Image, tex: *Image) -> i64 |
| 92 | func rb_frame_fast(fb: *Image, tex: *Image) -> i64 |
| 100 | func rb_scene_ref(fb: *Image, tex: *Image, u0a: i64) -> i64 |
| 111 | func rb_scene_fast(fb: *Image, tex: *Image, u0a: i64) -> i64 |
| 120 | func rb_cksum(fb: *Image) -> i64 called by 1: main |
| 130 | func rb_bench(fb: *Image, tex: *Image, ts: *i64) -> i64 |
| 145 | func rb_bench_fast(fb: *Image, tex: *Image, ts: *i64) -> i64 |
| 163 | func rb_band_fn(band: i64, ctx: i64) -> i64 calls 1: txtri_render_fast_clip |
| 185 | func rb_frame_threaded(team: *NxPTeam, fb: *Image, tex: *Image, ctx: *i64, nbands: i64) -> i64 |
| 190 | func rb_bench_threaded(team: *NxPTeam, fb: *Image, tex: *Image, ctx: *i64, nbands: i64, ts: *i64) -> i64 |
| 206 | func main() -> i64 |