commit | 26b401ad9301a42494b352a7bdf71da91363a311 | [log] [tgz] |
---|---|---|
author | Tint team <no-reply@google.com> | Wed Jul 19 11:03:29 2023 +0000 |
committer | Tint LUCI CQ <tint-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jul 19 11:03:29 2023 +0000 |
tree | 0679a8188f7405abd0ece4f95da698749318279b | |
parent | b3ae12e17f2ede176a4c442e0a73231f2770955f [diff] |
Import Tint changes from Dawn Changes: - aa5e77b68bce04114250a15bdf2df2c1a413e2e1 [ir][spirv-writer] Remove logic for depth textures by James Price <jrprice@google.com> - 225479f0a5f2050a8199d4533ceb2c58acd6f41f [ir][spirv-writer] Fix texture builtin return type by James Price <jrprice@google.com> - c6223a1b5d2955ef99528ba3ebcebe40b8741cdd [ir][spirv-writer] Implement all builtin by James Price <jrprice@google.com> - b26348e892ee5cb30b4dfab7078575427085e29c [ir] Fix duplicate StoreVectorElement disassembly. by dan sinclair <dsinclair@chromium.org> - db2743d288cc4dd9996916af6fa70c01b8b61b63 [ir] Add accessor test by dan sinclair <dsinclair@chromium.org> - 937670a0ed00021d0e31dd5f0b58facc7d40c232 [ir][spirv-writer] Handle mix builtin by James Price <jrprice@google.com> - ef8671ca3ec6ed29eca8ca658b584514f08a5fda [ir][spirv-writer] Implement pow builtin by James Price <jrprice@google.com> - 41090b502f341659fff3be7a45f298d13832be63 [ir][spirv-writer] Implement step and smoothstep by James Price <jrprice@google.com> - ee9abc3495095550a4d6bce3ac4d185baa573cbd [ir][spirv-writer] Handle matrix arithmetic by James Price <jrprice@google.com> - 91bbbc4977f14bff6ad86fbde7e4dd40d36f1a2d [ir][spirv-writer] Expand implicit vector splats by James Price <jrprice@google.com> - c5c8f6356450b097c9ac50836874eda48b8c8d04 [ir][spirv-writer] Fix binary and|or for bools by James Price <jrprice@google.com> - 41da0ee63647af1db7fff5709644645d833eac5f [ir][spirv-writer] Implement fma builtin by James Price <jrprice@google.com> - b5996c8db8b2b6ae1af46e0e9f7fec1c43c111e2 [ir][spirv-writer] Implement barrier builtins by James Price <jrprice@google.com> - 6c4de8b23b6406519774c658fa33df45a74b1f1e Tint: Implement bitcast for f16 by Zhaoming Jiang <zhaoming.jiang@intel.com> - e4952f38995194c02e633463ab5ddbb9a18607ad [ir][validation] Move Validator to header file by dan sinclair <dsinclair@chromium.org> - 57c462971bf976c703db46d061186ffd28a43c40 [ir] Fix Builder::Not() for vector types by James Price <jrprice@google.com> - 05c6fd3a29790612b9667e4e21e6f401819e78a2 [ir][spirv-writer] Handle texture sample builtins by James Price <jrprice@google.com> - f7386737af831594412c56decfc76ada1163abb6 [ir][spirv-writer] De-dup depth texture types by James Price <jrprice@google.com> GitOrigin-RevId: aa5e77b68bce04114250a15bdf2df2c1a413e2e1 Change-Id: I173cb706352f7726982f1ecb864e692fc1376e67 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/141400 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.