commit | 104b4fd3dc2201acfabebcd1816e1816734c9c0c | [log] [tgz] |
---|---|---|
author | Tint team <no-reply@google.com> | Wed Jan 31 11:38:26 2024 +0000 |
committer | Tint LUCI CQ <tint-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 31 11:38:26 2024 +0000 |
tree | d68b9bbdf9146a9add7649eda0d84d64ca16f974 | |
parent | 2ad221a9121399bf1c66aeec8c0ab3b006e24b3b [diff] |
Import Tint changes from Dawn Changes: - cc636969b7b7bb04043ca15673c82dc94e7fdc17 [tint][wgsl] Replace size_t with uint32_t for IDs, Source. by Ben Clayton <bclayton@google.com> - 144ebed4c7ee7c6ecddeedfa81d607bbf256e8f2 tint/hlsl: widen scope of workaround of DXC bug with cons... by Antonio Maiorano <amaiorano@google.com> - 0880e0643379ff2535187662cb21a803ce974cfa Rename @index -> @blend_src by Corentin Wallez <cwallez@chromium.org> - dfb4eb05d2a4e65e22fbb3b0441e74f136fa9190 Add @blend_src as an alias for @index. by Corentin Wallez <cwallez@chromium.org> - 31a1592736e3465599145aa6f9ea9333bfd05196 [tint][sem] Replace more uses of std::vector with tint::V... by Ben Clayton <bclayton@google.com> - 8be957f698baa57c87eca49aa5f93315081172a3 [tint] Replace std containers with Tint's containers in n... by Ben Clayton <bclayton@google.com> - 5ff42f8900bae798cfc57d45953d387a994089a9 [tint][core] Don't create throw-away StructMembers by Ben Clayton <bclayton@google.com> - f9ffc45753f3eb668c058b0b8e62a77a0a3cb331 [tint][resolver] Don't create throwaway sem::Parameters by Ben Clayton <bclayton@google.com> - 10f1b6bdb4a7bd8e316d389230471654290cda66 [tint][utils] Fix Hashmap's small vector size by Ben Clayton <bclayton@google.com> - 80144d262ecef9331783faaa8ca4dfa6dfcfd60c [tint][hlsl] Fix names of vector / matrix setter utils by Ben Clayton <bclayton@google.com> - 652353953be36fd60ffc26788e7b5f3833a41dc4 [tint] Move unrestricted_pointer_paramters to kShippedWit... by Ben Clayton <bclayton@google.com> - 4eeb0bd6e2dc3f608a079b7e62ff3fd3befccdef Implement push_constant-based firstIndex transform. by Stephen White <senorblanco@chromium.org> - c65ac40803c289104fa26156113ebfd37280dd7a [tint][wgsl] Consider builtin calls as part of ptr analysis by Ben Clayton <bclayton@google.com> - 868380669fb051756b154d531beb805a990a6674 Move ClampFragDepth transform to WGSL transforms. by Stephen White <senorblanco@chromium.org> - c6ed507397f87c5ee96b01d2eed3eb77a0899c25 [tint][wgsl] Use tint's containers for ptr analysis by Ben Clayton <bclayton@google.com> - 02262d895ff373badfc4d2233f8e14108d185687 [tint][msl] Fix C++17 warning. by Ben Clayton <bclayton@google.com> - a840d5132ac88153efb26c92a24178d7d68eddef Replace CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR by amirsojoodi <amir@distributive.network> - 15d2710c84b3420bd20da25b8ccbe5681521df84 Remove data returned from `TextureBuiltinFromUniform` tra... by dan sinclair <dsinclair@chromium.org> GitOrigin-RevId: cc636969b7b7bb04043ca15673c82dc94e7fdc17 Change-Id: I949ec6ab831105ee01a2b5e92e96db023a9a469e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/171360 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.