commit | 5721c2200c76b10fcb6607f4a8a8f17376ac1232 | [log] [tgz] |
---|---|---|
author | Tint team <no-reply@google.com> | Mon Jun 26 08:32:13 2023 +0000 |
committer | Tint LUCI CQ <tint-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jun 26 08:32:13 2023 +0000 |
tree | 23669ff19a1598d485c6a4104582c6d918bbef72 | |
parent | 2702de0bc21c81ccd0dbda9528452ee663104c0f [diff] |
Import Tint changes from Dawn Changes: - c0f0ab761bb9b9e12cc73c124604a0a4eb334d5e [ir] Split `TextGenerator` apart. by dan sinclair <dsinclair@chromium.org> - 6dfc38b8a59d5aa70396fccc100260e4b0b091d9 [ir][validation] Validate `binary` by dan sinclair <dsinclair@chromium.org> - a0aabafb16d5f4cbab607ab2b67b6700b691a85c Remove redundant parentheses on lambdas by Ben Clayton <bclayton@google.com> - fbc2738baf84af039ae98097e89f3a24c40923fd Add More Dual Source Blending Tint Tests + Validation by Brandon Jones <brandon1.jones@intel.com> - 965b0b65aa1466f26645d5023693d772b1f1a129 [tint][ir][ToProgram] Add additional tests by Ben Clayton <bclayton@google.com> - 26fbdaa51384cbc8274b5adca452332afbfa5b92 [tint][ir][builder] Add callback based With() by Ben Clayton <bclayton@google.com> - a48e9b4dda0c127fa4e4e100811905414013a808 [tint][ir] Fix build by Ben Clayton <bclayton@google.com> - 7afd2c4147e89ae339b254439f8864e81d78473e [tint][ir][ToProgram] Add non-roundtrip tests by Ben Clayton <bclayton@google.com> - 56cb75e81cb0831406eb26ce05d827df2b7cffbb [ir][validation] Validate `var` by dan sinclair <dsinclair@chromium.org> - 5acd44cc94f5dcd6bd72b8be0a6070a2bb14c80e [tint][ir] Rename Function::StartTarget() to Block() by Ben Clayton <bclayton@google.com> - 1d94ba00a58affdc6fb2ee18cbb0234c8a2ee3c6 [ir] Enable disabled `for` test. by dan sinclair <dsinclair@chromium.org> - 91307895c1d4b1a13a7f0e966b975ce58318895f [tint][ir][ToProgram] Implement loops by Ben Clayton <bclayton@google.com> GitOrigin-RevId: c0f0ab761bb9b9e12cc73c124604a0a4eb334d5e Change-Id: I801e55fc6d3eaa10690af5f09b22762a3693154e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/138661 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
Note: This repo is read-only, minimized mirror of the Dawn repo.
Tint changes should be made in the Dawn repo.
Tint is a compiler for the WebGPU Shader Language (WGSL).
This is not an officially supported Google product.
TINT_BUILD_SPV_READER
: enable the SPIR-V input reader (off by default)TINT_BUILD_WGSL_READER
: enable the WGSL input reader (on by default)TINT_BUILD_SPV_WRITER
: enable the SPIR-V output writer (on by default)TINT_BUILD_WGSL_WRITER
: enable the WGSL output writer (on by default)TINT_BUILD_FUZZERS
: enable building fuzzzers (off by default)Tint uses Chromium dependency management so you need to install depot_tools and add it to your PATH.
# Clone the repo as "tint" git clone https://dawn.googlesource.com/tint tint cd tint # Bootstrap the gclient configuration cp standalone.gclient .gclient # Fetch external dependencies and toolchains with gclient gclient sync
mkdir -p out/Debug cd out/Debug cmake -GNinja ../.. ninja # or autoninja
mkdir -p out/Debug cd out/Debug cmake ../.. make # -j N for N-way parallel build
mkdir -p out/Debug gn gen out/Debug autoninja -C out/Debug
If you are attempting fuzz, using TINT_BUILD_FUZZERS=ON
, the version of llvm in the XCode SDK does not have the needed libfuzzer functionality included.
The build error that you will see from using the XCode SDK will look something like this:
ld: file not found:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.fuzzer_osx.a
The solution to this problem is to use a full version llvm, like what you would get via homebrew, brew install llvm
, and use something like CC=<path to full clang> cmake ..
to setup a build using that toolchain.
The gn based work flow uses the Chromium toolchain for building in anticipation of integration of Tint into Chromium based projects. This toolchain has additional plugins for checking for style issues, which are marked with [chromium-style] in log messages. This means that this toolchain is more strict then the default clang toolchain.
In the future we will have a CQ that will build this work flow and flag issues automatically. Until that is in place, to avoid causing breakages you can run the [chromium-style] checks using the CMake based work flows. This requires setting CC
to the version of clang checked out by gclient sync
and setting the TINT_CHECK_CHROMIUM_STYLE
to ON
.
mkdir -p out/style cd out/style cmake ../.. CC=../../third_party/llvm-build/Release+Asserts/bin/clang cmake -DTINT_CHECK_CHROMIUM_STYLE=ON ../../ # add -GNinja for ninja builds
Please file any issues or feature requests at https://bugs.chromium.org/p/tint/issues/entry
Please see the contributing guide in the Dawn repo.