nx_pe_dll_d3d11shade.nx
buildroot/runtime/nx_pe_dll_d3d11shade.nx
about
nx_pe_dll_d3d11shade.nx -- PROGRAMMABLE SHADER Draw: a real fxc-compiled DXBC pixel shader, created via the real D3D11
API and EXECUTED per-draw by our register machine (sh_execute_scratch, DLL-safe), produces WARP-matching pixels.
Superset of d3d11draw: 14 methods incl. CreatePixelShader [dev slot 15] + PSSetShader [ctx slot 9]. CreatePixelShader
has 5 args (ppShader on the stack) -> a 5-arg MS-x64->SysV thunk (rbp frame reads [rbp+0x30]). Draw: if a PS is bound,
executes its DXBC (sh_execute_scratch over caller-scratch in the object mem) -> o0 color -> UNORM8 -> fills the triangle.
Graded vs WARP's shaded triangle (knowledge/warp_shaded.ppm). Method bodies = sovereign nx_cc NishiLang (incl. the fxc-
validated DXBC executor); vtables+thunks = sovereign emitter. Input /tmp/nishi_export_lib.s Output knowledge/nishi_d3d11shade.dll
license_tier: ORIGINAL expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nxnxasm_x86.nxnx_pe_writer.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
| 14 | const N_DEV: i64 = 43 |
| 15 | const N_CTX: i64 = 108 |
| 16 | const N_METH: i64 = 14 |
functions
| 18 | func d11_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 23 | func d11_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 24 | func d11_wstr(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ buf[off+i]=s[i]; i=i+1 } buf[off+i]=0 as u8; return i+1 } called by 1: d11_emit |
| 26 | func d11_assemble(src: *u8, n: i64, out: *u8, out_cap: i64, names: *i64, offs: *i64, cnt: i64) -> i64 |
| 56 | func d11_thunk4(buf: *u8, tco: i64, moff: i64) -> i64 |
| 70 | func d11_thunk5(buf: *u8, tco: i64, moff: i64) -> i64 |
| 85 | func d11_dev_slot(s: i64) -> i64 called by 1: d11_emit |
| 96 | func d11_ctx_slot(s: i64) -> i64 called by 1: d11_emit |
| 108 | func d11_emit(buf: *u8, code: *u8, code_len: i64, offs: *i64) -> i64 |
| 184 | func main() -> i64 |