code wiki / (root) / nx_surface_compatibility_gate_t207.nx

nx_surface_compatibility_gate_t207.nx source

↩ module page · 16 lines · 1459 B

1import "nx_craft_visitors_material_fit_t181.nx" 2func main()->i64{ 3 if ep_anchor()<0{return 3};let c:*i64=gv_ctr() 4 let cp:*u8="buildroot/runtime/nx_cast_shader_src.nx";let cs:*u8="1049ef22208253d6cfbddf3d1ad6a1d4d08f6cd0d714a3a2a3e89199f66fcc8c" 5 let ap:*u8="buildroot/runtime/nx_cast_surface_src.nx";let az:*u8="b93fc53053eadbee8d6bee38ded29532e5dae9471bd1fbbe695357bf4c9494f9" 6 let bad:*u8="0000000000000000000000000000000000000000000000000000000000000000" 7 gv_check("current exact cast and adapter lineage",gpe_surface_sources_t132(cp,cs,ap,az)==1,c) 8 gv_check("wrong cast hash refuses",gpe_surface_sources_t132(cp,bad,ap,az)==0,c) 9 gv_check("wrong adapter hash refuses",gpe_surface_sources_t132(cp,cs,ap,bad)==0,c) 10 gv_check("swapped paths refuse",gpe_surface_sources_t132(ap,cs,cp,az)==0,c) 11 let cap:i64=GPE_WASM_CAP;let out:*u8=sys_mmap(cap);let n:i64=gpe_surface_runtime_t132(out,0) 12 gv_check("guarded helper emits",n>0&&n<cap&&gsb_failed==0,c) 13 gv_check("projection helper and selected vertex connected",rk_find(out,n,0,"function nxSurfaceLegacyProjection")>=0&&rk_find(out,n,0,"nxSurfaceLegacyProjection(NXCV,NXCV_SIZE,WGSL_CASTV)")>=0,c) 14 gv_check("dispatch projects common prefix",rk_find(out,n,0,"projectLegacy(G.castCVBytes,cvBytes)")>=0&&rk_find(out,n,0,"cvBytes.set(G.castCVBytes)")<0,c) 15 return gv_verdict("SURFACE-COMPATIBILITY207",c,"Native source closure and emitted wiring; actual GPU surface runtime remains served-page qualification") 16}