CMake-only fork of https://dawn.googlesource.com/dawn with cleaned, vendored dependencies
Go to file
dan sinclair dc9d3e0cd5 Roll dependencies
Roll third_party/googletest/ 389cb68b8..f3ef7e173 (40 commits)

389cb68b87..f3ef7e173f

$ git log 389cb68b8..f3ef7e173 --date=short --no-merges --format='%ad %ae %s'
2021-02-04 absl-team Googletest export
2021-02-03 dmauro Googletest export
2021-02-03 absl-team Googletest export
2021-02-02 absl-team Googletest export
2021-02-02 absl-team Googletest export
2021-02-02 absl-team Googletest export
2021-02-02 dmcardle Googletest export
2021-02-02 absl-team Googletest export
2021-02-01 absl-team Googletest export
2021-01-27 absl-team Googletest export
2021-01-27 absl-team Googletest export
2021-01-26 absl-team Googletest export
2021-01-26 absl-team Googletest export
2021-01-25 absl-team Googletest export
2021-01-25 absl-team Googletest export
2021-01-22 absl-team Googletest export
2021-01-20 absl-team Googletest export
2021-01-20 ofats Googletest export
2021-01-19 absl-team Googletest export
2021-01-19 absl-team Googletest export
2021-01-19 krzysio Googletest export
2021-01-19 absl-team Googletest export
2021-01-16 dreamer.tan Fix link to Google Test Primer
2021-01-15 absl-team Googletest export
2021-01-15 absl-team Googletest export
2021-01-14 absl-team Googletest export
2021-01-14 absl-team Googletest export
2021-01-10 krystian.kuzniarek fix a broken link
2021-01-13 dmauro Googletest export
2021-01-13 dmauro Googletest export
2021-01-13 absl-team Googletest export
2021-01-08 absl-team Googletest export
2021-01-07 absl-team Googletest export
2021-01-05 absl-team Googletest export
2021-01-05 absl-team Googletest export
2021-01-05 absl-team Googletest export
2020-12-29 absl-team Googletest export
2021-01-06 davidben Restore GTEST_ATTRIBUTE_PRINTF_ on ColoredPrintf
2021-01-03 krystian.kuzniarek remove explicit function overloads of CmpHelper?? for BiggestInt arguments
2020-12-25 mattias.ellert Fix gtest-help-test failure on GNU/kFreeBSD

Created with:
  roll-dep third_party/googletest

Roll third_party/spirv-headers/ faa570afb..75b30a659 (4 commits)

faa570afbc..75b30a659c

$ git log faa570afb..75b30a659 --date=short --no-merges --format='%ad %ae %s'
2020-08-19 jason Add header changes for SPV_EXT_shader_atomic_float_min_max
2021-01-27 jason.ekstrand Re-run buildSpvHeaders to fix indentation
2021-01-19 dneto Header generator: Check enumerant ordering
2021-01-05 ben.ashbaugh add function control bitfield reservation section reserve bit 16 for an upcoming Intel extension

Created with:
  roll-dep third_party/spirv-headers

Roll third_party/gpuweb-cts/ 89ba81c39..d836e71f2 (20 commits)

89ba81c395..d836e71f29

