This CL fixes a few tabs to be spaces which makes the whitespace/comments
lint check pass. The check is set to enabled.
Change-Id: I2a6c590aa3bfee888239adc89d1ce4c8c99f3e78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86083
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
When splitting WGSL source lines, detect and split along CRLF, not just
LF. Before this fix, when emitting error diagnostics on Windows, we'd
emit the CR at the end. Not normally a big deal, but it made our e2e
tests fail when the source WGSL had CRLFs in it: when comparing against
expected files, even though we'd replace CRLF with LF, we'd fail the
comparison because the actual output would contain CRCRLFs.
Change-Id: I360e0d4cd0f29ff76938ff32d7cb84e45feda2b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86201
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
The sanitizer flags need to be applied to all compilation units, and to all final link stages.
As this is whole-project (dawn + tint), these options have been promoted to DAWN_ options.
Bug: dawn:1339
Change-Id: I17beb5bd2a8f15de9d8f13d132356b5c663d71bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86143
Kokoro-Run: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
And force shader code to always use LF endings.
Post merge, there were a number of files that crept in with CRLF endings.
Some Tint end-to-end tests take objection to CRLF endings.
CRLF endings can be detected with:
```
git grep -I --files-with-matches --perl-regexp '\r' HEAD
```
And fixed with:
```
find . -type f -exec dos2unix {} \;
```
Bug: dawn:1339
Change-Id: Iee054bafd15875de744b86e28393cd8229bd3cfa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86140
Kokoro-Run: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Dawn depends on GLFW, which in turn depends on a number of system
dependencies to be installed. These are not part of the docker image, so
need to be installed on the fly.
Also disable the Kokoro doxygen step as this is still being worked on.
Bug: dawn:1339
Bug: dawn:1358
Bug: tint:1498
Change-Id: I1a33044d11c243fc3809c2b5b4d25f0bfc943d6e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86071
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL updates the list of lint filters in order to allow the lint
presubmit check to pass. This allows each of the individual exclusions
to be fixed or ignored independently.
Issue: dawn:1339
Change-Id: Ia96a38c54508628996ca1e19555c01b11776c07f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86045
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Also changes enums to use the concept of "limit class" from the WebGPU
specification.
Fixed: dawn:1242
Change-Id: I328ce98c2eaaf3f4b7ff1c253ee5f3db5a2980f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84762
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Tint's contributing documentation end up in the top-level
CONTRIBUTING.md, but should live in its project specific
documentation.
BUG=dawn:1356
Change-Id: I64d8a10d11e11922756c9d7bb02678f4bf92442b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86100
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Kokoro-Run: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
There's an implict dependency between including protobug and SPIR-V tools, as SPIR-V tools needs to know where protobuf lives.
Bug: dawn:1339
Change-Id: I22a95e44af5ae1cc39a9c3400bd319d86e434967
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86070
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This is the result of running clang-format over all of the files.
Change-Id: I196f0e628583f9d87d350d11d762ea9e98987a01
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86080
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Computation of the default depends on the aspect, but the aspect
may be invalid. Make the default computation robust such that it
picks some valid aspect if a valid one is not provided. This will
make computing the default OK, but still fail validation of the
aspect later.
Bug: chromium:1314049
Change-Id: I2dcfe7962c7e30ac627605b6d0f1c269b3a6af6e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86020
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Use `scripts/standalone.gclient` instead.
Bug: dawn:1339
Change-Id: Id702d42d104a0f6951973792389f897a6bdf4b10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86069
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Relabel a bunch of things as Dawn instead of Tint.
Also adjust the tools/lint to only lint Tint.
- It doesn't like Dawn code much.
Bug: dawn:1339
Change-Id: Iab224cfbea2314f9e06fe71f8d75d825bc483c43
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86066
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Allow the developer to pick either the GN or CMake build. Extract the lengthy string out to a new bash script in <dawn>/tools.
Windows CMake is TODO.
The Tint repo defaulted to using CMake, where as the Dawn repo defaulted to using GN. This gives us the best of both.
Bug: dawn:1339
Change-Id: Ibd5cf2a8f1c6d416b231d3267d68e006aee806be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86064
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This PR condenses the namespaces in the tint/ folder.
Change-Id: Ia8d712f8c356b2714ebfa36443a4d78750293ce6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86039
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This PR condenses the namespaces in the tint/reader folder.
Change-Id: Idfcff142b33a1e08884271ff1124a69b75b4e606
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86034
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This PR condenses the namespaces in the tint/reader/spirv folder.
Change-Id: I80cf1e7d3587020359d790381d147fde140b0ba5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86033
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This PR condenses the namespaces in the tint/ast folder.
Change-Id: I77a84fb03f921b4db7135572005a08563f2fb60b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86038
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
There were a bunch of helper scripts to build a go tool and run it.
Replace these with a single 'run' command that takes the tool name and arguments.
Helps reduce maintainance, file spew.
Also add the 'tools/bin' directory to .gitignore. These are the cached tool binaries.
Bug: dawn:1339
Change-Id: I012c966736b4d93949f6142c342cdcfefa9f0083
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86063
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This PR condenses the namespaces in the tint/inspector folder.
Change-Id: If784b9b726368c7d1afc16b7482fee70fc42b667
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86035
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This is both a security/ACL best practice, but also to make the Gerrit UI
better suggest owners for CLs.
Bug: dawn:1339
Change-Id: Ia79b88d919707147d2726a7e4f3ff9080cd275b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86067
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This PR condenses the namespaces in the tint/reader/wgsl folder.
Change-Id: Ic9f668402f10f02eecf5a8eaf0625558957391d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86032
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This will ignore tools/cmake-win32.zip and tools/cmake-win32/
Change-Id: I9018aff8acd991b2c9e7d1e9b4100c17096676ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86043
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This PR condenses the namespaces in the tint/fuzzers folder.
Change-Id: I74d4db39e41d408a826bee89241c5752e1aa7df9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86036
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This PR condenses the namespaces in the tint/resolver folder.
Change-Id: I7ed4d677a3d1dd39a672fc2d4e6721a6a4f6157d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86031
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This PR condenses the namespaces in the tint/diagnostic folder.
Change-Id: Id1b2afca99a8f6aeccb505682aa0f0b4b0b4bb05
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86037
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This PR condenses the namespaces in the tint/utils folder.
Change-Id: I6b541a6383386346a0b11ba46074a5981fe75f66
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86028
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This PR condenses the namespaces in the tint/transform folder.
Change-Id: Idf448870ccf90f892b9186f7aab7bb0ac9deda17
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86029
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
These really test spirv-val, and by relying on its output, often fail
when we upgrade spirv-tools.
Change-Id: I146a2bf517328b5ef1945247c9ce0b1094ff6122
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86044
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This PR condenses the namespaces in the tint/sem folder.
Change-Id: Iff802ca78d4cb7fd21134a640dfe5d04e85148b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86030
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This PR condenses the namespaces in the tint/writer folder.
Change-Id: I66b28d6e70b99834dc6a25fee4c71e3036e0864a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86026
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This PR condenses the namespaces in the tint/val folder.
Change-Id: I99fe97a5ab5bee2c0a22d4ad382aa57557b871fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86027
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This PR condenses the namespaces in the tint/writer/glsl folder.
Change-Id: I527bcd7b73a32fa90f844b9cf2e1bfc038851404
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86025
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This PR condenses the namespaces in the tint/writer/hlsl folder.
Change-Id: Iecbf1965ade236547e2f5654a66fa8367df9f092
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86024
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This PR condenses the namespaces in the tint/writer/spirv folder.
Change-Id: Ibe1d241b4a3da3c031b431d4ed2a95f197678def
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86022
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This PR condenses the namespaces in the tint/writer/msl folder.
Change-Id: I9def76a6527b6780f9d1008a928070e64f63806d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86023
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Refactor the ExpandCompoundAssignment transform to handle these
statements, which delivers support for all of the non-WGSL backends.
Fixed: tint:1488
Change-Id: I96cdc31851c61f6d92d296447d0b0637907d5fe5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86004
Reviewed-by: Ben Clayton <bclayton@google.com>
Implemented in both the reader and writer with E2E tests. Other
backends will ICE for now.
Bug: tint:1488
Change-Id: Ied2afa55a338347f427dee98a4076643ac432d9c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86003
Reviewed-by: Ben Clayton <bclayton@google.com>
These can only be applied to scalar integer references.
These currently cannot be used in a for-loop initializer.
Bug: tint:1488
Change-Id: I218c438c573ff3f5917d058718d12603f9b4057f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86002
Reviewed-by: Ben Clayton <bclayton@google.com>