nx_d3d11_min.nx
buildroot/runtime/nx_d3d11_min.nx
about
nx_d3d11_min.nx -- D0 of the D3D-game ladder: the END-TO-END SPINE. Models the D3D11 device+swapchain object model
and the exact startup call sequence a game makes on frame 0 -- D3D11CreateDeviceAndSwapChain -> GetBuffer(backbuffer)
-> ClearRenderTargetView -> [draw region] -> Present -- and drives it through OUR real backend (nx_swgpu framebuffer)
and OUR real present (nx_swapchain -> PPM). Proves API-surface -> backend -> present as ONE working path.
HONEST SCOPE: this is the ARCHITECTURE spine (the object model + call sequence backed by the real backend/present),
NOT yet a COM-vtable d3d11.dll a Windows game loads unchanged -- that (real IUnknown/GUID vtables + the dll shim) is a
later rung. Correctness before perf: the software backend is correct-but-slow. license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_swgpu.nxnx_swapchain.nx
imported by: nx_d3d11_min_gate.nx
structs
| none |
consts
| none |
functions
| 13 | func d3d_create_device_and_swapchain(reqw: i64, reqh: i64) -> *i64 |
| 22 | func d3d_backbuffer(ctx: *i64) -> *i64 { return sg_fb(ctx[0]) } // GetBuffer(0) + CreateRenderTargetView |
| 23 | func d3d_width(ctx: *i64) -> i64 { return ctx[1] } called by 1: main |
| 24 | func d3d_height(ctx: *i64) -> i64 { return ctx[2] } called by 1: main |
| 26 | func d3d_pack(r: i64, g: i64, b: i64) -> i64 { return (r & 255) | ((g & 255) << 8) | ((b & 255) << 16) } |
| 29 | func d3d_clear_rtv(ctx: *i64, r: i64, g: i64, b: i64) -> i64 |
| 39 | func d3d_fill_rect(ctx: *i64, x0: i64, y0: i64, x1: i64, y1: i64, r: i64, g: i64, b: i64) -> i64 |
| 53 | func d3d_present(ctx: *i64, out: *u8, out_cap: i64) -> i64 |