Commit Graph

4024 Commits

Author SHA1 Message Date
Brandon Jones 4d2bc396ea Improve validation errors in RenderPipeline
Updates all validation messages in RenderPipeline.cpp to give them
better contextual information.

Bug: dawn:563
Change-Id: Iccf2714c781c2e1d52eaf00bf81f1d5643635cf7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65484
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-09-30 01:30:12 +00:00
Dawn Autoroller 56f3807741 Roll Tint from efe1f14685 to 1ca6fbad8f (1 revision)
https://dawn.googlesource.com/tint.git/+log/efe1f1468521..1ca6fbad8f23

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: I765d24e35a9934ff25a3218a2447df0a732f6a93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65482
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-29 21:53:23 +00:00
Brandon Jones d6d2584480 Add debug group logging to validation errors
Updates the formatted error messages to display as:

Error message text.
 - While context 2.
 - While context 1.

Debug group stack:
 > "Debug Group Label 2"
 > "Debug Group Label 1"

Bug: dawn:563
Change-Id: I66f5ed59d3e6960722c0d1faf7eaa770d9774eb6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65480
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-29 19:39:02 +00:00
Brandon Jones 9b643b72f7 Improve validation errors, Part 3
Modified ConsumedError and TryEncode methods to allow for top-level
error context messages. Applied them to:
 - ComputePassEncoder
 - ProgrammablePassEncoder
 - RenderEncoderBase
 - RenderPassEncoder
 - Device

Bug: dawn:563
Change-Id: I4a989763f57afbcf6b1cfe87ccaaba502ebd29fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65101
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-29 18:39:23 +00:00
Dawn Autoroller caba9139a0 Roll Tint from ac958bd1dd to efe1f14685 (1 revision)
https://dawn.googlesource.com/tint.git/+log/ac958bd1dd8b..efe1f1468521

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: I299e6c0a81c2a6bdf39115554c39060af08efaff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65460
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-29 16:29:22 +00:00
Ben Clayton d6ecf83c19 dawn_node: Add Module.cpp
This is the node plugin entrypoint

Bug: dawn:1123
Change-Id: I4a48b047482a7c9f1a0f10cc2a5a02721d103b8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-29 09:51:21 +00:00
Corentin Wallez cac3e7e110 Revert "OpenGL: delete shaders and pipelines when they are not used any longer"
This reverts commit a57c1db878.

It produces a GL_INVALID_VALUE in ColorStateTest.ColorWriteMask

BUG=dawn:529

Change-Id: I3511057daf24baaf895b86cbda2a3a21e58d77fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65384
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-09-29 09:15:02 +00:00
Ben Clayton bc207f7193 dawn_node: Add binding/GPUDevice.cpp
Bug: dawn:1123
Change-Id: Ied4baca4d5eea41ad13ee488978a8f2354d5f8d0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64919
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-29 08:48:43 +00:00
Jiawei Shao 3c0925b480 Avoid redundant creation of RenderPipelineBase in GetCachedRenderPipeline
This patch removes a redundant creation of RenderPipelineBase object
in GetCachedRenderPipeline(). Instead, we directly compute the blueprint
hash from the uninitialized backend render pipeline object.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I3c7a2acfc01ab9e1e631793030ea06c9ae908aa2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65000
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-29 00:49:01 +00:00
Jiawei Shao a57c1db878 OpenGL: delete shaders and pipelines when they are not used any longer
Previously on OpenGL backend the GL pipelines and shaders are never
deleted. With this patch the GL pipelines and shaders will be able to
be destroyed correctly after they are not needed any longer.

BUG=dawn:529

Change-Id: I4f7f22c7b536825363fe1ecc0f5ffd1bb86fd774
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-29 00:48:22 +00:00
Ben Clayton 126dc7d20f dawn_node: Add binding/GPUBuffer.cpp
Bug: dawn:1123
Change-Id: I4ba8d69bcd91a1fa0ed43a5ca063c7ff14d7d031
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64918
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-28 21:51:28 +00:00
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