nx_wgsl.nx
buildroot/runtime/nx_wgsl.nx
about
dependencies 11 imports · 25 importers
diagram shows first 10 each side; +1 more imports, +15 more importers in the complete lists below.
imports: nx_syscalls.nxnx_shader_ir.nxnx_cast_shader_src.nxnx_world_shader_src.nxnx_types.nxnx_lex_kinds.nxnx_ir.nxnx_tokenizer.nxnx_parse.nxnx_opt.nxnx_import.nx
imported by: nx_cast_attachment_gate_t131.nxnx_cast_canonical_capture_t181.nxnx_cast_face_mask_gate_t163.nxnx_cast_inspection_gate_t165.nxnx_cast_lit_gate_t181.nxnx_cast_normal_gate_t133.nxnx_cast_projection_integration_gate_t290.nxnx_cast_shader_src.nxnx_cast_static_canonical_gate_t335.nxnx_cast_surface_canonical_gate_t140.nxnx_cast_surface_gate_t130.nxnx_cast_trace_diagnostic_t290.nxnx_clip_depth_contract_gate.nxnx_eye_aperture_gate_t203.nxnx_eye_aperture_reuse_gate_t206.nxnx_game_texture_mip_emit_t241.nxnx_ir_cast_capacity_t206.nxnx_ir_cast_identity_t206.nxnx_material_cast_gate_t302.nxnx_material_normal_shader_candidate_t301.nxnx_normal_shader_gate_t290.nxnx_shader_front_gate_t217.nxnx_texture_array_gate_t289.nxnx_texture_mip_alpha_gate_t241.nxnx_texture_mip_gate_t218.nx
structs
| none |
consts
| 78 | const STAGE_PLAIN: i64 = 0 |
| 79 | const STAGE_VERTEX: i64 = 1 |
| 80 | const STAGE_FRAGMENT: i64 = 2 |
| 82 | const STAGE_COMPUTE: i64 = 3 |
| 87 | const WG_WORKGROUP: i64 = 64 |
| 91 | const WG_TRACE_CAP: i64 = SIR_MAXNODE |
| 95 | const WG_EMIT_CAP: i64 = SIR_MAXNODE * 16 |
| 97 | const WG_C_BANG: i64 = 33 |
| 99 | const WG_NUMBUF: i64 = 32 |
| 107 | const WG_MSGBUF: i64 = 128 |
| 114 | const WG_BIND_GROUP: i64 = 0 |
| 119 | const WG_BIND_UNIFORM: i64 = 0 |
| 120 | const WG_BIND_TEX_FIRST: i64 = WG_BIND_UNIFORM + 1 |
| 277 | const WG_F32ARR_LANES: i64 = 4 |
| 2068 | const WG_UNIFORM_STRIDE_MULTIPLE: i64 = 16 |
| 2202 | const WG_MODE_0644: i64 = 420 |
| 2861 | const SHL_EXPAND_CAP: i64 = 4194304 |
| 2862 | const SHL_LEX_CAP: i64 = 262144 |
functions
| 118 | func wg_group(m: *i64) -> i64 { return WG_BIND_GROUP + m[M_BINDGROUP] } |
| 123 | func gl_ty(t: i64) -> *u8 |
| 142 | func wg_ty(t: i64) -> *u8 |
| 165 | func gl_tyname(m: *i64, t: i64) -> *u8 |
| 170 | func wg_tyname(m: *i64, t: i64) -> *u8 |
| 179 | func wg_is_texty(t: i64) -> i64 |
| 192 | func wg_name_is(m: *i64, id: i64, name: *u8) -> i64 |
| 196 | func wg_fn_param(m: *i64, fn: i64, name: *u8) -> i64 |
| 206 | func wg_fn_position_param(m: *i64, fn: i64) -> i64 |
| 216 | func wg_chain_local(m: *i64, head: i64, name: *u8) -> i64 |
| 231 | func wg_decl_named(m: *i64, kind: i64, name: *u8) -> i64 |
| 240 | func wg_array_sample_bound(m:*i64,id:i64)->i64 |
| 254 | func wg_resolves_to_uniform(m: *i64, name: *u8) -> i64 |
| 264 | func wg_resolves_to_varying(m: *i64, name: *u8) -> i64 |
| 278 | func wg_f32arr_vec4n(n: i64) -> i64 { return (n + WG_F32ARR_LANES - 1) / WG_F32ARR_LANES } |
| 280 | func wg_f32arr_len(m: *i64, name: *u8) -> i64 |
| 290 | func wg_decl_kind_first(m: *i64, kind: i64) -> i64 |
| 299 | func wg_decl_kind_count(m: *i64, kind: i64) -> i64 |
| 310 | func wg_fragout(m: *i64) -> i64 { return wg_decl_kind_first(m, K_FRAGOUT) } |
| 315 | func wg_chain_returns_value(m: *i64, head: i64) -> i64 |
| 332 | func wg_chain_assigns(m: *i64, head: i64, name: *u8) -> i64 |
| 350 | func wg_chain_last_is_return(m: *i64, head: i64) -> i64 |
| 360 | func wg_tex_binding(m: *i64, tex: i64) -> i64 |
| 371 | func wg_storage_at(m: *i64, binding: i64) -> i64 |
| 381 | func wg_sampler_name_is(base:*u8,name:*u8)->i64 |
| 389 | func wg_sampler_name_conflict(m:*i64,tex:i64)->i64 |
| 407 | func wg_front_contract(m:*i64,stage:i64)->i64 |
| 423 | func gl_expr(m: *i64, id: i64, out: *u8, pos: i64, cap: i64, trace: *i64, tcap: i64, tn: *i64) -> i64 |
| 568 | func gl_stmts(m: *i64, head: i64, out: *u8, pos: i64, cap: i64, trace: *i64, tcap: i64, tn: *i64) -> i64 |
| 645 | func glsl_emit_module(m: *i64, stage: i64, out: *u8, cap: i64, trace: *i64, tcap: i64, tn: *i64) -> i64 |
| 836 | func wg_fn_is_plain(m: *i64, f: i64, stage: i64) -> i64 |
| 844 | func wg_rev(out: *u8, a: i64, b: i64) -> i64 |
| 863 | func wg_splat_callee(n: *u8) -> i64 |
| 872 | func wg_vec_arg_ty(m: *i64, id: i64) -> i64 |
| 884 | func wg_expr(m: *i64, id: i64, out: *u8, pos: i64, cap: i64, trace: *i64, tcap: i64, tn: *i64) -> i64 |
| 1110 | func wg_is_position(m: *i64, id: i64) -> i64 |
| 1118 | func wg_stmts(m: *i64, head: i64, out: *u8, pos: i64, cap: i64, trace: *i64, tcap: i64, tn: *i64) -> i64 |
| 1223 | func wgsl_compute_stage(m: *i64, f: i64, out: *u8, pos: i64, cap: i64) -> i64 |
| 1234 | func wgsl_emit_module(m: *i64, stage: i64, out: *u8, cap: i64, trace: *i64, tcap: i64, tn: *i64) -> i64 |
| 1606 | func shsrc_fullscreen_tri(m: *i64) -> i64 |
| 1636 | func shsrc_depth_min(m: *i64) -> i64 |
| 1648 | func wg_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 1650 | func wg_streq(a: *u8, b: *u8) -> i64 |
| 1659 | func wg_compute_demo() -> i64 |
| 1711 | func wg_probe(m: *i64, stage: i64, label: *u8, dialect_wgsl: i64, trace: *i64, tn: *i64) -> i64 |
| 1730 | func wg_trace_eq(a: *i64, an: i64, b: *i64, bn: i64) -> i64 |
| 1740 | func shsrc_frag_const(m: *i64) -> i64 |
| 1758 | func shsrc_fullscreen_tri_scaled(m: *i64) -> i64 |
| 1775 | func shsrc_fullscreen_tri_shadowlocal(m: *i64) -> i64 |
| 1793 | func shsrc_plain_shadowparam(m: *i64) -> i64 |
| 1809 | func shsrc_private_demo(m: *i64) -> i64 |
| 1826 | func shsrc_tex2d_sample(m: *i64) -> i64 |
| 1834 | func shsrc_tex_plain(m: *i64) -> i64 |
| 1854 | func shsrc_frag_pos(m: *i64) -> i64 |
| 1870 | func shsrc_frag_pos_undeclared(m: *i64) -> i64 |
| 1885 | func shsrc_frag_plainparam(m: *i64) -> i64 |
| 1903 | func shsrc_frag_discard(m: *i64) -> i64 |
| 1913 | func shsrc_frag_noout(m: *i64) -> i64 |
| 1927 | func shsrc_frag_loc2(m: *i64) -> i64 |
| 1941 | func shsrc_vert_fragout(m: *i64) -> i64 |
| 1948 | func shsrc_frag_twoout(m: *i64) -> i64 |
| 1955 | func shsrc_frag_const_body(m: *i64) -> i64 |
| 1971 | func shsrc_texsample(m: *i64) -> i64 |
| 1982 | func shsrc_select_let(m: *i64) -> i64 |
| 1997 | func shsrc_for_until(m: *i64) -> i64 |
| 2013 | func shsrc_struct(m: *i64) -> i64 |
| 2036 | func shsrc_struct_ret(m: *i64) -> i64 |
| 2069 | func wg_round_up(al: i64, n: i64) -> i64 { return ((n + al - 1) / al) * al } |
| 2070 | func wg_align_of(t: i64) -> i64 |
| 2082 | func wg_size_of(t: i64) -> i64 |
| 2099 | func wg_uniform_layout(m: *i64, out: *u8, pos: i64, cap: i64) -> i64 { return wg_uniform_layout_k(m, out, pos, cap, "struct_u_size=" as *u8) } |
| 2100 | func wg_uniform_layout_k(m: *i64, out: *u8, pos: i64, cap: i64, key: *u8) -> i64 |
| 2153 | func shsrc_world_uniforms(m: *i64) -> i64 |
| 2165 | func shsrc_neg_uninit(m: *i64) -> i64 |
| 2176 | func wg_world_demo() -> i64 |
| 2204 | func wg_glsl_to_path(m: *i64, stage: i64, outp: *u8, label: *u8) -> i64 |
| 2222 | func wg_cast_demo(outp: *u8, outf: *u8) -> i64 |
| 2299 | func wg_layout_demo() -> i64 |
| 2368 | func gl_call_name(name: *u8) -> *u8 |
| 2379 | func wg_decls_demo() -> i64 |
| 2867 | func shl_ty(t: *Type) -> i64 |
| 2877 | func shl_op(op: i64) -> *u8 |
| 2900 | func shl_val(m2: *i64, f: *Function, vid: i64, nb: *u8) -> i64 |
| 2926 | func shl_blk(m2: *i64, f: *Function, fn2: i64, bb: *BasicBlock, nb: *u8, msg: *u8, seen: *i64) -> i64 |
| 3003 | func shl_bid(f: *Function, id: i64) -> *BasicBlock |
| 3016 | func shl_reaches(f: *Function, from: i64, to: i64, mark: *i64, wl: *i64) -> i64 |
| 3046 | func shl_reaches_avoid(f: *Function, from: i64, to: i64, avoid: i64, mark: *i64, wl: *i64) -> i64 |
| 3075 | func shl_dominates(f: *Function, b: i64, p: i64, mark: *i64, wl: *i64) -> i64 |
| 3090 | func shl_is_header(f: *Function, bb: *BasicBlock, mark: *i64, wl: *i64) -> i64 |
| 3119 | func shl_region(m2: *i64, f: *Function, fn2: i64, eid: i64, stop: i64, nb: *u8, msg: *u8, seen: *i64, mark: *i64, wl: *i64, depth: i64) -> i64 |
| 3236 | func shl_lower(m2: *i64, f: *Function, fname: *u8) -> i64 |
| 3302 | func main(argc: i64, argv: *i64) -> i64 |