emitModuleAt
이 페이지에서

emitModuleAt()

함수, 출력 분류

Emit a ModuleDecl as WGSL at an explicit optimization level.

import { emitModuleAt } from 'typeshade'

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

구문

const emitModuleAt: (m: ModuleDecl, level: OptLevel) => string

매개변수

m ModuleDecl
level OptLevel

반환값

string

설명

emitModuleAt(m, 'O2') produces the same string as emitModule(m); 'O0' skips the optimizer and writes the lowered module as authored; 'O1' runs only the passes that cannot change a computed value. Useful for debug builds and for comparing emitted size across levels. See OptLevel.

대상별 지원

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

Writes WGSL for WebGPU.

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

함께 보기

소스

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

이 페이지 편집 문제 보고