Scroll to navigation

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

Output format. One of: none, wgsl, ir, spirv, spvasm, glsl.
Write output to file instead of stdout.
Output only the specified entry point.
Validate the generated shader with all available validators.
Dump the IR at each stage of the compilation flow.
Stop after parsing the input (useful for validation only).
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

tint_info(1)

HOMEPAGE

https://dawn.googlesource.com/dawn

2026-04-17 Dawn