Commit Graph

263 Commits

Author SHA1 Message Date
Loko Kung dcaedad707 Updates CTS tooling to use new 'allow-unsafe-apis' toggle.
Bug: dawn:1685
Change-Id: Ie5dc18dfff51c6e116dd5c4ea322a41fb249ca37
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131584
Auto-Submit: Loko Kung <lokokung@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-05-09 12:26:47 +00:00
Ben Clayton 9dede34fc1 Improvements to tint perfmon
* Bump timeouts
* Include changes description in results
* Use median times instead of means
* Use CPU time instead of real time
* Bump prority of the benchmark process

Change-Id: I40cb5635016fab4d6a1d1ee2434e94c120f7f6f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121700
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-28 09:25:44 +00:00
Ben Clayton 5faf59d81d tools/perfmon: Hook up external shader corpus
Allow perfmon to benchmark shaders that are defined outside of the repo

Change-Id: Iee53b64cf357facdaa9941602d8d571611680097
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128040
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-04-19 23:26:01 +00:00
Yuly Novikov 7cec9076d5 Remove experimental Mac AMD trybot from CTS rolls
Mac AMD testing restored on Dawn CQ in crrev.com/c/4427778

Bug: chromium:1382149
Change-Id: I8a100c68a49ad9de72a0f4a25ec1371241dcc7b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127421
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-15 11:42:18 +00:00
Ben Clayton 4489109c86 tools/cts/roll: Preserve RetryOnFailure expectations
It's intended for the Unexpected Pass Finder to clean these up.

This should help prevent known flakes from causing retries.

Bug: chromium:1426512
Change-Id: I58c7baf2585dc4ca2e061e4a53c7b7d0f41e0af9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127420
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2023-04-14 18:26:36 +00:00
James Price b7179aa89d tools/cts: Fix link in authentication error
Change-Id: I035c43fb51728792135c269cd558c9838741f4f3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/125320
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: James Price <jrprice@google.com>
2023-03-23 19:03:29 +00:00
Ben Clayton a92a8078c5 tools/run-cts: Fix code coverage in `--isolate` mode
Use the new `cmdline.ts --coverage` flag in https://github.com/gpuweb/cts/pull/2206 to write out the per-test coverage to a unique file.

Change-Id: Iea273217eede2fa615b78cd6f69f036976dcfd35
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117883
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-03-09 23:08:02 +00:00
Yuly Novikov 9eff4810c6 Add MacBook Pro 2019 AMD macOS 13.2.1 failure expectations
Found in https://ci.chromium.org/ui/p/chromium/builders/try/dawn-try-mac-amd-exp/47/overview

Use on CTS rolls to maintain these expectations during the migration.

Bug: chromium:1382149
Change-Id: I32c27965a1178338bde7b4af211337754a381f73
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122720
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-03-08 18:55:50 +00:00
Ben Clayton 77a90cb796 test/tint/builtins/gen: Use returned value
It appears that FXC and DXC do some validation post dead-code-elimination.
These tests have been updated so that the return value is assigned to a storage buffer, ensuring that all validation is performed.

Many DXC tests are affected by https://github.com/microsoft/DirectXShaderCompiler/issues/5082, which have been SKIP'ed.

Fixed: tint:1859
Change-Id: I0001a9a9821846cd0855c3d8ce2bec79ab8e64ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122662
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2023-03-06 18:25:08 +00:00
Ben Clayton 54a104e28f tint: Update constructor / conversion terminology
Rename:
* "type initializer" -> "value constructor"
* "type conversion" -> "value conversion"

Fixed: tint:1848
Change-Id: I3e86a4e944971cea970f0d137641517c36cb807d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121060
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-22 20:04:40 +00:00
Antonio Maiorano 4be42e57de tint/run-cts: make dump-shaders also disable symbol renaming
Change-Id: If9e0db103135e3c7c7928a91f6995c56938bec3d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121040
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-22 19:58:53 +00:00
Ben Clayton d84903201d tools: Add @must_use support to intrinsics.def
Emits the new OverloadFlag::kMustUse flag on the annotated overloads.
Nothing consumes this, yet.

