code wiki / _hdl_build / nishi_export_lib.nx

nishi_export_lib.nx

buildroot/runtime/_hdl_build/nishi_export_lib.nx

12874 B211 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tooltopic nishi
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_f32_hw.nx nx_dxbc.nx nx_dxbc_exec.nx nishi_export_lib.nx

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

main sys_mmap nishi_answer nishi_render nx_edge nx_dev_render nx_edge ↻ nx_dev_get_info nx_dev_qi nx_dev_addref nx_dev_release nx_dev_getfl nx_dev_notimpl nx_dev_getctx nx_dev_create_rtv nx_ctx_clearrtv to_unorm8 f32_int f32_add f32_mul f32_of f32_div ld32 to_unorm8 ↻ ld32 ↻ nx_dev_create_buffer nx_ctx_om_set_rt nx_ctx_ia_set_vb nx_dev_create_shader nx_ctx_pssetshader nx_dev_create_tex nx_dev_create_srv nx_ctx_pssetsrv nx_ctx_draw dxbc_total_size dx_u32 dxbc_find dxbc_chunk_count dx_u32 ↻ dxbc_chunk_off

structs

none

consts

none

functions

13func nishi_answer() -> i64 { return 42 }
called by 1: main
14func nx_edge(ax: i64, ay: i64, bx: i64, by: i64, px: i64, py: i64) -> i64 { return (bx-ax)*(py-ay) - (by-ay)*(px-ax) }
16func nishi_render(buf: *u8, w: i64, h: i64) -> i64
called by 1: main calls 1: nx_edge
40func nx_dev_render(self: *i64, buf: *u8, w: i64, h: i64) -> i64
called by 1: main calls 1: nx_edge
67func nx_dev_get_info(self: *i64) -> i64 { return self[1] }
called by 1: main
70func 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
71func nx_dev_addref(self: *i64) -> i64 { self[1] = self[1] + 1; return self[1] } // ULONG AddRef
called by 1: main
72func nx_dev_release(self: *i64) -> i64 { self[1] = self[1] - 1; return self[1] } // ULONG Release
called by 1: main
73func nx_dev_getfl(self: *i64) -> i64 { return 45056 } // D3D_FEATURE_LEVEL_11_0 = 0xB000
called by 1: main
74func nx_dev_notimpl(self: *i64) -> i64 { return 2147500033 } // E_NOTIMPL = 0x80004001
called by 1: main
78func 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
79func 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) }
called by 2: nx_ctx_clearrtvmain
80func nx_dev_getctx(self: *i64, ppCtx: *i64) -> i64 { ppCtx[0] = (self as i64) + 16; return 0 } // GetImmediateContext -> &mem[2]
called by 1: main
81func 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
82func nx_ctx_clearrtv(self: *i64, rtv: *i64, colorptr: *u8) -> i64 { // ClearRenderTargetView(ctx, rtv, FLOAT[4])
called by 1: main calls 2: to_unorm8ld32
95func nx_dev_create_buffer(self: *i64, pDesc: i64, pInit: *i64, ppBuf: *i64) -> i64 { // CreateBuffer
called by 1: main
100func 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
101func 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
103func nx_dev_create_shader(self: *i64, bc: i64, len: i64, link: i64, ppShader: *i64) -> i64 { ppShader[0] = bc; return 0 }
called by 1: main
105func nx_ctx_pssetshader(self: *i64, ps: i64, cinst: i64, num: i64) -> i64 { self[6] = ps; return 0 }
called by 1: main
109func nx_dev_create_tex(self: *i64, pDesc: i64, pInit: *i64, ppTex: *i64) -> i64 { // CreateTexture2D
called by 1: main
114func 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
115func 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
116func nx_ctx_draw_tex(self: *i64, vcount: i64, start: i64) -> i64 { // textured Draw
called by 1: main calls 1: nx_edge
149func nx_ctx_draw(self: *i64, vcount: i64, start: i64) -> i64 { // Draw -> rasterize; execute bound PS if any
199func main() -> i64