Fix the namespace - this should have been tint::resolver.
Use a single u32 bitset for overload flags instead of multiple fields.
Bug: tint:1504
Change-Id: I633b21ce14e20fc9aeeed5221886c1d22e327bdc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90241
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Do the partitioning of unary and binary operators in the intrinsic table
generators, instead of searching all operators at runtime.
Will allow code to be simplified.
Bug: tint:1504
Change-Id: I67246b954e530e0542b1b67c99fb34a756cf532a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90240
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Instead of Failure.
If we have duplicate results (same query, same tags), but with different results, then we have to merge them. Previously we'd merge Pass and Slow as Failure, which was just odd. Fix this so the combined result is Slow.
Bug: dawn:1342
Change-Id: If9b035bb3c1e59b7a93a5c8b194f854405e656d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89960
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
• Declare all the unary ops in the intrinsics.def file.
• Reimplement the bulk of Resolver::UnaryOp() with the IntrinsicTable.
This will simplify maintenance of the operators, and will greatly
simplify the [AbstractInt -> i32|u32] [AbstractFloat -> f32|f16] logic.
Bug: tint:1504
Change-Id: Ifc646d086fc93cfbe3f3f861b8c447178664c1f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89028
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Adapt the builtin parsing and resolving to also support operators.
Will be used to generate intrinsic table entries for operators.
This will simplify maintenance of the operators, and will greatly
simplify the [AbstractInt -> i32|u32] [AbstractFloat -> f32|f16] logic.
Bug: tint:1504
Change-Id: Id75735ea24e501877418812185796f3fba88a521
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89026
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
• Rename 'builtin-gen' back to 'intrinsic-gen', as 'intrinsics' now
include both builtins and operators.
• Move the intrinsic definitions, and IntrinsicTable to the resolver
package, where it belongs.
Bug: tint:1504
Change-Id: I5ad5c285c1e360a224ee1235c293ccd55eb2693d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89025
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
• Add the included trybots in the CL description. All of these trybots are tested by the roll, but the final CQ-submit wouldn't necessarily test all of the variants before landing. This would mean that the 'cts export' could miss some results, as it takes the last PS with any results.
• Add --force flag to cts roll to force a roll. Useful for testing.
• Emit timing diagnostics for tests labelled 'Slow' instead of unhelpfully stating they pass.
• Enable the --cl and --ps flags for cts export
• Export with the most recent data to the top of the spreadsheet
Bug: dawn:1401
Change-Id: Id926367ab805bfb9f3032fce9cce7f00daf7a5d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88661
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
• Strip 'release-x64' tags.
These are always paired with 'release', and all
other tests just have the 'release' tag. This
means that results with the 'release' +
'release-x64' tags are a subset of just the
'release' tags, leading to many broken
assumptions in the expectation update.
• Don't consider tests with the error reason
'asyncio.exceptions.TimeoutError' as slow, but
as a failure. The CTS expectation updater will
already mark tests exceeding the config
threshold as slow. This reduces the amount of
data requested from resultdb, and prevents
failed rolls when results are actually
deadlocking.
• Fix inferring of patchset in GetResults().
LatestPatchest() was called but was assigned to
a nested scope.
Bug: dawn:1401
Change-Id: I57b2c9a029b31430d63a056f7b13c4bf1bc5b437
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88450
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Updates a Google spreadsheet with latest CTS statistics.
Bug: dawn:1342
Change-Id: I01a9c99032c755d6a78af674675d8c9cbfc79019
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88443
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Previously we'd generate the build files into the symlink target directory.
CMake gets grumpy if the cache is invalidated, and you're building in the 'active' directory, which does not match the directory path it remembered.
Also: Enable ccache if found on PATH
Change-Id: I7e0dc93516b2c59d6bf346fc943acea3d0021087
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88311
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Add the common utilities for starting and fetching build results.
'cts time' provides views on the longest running tests, along with
a histogram view of all test times.
Bug: dawn:1342
Change-Id: Ia3707f7f062ea26a2406e3163a26e1cc7e30e3b2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88319
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL introduces the Config structure, and config file.
Used by all the sub-commands.
Bug: dawn:1342
Change-Id: Iaad5a02bc2ceba2c63265cf0d1086dc7901e7ed7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88317
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Helper for writing command line tools that have sub-commands.
Will be used by the CTS tool (roll, results, export, etc).
Bug: dawn:1342
Change-Id: Id22beecbc02b73af23064adc67c590f825b37789
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88315
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Add Patchset.RefsChanges(). Returns the 'refs/changes/X/Y/Z' string
for the given patchset.
Add []FileComment parameter to Gerrit.Comment(), allowing the posting
of comments on particular lines of the change.
Bug: dawn:1342
Change-Id: Ia4113a158b285c606b2c6c520cef6c9e8030fae7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88314
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is needed elsewhere.
Rename location.go to paths.go, as this is really dealing with file
paths.
Bug: dawn:1342
Change-Id: Ifdbfafc0fd763ac7ec2b8f692efc35772c4793da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87704
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Implement the logic to update an existing expectations file with new
results.
Bug: dawn:1342
Change-Id: Idcbad57946712539cc5f0d238f89a2adf42f5aa0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87702
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
MinimalVariantTags accepts a list of tag-sets (e.g GPU tags, OS tags, etc),
and returns an optimized list of variants, folding together variants that
have identical result query-to-status mappings, and removing redundant tags.
Bug: dawn:1342
Change-Id: I759c82e9a0631a9d321d376656e5a2dbbf5f5507
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87643
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Implement an expectation parser, data structures and writer.
Bug: dawn:1342
Change-Id: I53587a9b55346ccf1543e15c9cec5ff68c6849ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87641
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Go tooling does not work properly when modifying go files in subdirectories from the root of the IDE.
Consolidate the two go modules in the source tree.
We'll eventually want to move `src/dawn/node/tools` to `tools/src`.
Allows us to type `go test ./...` at the root, and test all go code in
the entire repo.
Bug: dawn:1342
Change-Id: Ie3dd2c89a769cd25c2b68884970ef0f2ba8c7560
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86532
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
If the URL ends in a slash, this would fail to match the gitcookies file
Change-Id: I987ec637b2f6db172d4173938960060321722bfe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87920
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
• Fix up various references of 'tint' to 'dawn' post-migration.
• Round the CPU speed to 100MHz. This appears to fluctuate on reboots
for some machines.
• Fix git.Log() - the Count was trimming from the wrong end, leading
to perfmon spamming the github repo with repeat results.
• Instead of using google-benchmark's `--benchmark_repetitions` flag
for repeating benchmarks, calculate averages by re-running the
benchmark executable. Use '--benchmark_enable_random_interleaving'
to randomize the order in which benchmarks are run, which greatly
helps reduce noise in the averaged results.
• If the host machine supports CPU temperature sensors, wait for
thermals to stabilise before running the benchmarks. Further helps
reduce result noise.
• Breakout of the historic benchmarking loop every 15 minutes to check
for new Gerrit changes to benchmark.
• When idle, attempt to re-benchmark historic results that are 'spiky'
to reduce noise in the graphs.
• Specify more CMake flags to avoid building non-benchmark executables.
• Update the default base change for historic results. Attempting to
use the old hash, which was prior to the tint -> dawn merge makes,
the git log go back to T0 on the dawn branch. We don't want to
benchmark nearly 3k changes.
Change-Id: I8e59c7838720eb8bd11f217e9bd3104ba1eb51c3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87642
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Add result.List.StatusTree() for building a query.Tree[Status].
Add helpers for serializing results.
Add helpers for merging and de-duplicating results.
Change the interface of result.List.ReplaceDuplicates() so that the
merging function takes a status set instead of a list of results.
Bug: dawn:1342
Change-Id: I77580ec5fd4c8f12109fb6e9e83afea8b740260c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87240
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
A tree of query to data. Has utilities for reducing the tree based on a
custom merger function.
Bug: dawn:1342
Change-Id: If1c0503be05ee04bcf55dd5bdc9aa3caf6fb56ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87222
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Required as the test name tag field is limited to 256 bytes.
Bug: dawn:1342
Change-Id: I9f604181561acb6b7b9250599508474c0190333a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87221
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Contains helpers for obtaining the source location of the caller
Bug: dawn:1342
Change-Id: I6eddf9140d10bc7889260392e04c3e2adec715d8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This Cl updates tools/format to match the various Dawn extensions and to
use the `clang_format.py` file from depot_tools instead of the one from
clang. This fixes up some formatting differences so `tools/format` will
now match `git cl format`.
Bug: dawn:1339
Change-Id: I32a2cdbd2d7e950794268616fae38b5bf54ab370
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86874
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Wraps the luci package to make it a bit friendlier.
Bug: dawn:1342
Change-Id: I8e0b5c27696d23aaf704fedcbdf71b26070f5d34
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86528
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Wraps the luci package to make it a bit friendlier.
Bug: dawn:1342
Change-Id: I80e02344ea1ecd95134a719f21eb8bd2a1cb1997
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86527
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
The kokoro bots are running at a different level of verbosity than
the presubmit check. This CL ups the verbosity level for presubmit
to match kokoro and suppresses any new lint warnings which are
produced by the change.
The set of always removed filter options used by PRESUBMIT are
copied into the CPPLINT.cfg main file in order for kokoro to
match the errors presented by the CQ.
Bug: dawn:1339
Change-Id: I875a06bc2ed929d5dbaaa933282e3afa2559a7af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86627
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Wraps the luci package to make it a bit friendlier.
Bug: dawn:1342
Change-Id: I70bf01b7ef5fcf210a2ff7ccafa49ea0720ae125
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86526
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Rename 'Auth' to 'Credentials' to match the gerrit package.
Add a couple more helpers, and add more comments.
Bug: dawn:1342
Change-Id: Ieb6d12d23bb71678e04ff694ab9085a8f5367437
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86525
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Add more helpers for interfacing with Gerrit.
Move dawn-specific constants out to a new 'dawn' package. Keeps the
packages dawn-specific-free.
Bug: dawn:1342
Change-Id: Iaebe0b68d877340fc848d711c848d01705ddae57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86524
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This has been superseded with the end-to-end test runner.
Change-Id: I628cf9578313a43d8423abab3dfbacf398a8c6ba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86522
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
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>
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>
Integrates Tint repo into Dawn
KIs:
- Building docs for Tint is turned off, because it fails due to lack
of annotations in Dawn source files.
- Dawn CQ needs to be updated to run Tint specific tests
- Significant post-merge cleanup needed
R=bclayton,cwallez
BUG=dawn:1339
Change-Id: I6c9714a0030934edd6c51f3cac4684dcd59d1ea3
Provides a type to represent the CTS query strings.
100% test coverage.
Bug: dawn:1342
Change-Id: I3769b094ba64221a7b79dd38f76daf0125ee9e28
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85221
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Contains generic Map and Set types.
Golang 1.18 added new support for generics, but has not yet added a standard library that provides generic containers. In future versions of Golang, there will almost certainly be similar implementations of these types.
Until then, use these to simplify some code.
100% test coverage.
Bug: dawn:1342
Change-Id: I2a5c7bfb26f15c2099037d3fa0f0576df641d9f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85220
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
When enabled, for each test, FXC is run first, and if it succeeds, DXC
is run. If both succeed, the test passes, otherwise it fails. This
option allows us to get meaningful feedback from running this script
against HLSL files, as well as taking advantage of the feature to delete
skips for tests that now pass (both FXC and DXC in this case).
Change-Id: Iae2ebfda7bd92f1b94893e648e2d1fb1f6979b39
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/84680
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Tests were moved to a new 'tint' subdirectory for the tint -> Dawn
merge, but these paths were not updated.
Also regen'd files for HLSL and a couple are no longer failing.
Change-Id: I11c315d948013ed30635d20e6da565450859cb03
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/84341
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Bug: tint:1418
Change-Id: Ic1560bf7a0aa99ecbe554b985dc07f1b055fab64
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81500
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Explicitly filters out problematic files from presubmit with issues
that are not under our control, i.e. URLs.
BUG=tint:1433
Change-Id: I34a449c825edc39f934cbe9afa3436f7514f2808
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80860
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
BUG=tint:1413
Change-Id: I6a4735a97f64003cb4999d6a64b64666d0ce08ad
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79140
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Kokoro: Ryan Harrison <rharrison@chromium.org>
Mostly typos and one case of a return not being error checked.
Change-Id: Id33e93402b05c165aa129bb22e4b0c7f55b0a71b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79141
Kokoro: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This matches the term used in the WGSL spec.
Change-Id: I4603332b828450c126ef806f1064ed54f372013f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78787
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Don't terminate on first error. Sleep a bit and try again.
Post a message to a gerrit change if it cannot be built. The fact the PS has a message from perfmon will prevent it from retrying the same change.
Remove trailing newlines from log.Printf() messages, they're automatically added.
Bug: tint:1383
Change-Id: I78a627c53c492e7da33a74470d5a064e90a7a753
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78783
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
The diff format changed.
Change-Id: I13930e0aeb450384d95d71460f9623adb5c1b192
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78581
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
A tool to continually automatically generate performance metrics for tint CLs.
perfmon monitors gerrit changes, benchmarks them and posts results to
the gerrit change.
Commit changes are also benchmarked, and results are automatically posted to:
https://tint-perfmon-bot.github.io/tint-perf
Bug: tint:1383
Change-Id: I3470b170046e1d9af456f5e3a1d6ff76c305898a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77940
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Essentially, this adds GLSL to the list of backends to run.
Bug: tint:1358
Change-Id: I5075df32d935a3e08733daadbe5ac9dc1e13f03c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77220
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
For the directories "/test/unittest/" and "/test/vk-gl-cts/", continue to prevent the emission of PASS expectations, but now:
* Generate SKIP expectations in these directories if `--generate-skip` is passed.
* Delete expectation files in these directories if the tests now pass and `--generate-expected` is passed.
There's no change in behaviour for other test directories.
Change-Id: Ibd9e84a51029715e7c3d9e22e76a65770b66f1c7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77442
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Deprecate the old syntax. Migrate everything to the new syntax.
Bug: tint:1382
Change-Id: Ide12b2e927b17dc93b9714c7049090864cc568d3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77260
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
Add google benchmark to the DEPs.
Implement a basic set of benchmarks for each of the writers and the WGSL parser.
Add build rules for CMake. GN build rules TODO.
Add a simple go tool (ported from Marl) to diff two benchmarks. Less
noisy than the one provided by google benchmark.
Bug: tint:1378
Change-Id: I73cf92c5d9fd2d3bfac8f264864fd774afbd5d01
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/76840
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
The tool was getting slow, due to the number of branches being examined.
M96 is the latest stable release. We aren't applying fixes to this or older branches.
Also avoids an issue where the M95 branch was missing a cherry-pick, which the tool wanted to merge with each run.
Change-Id: I8a8b1466c10633d9539725cd4f9b1b0514e41e93
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/75067
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Update the script to check coverage generation is enabled, and provide a sensible error message if it is not.
Change-Id: I42f2b97d18bb3be2d081200cb682ea310476943f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70520
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
'__' is reserved in C++, and the 'match__' and 'build__' functions are causing OSS-fuzz builds to fail.
Add the change in tint behavior to the OT notes.
Add end to end tests for underscores. While the GLSL and MSL compilers seem to accept leading and double underscores in identifiers, the tint build failure has highlighted we have more work to do here (crbug.com/tint/1319)
Fixed: oss-fuzz:41214
Bug: tint:1292
Bug: tint:1319
Change-Id: I32b7bf4e0cff26e678b788457f90452c2503da50
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70480
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Since CMake 3.21, the Ninja generator now outputs absolute paths to
source files, rather than relative. These paths are what __FILE__ gets
mapped to during compilation, and is what gtest outputs for test
failures. This broke fix-tests, which assumed a build-relative source
path. This change detects when the source file path is absolute, and
converts it to a build-relative one.
Also, on Windows, absolute paths include the drive with a colon
character, so I added matching the colon to the regex for the path
portion.
Change-Id: I065161d65f098023376b7e479d8a24a83beb1df7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69440
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Script would erroneously generate for files in excluded paths because of
slash differences.
Also make the output display the path to the MSL and HLSL executable
being used.
Change-Id: I0bf55dd461c96b7b910f7a9aa9756ab2006c2a33
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/68821
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This is not included in the default for 'filter' as it is far from ready.
Also: Don't generate SKIPs in the excluded directories.
Change-Id: I02cb40c1bf8adebc77e9e5102988dd41e4b1f7a1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/68522
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
And remove a whole load of const_cast hackery.
Semantic nodes may contain internally mutable fields (although only ever modified during resolving), so these are always passed by `const` pointer.
While all AST nodes are internally immutable, we have decided that pointers to AST nodes should also be marked `const`, for consistency.
There's still a collection of const_cast calls in the Resolver. These will be fixed up in a later change.
Bug: tint:745
Change-Id: I046309b8e586772605fc0fe6b2d27f28806d40ef
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66606
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
The old regex was not allowing numbers in the filenames.
Change-Id: Ic16de247f9caadefda6d6eb05896923ba4399ba5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66441
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
For these tests, we only really care that we can successfully consume
them and generate valid output for each backend. Having the expected
files in the tree generates significant churn for any change to how we
generate backend code, which makes it hard to inspect diffs.
Change-Id: Ic98c248081144c0fb1791f1303eaf6d459548e3d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/62720
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Starting a test case with `// flags: <flags>` will
append the <flags> to the tint executable for that test case.
Let's you specify things like `// flags: --transform XXX`, which lets us
end-to-end test a particular set of transforms.
Change-Id: I181e9f7e7c1fba5e3a47cf58aee462b51e4b6e3b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60921
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Shows the net time spent waiting for tint & validators to complete the test run
Helps identify the slow compilers
Change-Id: I3e915762fdb4dc56f02320d7f5e0e13f7cb83d78
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60343
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Fixes building on Linux, and possibly Windows
Change-Id: Ie8560618c4e0179e3a76da514d8835114b91b863
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60349
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
roll-release is a tool to synchronize Dawn's release branches with Tint.
roll-release will scan the release branches of both Dawn and Tint, and will:
* Create new Gerrit changes to roll new release branch changes from Tint into Dawn.
* Find and create missing Tint release branches, using the git hash of Tint in the DEPS file of the Dawn release branch.
Change-Id: I009aedc826d604f7fda10769ea94fee931a56dcc
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60341
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Implement these for all the writers.
SPIR-V reader not implemented (the old overloads weren't implemented either).
Deprecate the old overloads.
Fixed: tint:54
Change-Id: If66d26dbac3389ff604734f31b426abe47868b91
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59302
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Gathers information about changes merged and reviewed for team weekly reports.
Change-Id: I53e3acc45679b4822c506d16980393fbaf337b3b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59022
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Gives you juicy stats for contributions to the project.
Change-Id: I4f3e7f03cc43947675e916a8036317af4a894d12
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57883
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
A tool for compiling shaders on a remote machine.
Helpful for combining with `test-all`, so that a single non-windows
machine can validate SPIR-V, MSL and HLSL.
Change-Id: I3a0f70e6e4edd13952eb5dc72fbbed7c495036ee
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56940
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
If provided, this option truncates long filenames to avoid unpleasant
line wrapping behavior for those of us that use narrow terminals.
Change-Id: I684b91b7aa4b0ae86a4cf9ed9f047b685ab97550
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57100
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
And add a reasonable timeout to tests.
Change-Id: I362d44f2a799562d236a80f5c35d50d93e8d094a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56769
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Colors were not being escaped properly for windows (which has special non-ANSI color code handling)
Change-Id: I03c34b1205b26b1192af9c05162bbe03035172bd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56500
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
We've decided that these will be omitted for now.
Move the check-spec-examples script into the tools/src directory, and update the go modules.
Add a bash script to build and run this.
Change-Id: I852f8ddb1b9b987410a2a49cf6d14e54c3cf3f0e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56381
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
If a full test row PASSes, then omit this unless the --verbose flag is used.
Add a summary below the table for PASS, SKIP and FAIL for each column.
Change-Id: Ie88003696c59614cf8e5efa3c80dca37a8e4d3f0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56380
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Instead of just generating pointers to functions, generate pointers to all permuted storage types and accesses.
Change-Id: I930b20150d823877eaf72dd7cac850078fe22f35
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54656
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: David Neto <dneto@google.com>
The resolver is the closest thing to a validator in this case.
Enables `--generate-expected` for WGSL files that were previously marked as SKIP.
Change-Id: Id7979ec39571ff52a2beb4255d88e4eb0962b82a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54650
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>