Bug: tint:1844
Change-Id: I4eb0943a23eaf5de98cd63444a686cffe62fb36e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120920
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-02-22 13:52:21 +00:00
Ryan Harrison 3884471c8a Increase CTS checkout timeout when rolling CTS
The default behaviour is a 1 minute timeout, which depending on
network load and other factors, may not be enough time to clone the
CTS repo when running the tool.

Increasing the timeout for this step to 10 minutes, since the tool is
expected to take a significant amount of time to run, so a bit of
extra time on setup isn't noticable.

Change-Id: If51ed154a8b2373bb9b246f29467fb17c7d7e345
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119300
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2023-02-09 19:43:51 +00:00
Ben Clayton ad73301856 tint/type: Rename ShortName to type::Builtin
These will include the builtin language types.

Bug: tint:1810
Change-Id: I695a9ee833e1035eb1d17913d709038ae4c561d8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118502
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-02-07 13:35:58 +00:00
Ben Clayton 1591a16003 tools/format: Format .gn files too
Change-Id: I2ff7e099e4b8a4a71e1900fdd3f904630cb87a4d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118501
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-05 12:38:23 +00:00
Ben Clayton 97b8348086 Kokoro: Fix windows builds
The change to use `go run` over `go build` has upset the windows kokoro builds.

Use absolute paths.

Change-Id: Id9700529b3460a5ab579f82f616a95c3498c152c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118722
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-02-05 10:52:57 +00:00
Ben Clayton 95e9bf2a15 tools/run: Remove 'bin' cache
People keep on running the executable from the bin cache, wondering why stuff is out of date.

`go run` has pretty decent builtin caching, so just use that.

Change-Id: I6305a222f3f6b5b0b1ce23d7a89227aea96b9ef4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118720
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-02-04 16:15:54 +00:00
Ben Clayton 98bd83a8fc tools: More CTS coverage fixes
* Use common_compile_options(turbo-cov) to fix RTTI linker errors on macOS + debug builds.
* Delete the .profraw files after they've been consumed.
* Include the test-case parameters in the coverage information

Change-Id: I02c6f408ed6e65c6f7e9eb1b4cd8443e4cfa7939
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117882
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-02-01 15:02:56 +00:00
James Price 61feebef38 tint/tests: Actually validate the generated WGSL
We weren't actually enabling WGSL validating in Tint in the E2E test
runner.

Mark a few tests as SKIP for cases that do not actually validate.

Change-Id: I62a55ce701f704d744c32f2cd5cb97683e270e96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117960
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: James Price <jrprice@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
2023-01-27 16:33:30 +00:00
Ben Clayton 42c5b2f675 tools/run-cts: Add --validate flag
Default to no-validation.

Change-Id: I4b3506e2addf580256175b13efbeb47f8ef96aaf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117881
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-01-26 16:03:08 +00:00
Ben Clayton 78e4530f59 code-coverage / turbocov fixes
Common:
* The turbocov build target (somehow) never got hooked up to the root CMakeLists.txt file. This is now fixed.

macOS:
* Emit coverage for 'AppleClang' compiler.
* Have run-cts find the tucked-away `llvm-profdata` executable.

Windows:
* Various fixes for building with clang
* Fix turbocov stdout CRLF corruption
* Fix bad JSON with backslashes

Change-Id: I481cceafe2e72b544e13168172fc1456e5df2005
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117880
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-01-26 15:57:27 +00:00
Ben Clayton 330bc25322 tools/run-cts: Use new 'load' server RPC
Can dramatically reduce latency for small test runs.

Requires: https://github.com/gpuweb/cts/pull/2167
Change-Id: Ib5ff5d0fbcaf151ffe67bf30e97c9ccdf34443e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117200
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
2023-01-17 14:54:45 +00:00
Ben Clayton 54264d3037 tools/run-cts: Optimize coverage collection
Enable coverage collection when using the test server, which is substantially faster than running in separate, isolated processes.

Use clang's `__llvm_profile_*` APIs to reset the counters between each test case run.

Change-Id: I01f8d0c1b3f215f66cfa50ef0fd51f2522c2ea57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113880
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-01-10 21:55:43 +00:00
Ben Clayton c9c937cc3e dawn/node: Allow picking of the adapter by name
Add the "--adapter" flag to run-cts as a helper for setting this.

