Add vulkan backend implementations and tests.
Disabled some tests that fail due to tint missing
features and issues.
Bug: dawn:1041, tint:1155
Change-Id: Iac161317450cff59627e08b1228bffde4cef71da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64981
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Change-Id: Id5c8701a673c8fececb83e94dab909272d2f6c00
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65341
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
The conversion should only pass if the element type matches.
Bug: dawn:1123
Change-Id: I700a445e8d281afdc36d1b6f9be73767ca89d4ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65240
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Set BUILD_TESTING to OFF, mainly so Abseil doesn't build its tests,
which aren't configured properly for sub-builds.
Use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR, so third
parties are built in the same directory as the rest of dawn.
Change-Id: I51a2c0887bfb42c1c21223c41bfcbd2816e34034
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Fixes an ASSERT when a render pass is started while another pass is
already current.
Bug: chromium:1253090
Change-Id: I085c1de225f9ba30a7f368fad3b1d8a97ed92c63
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65241
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Adds generated headers in dawn_native for object type tracking similar to that used in dawn_wire. Splits ObjectBase into ObjectBase and ApiObjectBase for clearly differentiation, and adds virtual function to identify the type of ApiObjects. Updates error generation to utilize new object typing for generating messages.
Bug: dawn:628, dawn:840, dawn:563
Change-Id: Ia4f831fcbfb29a70ed5a35d47ed622921e744c84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64820
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
All UNIMPLEMENTED()s are TODO.
Bug: dawn:1123
Change-Id: Ie51b807d8a2a2ba376416d77de383dd627d04a07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64908
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Nothing includes these yet.
Bug: dawn:1123
Change-Id: Ia2178d4bc9bf2c8f8f586493568b2864063d3fc7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64906
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Used to poll a wgpu::Device with calls to Tick() while there are asynchronous tasks in flight.
Bug: dawn:1123
Change-Id: Ieee75b983df836a6df09ae4ff81f7382f4be4995
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64905
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Breaking change, but it should only require small changes in any project
that relies on it, so just doing this instead of a two-stage deprecation.
Will require a manual roll into (at least) Chromium.
Bug: dawn:1080, chromium:1253721
Change-Id: I6699e0629c3b2fe63e7f9d5ba0a928f00316a588
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64520
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is enough to compile the interop code. This doesn't do anything as we need to emit the NodeJS module entry point, and actually hook up the interop to the Dawn bindings.
This comes next.
Bug: dawn:1123
Change-Id: I754b4bcb0532c8446031622d8e8e64e2faaff585
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64903
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Templates used to generate the NodeJS interop classes for the WebGPU IDL.
Also includes a stub `Browser.idl` file that provides stub definitions for browser IDL declarations referenced by the WebGPU IDL.
Bug: dawn:1123
Change-Id: I4067cb186f63436a502c3516a879ed1c5cd30731
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64902
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Core hand-written interop classes, which the template-generated code makes heavy use of.
There's currently no build rules for these files.
These will come in a followup change.
Bug: dawn:1123
Change-Id: Id56f96533070acc8ee581d6f44f83b5374662215
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64901
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
For size parameter in setIndexBuffer and setVertexBuffer, use
wgpu::kWholeSize rather than 0 to indicate using the default
size, i.e. remaining buffer size after offset. Using size=0 is still
avaliable but will cause a deprecation warning.
Bug: dawn:1058
Change-Id: I4c4f6ca6fc7346c225815bdcd607fed110ce2b9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65020
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Multiple groups of limits may be defined via macros.
ApplyLimitTiers degrades the incoming limits such that
each limit value within a group is clamped to the
best possible tier. A device may be in Tier 2 for one
limit group, but Tier 1 for another limit group.
Also adds equality operators to dawn_native generated structs
for comparison of expected limits in the test.
Bug: dawn:685
Change-Id: Ibdf947f2ccd44f70d66f48bed472ff5681230633
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64720
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
These are behind the new `dawn_node` flag, which can be enabled by using the new `scripts/standalone-with-node.gclient` file.
Bug: dawn:1123
Change-Id: Ia7ca715808e46b17f91338f56ffc6794d0104fd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64900
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Contains macros used for logging and marking code as unimplemented.
Bug: dawn:1123
Change-Id: I861348b0cc53eb1dc80ed5b477ab33af45d1acd9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64747
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
A go WebIDL parser and template generator tool.
Will be used to generate the NodeJS bindings for Dawn.
We may wish to reimplement this in Python some day. Not today.
Bug: dawn:1123
Change-Id: I31c868efcd8ba00084a6c25a1fc0e3ad774dfa53
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64746
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Since spirv_to_dxil does not generate HLSL, to support pipeline caching,
we need to generate a cache key from the WGSL instead.
A new type, ShaderCompilationRequest, is added to isolate the
compilation inputs to help ensure that the cache key contains all
relevant information.
Bug: dawn:1103
Change-Id: Ic2f09326dc3ac254cecf35098dcfe95aa396796f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61160
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Michael Tang <tangm@microsoft.com>
Outer projects can just set() the option / setting before calling add_subdirectory() on Dawn.
Also provide a build directory for Dawn's third_party dependencies. Allows the outer project to specify a third_party directory that's out of the dawn tree.
Change-Id: I04c5f12b362ee9c9488b7b78a6aa5fa6f55dec98
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64743
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch implements the asynchronous path of creating render
pipeline on Vulkan backend. This patch also makes the access to
the member mCache of Vulkan::RenderPassCache thread-safe as it
can be accessed in different threads simultaneously.
BUG=dawn:529
TEST=dawn_end2end_tests
Change-Id: I74c799935ef46405275585cb5dccfcb552a48aa4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64840
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Begin's using Abseil's string formatting and new error context tracking
to dramatically improve the usefulness of validation messages. In
addition to putting in place several utilities to enable better messages
this change also updates the BindGroup buffers bindings validation
messages as a test for the new mechanisms.
Bug: dawn:563
Change-Id: Ie5bf5ffb24a9013cebd67745dc4172dfbc901e9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64201
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
glfw is used by several `src/utils/*.cpp` files, regardless of whether examples are being built or not.
Change-Id: Iba90fbf96e254979c72acf792af3cb86d889f5db
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64742
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Change-Id: Ie6be1301c3f2f9877a9dfb04ab5025559b90d926
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64741
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
If this prefix is omitted, then any subdirectory that matches the pattern will also be ignored.
Change-Id: I09b2629156416c26f885d765f88e69be236b7d3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64745
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Every render pass which invokes DrawIndexedIndirect, either directly or
through a RenderBundle execution, is now preceded immediately by at
least one validation pass.
All indirect buffer offests used with DII are validated, and their
validated values are copied into a separate scratch buffer (or zeroed
out there, in the case of validation failure). All encoded DII commands
are rewritten to use the validated parameters instead of the original
ones.
Bug: dawn:809
Change-Id: I5eead937f19536f84f89e2c8e6fed7f18f0aee9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63461
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Adds some unittests for Limits to dawn_unittests.
Statically links dawn_unittests against dawn_native
to access the internals. Additional tests for dawn_native
can now be added to dawn_unittests as well.
Bug: dawn:685, dawn:1105
Change-Id: I1e67c2f673e43d0e07693f3a50920129f135440e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64780
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>