Emit
30 members
The WGSL and GLSL ES 3.00 writers, module fragments and the passes that run before them.
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
-
autoVarsFunction - Turns every value that is later assigned to into a WGSL var.
-
cseFunction - Common-subexpression elimination.
-
emitBindingFunction - Emit one BindingDecl as a WGSL @group(…) @binding(…) var line.
-
emitConstFunction - Emit one ConstDecl as a WGSL const line, without the surrounding module.
-
emitExprFunction - Emit one Expr as WGSL source text, using wgslBackend with the default 'full' parenthesisation.
-
emitFragmentFunction - Emit a ModuleDecl as a WGSL fragment for a host that assembles the final module itself: the declarations and helper functions without the enable directive header and, unless opts.entryPoints is true, without the stage entry points.
-
EmitFragmentInterface - A module emitted without its stage wrapper, plus everything the host must supply or ensure for the result to compile.
-
emitFuncFunction - Emit one FuncDecl as a WGSL function, exactly as given.
-
emitFuncsFunction - Emit a list of functions as WGSL, joined by blank lines, through the same lowering and optimization passes emitModule runs.
-
emitFuncsCsedFunction - Alias of emitFuncs.
-
emitGlslFragmentFunction - Emit a module as a GLSL ES 3.00 fragment for a host that owns the program: the declarations and helper functions, without #version, without the precision lines and, by default, without the stage entry point.
-
emitGlslModuleFunction - Emit a module as GLSL ES 3.00 source.
-
emitGlslStagesFunction - Emit both stages of one module, lowering and optimizing it once.
-
emitModuleFunction - Emit a ModuleDecl as a complete WGSL module string, ready for device.createShaderModule.
-
emitModuleAtFunction - Emit a ModuleDecl as WGSL at an explicit optimization level.
-
EmitOptionsInterface - Options accepted by emitModule and emitGlslModule.
-
EmitPluginInterface - A transform that runs inside module emit.
-
emitStructFunction - Emit one StructDecl as a WGSL struct block.
-
f32LitFunction - Spell v as an f32 literal, in the form WGSL and GLSL share: an integer-looking value gets a .0 suffix so a float context never sees an integer literal.
-
FragmentDeclaresInterface - What a fragment declares in the program it is composed into: the manifest a composer checks its host prelude against.
-
GlslEmitOptionsInterface - The options accepted by emitGlslModule, emitGlslStages and emitGlslFragment: the shared EmitOptions plus three that exist only for GLSL ES 3.00, one for each thing the target lacks.
-
glslEs300BackendConstant - The GLSL ES 3.00 (WebGL2) Backend.
-
intLitFunction - Spell v as the body of an i32 or u32 literal (no suffix), in the form WGSL and GLSL share.
-
lowerComputeToFragmentFunction - Rewrite a gather-only @compute module into a @fragment one that WebGL2 runs as a fullscreen draw into an R32UI target, one texel per invocation.
-
lowerModuleFunction - Rewrites every matchExpr in a module into a form the backends can emit: a hoisted variable assigned from a switch statement, placed immediately before the statement that contained the expression.
-
lowerWgslFunction - Run the passes emitModule runs before writing text (validation, the capability check, autoVars, lowerModule and the optimizer at level) and return the resulting ModuleDecl.
-
OptLevelType - A named optimization level, spelled like a C compiler's -O flag.
-
repackFunction - Emit manifest again from the portable IR it carries, with options: the same program, its WGSL, GLSL and layouts byte for byte what the build wrote, and the variants the build did not ask for.
-
wgslBackendConstant - The WGSL target: a Backend that spells types, literals, intrinsics and module declarations for device.createShaderModule.
-
wgslTypeFunction - Spell a ShaderType as WGSL type syntax.