Make "--verbose" print the picked adapter.

Rename "dawn-backend" flag to just "backend" - this is already specific to the "gpu provider" (dawn).

Change-Id: Idc8d0eb3ccf5fa23325c06f0f9520aa9b528d9dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116295
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-10 19:15:42 +00:00
Ben Clayton c6236de7c2 tools/run-cts: Add --unroll-const-eval-loops flag
Change-Id: I82152615a068bbabfbfa3dcc7d68025d6383684e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116291
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-01-10 16:21:26 +00:00
Ben Clayton 64e900e456 Clear up a bunch of expectations
With the CTS global timeout extended, and tweaks to how const-eval loops are emitted, we now have a whole lot of passing tests.

Adjust the 'Slow' threshold to account for the new global timeout.

Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Change-Id: I9a4d3278048e72e6560552164522395423dedf99
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116296
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-01-07 17:53:27 +00:00
Corentin Wallez 9b6e9313c8 CTS roller: remove exception for HD/UHD630 being the same.
These configurations are no longer used and replaced with newer
machines.

Bug: dawn:1387, dawn:1444
Change-Id: I13fcaf8fc5a42329cd74e9fd9a8ec9d10de63f68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116285
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-04 18:33:16 +00:00
James Price fe0c2a73e7 tint: TINT_EMIT_COVERAGE -> DAWN_EMIT_COVERAGE
Change-Id: Ic215fba55238d89f9790f071361e29fddfc3624d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116340
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-01-04 18:06:49 +00:00
Ben Clayton 3febbd218f intrinsic/gen: Don't permutate impossible workgroup ptr types
Change-Id: I1e6a3436553ca886a52075315d09ff7ef04eb492
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116082
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-01-03 20:17:18 +00:00
Ben Clayton 55ceebec1e tools/intrinsic: Fix validation for type matchers
The tooling does not expect, nor can handel a type matcher to be used as a parameter or a direct template parameter to another type. Make this an error.

Change-Id: I28c04c00c7fa1cb5130c53215a90a59d660d6fa3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114380
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-12-14 21:18:23 +00:00
Ben Clayton 97b05e169e tools: Exit run-cts when the coverage page is closed
Change-Id: I70f3ffa40dcfe60cdee46bdf0f5db21370be1a3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113861
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
2022-12-13 15:56:39 +00:00
Ben Clayton 408ace6927 tools: Add documentation for coverage viewer
Change-Id: I5605925bf4dc4012b38f4e2da48f45321d5e047d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113860
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-12-13 15:48:49 +00:00
Ben Clayton 61dbeb5b72 tools/cts: Handle CRLF in expectations.txt
Change-Id: Iccc9f0b4c488a93a3014bd1d2415b42b05c01553
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114000
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-12-13 14:55:50 +00:00
Ben Clayton 60dc70df71 tools run-cts: Add --coverage flag
Displays a per-test coverage viewer in your browser

Change-Id: I0b808bfadf01dab0540143760580cd7ca680e93b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113644
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-12-13 09:34:24 +00:00
Ben Clayton 61b5aaccf3 tools: Move idlgen and run-cts to from dawn/node to tools/
This is the standard place for tooling.

Update src/dawn/node/README.md with the new paths, and drop inferred
arguments from the examples.

Change-Id: Ib944ca045366b81b8897d9548112a8889e097769
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113643
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-12-12 23:06:43 +00:00
Ben Clayton f8e0aac2a6 tools: Port 'cov' package from SwiftShader
A library for dealing with coverage information, and compressing CTS test information down into something that can be easily downloaded and visualized in a web page

Change-Id: If025e1555665609f7c963bad14c9c91d8324a390
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113642
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-12-12 21:49:02 +00:00
Ben Clayton f927bcb5a6 tools: Port turbo-cov from SwiftShader
A tiny utility that emits just the per segment coverage in a binary stream. This avoids the overhead of encoding to JSON, which provides substantial performance improvements.

