nx_dxbc_exec.nx
buildroot/runtime/nx_dxbc_exec.nx
about
nx_dxbc_exec.nx -- D2 of the D3D-game ladder: DECODE OPERANDS + EXECUTE a real DXBC shader. A minimal SM5
interpreter over 4-component float32 registers (input v[], output o[], temp r[]) using REAL hardware float32
(nx_f32_hw mulss/addss = the same IEEE-754 ops D3D uses -> bit-matching semantics). Operand token layout decoded
from Microsoft fxc's actual output (confirmed): [0:1]=ncomp [2:3]=selmode [4:11]=swizzle/mask [12:19]=optype
(0=temp 1=input 2=output 4=immediate32) [20:21]=index-dim. Subset: mov + mad (enough to execute + GRADE a real
fxc arithmetic shader vs its known output). Extended operand tokens + full opcode coverage = D2b. license_tier: ORIGINAL
dependencies 3 imports · 3 importers
imports: nx_syscalls.nxnx_dxbc.nxnx_f32_hw.nx
imported by: nishi_export_lib.nxnx_d3d_shade_gate.nxnx_dxbc_exec_gate.nx
structs
| none |
consts
| 10 | const K_MAGIC_100000: i64 = 100000 |
| 11 | const K_MAGIC_2047: i64 = 2047 |
functions
| 15 | func op_decode(b: *u8, off: i64, out: *i64) -> i64 |
| 37 | func sh_regbase(regs: *i64, optype: i64, idx: i64) -> *i64 |
| 47 | func sh_read_src(regs: *i64, opd: *i64, dst: *i64) -> i64 |
| 66 | func sh_write_dest(regs: *i64, opd: *i64, src: *i64) -> i64 |
| 78 | func sh_execute_scratch(b: *u8, payoff: i64, n: i64, regs: *i64, scratch: *i64) -> i64 |
| 122 | func sh_execute(b: *u8, payoff: i64, n: i64, regs: *i64) -> i64 |