This CL adds commented out blocks for the various switches required to
walk the AST.
Bug: tint:1718
Change-Id: I70e7c4d0168621bf97006a782f2942df1173c393
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110780
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
- Messed up the conditon in previous change so it required both the
enable flag to be on and the disable to be off, but then we can't
deprecate the enable flag in Chromium.
Bug: dawn:549
Change-Id: I1c730939104aafaef48182238fa32ed7fa6a1e16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110983
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
- The disable toggle will supercede the enable one once Chromium side
deprecates usage of the enable one.
Bug: dawn:549
Change-Id: I5c5bd60161917fe2654cfce55a6f29e8a7e79962
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110728
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
The `forced` parameter is always false, remove it.
Change-Id: I9aa16dfc6a51516f6b6e619a3c8ce982a25ba4c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111101
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
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>
Update CreateASTTypeFor() to handle a potential edge-case described in tint:1764.
We haven't seen this issue happen in production, nor can I find a way to trigger this with the tint executable, but try to handle this before we encounter a nasty bug.
Fixed: tint:1764
Change-Id: I496932955a6fdcbe26eacef8dcd04988f92545a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111040
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds const-eval for `degrees` and `radians`.
Bug: tint:1581
Change-Id: I7f00e2b1e5ab7c8e895680a6b75b9531dac31f5a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110601
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
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>
There's a reason the overload of `ctx.Replace()` that takes a pointer to the replacement is deprecated - it doesn't play well when used as part of another replacement.
Switch to using the callback overload of Replace() to fix bad transform output.
Bug: tint:1386647
Change-Id: I94292eeb65d24d7b2446b16b8b4ad13bdd27965a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111000
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
...now that we correctly fail on inf/nan. Also fold separate error test
functions into SmoothstepCases.
Also fixed atanh, acos, acosh, and asin tests to properly test error
cases for all float types, not just abstract float.
Bug: tint:1581
Bug: tint:1747
Change-Id: I63bd57d36beab4cc7dde501183052aa688e2efdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110727
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This is a catch-all that handles all cases where an operation can result
in non-finite values, such as from calls to std::cosh and std::sinh.
Bug: tint:1581
Bug: tint:1747
Change-Id: Ibb55466fea01b263c98d598459c788fd22cf5bb7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110726
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
For example, a large f32 value converted to f16 now fails, instead of
resulting in +/-inf.
Bug: tint:1581
Bug: tint:1747
Change-Id: I30fd8c61ecc328206e8f73b626af8046dad4b0b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110723
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Cache .json files are generated at build time. This relies on a
list of the expected cache outputs.
The path to the cache is hardcoded in the test_runner and the
.json files are loaded at runtime.
Change-Id: Icc125125df7e9c338a243526dbc4950a2517039f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110441
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This will be required to use the new data-caching functionality provided by:
https://github.com/gpuweb/cts/pull/1985
Also propagate `--verbose` down, if passed to the frontend.
Change-Id: Ic436e8ed754296cec859c45bd4db703634c31ab1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109764
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
The SingleEntryPoint transform currently does not strip away any
unused type declarations, which was leading to broken code when an
alias referenced an override that was removed. We can detect this
scenario and remove such aliases, until we have a better mechanism for
detecting all unused aliases.
Fixed: tint:1763
Change-Id: I319ff30b5e52d7dd54596cc99a2201a708c502f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110725
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
The #if disabled code wasn't compiling as a variable was renamed
Change-Id: I2ce7210d18d52036dd99f729a44e21c6137f84a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110520
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
With this CL, binary ops add, subtract, multiply, and divide of concrete
values will now produce an error if the result is inf/NaN, as it was
doing with abstract values. This also affects the cross builtin, which
is written in terms of subtract and multiply.
Bug: tint:1581
Bug: tint:1747
Change-Id: Ib1d0d8deddc82c67ab53729a6011937636fcc1a5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110163
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
- The test was failing on the google3 TAP bots.
- Also adjusts the size so that it is the aligned min given the limit,
not just the aligned limit since that can be larger than the limit.
Bug: dawn:1217
Change-Id: I02a68d14d61099dc5c1a2450cbaadc2320f5b8a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110760
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
This patch adds a workaround on Intel Gen9.5 and Gen11 GPUs to always
allocate 2D textures with CopyDst as committed resources instead of
placed resources to mitigate a driver bug about CreatePlacedResource().
Bug: chromium:1237175
Test: dawn_end2end_tests
Change-Id: I64ab9c083c8835fb2971660eed51252fecac416c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100641
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
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>
- Issue found in LinkedListTests when running against ASAN since the
LinkedList was being destroyed after the Nodes, thereby triggering
a RemoveFromList on the root node, but the other nodes were never
removed from the list and are dangling pointers.
Change-Id: I136abbc5d73c35142990c9fe4669e5fc6d5ef644
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110500
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Since overrides can be used to size workgroup arrays and also as
initializers to module-scope variables, we cannot just consider
overrides that are directly referenced in the shader functions.
This change makes the Resolver track references to overrides whilst
resolving array types and module-scope variable declarations, so that
they are included in the set of overrides reported by the Inspector in
these scenarios.
Fixed: tint:1762
Change-Id: If7501abf3ddcb87a87134ddd578aa4904d204de6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110460
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This reverts commit f3666c45f3.
Reason for revert: Did not realize these assertions could knowingly be reached after this fix for crbug.com/1340654
Original change's description:
> Add assertions to ServerInlineMemoryTransferService to catch corrupted states while fuzzing with DawnWireServerFuzzer and tests.
>
> Bug: chromium:1340654,chromium:1374495,chromium:1376477
> Change-Id: Icfb008a1cd6dbd8af32f3aedc90ef29e29a0465b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106041
> Commit-Queue: Brendon Tiszka <tiszka@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: chromium:1340654,chromium:1374495
Change-Id: I5bff56e32266721ec418a545ad72c1065c73d526
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109461
Commit-Queue: Brendon Tiszka <tiszka@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>