CMake-only fork of https://dawn.googlesource.com/dawn with cleaned, vendored dependencies
Go to file
Corentin Wallez f490798fe6 Roll spirv-headers and spirv-tools
Roll third_party/spirv-headers/ 1d4e3a7e3..ae217c178 (13 commits)

1d4e3a7e3a..ae217c1780

$ git log 1d4e3a7e3..ae217c178 --date=short --no-merges --format='%ad %ae %s'
2021-09-16 gleese Remove 'Kernel' capability from fast-math flags
2021-09-09 74654571+BedrockDotPng Update CMakeLists.txt
2021-08-27 greg Add nonsemantic.shader.debuginfo to Bazel
2021-07-28 marijn spirv.core.grammar: Remove duplicate OpArbitraryFloatPowNINTEL declaration
2021-08-10 alele Add support for SPV_NV_ray_tracing_motion_blur.
2021-07-28 nikita.rudenko Fix minor details in SPV_INTEL_optnone extension
2021-07-28 nikita.rudenko Implement SPV_INTEL_optnone extension (#230)
2021-07-20 gleese Correct grammar for LocalSizeHintId
2021-06-28 frustumo Clay is an internal framework of Tellusim Technologies Inc.
2021-05-20 kloczek Rename spirv-headers.pc to SPIRV-Headers.pc
2021-05-19 kloczek removed excesive space in configure_file() line
2021-05-19 kloczek Fixed substituted string with paths and version
2021-05-18 kloczek Add spirv-headers pkgconfig file

Roll third_party/spirv-tools/ 640b17b5f..c3adcb034 (86 commits)

640b17b5fb..c3adcb034f

$ git log 640b17b5f..c3adcb034 --date=short --no-merges --format='%ad %ae %s'
2021-09-24 stevenperron Adce refactor (NFC) (#4547)
2021-09-24 greg Handle NonSemantic.Shader Debug[No]Line (#4530)
2021-09-23 greg Fix inst_buff_addr_check to handle struct loads (#4489)
2021-09-23 jmadill GN: Fix build for debuginfo codegen. (#4536)
2021-09-22 alanbaker Update SPIRV-Headers (#4543)
2021-09-21 alanbaker Fix checks for offset in nested structs (#4531)
2021-09-21 afdx Fix UBSan error in spirv-dis fuzzer (#4517)
2021-09-20 stevenperron Fix extract with out-of-bounds index (#4529)
2021-09-15 greg spirv-opt: Switch from Vulkan.DebugInfo to Shader.DebugInfo (#4493)
2021-09-15 greg Add preserve_interface mode to aggressive_dead_code_elim (#4520)
2021-09-14 afdx spirv-fuzz: Account for differing signedness in WrapVectorSynonym (#4414)
2021-09-14 afdx spirv-opt: Avoid integer overflow during constant folding (#4511)
2021-09-14 stevenperron Roll external/googletest/ b7d472f12..955c7f837 (111 commits) (#4521)
2021-09-13 alanbaker Fix infinite loop in validation (#4523)
2021-09-13 afdx Fix UBSan kokoro config (#4522)
2021-09-13 alanbaker Fix bad order of checks in atomic validation (#4524)
2021-09-13 stevenperron Handle out-of-bounds accesses in VDCE (#4518)
2021-09-12 alanbaker Change validator boolean tests to avoid asserts (#4503)
2021-09-10 alanbaker Fix infinite loop in GetBlockDepth (#4519)
2021-09-10 dneto Fix validation message for cooperative matrix column type (#4502)
2021-09-10 afdx Add UBSan kokoro configuration (#4512)
2021-09-08 alanbaker Add some missing switch validation (#4507)
2021-09-07 afdx spirv-val: Fix ubsan error (#4505)
2021-09-07 gleese Remove environment features that are never used (#4491)
2021-09-03 dneto fix parsing of bad binary exponents in hex floats (#4501)
2021-09-02 afdx Adjust build for fuzzer targets to support OSS-Fuzz (#4498)
2021-09-02 jaebaek Set threshold for reduce-load-size pass (#4499)
2021-08-31 stevenperron Handle exported functions in ADCE (#4495)
2021-08-30 antiagainst Only add `-DSPIRV_CHECK_CONTEXT` for Debug builds (#4496)
2021-08-27 kubak spirv-lint: Add lint based on divergence analysis (#4488)
2021-08-26 gleese Add a feature for allowing LocalSizeId (#4492)
2021-08-25 jaebaek Start SPIRV-Tools v2021.4
2021-08-25 jaebaek Finalize SPIRV-Tools v2021.3
2021-08-24 jaebaek Update CHANGES
2021-08-23 greg spirv-val: Validate vulkan debug info similarly to opencl debug info (#4466)
2021-08-23 52670911+dong-ja Add divergence analysis to linter (#4465)
2021-08-19 46493288+sfricke-samsung spirv-val: Fix WorkgroupSize VUID 04425 (#4482)
2021-08-18 52670911+dong-ja spirv-lint: add basic CLI argument handling (#4478)
2021-08-18 alanbaker Fix matrix stride validation (#4468)
2021-08-18 alanbaker Don't double count variables for location validation (#4474)
2021-08-18 jmadill GN: Suppress unreachable code warnings. (#4476)
2021-08-18 jaebaek Add spirv-opt convert-to-sampled-image pass (#4340)
2021-08-16 alanbaker Disallow loading a runtime-sized array (#4473)
2021-08-16 nicolas.capens Fix early-out for Clamp constant folding (#4461)
2021-08-16 nicolas.capens Don't fold unsigned divides of an constant and a negation (#4457)
2021-08-16 61918637+5265644D61736F6E fix SIGSEGV when reading from a non-existant file (#4453)
2021-08-13 alanbaker Limit location validation (#4467)
2021-08-12 alanbaker Update SPIRV-Headers (#4463)
2021-08-10 greg spirv-opt: Add handling of vulkan debug info to DebugInfoManager (#4423)
2021-08-09 52670911+dong-ja spirv-opt: Add dataflow analysis framework (#4402)
2021-08-09 52670911+dong-ja Remove PCH from source/lint/CMakeLists.txt (#4459)
2021-08-06 52670911+dong-ja Add new target for spirv-lint (#4446)
2021-08-06 alanbaker Add a section releases to the README (#4444)
2021-08-05 alanbaker Fix array layout validation slowdown (#4449)
2021-08-05 mostaphaashraf1996 spirv-fuzz: Support AtomicStore (#4440)
2021-08-05 bclayton fuzzers: Disable suggest-destructor-override warning (#4439)
2021-08-05 afdx Add CMake rules for libFuzzer targets (#4445)
2021-08-03 mostaphaashraf1996 spirv-fuzz: support AtomicLoad (#4330)
2021-08-03 alastair.donaldson Add GraphicsFuzz shaders to fuzzer corpus (#4429)
2021-08-02 bclayton Fuzzer: Default the new constructor parameter (#4438)
2021-07-29 alanbaker Fix validator crash (#4418)
2021-07-29 alastair.donaldson spirv-fuzz: Add minimal SPIR-V example to test shaders (#4415)
2021-07-29 52670911+dong-ja spirv-opt: Rename ControlDependenceAnalysis::DoesBlockExist to HasBlock (#4412)
2021-07-28 greg spirv-opt: Add specific handling of vulkan debug info differences (#4398)
2021-07-28 alastair.donaldson spirv-fuzz: Allow inapplicable transformations to be ignored (#4407)
2021-07-28 alastair.donaldson spirv-fuzz: Quit fuzzer pass when no types are available (#4409)
2021-07-28 52670911+dong-ja spirv-opt: Add more tests to control dependence  (#4410)
2021-07-28 52670911+dong-ja Add control dependence analysis to opt (#4380)
2021-07-27 alastair.donaldson spirv-fuzz: Use reference in CanMakeSynonymOf (#4401)
2021-07-26 kqenro Fix public deps on generated headers (#4386)
2021-07-25 cwallez BUILD.gn: introduce finer grained internal targets for Tint (#4399)
2021-07-23 vasniktel Initialize context in `opt::Instruction`'s move constructor (#4397)
2021-07-22 alastair.donaldson spirv-fuzz: Fix problem with instruction context (#4394)
2021-07-22 alastair.donaldson spirv-fuzz: Avoid out-of-bounds access (#4395)
2021-07-22 alastair.donaldson spirv-fuzz: Fix vector wrapping fuzzer pass (#4392)
2021-07-22 afdx spirv-fuzz: Tighten checks on null and undef pointers (#4367)
2021-07-22 alanbaker Fix local size hint id tests (#4400)
2021-07-21 greg spirv-opt: Where possible make code agnostic of opencl/vulkan debuginfo (#4385)
2021-07-20 jamessliu2020 spirv-fuzz: TransformationWrapVectorSynonym that rewrites scalar operations using vectors (#4376)
2021-07-20 mostaphaashraf1996 spirv-fuzz: Support atomic operations opcode (#4348)
2021-07-16 olvaffe CMake: add ENABLE_RTTI option (#4382)
2021-07-16 greg Add common enum for debug info instructions from either opencl or vulkan (#4377)
2021-07-16 kubak Don't mention VS2013 in PR review instructions (#4384)
2021-07-16 kubak Explain how to run tests with CMake and Bazel (#4383)
2021-07-15 mostaphaashraf1996 spirv-fuzz: Don't replace memory semantics / scope operands (#4349)
2021-07-15 jmadill Add missing fuzzer header dependency. (#4381)

Created with:
  roll-dep third_party/spirv-tools
Created with:
  roll-dep third_party/spirv-headers

Change-Id: I0983f72c8fa3fe7a4c844b43402b3c02fc40ebdf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65264
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-09-28 15:40:27 +00:00
.vscode .vscode: Fix quotations in windows 'configure' task 2021-07-21 13:24:21 +00:00
build_overrides Remove obsolete GN config 2021-01-18 15:25:23 +00:00
docs wgsl-reader: reject identifiers starting with underscrore 2021-09-20 14:38:45 +00:00
fuzzers Regex fuzzer: Add return statement inside a randomly-chosen function 2021-09-28 14:57:54 +00:00
include/tint Remove TINT_EXPECTS_UBOS_TO_BE_MULTIPLE_OF_16 macro 2021-07-19 14:54:19 +00:00
infra/config Add an infra specific PRESUBMIT.py 2021-07-20 18:48:26 +00:00
kokoro Kokoro: Move the clean checkout to tmpfs 2021-09-20 19:30:35 +00:00
samples Fix build when TINT_BUILD_[WGSL|SPV|MSL|HLSL]_[READER|WRITER] are toggled off 2021-09-03 14:16:56 +00:00
src transform: Avoid symbol collision in Canonicalize IO 2021-09-27 21:40:33 +00:00
test transform: Avoid symbol collision in Canonicalize IO 2021-09-27 21:40:33 +00:00
third_party CMake: Massage CMakeLists for use by NodeJS bindings 2021-09-20 19:47:05 +00:00
tools cts: fix generated test names in get-test-plan tool 2021-09-13 23:26:00 +00:00
.clang-format Initial commit 2020-03-02 15:47:43 -05:00
.gitignore Add spirv-tools fuzzer 2021-06-24 18:10:46 +00:00
.gn Get `gn gen --check` actually working in repo 2021-04-21 19:05:14 +00:00
AUTHORS Add spirv-tools fuzzer 2021-06-24 18:10:46 +00:00
BUILD.gn BUILD.gn: Remove the temporary group with Dawn migrated. 2021-03-17 07:41:03 +00:00
CMakeLists.txt CMake: Massage CMakeLists for use by NodeJS bindings 2021-09-20 19:47:05 +00:00
CMakeSettings.json Add CMakeSettings.json with convenient defaults 2021-03-16 18:52:53 +00:00
CODE_OF_CONDUCT.md Initial commit 2020-03-02 15:47:43 -05:00
CONTRIBUTING.md Add a style guide 2021-04-08 15:10:47 +00:00
CPPLINT.cfg Adding PRESUBMIT.py with a bunch of checks turned on 2020-06-03 13:41:41 +00:00
DEPS Roll spirv-headers and spirv-tools 2021-09-28 15:40:27 +00:00
Doxyfile Implement AST fuzzer 2021-07-13 12:01:25 +00:00
LICENSE Initial commit 2020-03-02 15:47:43 -05:00
OWNERS Reduce OWNERS to 4 people 2021-08-24 09:59:31 +00:00
PRESUBMIT.py Force Python 3 in presubmit 2021-07-20 17:16:31 +00:00
README.md Proposed process for experimental extensions 2021-04-27 17:55:07 +00:00
standalone.gclient Convert dependency management to using gclient 2020-03-05 15:58:27 +00:00
tint_overrides_with_defaults.gni Change the default for BUILD.gn to build all the modules 2020-07-30 18:44:04 +00:00

README.md

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.