| TINT(1) | User Commands | TINT(1) |
NAME¶
tint - compiler for the WebGPU Shader Language (WGSL)
SYNOPSIS¶
tint [options] input-file
DESCRIPTION¶
tint compiles and validates shaders written in the WebGPU Shader Language (WGSL). It can convert WGSL to SPIR-V, GLSL, or WGSL, and accepts SPIR-V as input.
By default the output format is inferred from the output filename extension. If no output file is specified, SPIR-V assembly (spvasm) is written to stdout.
OPTIONS¶
- -f format, --format=format
- Output format. One of: none, wgsl, ir, spirv, spvasm, glsl.
- -o file, --output-name=file
- Write output to file instead of stdout.
- -ep name, --entry-point=name
- Output only the specified entry point.
- --validate
- Validate the generated shader with all available validators.
- --dump-ir
- Dump the IR at each stage of the compilation flow.
- --parse-only
- Stop after parsing the input (useful for validation only).
- -h , --help
- Show usage information.
EXAMPLES¶
Validate a WGSL shader:
tint shader.wgsl
Compile WGSL to SPIR-V binary:
tint shader.wgsl -o shader.spv
Compile WGSL to GLSL:
tint --format glsl shader.wgsl
Compile SPIR-V to WGSL:
tint shader.spv --format wgsl
SEE ALSO¶
HOMEPAGE¶
| 2026-04-17 | Dawn |