Roll third_party/spirv-tools/ ecdd9a3e6..640b17b5f (31 commits)ecdd9a3e6b..640b17b5fb
$ git log ecdd9a3e6..640b17b5f --date=short --no-merges --format='%ad %ae %s' 2021-07-14 pkasting Fix -Wunreachable-code-aggressive. (#4358) 2021-07-14 jaebaek spirv-opt: support SPV_EXT_shader_image_int64 (#4379) 2021-07-14 afdx Fix BUILD.gn (#4378) 2021-07-13 afdx spirv-fuzz: support building using gn (#4365) 2021-07-13 greg Fix vendor table build in BUILD.gn for nonsemantic.vulkan.debuginfo.100 (#4375) 2021-07-12 greg Add non-semantic vulkan extended instruction set (#4362) 2021-07-07 ynovikov Update SPIRV-Headers deps (#4369) 2021-07-06 alastair.donaldson spirv-reduce: Eliminate skeletal structured control flow construct (#4360) 2021-07-05 alastair.donaldson spirv-fuzz: Check updated analyses in transformation tests (#4266) 2021-07-04 alastair.donaldson spirv-fuzz: Added tests for signedness analysis (#4361) 2021-07-02 stevenperron Add remove_unused_interface_variable_pass.* to BUILD.gn (#4363) 2021-07-02 ben.ashbaugh add tests for SPV_KHR_bit_instructions (#4350) 2021-07-01 alastair.donaldson spirv-fuzz: Avoid out of bounds access (#4355) 2021-06-29 61806567+TheMostDiligent Enabled tvOS platform (#4329) 2021-06-29 3.1416f spirv-opt: A pass to removed unused input on OpEntryPoint instructions. (#4275) 2021-06-29 stevenperron Bump glob-parent from 5.0.0 to 5.1.2. (#4353) 2021-06-29 johnzupin fix strncpy bound error (#4331) 2021-06-28 alastair.donaldson spirv-reduce: Allow merging unreachable blocks (#4303) 2021-06-28 alastair.donaldson Add IsReachable function to IRContext (#4323) 2021-06-28 alastair.donaldson spirv-reduce: Cleanup a few things (#4352) 2021-06-24 alastair.donaldson spirv-fuzz: Add illustrative tests for new issues (#4347) 2021-06-24 jason.ekstrand Add validation for SPV_EXT_shader_atomic_float16_add (#4325) 2021-06-23 kpet Initial support for SPV_KHR_integer_dot_product (#4327) 2021-06-23 dneto fix symbol exports check, for Android build cases (#4342) 2021-06-22 dnovillo Start SPIRV-Tools v2021.3 2021-06-22 dnovillo Finalize SPIRV-Tools v2021.2 2021-06-21 46493288+sfricke-samsung spirv-val: Label VUID 04780 (#4334) 2021-06-21 46493288+sfricke-samsung spirv-val: Add GLCompute to VUID 04644 message (#4333) 2021-06-18 dnovillo Update CHANGES file for upcoming release. 2021-06-17 alanbaker Update SPIRV-Headers deps (#4328) 2021-06-15 alanbaker Support SPV_KHR_subgroup_uniform_control_flow (#4318) Created with: roll-dep third_party/spirv-tools Change-Id: I5e6534f9118ff2f633552c1149c03f2e06cb721c Roll third_party/spirv-headers/ f5417a4b6..1d4e3a7e3 (9 commits)f5417a4b66..1d4e3a7e3a
$ git log f5417a4b6..1d4e3a7e3 --date=short --no-merges --format='%ad %ae %s' 2021-07-09 mariusz.merecki Add missing capabilities and '"version" : "None"' to QuantizationModes and OverflowModes enumerants 2021-07-07 kevin.petit Fix grammar for PackedVectorFormat 2021-06-25 mariya.podchishchaeva Upstream SPV_INTEL_debug_module 2021-06-24 13504385+WyvernWang reserve value range 2021-06-23 ben.ashbaugh add support for SPV_KHR_bit_instructions 2021-06-23 kevin.petit Add CI using Github actions and update README 2020-05-22 dneto Support SPV_KHR_integer_dot_product 2021-01-12 jason.ekstrand Add header changes for SPV_EXT_shader_atomic_float16_add 2021-06-16 john Fix two ordering problems. Created with: roll-dep third_party/spirv-headers Change-Id: Icfe131fd8bdf3b9fd8fa400ba804d2ea57d27562 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58301 Auto-Submit: David Neto <dneto@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
Tint
Tint is a compiler for the WebGPU Shader Language (WGSL).
This is not an officially supported Google product.
Requirements
- Git
- CMake (3.10.2 or later)
- Ninja (or other build tool)
- Python, for fetching dependencies
- depot_tools in your path
Build options
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)
Building
Tint uses Chromium dependency management so you need to install depot_tools and add it to your PATH.
Getting source & dependencies
# 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
Compiling using CMake + Ninja
mkdir -p out/Debug
cd out/Debug
cmake -GNinja ../..
ninja # or autoninja
Compiling using CMake + make
mkdir -p out/Debug
cd out/Debug
cmake ../..
make # -j N for N-way parallel build
Compiling using gn + ninja
mkdir -p out/Debug
gn gen out/Debug
autoninja -C out/Debug
Fuzzers on MacOS
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.
Checking [chromium-style] issues in CMake builds
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
Issues
Please file any issues or feature requests at https://bugs.chromium.org/p/tint/issues/entry
Contributing
Please see the CONTRIBUTING and CODE_OF_CONDUCT files on how to contribute to Tint.
Tint has a process for supporting experimental extensions.