CMake-only fork of https://dawn.googlesource.com/dawn with cleaned, vendored dependencies
Go to file
David Neto c3bbb4d079 Roll third_party dependencies
Roll third_party/gpuweb-cts/ dea8ed8c2..177a4faf0 (25 commits)

dea8ed8c2b..177a4faf0a

$ git log dea8ed8c2..177a4faf0 --date=short --no-merges --format='%ad %ae %s'
2021-04-06 enga Implement api,operation,rendering,draw:vertex_attributes,basic (#522)
2021-04-06 enga Implement api,operation,render_pipeline,primitive_topology:unaligned_vertex_count (#524)
2021-04-06 enga Convert primitive topology tests to a single parameterized test (#523)
2021-04-06 shrekshao Some depth related tests (#519)
2021-04-06 yunchao.he Fix a bug in createTexture validation for multisample (#521)
2021-04-05 enga node.tsconfig.json: include more files (#520)
2021-04-02 enga gen_wpt_cts_html: Split lines by either \r\n or \n (#517)
2021-04-02 enga checklist.ts: Split lines by either \r\n or \n (#518)
2021-03-31 enga Fix multicase test expectation filtering (#516)
2021-03-30 enga WPT: Pass expectations to worker.run (#515)
2021-03-25 shrekshao Fix wgsl .0 suffix to indicate f32 type (#514)
2021-03-25 hao.x.li Clean up TODOs for queries validation (#511)
2021-03-24 enrico.galli Add validation tests for setBindGroup (#493)
2021-03-24 enga Fix check of `loadWebGPUExpectations` for undefined (#512)
2021-03-18 kainino Add stubs for new tests and organize a few old ones (#510)
2021-03-19 jiawei.shao Add validation tests on buffer offset in B2T and T2B copies with depth stencil formats (#506)
2021-03-18 2154796+austinEng Support passing skip/fail test expectations in wpt or by command line (#509)
2021-03-18 kainino capability_checks tests should expect exceptions not validation errors (#508)
2021-03-18 2154796+austinEng Implement api,operation,rendering,draw:arguments:* (#498)
2021-03-18 hao.x.li Add validation tests plan for Occlusion Query (#491)
2021-03-11 kainino Add a tool to verify tracking spreadsheet
2021-03-17 kainino move an error out of loadTreeForQuery
2021-03-17 kainino add includeEmptySubtrees to iterateSubtreeCollapsedQueries
2021-03-17 kainino Add StacklessError for less annoying fatal errors in scripts
2021-03-17 2154796+austinEng Don't validate test modules in `makeListing` (#507)

Created with:
  roll-dep third_party/gpuweb-cts

Change-Id: I60610afcd9533fc6905134a1b224c9946a475316

Roll third_party/spirv-tools/ 4f498774d..212895d4c (21 commits)

4f498774db..212895d4c2

$ git log 4f498774d..212895d4c --date=short --no-merges --format='%ad %ae %s'
2021-04-02 alastair.donaldson Typo fix (#4225)
2021-03-31 greg Add interpolate legalization pass (#4220)
2021-03-27 alastair.donaldson spirv-fuzz: Efficiency improvements to fuzzer pass (#4188)
2021-03-27 alastair.donaldson spirv-fuzz: Avoid invalidating analyses when splitting blocks (#4218)
2021-03-27 alastair.donaldson spirv-fuzz: Do not add too many dead blocks (#4217)
2021-03-26 alastair.donaldson spirv-fuzz: Optimize transformations (#4216)
2021-03-25 vasniktel spirv-fuzz: Fix comments #4215
2021-03-24 jason Add validation for SPV_EXT_shader_atomic_float_min_max (#4105)
2021-03-23 dneto Make spirv-tools-build-version a common dependency (#4210)
2021-03-23 alastair.donaldson spirv-fuzz: Call by value and move in transformations (#4208)
2021-03-23 alastair.donaldson spirv-fuzz: Remove destructors from FuzzerPass subclasses (#4209)
2021-03-23 alastair.donaldson spirv-fuzz: Improve transformation test oracles (#4207)
2021-03-21 vasniktel spirv-fuzz: Add WGSL compatibility flag to context (#4193)
2021-03-20 alastair.donaldson spirv-fuzz: Avoid invalidating analyses in various transformations (#4205)
2021-03-20 alastair.donaldson spirv-fuzz: Manage available instructions efficiently (#4177)
2021-03-20 alastair.donaldson spirv-fuzz: Remove AddType methods from fuzzerutil (#4204)
2021-03-19 46493288+sfricke-samsung spirv-val: Refactor of atomic pass (#4200)
2021-03-19 46493288+sfricke-samsung spirv-val: Label VUID 04643 (#4202)
2021-03-19 46493288+sfricke-samsung spirv-val: Label VUID 04667 (#4201)
2021-03-19 alastair.donaldson spirv-fuzz: Apply fuzzer pass before checking exit conditions (#4199)
2021-03-18 46493288+sfricke-samsung spirv-val: Fix Int64Atomics check (#4192)

Created with:
  roll-dep third_party/spirv-tools

Change-Id: Ieac13912b9899fe70b8b304f717f0f5e10155199

Roll third_party/spirv-headers/ bcf55210f..f88a1f98f (2 commits)

bcf55210f1..f88a1f98fa

$ git log bcf55210f..f88a1f98f --date=short --no-merges --format='%ad %ae %s'
2021-03-25 michael.kinsner Add xml section for memory operand bit allocation tracking, and reserve two bits for an upcoming Intel extension
2021-03-24 baldurk Add NonSemantic.Vulkan.DebugInfo.100 JSON/header

Created with:
  roll-dep third_party/spirv-headers

Change-Id: Ia59440c53433e5624d5d1d090ec5b9c194ba5c21

Roll third_party/googletest/ b7d472f12..5c8ca58ed (14 commits)

b7d472f122..5c8ca58edf

$ git log b7d472f12..5c8ca58ed --date=short --no-merges --format='%ad %ae %s'
2021-04-05 absl-team Googletest export
2021-04-02 absl-team Googletest export
2021-03-25 absl-team Googletest export
2021-03-24 absl-team Googletest export
2021-03-24 absl-team Googletest export
2021-03-24 absl-team Googletest export
2021-03-24 absl-team Googletest export
2021-03-23 absl-team Googletest export
2021-03-22 absl-team Googletest export
2021-03-22 absl-team Googletest export
2021-03-22 absl-team Googletest export
2021-03-20 absl-team Googletest export
2021-03-14 zekewarren Use @platforms instead of @bazel_tools for windows constraint
2020-12-04 zed.three CMake: Add namespaced ALIAS library

Created with:
  roll-dep third_party/googletest

Change-Id: I07e2fbdda46a67d76797c08f4266d311404150de
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47022
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2021-04-12 14:41:32 +00:00
.vscode .vscode/tasks.json: Make build & configure work for windows. 2021-03-30 20:10:08 +00:00
build_overrides Remove obsolete GN config 2021-01-18 15:25:23 +00:00
docs Add a style guide 2021-04-08 15:10:47 +00:00
fuzzers Remove tint's usage of Validator 2021-04-08 14:08:47 +00:00
include/tint Automatically run entry point IO canonicalization 2021-04-09 13:50:38 +00:00
infra/config Restrict Windows to Win10 bots 2021-01-27 19:24:25 +00:00
kokoro Kokoro: implement Windows build scripts 2021-03-23 20:06:29 +00:00
samples Output all diagnostics from tint executable 2021-04-09 20:14:18 +00:00
src [wgsl-reader] Deprecate old syntax for entry point IO 2021-04-09 19:58:58 +00:00
test writer/hlsl: Move the renamer into the sanitizer transform 2021-04-09 17:28:18 +00:00
third_party Fix VS clang-cl build 2021-03-09 21:51:50 +00:00
tools wgsl: Deprecate '-> void' on functions 2021-04-08 14:39:47 +00:00
.clang-format Initial commit 2020-03-02 15:47:43 -05:00
.gitignore Add .vscode/tasks.json 2021-03-16 13:33:23 +00:00
.gn Fixup gn check. 2020-12-02 16:11:59 +00:00
AUTHORS Add AUTHORS file 2021-03-17 17:54:33 +00:00
BUILD.gn BUILD.gn: Remove the temporary group with Dawn migrated. 2021-03-17 07:41:03 +00:00
CMakeLists.txt CMake: disable "no-used-but-marked-unused" Clang warning 2021-03-31 23:39:46 +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 third_party dependencies 2021-04-12 14:41:32 +00:00
Doxyfile Fixup all doxygen warnings 2021-04-09 16:51:38 +00:00
LICENSE Initial commit 2020-03-02 15:47:43 -05:00
OWNERS Add an OWNERS file 2021-03-08 16:07:55 +00: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.