commit | cbfc1e5d17f1492521eec82861045fc646f48ada | [log] [tgz] |
---|---|---|
author | Tint team <no-reply@google.com> | Thu May 25 09:56:52 2023 +0000 |
committer | Tint LUCI CQ <tint-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 25 09:56:52 2023 +0000 |
tree | 9d9459bde9edc2d1f66fa3e722d0054956957dbb | |
parent | 908f7b8f2d59284aac47d31446457518fe4f3726 [diff] |
Import Tint changes from Dawn Changes: - 4b35f52f9b33eb358a01170ad2fd334f2b5b4347 [ir] Remove IsConnected by dan sinclair <dsinclair@chromium.org> - a00fe39f3e823ad38aeb2c575daf94848977a961 [ir] Remove FlowNode. by dan sinclair <dsinclair@chromium.org> - 0eb4d04d83e8f1565e9dc527f6d84fdbc0268aa8 [ir][spirv-writer] Expand binary arithmetic tests by James Price <jrprice@google.com> - dd7b3141052053ce7e83057b6f82e4da9ec846af [ir][spirv-writer] Emit binary bitwise operators by James Price <jrprice@google.com> - 59339216a1f625bce1eded49022c286e1cd53aa3 [ir][spirv-writer] Emit comparison instructions by James Price <jrprice@google.com> - 1e67e5368d30d5c0ea8669b9c254f03ad86617f0 [tint][constant] Use the new constant::Manager by Ben Clayton <bclayton@google.com> - a71bd22de1263cbf5e7774e0abad9653b77cec42 [tint][constant] Make Value::Clone() return a const pointer by Ben Clayton <bclayton@google.com> - 9aa8012d91e5603650532ad1bd90f8d38b3583e2 [tint][constant] Add constant::Manager by Ben Clayton <bclayton@google.com> - 56e5fb57ef241ce5c9937faacf64d792bccd5856 [ir] Convert function to Value. by dan sinclair <dsinclair@chromium.org> - a518707db4a6d785ce82ea359b9f0a8d426937e3 [ir] Update disassembly output. by dan sinclair <dsinclair@chromium.org> - f55ef5e48b14121017d315aa4c18c4b3e58c61a1 [ir] Convert FlowNode to Block where possible. by dan sinclair <dsinclair@chromium.org> - 0089d5e6e2f9915b8867f68b758c8b467e2116b4 [ir] Change base class for terminators. by dan sinclair <dsinclair@chromium.org> - e9a4adeff959518ee876ee61734c93967ed906e8 [ir] Remove Jump. by dan sinclair <dsinclair@chromium.org> - 24c5ed6b0a5ab8ad7b5f708fa6f89dd1ac777e07 [ir][spirv-writer] Emit matrix constants by James Price <jrprice@google.com> - a8c528052d67f37b9a1e7c7cb9a4e10d927e065b [ir][spirv-writer] Emit matrix types by James Price <jrprice@google.com> - b54b58d57df2e26e0b6dd8aa87e730b1f7f818f8 [ir][spirv-writer] Implement user function calls by James Price <jrprice@google.com> - c1fd6316de4817f1d1a5caef97a5623e384e472c [fuzzers] Substitute all override variables by James Price <jrprice@google.com> - 1ea7f0f351856153e7f51b7a2695da658df38600 [ir][spirv-writer] Add support for parameters by James Price <jrprice@google.com> - f5a62539f4ea16999fbdac588793aa3a47f0d8b0 [ir][spirv-writer] Add support for return values by James Price <jrprice@google.com> - 23c0451377ec6c31c5d5b898595d860b605992de [ir] Add scalar type helpers to type::Manager by James Price <jrprice@google.com> GitOrigin-RevId: 4b35f52f9b33eb358a01170ad2fd334f2b5b4347 Change-Id: I7b21e9697ef4855fefaac7fa557cc341d6b495f4 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/134380 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.