출력
export 30개
WGSL과 GLSL ES 3.00을 쓰는 출력기와 모듈 조각, 그리고 그 앞에서 실행되는 패스입니다.
시그니처, 설명, 예제는 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
-
autoVars함수 - Turns every value that is later assigned to into a WGSL var.
-
cse함수 - Common-subexpression elimination.
-
emitBinding함수 - Emit one BindingDecl as a WGSL @group(…) @binding(…) var line.
-
emitConst함수 - Emit one ConstDecl as a WGSL const line, without the surrounding module.
-
emitExpr함수 - Emit one Expr as WGSL source text, using wgslBackend with the default 'full' parenthesisation.
-
emitFragment함수 - 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.
-
EmitFragment인터페이스 - A module emitted without its stage wrapper, plus everything the host must supply or ensure for the result to compile.
-
emitFunc함수 - Emit one FuncDecl as a WGSL function, exactly as given.
-
emitFuncs함수 - Emit a list of functions as WGSL, joined by blank lines, through the same lowering and optimization passes emitModule runs.
-
emitFuncsCsed함수 - Alias of emitFuncs.
-
emitGlslFragment함수 - 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.
-
emitGlslModule함수 - Emit a module as GLSL ES 3.00 source.
-
emitGlslStages함수 - Emit both stages of one module, lowering and optimizing it once.
-
emitModule함수 - Emit a ModuleDecl as a complete WGSL module string, ready for device.createShaderModule.
-
emitModuleAt함수 - Emit a ModuleDecl as WGSL at an explicit optimization level.
-
EmitOptions인터페이스 - Options accepted by emitModule and emitGlslModule.
-
EmitPlugin인터페이스 - A transform that runs inside module emit.
-
emitStruct함수 - Emit one StructDecl as a WGSL struct block.
-
f32Lit함수 - 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.
-
FragmentDeclares인터페이스 - What a fragment declares in the program it is composed into: the manifest a composer checks its host prelude against.
-
GlslEmitOptions인터페이스 - 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.
-
glslEs300Backend상수 - The GLSL ES 3.00 (WebGL2) Backend.
-
intLit함수 - Spell v as the body of an i32 or u32 literal (no suffix), in the form WGSL and GLSL share.
-
lowerComputeToFragment함수 - 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.
-
lowerModule함수 - 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.
-
lowerWgsl함수 - Run the passes emitModule runs before writing text (validation, the capability check, autoVars, lowerModule and the optimizer at level) and return the resulting ModuleDecl.
-
OptLevel타입 - A named optimization level, spelled like a C compiler's -O flag.
-
repack함수 - 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.
-
wgslBackend상수 - The WGSL target: a Backend that spells types, literals, intrinsics and module declarations for device.createShaderModule.
-
wgslType함수 - Spell a ShaderType as WGSL type syntax.