$ git log 89ba81c39..d836e71f2 --date=short --no-merges --format='%ad %ae %s'
2021-02-11 corentin Implement some of api:validation:vertex_state (#461)
2021-02-10 kainino standardizeExtent3D
2021-02-10 kainino factor out makeBufferWithContents
2021-02-10 kainino add more texture format subtypes
2021-02-09 kainino roll types
2021-02-10 kainino renames in operation test helpers
2021-02-03 kainino use new helpers, subcases, selectDevice in operation tests
2021-02-03 kainino [trivial] Move helpers to util/texture/image_copy.ts
2021-02-10 jamesprice.dev Remove explicit storage class from samplers/textures (#464)
2021-02-08 enrico.galli Add button to print creation stack to console in /standalone/ (#457)
2021-02-08 corentin Update the test plan for validation/vertex_state (#458)
2021-02-05 shrekshao Update wgsl comments from # to // (#456)
2021-02-04 kainino Use subcases in copyImageBitmapToTexture tests (#453)
2021-02-04 kainino Update copyBetweenLinearDataAndTexture tests for new bytesPerRow/rowsPerImage rules (#452)
2021-02-03 kainino fix "INFO: subcase:" prints (#454)
2021-02-01 9856269+sarahM0 [wgsl] validation v-0040: uniform and storage buffer are declared with group and binding decorations. (#428)
2021-02-01 kainino Loosen precision in multisample resolve operation test (#446)
2021-02-01 shrekshao Add sampler anisotropy tests (#437)
2021-02-01 tojiro Update defaultQueue->queue, OUTPUT_ATTACHMENT->RENDER_ATTACHMENT to match latest spec (#449)
2021-02-01 kainino add todos in createView tests (#450)

Created with:
  roll-dep third_party/gpuweb-cts

Roll third_party/spirv-tools/ 297723d75..cfa1dadb1 (6 commits)

297723d75a..cfa1dadb1e

$ git log 297723d75..cfa1dadb1 --date=short --no-merges --format='%ad %ae %s'
2021-02-10 dj2 Update a few virtuals to overrides. (#4143)
2021-02-05 46493288+sfricke-samsung spriv-val: Vulkan image gather constant component (#4133)
2021-02-05 46493288+sfricke-samsung spirv-val: Fix/Label UniformConstant VUID (#4134)
2021-02-05 46493288+sfricke-samsung spirv-val: Add Vulkan Invariant Decoration VUID (#4132)
2021-02-02 46493288+sfricke-samsung spirv-val: label tests for VUID 04657 (#4119)
2021-02-01 46493288+sfricke-samsung spirv-val: Add Vulkan PSB64 convert VUID (#4122)

Created with:
  roll-dep third_party/spirv-tools

Change-Id: I5632e3eed6d8e8731faeb4800e903a8893a60f9f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/41560
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2021-02-11 15:04:03 +00:00
build_overrides Remove obsolete GN config 2021-01-18 15:25:23 +00:00
docs Update builtin idx names. 2021-01-18 15:51:13 +00:00
fuzzers Add semantic::Node 2021-01-29 15:17:30 +00:00
include/tint tint.h: Remove the type_determiner.h include 2021-02-10 21:48:55 +00:00
infra/config Restrict Windows to Win10 bots 2021-01-27 19:24:25 +00:00
samples Stub sanitizer transforms for the hlsl, msl & spirv writers 2021-02-10 21:22:03 +00:00
src Add SymbolTable::New() 2021-02-11 14:54:41 +00:00
test Update storage_buffer storage class. 2021-01-18 21:06:34 +00:00
third_party Fixup build issues. 2021-02-10 16:57:24 +00:00
tools Add tool to check the WGSL spec examples compile 2021-01-07 01:44:11 +00:00
.clang-format Initial commit 2020-03-02 15:47:43 -05:00
.gitignore Fix typos in CMakeLists 2021-01-18 21:39:14 +00:00
.gn Fixup gn check. 2020-12-02 16:11:59 +00:00
BUILD.gn IntrinsicTable: Fix a number of TODOs 2021-02-10 21:34:25 +00:00
CMakeLists.txt CMake: Add a flag to control whether to built tint_unittests 2020-12-09 14:47:30 +00:00
CODE_OF_CONDUCT.md Initial commit 2020-03-02 15:47:43 -05:00
CONTRIBUTING.md Fixup the contributing file. 2020-04-06 18:43:20 +00:00
CPPLINT.cfg Adding PRESUBMIT.py with a bunch of checks turned on 2020-06-03 13:41:41 +00:00
DEPS Roll dependencies 2021-02-11 15:04:03 +00:00
Doxyfile [wgsl-reader][wgsl-writer] Support new sampled texture syntax. 2020-11-04 19:03:21 +00:00
LICENSE Initial commit 2020-03-02 15:47:43 -05:00
PRESUBMIT.py Add language check 2020-11-16 15:01:27 +00:00
README.md One command per line 2020-10-30 15:03:21 +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.