emitFuncs
이 페이지에서

emitFuncs()

함수, 출력 분류

Emit a list of functions as WGSL, joined by blank lines, through the same lowering and optimization passes emitModule runs.

import { emitFuncs } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

function emitFuncs(funcs: readonly FuncDecl[]): string

매개변수

funcs readonly FuncDecl[]

반환값

string

설명

Constant folding, dead-code removal and reuse binding apply exactly as they would inside a full module, so the text matches the function section emitModule would write for the same declarations.

A bare list of functions is not a complete module, so validation and the capability check are skipped; only the passes the spelling needs run. emitFragment runs the full set when the declarations form a module.

대상별 지원

대상지원비고
WGSL (WebGPU) 지원

Writes WGSL for WebGPU.

GLSL ES 3.00 (WebGL2) 해당 없음
CPU 오라클 해당 없음

함께 보기

소스

src/core/backends/wgsl.ts, 542행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고