nx_enginelab_golden.nx
buildroot/runtime/nx_enginelab_golden.nx
about
nx_enginelab_golden.nx -- GOLDEN-IMAGE REGRESSION for the engine instrument (the O3DE class).
WHY THIS IS ITS OWN MODULE, EXTRACTED FROM nx_enginelab_lib ON 2026-08-28. It started life inside
the core spine, and that was wrong for a measurable reason rather than a stylistic one: the spine
is frames, CPU zones, GPU queue slices, draw calls, allocations and lock waits -- ALL PURE INTEGER,
and deliberately so, because the natural first consumer of an engine instrument is the engine, and
this estate's engines compile to wasm. Golden-image comparison is the one row that needs to read a
PNG, so keeping it in the core made EVERY consumer of the integer spine import nx_visual_diff and
with it a PNG decoder, for a capability most of them will never call.
A CAPABILITY THAT TAXES EVERY CONSUMER FOR A FEATURE MOST OF THEM NEVER CALL BELONGS IN ITS OWN
MODULE -- and the cost is not theoretical: it is paid by whichever organ adopts the spine first.
Nothing about the behaviour changed in the move. el_golden is byte-for-byte the same function, its
refusal still propagates, and the gate that proves it is unchanged -- which is exactly why the
extraction is provable: the gate must stay 38 of 38 GREEN across it, and a same-verdict run on a
smaller closure is the whole evidence for the split.
license_tier: ORIGINAL No hardware writes (Rule 26).
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_visual_diff.nxnx_enginelab_lib.nx
imported by: nx_enginelab.nxnx_enginelab_gate.nx
structs
| none |
consts
| 24 | const EL_GOLD_PASS: i64 = 0 |
| 25 | const EL_GOLD_FAIL: i64 = 1 |
| 26 | const EL_GOLD_UNMEASURABLE: i64 = 3 |
| 27 | const EL_GOLD_PASS_PERMIL_DEFAULT: i64 = 1000 // every cell must match by default |
| 28 | const EL_GD_PERMIL: i64 = 0 |
| 29 | const EL_GD_MATCH: i64 = 1 |
| 30 | const EL_GD_TOTAL: i64 = 2 |
| 31 | const EL_GD_SLOTS: i64 = 3 |
functions
| 33 | func el_golden(a: *VdImg, ay: i64, b: *VdImg, by: i64, cw: i64, ch: i64, |