Commit Graph

3913 Commits

Author SHA1 Message Date
Brandon Jones ea5d768f94 Improve validation errors, Part 2
Updated validation messages in:
 - CommandBufferStateTracker
 - RenderBundleEncoder
 - RenderEncoderBase
 - RenderPassEncoder

Bug: dawn:563
Change-Id: I0e8f133333bf759921e5db1b1908ee2dc882c504
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64982
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 21:35:43 +00:00
Dawn Autoroller 7c73488b37 Roll Tint from 2228ad19af to ac958bd1dd (3 revisions)
https://dawn.googlesource.com/tint.git/+log/2228ad19afa9..ac958bd1dd8b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: Ia0f0c73338034434eb8732ba0c2371b4aa840ab0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65222
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-28 20:47:31 +00:00
shrekshao e99ad765ae Overridable constants vulkan implementation and tests
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>
2021-09-28 20:15:52 +00:00
Ben Clayton 6e57843e67 Fix build on GCC: Add missing include
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>
2021-09-28 19:52:35 +00:00
Ben Clayton 5d1613db8e dawn_node: Fix Converter<Napi::TypedArrayOf<T>>::FromJS
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>
2021-09-28 18:08:13 +00:00
Ben Clayton 5a18c2aab8 dawn_node: Add binding/GPURenderBundleEncoder.cpp
Bug: dawn:1123
Change-Id: Id2d8e77456869562a680a5bd7eb2056b1e319311
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64912
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-28 17:30:11 +00:00
Ben Clayton c6b786e0fc dawn_node: Add binding/GPUAdapter.cpp
Bug: dawn:1123
Change-Id: I5eee0036acf4db18dd103f863c4f07511a0cee25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64917
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 16:56:31 +00:00
Aleksi Sapon 9a10674bb9 CMake: fix third parties when dawn is a sub-build
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>
2021-09-28 16:48:01 +00:00
Ben Clayton ffcebe8c2c dawn_node: Add binding/GPUCommandEncoder.cpp
Bug: dawn:1123
Change-Id: Iadc53f1e5629fb58f12c5305cba965b1ef38ffea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64915
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 16:46:12 +00:00
Ben Clayton 334714b312 dawn_node: Add binding/GPUComputePassEncoder.cpp
Bug: dawn:1123
Change-Id: Ied735455b04f52ba214b3ef9ef41edb78d9ed6fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64914
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 16:16:41 +00:00
Ben Clayton c5d9650308 dawn_node: Add binding/GPU.cpp
Bug: dawn:1123
Change-Id: I9d962a149c4bbb0fc8749fdb77c6ad29c59f0111
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64916
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-28 16:14:21 +00:00
Ben Clayton 6104800416 dawn_node: Add binding/GPUQueue.cpp
Bug: dawn:1123
Change-Id: I629008de8b096da537737df18d7173e96d433394
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64913
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 16:07:32 +00:00
Ben Clayton c06b8132ec dawn_node: Add binding/GPURenderPassEncoder.cpp
Bug: dawn:1123
Change-Id: I0f288e1b3c19f0063f346e5801be7e07eaf1818a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64911
Reviewed-by: Corentin Wallez <cwallez@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-28 16:02:46 +00:00
Corentin Wallez 347a597f7d Only call WillBeginRenderPass when encoder is current
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>
2021-09-28 15:55:42 +00:00
Dawn Autoroller e2c74d0b9d Roll Tint from 9c7cd9e9c3 to 2228ad19af (1 revision)
https://dawn.googlesource.com/tint.git/+log/9c7cd9e9c3ee..2228ad19afa9

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I0a5de452569e9c696da2acc49b31d7998896f938
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65221
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-28 15:43:51 +00:00
Loko Kung 8d195d511d Refactors dawn_native objects for list tracking and adds destroy skeleton API.
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>
2021-09-28 15:40:01 +00:00
Ben Clayton 7b04930aa0 dawn_node: Add binding/GPUShaderModule.cpp
Bug: dawn:1123
Change-Id: I0b0bd50314c656a527913d5dffa73032e6cdcdf2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64910
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 14:09:40 +00:00
Ben Clayton 05944b0f97 dawn_node: Add binding/GPUTexture.cpp
Bug: dawn:1123
Change-Id: I2858cc2b86aa9189a92a2f4a9f0988a9f7b36953
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64909
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 13:58:00 +00:00
Ben Clayton ca9bc676aa dawn_node: Add binding .cpp files for trivial types
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>
2021-09-28 13:56:01 +00:00
Ben Clayton 118d2dd19e dawn_node: Add binding/Converter.[cpp,h]
The interop -> Dawn conversion utility class.

Bug: dawn:1123
Change-Id: I8a2a352eb730a4a528f6a0262d5b21e08d85b413
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64907
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 13:18:40 +00:00
Ben Clayton 3e5848a4de dawn_node: Add all the headers for the binding classes
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>
2021-09-28 13:09:30 +00:00
Ben Clayton a35156b732 dawn_node: Add binding/AsyncRunner
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>
2021-09-28 13:01:41 +00:00
Ben Clayton af48bbc460 dawn_node: Add binding/Errors.[cpp,h]
Errors contains static helper methods for creating DOMException error messages as documented at:
https://heycam.github.io/webidl/#idl-DOMException-error-names

