lowerWgsl
On this page

lowerWgsl()

Function in Emit

Run the passes emitModule runs before writing text (validation, the capability check, autoVars, lowerModule and the optimizer at level) and return the resulting ModuleDecl.

import { lowerWgsl } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

const lowerWgsl: (m: ModuleDecl, level: OptLevel) => ModuleDecl

Parameters

m ModuleDecl
level OptLevel

Return value

ModuleDecl

Description

The string emit and this function share one recipe, so a tool that inspects the lowered module (an instruction count, for example) sees exactly the module emitModuleAt would write at the same level.

See also

Source

src/core/backends/wgsl.ts, line 604, at commit 26de7be8

Edit this page Report a problem