blob: 10a9e69525bff1b02cbf970dca941a35a2769b6c [file] [log] [blame] [view]
Dan Sinclair6e581892020-03-02 15:47:43 -05001# Tint
2
3Tint is a compiler for the WebGPU Shader Language (WGSL).
4
5This is not an officially supported Google product.
6
7## Requirements
8 * Git
9 * CMake (3.10.2 or later)
10 * Ninja (or other build tool)
11 * Python, for fetching dependencies
12
13## Build options
14 * `TINT_BUILD_SPV_PARSER` : enable the SPIR-V input parser
15
16## Building
Ryan Harrisondb6ade72020-03-05 15:58:27 +000017Tint uses Chromium dependency management so you need to [install depot_tools] and add it to your PATH.
Dan Sinclair6e581892020-03-02 15:47:43 -050018
Ryan Harrisondb6ade72020-03-05 15:58:27 +000019[install depot_tools]: http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
20
21### Getting source & dependencies
22
23```sh
24# Clone the repo as "tint"
25git clone https://dawn.googlesource.com/tint tint && cd tint
26
27# Bootstrap the gclient configuration
28cp standalone.gclient .gclient
29
30# Fetch external dependencies and toolchains with gclient
31gclient sync
Dan Sinclair6e581892020-03-02 15:47:43 -050032```
Ryan Harrisondb6ade72020-03-05 15:58:27 +000033
34### Compiling using CMake + Ninja
35```sh
Dan Sinclair6e581892020-03-02 15:47:43 -050036mkdir -p out/Debug
37cd out/Debug
38cmake -GNinja ../..
Ryan Harrisondb6ade72020-03-05 15:58:27 +000039ninja # or autoninja
40```
41
42### Compiling using CMake + make
43```sh
44mkdir -p out/Debug
45cd out/Debug
46cmake ../..
47make # -j N for N-way parallel build
Dan Sinclair6e581892020-03-02 15:47:43 -050048```
49
Dan Sinclair707705d2020-03-05 15:06:38 +000050## Issues
51Please file any issues or feature requests at
52https://bugs.chromium.org/p/tint/issues/entry
53
Dan Sinclair6e581892020-03-02 15:47:43 -050054## Contributing
55Please see the CONTRIBUTING and CODE_OF_CONDUCT files on how to contribute to
56Tint.