code wiki / _hdl_build / nx_prepared_character_bundle_emit_t316_gate.nx
nx_prepared_character_bundle_emit_t316_gate.nx source
↩ module page · 11 lines · 1150 B
1import "nx_prepared_motion_candidate_t316.nx"
2import "nx_character_prepared_runtime.nx"
3import "nx_syscalls.nx"
4import "nx_gate_verdict.nx"
5const BUNDLE_TESTS:i64=6
6func has(h:*u8,hn:i64,n:*u8)->i64{var nn:i64=0;while n[nn]!=(0 as u8){nn=nn+1};if nn<=0||hn<nn{return 0};var i:i64=0;while i<=hn-nn{var j:i64=0;while j<nn&&h[i+j]==n[j]{j=j+1};if j==nn{return 1};i=i+1};return 0}
7func main(argc:i64,argv:*i64)->i64{
8 let a:*u8=nx_prepared_motion_js();let b:*u8=nx_character_prepared_runtime_js();var na:i64=0;while a[na]!=(0 as u8){na=na+1};var nb:i64=0;while b[nb]!=(0 as u8){nb=nb+1}
9 var pass:i64=0;if na>0&&nb>0{pass=pass+1};if has(a,na,"class NishiPreparedMotion" as *u8)==1{pass=pass+1};if has(a,na,"gltf_pose_frame" as *u8)==1{pass=pass+1};if has(b,nb,"nxGpuUploadVisitor" as *u8)==1{pass=pass+1};if has(b,nb,"nxGpuDrawVisitors" as *u8)==1{pass=pass+1};if has(b,nb,"nxSceneLightFrame" as *u8)==1{pass=pass+1}
10 let c:*i64=gv_ctr();c[0]=pass;c[1]=BUNDLE_TESTS;let rc:i64=gv_verdict("PREPARED-CHARACTER-BUNDLE-GATE" as *u8,c,"motion and prepared-character GPU consumers are joined without duplicate implementations" as *u8);sys_exit(rc);return rc
11}