Commit Graph

258 Commits

Author SHA1 Message Date
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
Ben Clayton 95dd428c75 tint/intrinsics.def: Add @test_value() annotation
Specifies the value to use for argument values when generating end-to-end tests.

Use this to provide a legal value for atanh().

Change-Id: I008050c856f9d687ab918c68e90678c4e74f3a1d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106887
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-10-25 13:08:45 +00:00
dan sinclair 6e77b47ed9 Update internals to initializer instead of constructor.
This CL catches up the internals (along with a few error messages) to
say `initializer` instead of `constructor.

Bug: tint:1600
Change-Id: I8e56572c310d77da1130380bdd32b334f27c8e46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106462
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-10-20 13:38:28 +00:00
Ben Clayton 138ddcc08c tools/setup-build: Support x86
Change-Id: I03cc04ac3f8f511be530ccc57055b31574ed3d94
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105560
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-10-13 12:55:42 +00:00
Ben Clayton db368f1b9c tools/tint/intrinsic: Sort enum values lexicographically
Reorders the output of the CanonicalizeEntryPointIO transform, but
otherwise is a no-op.

This will help with diagnostics that print the enum values.

Bug: tint:1629
Change-Id: Iff517d88836d2a8cd42ce3cfde6363c1973df0dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105321
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-10-11 18:26:18 +00:00
Ben Clayton 5dac4f9644 tools/remote-compile: Handle socket disconnects
If the socket disconnected mid-communication, the server could spin, waiting for new data.

Actually handle recv() errors, preventing the server spinning itself to death.

Also fix code style to be more tint-like (snake_case variables, PascalCase functions)

Change-Id: I9fcbfde303a8624e7e1ff87abd33581589f4da42
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105142
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-10-10 15:16:23 +00:00