This CL updates the instruction class to be a `Castable` and allocated
from an Arena. Uses are updated to store the const pointer.
Bug: tint:1718
Change-Id: Ie0b8353cb0c6fe6e2ba6e01bcd45871891aef903
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112045
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL pulls the Temp and Constant classes out of the Value base class.
Bug: tint:1718
Change-Id: Ib7bccc7d3190ddd1c5cf493704e778dd23b5c008
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112044
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
The runtime toggle is off by default. When turned on,
the deprecation warning will be turned into validation error.
Replace device->EmitDeprecationWarning with
DAWN_MAKE_DEPRECATION_ERROR macro which make an internal
validation error or make a MaybeError{} based on the toggle.
The callsite can wrap it with a DAWN_TRY.
Bug: dawn:1563, dawn:1525, dawn:1269, dawn:1602
Change-Id: I7fd6f4f8ffc2e054e5fc5fc4aaf23c47f5733847
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111321
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Move the validation of usage and address space to helper.
Improve diagnostics.
Fix / clean up tests.
This is in preparation for tint:1553
Change-Id: I2cbc8b851ecf02f214341f8cba6bd52413c42911
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111880
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Allows Symbol to be used in a std::variant
Change-Id: If366622c39b5c25d633f6507467c9859394577c3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112283
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
Allows Hashmaps to be used as keys to other hashmaps.
Change-Id: I557d99515451c55e599dda847e15ce8e2b4500c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112282
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This CL moves the Value class to pointers stored in the module.
Bug: tint:1718
Change-Id: I0441e898c011b34b0fe2f8ca716ea26c9c566bd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112043
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Instead of always returning a const ref to the KeyValue, make the value
part mutable if the map is mutable.
Change-Id: I56512ba48a09300c51b1ac1ea31665a4941e2794
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112280
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Use the scalar overload of the case creation function.
Bug: tint:1581
Change-Id: I01b0d09ed99a9835583b1cee02ec323d2f2a546f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112204
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This reverts commit f42c4c7e5b.
Reason for revert: Tests are still failing. Win x86 bot doesn't run by
default on Dawn CQ.
Original change's description:
> CTS: Lift expectations for passing tests ComputeDispatchTests.
>
> Bug: dawn:1196
>
> Change-Id: I566f6171b6783fb51c3727aab64bd1488afa933f
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111800
> Commit-Queue: Austin Eng <enga@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: dawn:1196
Change-Id: I27799d6bcbc9e32079a3a39b94c1d42ec517e233
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112240
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Austin Eng <enga@chromium.org>
This CL removes VarData from Value. This will be implemented in another
way and is not currently used anywhere.
Bug: tint:1718
Change-Id: If5758cf050a080c6f68812219cd8ac968b54a8d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112042
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
- Uses an anonymous function to delete command pool/buffers.
- Shuffles the code around a bit so that the CommandPoolAndBuffer are
clearly next to the EncodingContext stuff to make it clear that we
may be able to consolidate them in the future.
Bug: chromium:1372772
Change-Id: I92a1d0333b7a85d439b5963a58db69ac685c03a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112181
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
This CL renames Register to Value and Op to Instruction.
Bug: tint:1718
Change-Id: Ided22c524213235369aae366a678d8058a516b60
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112041
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Replace ScalarArgs struct with Scalar variant and vector.
Fold ValueBase and ConcreteValue into Value.
Change-Id: I5cc5811a87f1aae162feb65fb6b1ecdac033d0fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111761
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Helpful for tests and the like.
Change-Id: I07f8c59af6db4d6a5629dca2dc985398b75eccf9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111760
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This patch enables more WebGPU CTS tests after we land the workaround
about CreatePlacedResource() on Intel GPUs:
https://dawn-review.googlesource.com/c/dawn/+/100641
Fixed: chromium:1343969, dawn:1398
Change-Id: I07b1091d0abc3a457446ca5b6a20ea53b55fe916
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111660
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
- Remove Types variant, and replace with a type-erasing Value class
instead. This is not only better for compile times, but makes the code
much easier to understand.
- Value wraps an internal shared_ptr to a const detail::ValueBase,
allowing it to be used as a value-type (i.e. copyable), while behaving
polymorphically.
- Add static_asserts to Val, Vec, and Mat creation helpers to emit a
more useful error message when the wrong type is passed in.
Bug: tint:1581
Change-Id: Icd0d08522bedb3eab12c44efa0d1555ed6e96458
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111700
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds const-eval for the `normalize` builtin.
Bug: tint:1581
Change-Id: I6d5ba3e0ba507921137ca90c4caefa9daf88f735
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111740
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Remove the scaffolding required to support SPIRV-Tools using C vs. C++11
enums internally.
Key downstream dependencies have been updated.
Change-Id: Ia1982ba25209b6c50ad01679ac0e9fee06388fb8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111680
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
This CL adds const-eval for the `fma` builtin.
Bug: tint:1581
Change-Id: Ia4df818fec9d5d969b364b2c165400d787a9e275
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111584
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This CL adds const-eval for the `distance` builtin.
Bug: tint:1581
Change-Id: Iee3af6474ace8e7baa230156f582f0a372f77cb7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111583
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL adds const-eval for the `inverseSqrt` builtin.
Bug: tint:1581
Change-Id: Ieef063416a8033b5fac9396e30c76c20b3360a90
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111581
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL implements f16 in uniform and storage address space, allowing
using f16 types in uniform and storage buffers on all backends. Tint
uint tests and Dawn E2E tests are added to validate the f16 types work
as expected.
Bug: tint:1473, tint:1502
Change-Id: I15e3de1033d3727f2ea33f4657f682c5f13c2153
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106320
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Ben Clayton <bclayton@google.com>