code wiki / _hdl_build / nx_render_tier_census.nx
nx_render_tier_census.nx source
↩ module page · 75 lines · 6069 B
1// nx_render_tier_census.nx -- the HONEST tiered render architecture (operator 2026-07-04: "sovereign nishi NO
2// CHEATING so nishi os and browser and electronics can run at the HIGHEST" + "work on mobile and desktop and
3// all systems choosing the highest graphics quality for the systems and outputs available"). The crux: a
4// 3rd-party browser's WebGL2/WebGPU uses THAT BROWSER'S GPU driver -- great for COMPAT, but NOT sovereign
5// (the host does the GPU work). Sovereign-HIGH means OUR render path on hardware WE control (nx_dxg -> FPGA/
6// GPU) so NishiOS/Nishi-browser/Nishi-electronics render at the highest WITHOUT leaning on Chrome. This census
7// grades every (device x tier) cell as SOVEREIGN-HAVE / COMPAT-HAVE / SOVEREIGN-GAP, so we never mislabel a
8// host-GPU frame as sovereign. LIAR-KILL: claiming sovereign-high via a 3rd-party browser must grade GAP.
9// license_tier: ORIGINAL expect_exit: 0
10import "nx_syscalls.nx"
11
12func cw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
13func cn(v: i64) -> i64 {
14 let b: *u8 = sys_mmap(32) as *u8
15 var x: i64 = v
16 var i: i64 = 31
17 if x == 0 { b[i] = 48 as u8; i = i - 1 }
18 while x > 0 { b[i] = (48 + x % 10) as u8; x = x / 10; i = i - 1 }
19 sys_write(1, (b as i64 + i + 1) as *u8, 31 - i)
20 return 0
21}
22// grade: 3=SOVEREIGN-HAVE 2=COMPAT-HAVE(host GPU) 1=PARTIAL/floor 0=GAP
23func gs(g: i64) -> *u8 {
24 if g == 3 { return "SOV-HAVE " as *u8 }
25 if g == 2 { return "COMPAT " as *u8 }
26 if g == 1 { return "PARTIAL " as *u8 }
27 return "GAP " as *u8
28}
29// t: [3]=sovhave [2]=compat [1]=partial [0]=gap
30func row(t: *i64, cell: *u8, g: i64, ev: *u8) -> i64 {
31 cw(" ["); cw(gs(g)); cw("] "); cw(cell); cw("\n "); cw(ev); cw("\n" as *u8)
32 t[g] = t[g] + 1
33 return 0
34}
35
36func main() -> i64 {
37 let t: *i64 = sys_mmap(8 * 8) as *i64
38 cw("=== nx_render_tier_census -- highest-quality-per-device, sovereign vs host-GPU (NO cheating) ===\n" as *u8)
39
40 cw("-- TIER 0: SOVEREIGN SOFT-RASTER (our CPU/wasm renderer -- runs on EVERYTHING) --\n" as *u8)
41 row(t, "T0 on 3rd-party browser (mobile+desktop) " as *u8, 3, "LIVE: /charlab /physlab /mineworld -- our code end-to-end, zero libs, byte-identical VM-vetted; quality LOW (256-320px stylized) but 100% ours" as *u8)
42 row(t, "T0 on NishiOS / Nishi-browser " as *u8, 3, "the SAME wasm/organs run on our own browser/OS (browser census 950permille) -- sovereign by construction; this is the floor NO incumbent has" as *u8)
43 row(t, "T0 on Nishi-electronics (FPGA display rung) " as *u8, 3, "pixels-on-sovereign-silicon rung shipped (omniforge) -- our raster can drive our own display" as *u8)
44
45 cw("-- TIER 1/2: BROWSER-COMPAT GPU (host's WebGL2/WebGPU -- HIGH quality, but the HOST does the GPU work) --\n" as *u8)
46 row(t, "T1 WebGL2 on Chrome/Edge/Firefox/Safari " as *u8, 2, "nx_gpu_render BEACHHEAD: our shaders+geometry+mat4 (ZERO libs, sovereignty-gated), device-adaptive quality (mobile 48seg/1.5DPR, desktop 80seg/2DPR). COMPAT: Chrome's driver executes -- NOT sovereign, honestly labeled" as *u8)
47 row(t, "T2 WebGPU fast-path on Chrome/Edge " as *u8, 1, "minecraftclone uses it (floor); our emitter = next rung. Still COMPAT (host GPU). SOTA fidelity ceiling for the browser tier" as *u8)
48 row(t, "T1/T2 on NishiOS / Nishi-browser " as *u8, 0, "our browser must IMPLEMENT WebGL2/WebGPU OR expose the sovereign GPU path -- until then NishiOS high-fidelity = T3, not a borrowed driver" as *u8)
49
50 cw("-- ★TIER 3: SOVEREIGN GPU on OUR silicon (nx_dxg submit -> FPGA/GPU we control) = the NO-CHEATING answer --\n" as *u8)
51 row(t, "T3 sovereign submit path (architecture) " as *u8, 1, "nx_dxg encoder MEASURED ahead-of-DirectX on path-depth (07-02) -- the submission model is OURS and lean; the ARCHITECTURE exists" as *u8)
52 row(t, "T3 EXECUTION on real silicon " as *u8, 0, "★THE WALL: WSL2 GPU-PV is NVIDIA-priv-walled (device probe 07-02) -> needs native-Linux GPU box / our own FPGA-GPU. This is the true path to NishiOS/electronics rendering at the HIGHEST sovereignly" as *u8)
53 row(t, "T3 render fidelity (PBR/shadows/SSS on ours) " as *u8, 0, "downstream of execution -- once T3 executes, the same shader ladder (PBR/shadow/SSS) runs on OUR silicon, no browser needed" as *u8)
54
55 cw("-- THE SELECTOR (highest available per device+output) --\n" as *u8)
56 row(t, "capability detect -> pick highest tier " as *u8, 1, "gpulab does WebGL2-or-fallback + mobile/desktop scaling TODAY; full selector = WebGPU>WebGL2>T3-sovereign>T0-soft-raster per device, with per-output resolution/effect scaling. Rung." as *u8)
57
58 // liar-kill
59 let pre: i64 = t[3]
60 row(t, "sovereign-HIGH via a 3rd-party browser (FAKE) " as *u8, 0, "using Chrome's WebGL2 and calling it sovereign = the cheat the operator named -- must grade GAP; sovereign-high ONLY via T3 on our silicon" as *u8)
61 var liar_ok: i64 = 0
62 if t[3] == pre { liar_ok = 1 }
63
64 cw("--- TALLY --- SOV-HAVE " as *u8); cn(t[3]); cw(" COMPAT " as *u8); cn(t[2]); cw(" PARTIAL " as *u8); cn(t[1]); cw(" GAP " as *u8); cn(t[0])
65 cw(" liar-kill=" as *u8)
66 if liar_ok == 1 { cw("YES\n" as *u8) } else { cw("NO -- INVALID\n" as *u8) }
67 cw("VERDICT (honest): TODAY sovereign-EVERYWHERE = soft-raster (T0, low quality). HIGH quality on 3rd-party\n" as *u8)
68 cw(" browsers = COMPAT (host GPU, T1/T2) -- real + cross-device but NOT sovereign. HIGH quality SOVEREIGNLY\n" as *u8)
69 cw(" (T3, our silicon) is the WALLED endgame = the ONLY 'no-cheating' path to NishiOS/electronics at the\n" as *u8)
70 cw(" highest. So: ship T1/T2 as honest COMPAT (mobile+desktop, highest-per-device), keep T0 as the\n" as *u8)
71 cw(" sovereign+vettable floor, and drive T3 EXECUTION (native-GPU last-mile / own FPGA-GPU) as the true\n" as *u8)
72 cw(" sovereign-SOTA work -- never mislabeling a borrowed-driver frame as ours.\n" as *u8)
73 if liar_ok == 1 { return 0 }
74 return 1
75}