출력

출력

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.

이 페이지 편집 문제 보고