nx_nxa_gpu_lib.nx
buildroot/runtime/nx_nxa_gpu_lib.nx
about
Native NXA geometry conversion for GPU upload; no platform API or allocator dependency.
dependencies 1 imports · 4 importers
imports: nx_nxa.nx
imported by: nx_nxa_garment_bind_candidate_t132.nxnx_nxa_garment_bind_lib.nxnx_nxa_gpu_gate.nxnx_nxa_gpu_wasm_gate.nx
structs
| none |
consts
| 4 | const NGP_COMPONENTS: i64 = 3 // VERT xyz and TRIS corners in the NXA v1 schema. |
| 5 | const NGP_GPU_WORD: i64 = 4 // WebGPU float32/uint32 wire representation. |
| 6 | const NGP_U32_MAX: i64 = 4294967295 |
| 7 | const NGP_E_OUTPUT: i64 = 0-4 |
| 8 | const NGP_E_INDEX: i64 = 0-5 |
| 9 | const NGP_E_OVERLAP: i64 = 0-6 |
| 11 | const NGP_SKIN_INFLUENCES: i64 = 4 // NXA v1: four joint indices, then four Q12 weights. |
| 12 | const NGP_SKIN_WORDS: i64 = NGP_SKIN_INFLUENCES*2 |
| 13 | const NGP_SKEL_WORDS: i64 = 8 // NXA v1 parent, bind translation xyz, quaternion xyzw. |
| 14 | const NGP_WEIGHT_ONE: i64 = 4096 // NXA v1 Q12 weight denominator. |
| 15 | const NGP_F32_INTEGER_BITS: i64 = 24 // IEEE-754 binary32 significand precision. |
| 16 | const NGP_E_SKIN_COUNT: i64 = 0-7 |
| 17 | const NGP_E_SKIN_JOINT: i64 = 0-8 |
| 18 | const NGP_E_SKIN_WEIGHT: i64 = 0-9 |
| 19 | const NGP_E_TEXC_SHAPE: i64=0-10 |
| 20 | const NGP_E_TEXC_VALUE: i64=0-11 |
| 21 | const NGP_F32_ABS_MASK: i64=2147483647 |
| 22 | const NGP_F32_SIGN_MASK: i64=2147483648 |
| 166 | const NGP_TEXC_HEADER: i64=4 // NXA TEXC nv, stride, atlas grid, optional region table offset. |
| 167 | const NGP_TEXC_STRIDE: i64=3 // u Q16, v Q16, owning joint. |
| 168 | const NGP_TEXC_UV: i64=2 |
| 169 | const NGP_TEXC_ONE: i64=65536 |
functions
| 24 | func ngp_reason(rc: i64) -> *u8 |
| 38 | func ngp_section(b: *u8,n: i64,tag: *u8) -> i64 called by 8: ngb_mapngb_mapngp_bytesngp_verticesngp_indicesngp_skin_section+2 calls 2: nxa_counted_sectionnxa_tag4 |
| 41 | func ngp_bytes(b: *u8,n: i64,tag: *u8) -> i64 |
| 48 | func ngp_output(b: *u8,n: i64,out: *u8,cap: i64,need: i64) -> i64 |
| 61 | func ngp_vertices(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 74 | func ngp_indices(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 101 | func ngp_skin_section(b: *u8,n: i64) -> i64 |
| 133 | func ngp_skin_bytes(b: *u8,n: i64) -> i64 |
| 141 | func ngp_skin(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 172 | func ngp_texcoord_section(b: *u8,n: i64) -> i64 called by 2: ngp_texcoord_bytesngp_texcoords calls 4: ngp_sectionnxa_counted_sectionnxa_tag4nxa_section_entry |
| 199 | func ngp_texcoord_bytes(b: *u8,n: i64) -> i64 |
| 205 | func ngp_texcoords(b: *u8,n: i64,out: *u8,cap: i64) -> i64 |
| 230 | func ngp_normal_length(square: i64) -> i64 called by 1: ngp_normals |
| 241 | func ngp_normal_edge(h: *i64,va: i64,a: i64,b: i64,k: i64,scale: i64) -> i64 |
| 246 | func ngp_float_difference(a: i64,b: i64) -> i64 { return __f32_add(a,b^NGP_F32_SIGN_MASK) } |
| 249 | func ngp_normals(b: *u8,n: i64,out: *u8,cap: i64) -> i64 called by 2: gg_normalsmain calls 5: ngp_sectionngp_outputngp_float_differencengp_normal_edgengp_normal_length |