Bug: dawn:1123
Change-Id: I5fcf4e146c91cde37f5514d8a4a426b17de6a701
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64904
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 11:59:10 +00:00
Kai Ninomiya 51791e0409 Add 'reason' argument to device lost callback
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>
2021-09-28 11:52:17 +00:00
Ben Clayton affb7a3ab9 dawn_node: Begin working on the CMake rules
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>
2021-09-28 11:14:42 +00:00
Ben Clayton 897cdeeb61 dawn_node: Add template files
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>
2021-09-28 10:01:02 +00:00
Ben Clayton 6d8a03e707 dawn_node: Add interop/Core.[h,cpp]
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>
2021-09-28 09:58:41 +00:00
Dawn Autoroller aea848e1ac Roll Tint from 231b50baab to 9c7cd9e9c3 (1 revision)
https://dawn.googlesource.com/tint.git/+log/231b50baab51..9c7cd9e9c3ee

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I163fc31162b090c34cfab0cacd0ed95cc8b92bb9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65201
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-28 05:05:11 +00:00
Zhaoming Jiang 2be4b8483c Deprecate size=0 for default in setIndexBuffer and setVertexBuffer
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>
2021-09-28 02:05:00 +00:00
Austin Eng 8411a12ab1 Add a mechanism for finding the best tier for a set of limits
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>
2021-09-28 01:04:10 +00:00
Dawn Autoroller f04d9d6618 Roll Tint from b9a2f5946e to 231b50baab (4 revisions)
https://dawn.googlesource.com/tint.git/+log/b9a2f5946e0c..231b50baab51

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I105d4cb7545d8080dc5b85c4db61bc291df00249
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65200
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-27 23:46:50 +00:00
Ben Clayton dc890d6915 DEPS: Add NodeJS binding dependencies
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>
2021-09-27 22:55:39 +00:00
Ben Clayton a3c387a6a2 dawn_node: Add utils/Debug.h
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>
2021-09-27 21:56:19 +00:00
Ben Clayton cea792f971 dawn_node: Add idlgen tool
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>
2021-09-27 20:41:15 +00:00
Michael Tang 029d67f2c8 D3D12: implement WGSL pipeline cache key generation
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>
2021-09-27 17:15:09 +00:00
Dawn Autoroller 4420ecc71e Roll Tint from 594e010cfb to b9a2f5946e (1 revision)
https://dawn.googlesource.com/tint.git/+log/594e010cfb67..b9a2f5946e0c

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC kainino@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: kainino@google.com
Change-Id: I480010359f5e9987994b6a86d675ff5b5eacb528
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65060
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-24 19:41:57 +00:00
Ben Clayton 30eeac7578 CMake: Simplify overriding of options / settings
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>
2021-09-24 10:38:18 +00:00
Jiawei Shao 0e3aa3c8d0 Metal: Support creating render pipeline asynchronously
This patch implements the asynchronous path of creating render
pipeline on Metal backend.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I3f40949f35f6cbc340bebf481bd4e204b12d86c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64880
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-24 00:40:59 +00:00
Jiawei Shao 525039ddc6 Vulkan: Support creating render pipeline asynchronously
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>
2021-09-24 00:40:57 +00:00
Brandon Jones ba66295033 Improve validation errors, Part 1
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>
2021-09-23 21:26:33 +00:00
Brandon Jones a04663c13d Added Abseil as a third-party dependency (Take 2)
Another attempt at https://dawn-review.googlesource.com/c/dawn/+/63780
Depends on https://skia-review.googlesource.com/c/skia/+/451638

This version of the CL fixes the Cmake and Skia compatibility issues
from the previous CL.

Bug: dawn:563
Change-Id: I41a7ee0aef1924df08a9be41e94effb7cd0025df
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64600
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-23 20:36:03 +00:00
Ben Clayton 0ecd67a3fa CMake: Fix build when DAWN_BUILD_EXAMPLES=0
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>
2021-09-23 20:13:53 +00:00
Dawn Autoroller 37126dd679 Roll Tint from 5e6d4577fd to 594e010cfb (1 revision)
https://dawn.googlesource.com/tint.git/+log/5e6d4577fdc6..594e010cfb67

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC kainino@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: kainino@google.com
Change-Id: I9e3adf216ebe3386989297f292057de85d669690
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64960
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-23 19:43:13 +00:00
Ben Clayton c19329c832 CMake: Only require SPIRV-Cross when enabling OpenGL backend
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>
2021-09-23 19:24:43 +00:00
Ben Clayton 999cc24209 Fix all GCC 10 warnings
Change-Id: Ibabab265e734a4a421a38ab586e7e11905fa5da1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64740
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-23 17:34:53 +00:00
Ben Clayton e0da9ffedd .gitignore: Prefix ignored root directories with '/'
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>
2021-09-23 10:48:19 +00:00
Ken Rockot ebf183bde4 Implement drawIndexedIndirect validation
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>
2021-09-23 00:15:19 +00:00
Dawn Autoroller 95cfd263ab Roll Tint from a617d0f0fc to 5e6d4577fd (1 revision)
https://dawn.googlesource.com/tint.git/+log/a617d0f0fccc..5e6d4577fdc6

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC kainino@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: kainino@google.com
Change-Id: I5dcf13f5127be2af9842fd4198a1369d867722bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64861
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-22 20:44:01 +00:00
Dawn Autoroller da7756cc3d Roll Tint from 28d6763ef8 to a617d0f0fc (1 revision)
https://dawn.googlesource.com/tint.git/+log/28d6763ef8e3..a617d0f0fccc

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC kainino@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: kainino@google.com
Change-Id: I548f7d006426853264d8cf0d5886f7e9e44cd7cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64860
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-22 15:32:20 +00:00
Austin Eng 1bca15969e Add dawn_native unittests for Limits
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>
2021-09-22 14:50:30 +00:00