code wiki / (root) / nx_glprobe_lib.nx

nx_glprobe_lib.nx

buildroot/runtime/nx_glprobe_lib.nx

7255 B122 linesdepth 2pulls 2 transitivereach 201 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_glprobe_lib.nx -- THE GL-CONTEXT PROBE RULER: one emitted probe, one native classifier, N page emitters. WHY (2026-09-02, operator: "it says no webgl2"): /world/rigview refused with the bare string "NXA REFUSED: no webgl2" and /world/beach fell to its sovereign tier with a bare "no-webgl2-context" -- neither said WHOSE refusal it was. Measured on the operator's laptop the same hour: every process started AFTER a display-driver swap (Intel UMD 32.0.101.6629 -> .8991) created WebGL2 (a fresh headless Edge AND a fresh headless Waterfox, ANGLE on the new UMD; the served rigview rendered 14164 verts / 104 joints in that Edge), while the Waterfox that had stayed open since before the swap still MAPPED THE DELETED 6629 UMD in its GPU process (the module that faulted Windows Terminal five times that week) and refused. The pages were innocent and the refusal text could not say so. A refusal that does not name its cause sends the reader at the wrong subject (nx_refusal_shape_lib asks exactly this: does the refusal name its subject and its remedy?). ONE TABLE, TWO SURFACES. The browser must answer the question itself (no page can call the estate for a remedy while its GPU is refusing), so the emitted JS carries the state and remedy table -- and the SAME table is the native classifier below, so an MCP caller (nx_glprobe classify <gl2> <gl1> <gpu>) and the served page cannot disagree. nx_glprobe_gate proves the two surfaces carry identical strings and that no page emitter still ships a bare refusal, with a runtime-assembled bare refusal as the firing neg-control. WHAT THIS IS NOT: not a fallback renderer. It names a refusal; the sovereign tier that would make the refusal irrelevant is the gameengine contract (wc_mob_tex, wc_render_tiles), not this lib. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 1 imports · 67 importers

nx_syscalls.nx nx_glprobe_lib.nx nx_game_page_affine_candidate_t361 nx_game_page_authored_material_t54 nx_game_page_body_t138.nx nx_game_page_canonical_t135.nx nx_game_page_catwalk_lighting_cand nx_game_page_emit.nx nx_game_page_emit_sand_review.nx nx_game_page_eye_t138.nx nx_game_page_gait_candidate_t139.n nx_game_page_garment_t132.nx

diagram shows first 10 each side; +0 more imports, +57 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_game_page_affine_candidate_t361.nxnx_game_page_authored_material_t54.nxnx_game_page_body_t138.nxnx_game_page_canonical_t135.nxnx_game_page_catwalk_lighting_candidate_t316.nxnx_game_page_emit.nxnx_game_page_emit_sand_review.nxnx_game_page_eye_t138.nxnx_game_page_gait_candidate_t139.nxnx_game_page_garment_t132.nxnx_game_page_gpu_timing_current_candidate.nxnx_game_page_gpu_timing_pool_candidate.nxnx_game_page_hair_attachment_candidate_t263.nxnx_game_page_hair_attachment_t283.nxnx_game_page_hair_guides_candidate_t263.nxnx_game_page_hair_t138.nxnx_game_page_host_candidate_t341.nxnx_game_page_identity_candidate.nxnx_game_page_imported_body_t45.nxnx_game_page_imported_t262.nxnx_game_page_inspection_distance_t235.nxnx_game_page_inspection_t142.nxnx_game_page_integrated_t73.nxnx_game_page_knight_bind_t25.nxnx_game_page_knight_feedback_t28.nxnx_game_page_knight_feedback_t29.nxnx_game_page_knight_support_t31.nxnx_game_page_knight_support_t31_before_t44.nxnx_game_page_length_diag_t140.nxnx_game_page_lit_candidate_t181.nxnx_game_page_material_body_t61.nxnx_game_page_material_candidate_t181.nxnx_game_page_material_compose_t55.nxnx_game_page_material_schema_candidate_t181.nxnx_game_page_metadata_candidate_t220.nxnx_game_page_mip_candidate_t241.nxnx_game_page_motion_candidate_t328.nxnx_game_page_motion_inventory_candidate_t330.nxnx_game_page_move_t72.nxnx_game_page_owned_candidate_t181.nxnx_game_page_pipeline_t64.nxnx_game_page_pre_inspection_t142.nxnx_game_page_pre_toon_region_t143.nxnx_game_page_procedural_review_candidate_t333.nxnx_game_page_recovery_feedback_t28.nxnx_game_page_recovery_t23.nxnx_game_page_rig_comparison_t332.nxnx_game_page_rig_inspection_t230.nxnx_game_page_rig_observation_candidate_t331.nxnx_game_page_scene_light_candidate_t364.nxnx_game_page_search_t53.nxnx_game_page_shared_candidate_t340.nxnx_game_page_skin_t138.nxnx_game_page_static_candidate_t338.nxnx_game_page_toon_region_candidate_t143.nxnx_game_page_visitors_inspection_t142.nxnx_game_page_visitors_t140.nxnx_game_page_workbench_candidate_t342.nxnx_game_page_workspace_body_t49.nxnx_game_page_workspace_body_t59.nxnx_game_page_workspace_t48.nxnx_glprobe.nxnx_glprobe_gate.nxnx_movement_base_page_t139.nxnx_nxa_rig_emit.nxnx_nxa_stream_emit.nxnx_nxa_view_emit.nx

structs

none

consts

28const GLP_OK: i64 = 0
29const GLP_GL1_ONLY: i64 = 1
30const GLP_GPU_NO_GL: i64 = 2
31const GLP_NO_CONTEXT: i64 = 3
32const GLP_STATES: i64 = 4
34const GLP_S_OK: *u8 = "webgl2-granted"
35const GLP_S_GL1: *u8 = "webgl2-refused-webgl1-granted"
36const GLP_S_GPU: *u8 = "no-gl-context-webgpu-adapter-advertised"
37const GLP_S_NONE: *u8 = "no-gpu-context-of-any-kind"
38const GLP_R_OK: *u8 = "none"
39const GLP_R_GL1: *u8 = "this browser build stops at WebGL1: open the page in a WebGL2 browser"
40const GLP_R_NOGL: *u8 = "the browser is not creating GPU contexts. Measured cause 2026-09-02: a browser left open across a display-driver update keeps the deleted driver mapped while every fresh process gets the new one -- restart the browser (finish any pending reboot), then reload"

functions

42func glp_classify(gl2: i64, gl1: i64, gpu: i64) -> i64
called by 2: mainmain
48func glp_state_name(st: i64) -> *u8
called by 2: mainmain
54func glp_remedy(st: i64) -> *u8
called by 2: mainmain
64func glp_js() -> *u8
69func glp_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
70func glp_find(buf: *u8, off: i64, n: i64, needle: *u8) -> i64
85func glp_count(buf: *u8, n: i64, needle: *u8) -> i64
100func glp_bare_needle(esc: i64) -> *u8
115func glp_bare_count(buf: *u8, n: i64) -> i64
119func glp_composes(buf: *u8, n: i64) -> i64