Change-Id: I36a588069d69c5c800d31bca8dd5c542bcdbe313
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113641
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-12-12 21:21:54 +00:00
Ben Clayton 5f55990471 tools/cts: Fix expectations update failure
appendConsumedResultsForSkippedTests() adds fake results for expectations that are 'Skip'ed, so that these sub-trees aren't collapsed as all passing.

However, this code was not handling the fact that there might actually be results for the cases.
This happened because there was an expectation collision in the expectations.txt file, and tests were not being skipped even though there was an expectation with a Skip (a collision expectation was used instead).

Change-Id: I2a1543d231db44dc8aa6683d051f884f4cb96853
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113520
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-12-08 20:59:01 +00:00
Ben Clayton f2b8d2b1ab tools: Parallelize ./tools/format
10x speed improvement on my 3990x machine

Change-Id: Ie4b2377719e9a25860ec05bb7649aa652d26ccf0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113022
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
2022-12-06 18:29:08 +00:00
Ben Clayton d5d207ba9f tint: Add builtin type aliases (vec3f, etc)
Fixed: tint:1772
Change-Id: I4bed36ded91ca5288875ed6ea819ff4bbb432186
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112340
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2022-12-01 13:41:56 +00:00
Ben Clayton d6800098e7 Add tools/src/cmd/git-stats
Can be run with:
./tools/run git-stats

Change-Id: Ie46be01ff3318ff50acdb13eb809d5304f867f04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111180
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
2022-11-23 21:08:52 +00:00
Ben Clayton 2f60bbdf9c tools: Add tint-bench
A simple tool to benchmark tint based on a template file.

Bug: tint:1122
Change-Id: I34ee0fb98e6d2187c145cc38ec3cb48606242cb4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110820
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-21 19:14:32 +00:00
Ben Clayton d114055e4e tools/src: Move template logic of 'gen' to package
And add tests.

This is useful for other tooling.

Change-Id: Ia399071baf6d4bb617f3c73e4ccd4ed72d522c2e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111020
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-21 17:43:11 +00:00
Ben Clayton 19f6cf9ec3 tools cts/roll: Generate cache file list
Will be used by GN to know the outputs of the generate cache step.

Change-Id: Iae09477fb355eac41ff9b2204605f46ed78e08ec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110620
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-17 22:38:04 +00:00
Ben Clayton bca96d9bc8 PRESUBMIT: Check that generated files aren't stale
Fails presubmit if you need to run `./tools/run gen`

Change-Id: I05311cd668c5a1f4f484b25cc1367f680a9d24eb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110140
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
2022-11-16 21:34:14 +00:00
Ben Clayton 6be02b607f tint: Fix stability of intrinsic_table.inl
Use a StableSort() to ensure the output is the same between different
versions of golang.

Change-Id: Ic81688d189ce62816ba0aefddcef607b76415a5d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110361
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
2022-11-16 21:30:13 +00:00
Ben Clayton 1ef277db0e tint: Skip e2e test validation for known-good
Cache the hash of the test output, and only re-validate if the output changes.
This speeds up incremental end-to-end testing.

Change-Id: I44bc1eff62320df1e80524e8481d1c012fb67f42
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109761
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2022-11-14 13:58:36 +00:00
Ben Clayton 5e4fc69a69 tools/intrinsic: Handle CRLF
Fixes cryptic error message:

error calling Sem: src/tint/intrinsics.def:14:1: unexpected '

Change-Id: Ic343e77f6a1976ebdc4952eb590751c34b014be8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108143
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-01 22:45:35 +00:00
Ben Clayton 68ed8d92d3 tools/gen: Add flags for explicit output
`-o` will emit the files to the given root output directory
`--verbose` will print what's going on, to help with debugging

Omitting these flags will behave as before.

Also consolidate the utils package into fileutils. These were two packages with near identical functionality.

Change-Id: I855dd4b57807fb9239a52e7f357842d4ba2517ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107687
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-10-31 18:28:22 +00:00
dan sinclair c3cbc35650 Add negative number parsing into `@test_value`
This CL updates the intrinsics lexer to allow negative values for int
and float numerics. This allows doing `@test_value(-2)` in the def file.

Change-Id: I2cad9b25a2932057ce9bc51dec6c32231e06f0a0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107440
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-10-27 18:44:50 +00:00