commit | 85e8e10c7ad7829afd7ff7f095d098e63a7e9cdf | [log] [tgz] |
---|---|---|
author | Tint team <no-reply@google.com> | Wed Dec 13 10:13:35 2023 +0000 |
committer | Tint LUCI CQ <tint-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Dec 13 10:13:35 2023 +0000 |
tree | b6fe14fea324b89184bb0c02fe8562e6c7c6a9fb | |
parent | 649715f1de9c9681ef2ce3d46ffbff67409ad9a8 [diff] |
Import Tint changes from Dawn Changes: - 109e648f2f452424d2d1d0b1eba1e1b9fe036645 Support const expression with dot4{I|U}8Packed by Jiawei Shao <jiawei.shao@intel.com> - 0f64392b2721f3fe759ad0fe1dc5d6a9fe289653 Tint/MSL: Fix translation of dot4{I|U}8Packed by Jiawei Shao <jiawei.shao@intel.com> - 4a66dd3f407d2ad25ef20ba7b870bd90a91bde9c [spirv-reader] Add --use-ir-reader option to exe by James Price <jrprice@google.com> - cbd7bc52f397f316d5251861203bdc1f6ad0bb65 [tint][ir] Serialize If instructions by Ben Clayton <bclayton@google.com> - 65d0b6d452fb90f0d7617f96fabf000bc10cbf5d [tint][ir] Serialize Atomics by Ben Clayton <bclayton@google.com> - abd95badaa3a4112f6e2964f550497fd3e4af643 [tint][ir] Serialize Convert instructions by Ben Clayton <bclayton@google.com> - fb728a34f167b35190041b1c21c3bba02a4c1707 [wgsl-writer] Add ProgramOptions for IR->AST by James Price <jrprice@google.com> - 2735fb1962246442021a3bb1e525d982daa2744a [spirv-reader] Add entry point for IR parser by James Price <jrprice@google.com> - cdcbe83771d83d5145ab81d471d0ae47b4637a9d [tint][ir] Serialize CoreBuiltinCall instruction by Ben Clayton <bclayton@google.com> - c027f09d4948116b9974f518ffc9ec4b6b176b43 [tint][ir] Serialize struct types by Ben Clayton <bclayton@google.com> - e6d2d2a94d619d83797472d1a1e7cad0cc86e240 [tools] Add --vebose flag to tint_remote_compile by Ben Clayton <bclayton@google.com> GitOrigin-RevId: 109e648f2f452424d2d1d0b1eba1e1b9fe036645 Change-Id: I7e844f58113784a4dd34c12442c13bc10d548b76 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/165320 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@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.