code wiki / _hdl_build / nishi_export_lib.nx
nishi_export_lib.nx
buildroot/runtime/_hdl_build/nishi_export_lib.nx
about
nishi_export_lib.nx -- REAL nx_cc-compiled NishiLang exported from sovereign DLLs. Includes:
- nishi_answer() / nishi_render(buf,w,h): the direct-export + arg-export + render proofs.
- nx_dev_render(self,buf,w,h) / nx_dev_get_info(self): COM DEVICE METHOD BODIES. nx_dev_render derives its interior
color from self->state (self[1]), proving object state flows through a vtable-dispatched call. These are the
compiled method bodies the COM-device DLL wires behind an ID3D11-shaped vtable (plumbing = sovereign emitter glue).
All pure integer math + caller-buffer writes -> position-independent, callable via MS-x64->SysV ABI thunks.
license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_f32_hw.nxnx_dxbc.nxnx_dxbc_exec.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
| none |
functions
| 13 | func nishi_answer() -> i64 { return 42 } called by 1: main |
| 14 | func nx_edge(ax: i64, ay: i64, bx: i64, by: i64, px: i64, py: i64) -> i64 { return (bx-ax)*(py-ay) - (by-ay)*(px-ax) } |
| 16 | func nishi_render(buf: *u8, w: i64, h: i64) -> i64 |
| 40 | func nx_dev_render(self: *i64, buf: *u8, w: i64, h: i64) -> i64 |
| 67 | func nx_dev_get_info(self: *i64) -> i64 { return self[1] } called by 1: main |
| 70 | func nx_dev_qi(self: *i64, riid: *i64, ppv: *i64) -> i64 { ppv[0] = self as i64; self[1] = self[1] + 1; return 0 } // *ppv=this; AddRef; S_OK called by 1: main |
| 71 | func nx_dev_addref(self: *i64) -> i64 { self[1] = self[1] + 1; return self[1] } // ULONG AddRef called by 1: main |
| 72 | func nx_dev_release(self: *i64) -> i64 { self[1] = self[1] - 1; return self[1] } // ULONG Release called by 1: main |
| 73 | func nx_dev_getfl(self: *i64) -> i64 { return 45056 } // D3D_FEATURE_LEVEL_11_0 = 0xB000 called by 1: main |
| 74 | func nx_dev_notimpl(self: *i64) -> i64 { return 2147500033 } // E_NOTIMPL = 0x80004001 called by 1: main |
| 78 | func to_unorm8(bits: i64) -> i64 { return f32_int(f32_add(f32_mul(bits, f32_of(255)), f32_div(f32_of(1), f32_of(2)))) } // round(f*255), D3D UNORM |
| 79 | func ld32(p: *u8, o: i64) -> i64 { return (p[o] as i64) | ((p[o+1] as i64)<<8) | ((p[o+2] as i64)<<16) | ((p[o+3] as i64)<<24) } |
| 80 | func nx_dev_getctx(self: *i64, ppCtx: *i64) -> i64 { ppCtx[0] = (self as i64) + 16; return 0 } // GetImmediateContext -> &mem[2] called by 1: main |
| 81 | func nx_dev_create_rtv(self: *i64, pRes: i64, pDesc: i64, ppRTV: *i64) -> i64 { self[4] = pRes; ppRTV[0] = (self as i64) + 32; return 0 } // RTV wraps the buffer @ &mem[4] called by 1: main |
| 82 | func nx_ctx_clearrtv(self: *i64, rtv: *i64, colorptr: *u8) -> i64 { // ClearRenderTargetView(ctx, rtv, FLOAT[4]) |
| 95 | func nx_dev_create_buffer(self: *i64, pDesc: i64, pInit: *i64, ppBuf: *i64) -> i64 { // CreateBuffer called by 1: main |
| 100 | func nx_ctx_om_set_rt(self: *i64, num: i64, ppRTV: *i64, dsv: i64) -> i64 { self[3] = ppRTV[0]; return 0 } // OMSetRenderTargets -> bound RT called by 1: main |
| 101 | func nx_ctx_ia_set_vb(self: *i64, start: i64, num: i64, ppVB: *i64) -> i64 { self[4] = ppVB[0]; return 0 } // IASetVertexBuffers -> bound VB (ignores stride/offset stack args) called by 1: main |
| 103 | func nx_dev_create_shader(self: *i64, bc: i64, len: i64, link: i64, ppShader: *i64) -> i64 { ppShader[0] = bc; return 0 } called by 1: main |
| 105 | func nx_ctx_pssetshader(self: *i64, ps: i64, cinst: i64, num: i64) -> i64 { self[6] = ps; return 0 } called by 1: main |
| 109 | func nx_dev_create_tex(self: *i64, pDesc: i64, pInit: *i64, ppTex: *i64) -> i64 { // CreateTexture2D called by 1: main |
| 114 | func nx_dev_create_srv(self: *i64, pRes: i64, pDesc: i64, ppSRV: *i64) -> i64 { ppSRV[0] = pRes; return 0 } // CreateShaderResourceView -> SRV wraps the texture obj called by 1: main |
| 115 | func nx_ctx_pssetsrv(self: *i64, start: i64, num: i64, ppSRV: *i64) -> i64 { self[8] = ppSRV[0]; return 0 } // PSSetShaderResources -> bound_srv = ctx self[8] (mem[10]) called by 1: main |
| 116 | func nx_ctx_draw_tex(self: *i64, vcount: i64, start: i64) -> i64 { // textured Draw |
| 149 | func nx_ctx_draw(self: *i64, vcount: i64, start: i64) -> i64 { // Draw -> rasterize; execute bound PS if any |
| 199 | func main() -> i64 |