Commit Graph

4990 Commits

Author SHA1 Message Date
Dawn Autoroller 9a8df8603a Roll Tint from 77f7f5d369 to 65ae64d009 (1 revision)
https://dawn.googlesource.com/tint.git/+log/77f7f5d36924..65ae64d0092a

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 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/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I92d83460689f93ae08430e753259b90c9065d1c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49500
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-29 15:06:07 +00:00
Dawn Autoroller 4d5e02366a Roll Tint from 23c73b0b32 to 77f7f5d369 (1 revision)
https://dawn.googlesource.com/tint.git/+log/23c73b0b3245..77f7f5d36924

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 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/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: Ie34c2cc84bad9e7b646954db08ec5aa51d67dd73
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49480
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-29 03:17:07 +00:00
Dawn Autoroller bed90d40c1 Roll Tint from 2ac55febf5 to 23c73b0b32 (5 revisions)
https://dawn.googlesource.com/tint.git/+log/2ac55febf5d3..23c73b0b3245

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 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/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I2d9cf0e3457bb964d4bd7c5a77dc63aa989b6d58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49422
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-28 22:07:46 +00:00
Dawn Autoroller 963991a107 Roll Tint from 70c8a96cd8 to 2ac55febf5 (7 revisions)
https://dawn.googlesource.com/tint.git/+log/70c8a96cd809..2ac55febf5d3

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 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/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: Iea8698c9cb04d981d1f6c50e00347deafe0c7565
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49420
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-28 16:39:46 +00:00
Dawn Autoroller 1de1371bc5 Roll Tint from 5bdece5583 to 70c8a96cd8 (1 revision)
https://dawn.googlesource.com/tint.git/+log/5bdece558342..70c8a96cd809

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 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/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: Ifbfc0a9c912a2384c0a77d8b820399578c388a22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49307
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-28 10:18:26 +00:00
Dawn Autoroller 1bd0450254 Roll Tint from 86a406b79e to 5bdece5583 (8 revisions)
https://dawn.googlesource.com/tint.git/+log/86a406b79efe..5bdece558342

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 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/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: If2a0dddd53f3b53e950468c2b1099f16e98b1745
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49304
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-27 20:57:47 +00:00
Yunchao He ef6a482fb2 Implement 3D Texture copy for partial depth slices on D3D12
Note that a slice somehow means a subresource on D3D12. There
are mip slice, array slice, and plane/aspect slice in D3D12.
We reuse the term "slice" for multiple depth of a 3D texture,
although one single depth slice of multiple depth slices is
not a separate subresource of a 3D texture (all these depth
slices for one mip are a separte subresource in 3D texture).

For the reason above, this change also renames "slice" to
"layer" in some functions if "slice" is a layer in that
function. Because a layer is definitely a subresource but a
slice may not be (like a single depth slice of a 3D texture).

Bug: dawn:547
Change-Id: I88b8120ef7f73bfc261fc225f4242924da221654
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49240
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-04-27 20:22:17 +00:00
陈俊嘉 74326fe2c8 Add support for UWP CoreWindow in SwapChain and Surface
Add SurfaceDescriptorFromWindowsCoreWindow structure in codegen.
Add WindowsCoreWindow surface type.
Add support for WindowsCoreWindow surface in SwapChain.

Bug: dawn:766
Change-Id: If89258dc68896b9ba22c677d37ca3ba68c6fceb7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48762
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: 陈俊嘉 <cjj19970505@live.cn>
2021-04-27 16:43:27 +00:00
Dawn Autoroller 12c6305674 Roll Tint from 31204afeb0 to 86a406b79e (7 revisions)
https://dawn.googlesource.com/tint.git/+log/31204afeb025..86a406b79efe

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 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/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I3fb4efaac1fc1c8a7e8102da3b17fd4592ffb565
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49300
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-27 15:54:37 +00:00
Jiawei Shao 045a02adc0 Fix incorrect return status of Create*PipelineAsync when device is lost
This patch fixes the incorrect return status of Create*PipelineAsync
when device is lost by explicitly calling and clearing all the
Create*PipelineAsync callbacks in DeviceBase::HandleError() when the
device is lost.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I67a8047b2e5a54f6f85c5a4cbcf420b744ac0d5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-04-27 09:33:26 +00:00
陈俊嘉 cf569e2c58 Remove reduntant dependencies in UWP compilation
Remove d3d12.li, dxgi.lib and d3d11.lib dependencies when targeting UWP.
Add dxgi.lib only for DXGIGetDebugInterface1 in debug build when targeting UWP.
Use DXGIGetDebugInterface1 only in debug build when targeting UWP.

Bug: dawn:766
Change-Id: I5fa53dbb257acf604836f861f75a122a7d417e7c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49040
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: 陈俊嘉 <cjj19970505@live.cn>
2021-04-27 06:09:36 +00:00
Jiawei Shao c952097dc6 Remove incorrect ASSERT in ~AsyncWaitableEvent
This patch removes an incorrect ASSERT(IsComplete()) in the
destructor of AsyncWaitableEvent because when the destructor of
AsyncWaitableEvent is called, the async task attached to mFuture
may not be completed and the status of mFuture may not be 'ready'.
In fact in C++14 we can always guarantee the attached async task
is completed after the destruction of mFuture.

BUG=dawn:529

Change-Id: I2f28246beb025a0d39dd432a404c0b04aed17249
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-04-27 02:50:46 +00:00
Bryan Bernhart e688e52e6c D3D12: Disable GBV when using partial validation.
GBV's ability to patch shaders with validation code
was hanging several end2end tests. Since disabling
GBV shader patching would render partial validation
ineffective, partial validation was re-mapped to have
GBV disabled while full validation enables GBV by default.

End2end tests now default to partial validation so
tests that would otherwise not run with GBV can still
have some coverage.

BUG=dawn:592

Change-Id: Iafb271b5ee8862592152fa45c34f188d64432e60
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46725
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Auto-Submit: Bryan Bernhart <bryan.bernhart@intel.com>
2021-04-26 18:26:36 +00:00
Corentin Wallez 3d71624bfd Only add extra warnings when building in standalone.
This avoids breaking dependents when they use a version of clang that's
different than the one being tested on Dawn CQ.

Also re-enable -Wdeprecated-copy(-dtor)

Bug: chromium:1201858
Change-Id: I09763fdb98e7dba53b4d9fa66fa4c606620a0078
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49100
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-04-26 17:18:16 +00:00
Dawn Autoroller 6d099f05e6 Roll Tint from 8f9de8a509 to 31204afeb0 (3 revisions)
https://dawn.googlesource.com/tint.git/+log/8f9de8a50954..31204afeb025

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 sarahmashay@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: sarahmashay@google.com
Change-Id: Ie35f47075c08fcdddf4318c79b5b85d1df838e57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49063
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-26 16:21:06 +00:00
Dawn Autoroller 125aaf7ba8 Roll Tint from 12353bc5fd to 8f9de8a509 (1 revision)
https://dawn.googlesource.com/tint.git/+log/12353bc5fd80..8f9de8a50954

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I5a248fda850352894ef8c5436cff68e45ed804ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49062
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-26 10:55:25 +00:00
Jiang caddf0c178 Clean up two unused function declarations
Remove the following 2 function declarations since their function
bodies are no longer available.
1.  ResultOrError<Ref<RenderPipelineBase>> CreateRenderPipeline(
        const RenderPipelineDescriptor* descriptor);
    in src/dawn_native/Device.h
2.  BufferUploader* GetBufferUploader() const;
    in src/dawn_native/vulkan/DeviceVk.h

BUG=none

Change-Id: I55a92a4acb3af3ea4807bfd0b58a0246d0b28cc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49061
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-26 10:12:26 +00:00
Hans Wennborg 55210f383c [build] Disable -Wdeprecated-copy(-dtor)
It fires with newer versions of Clang (see bug).

Bug: chromium:1201858
Change-Id: I4730dcfe52c74bfb730c4cb4c55877cafecb3385
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48692
Reviewed-by: Hans Wennborg <hwennborg@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-26 09:00:25 +00:00
Ryan Harrison bf99a720c3 Re-enable unittests for Tint
Bug: tint:717
Bug: tint:692
Bug: tint:718

Change-Id: I5765d8582ee0132efb47939f495781954a1e2afa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48843
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2021-04-26 08:31:15 +00:00
Dawn Autoroller 221b8b06cc Roll Tint from ab215981fe to 12353bc5fd (3 revisions)
https://dawn.googlesource.com/tint.git/+log/ab215981fe11..12353bc5fd80

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I744382e553f952525e62c6f713b3ddb616c3fb6e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49020
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-24 00:59:53 +00:00
Dawn Autoroller 96c7086628 Roll Tint from 05abdf5096 to ab215981fe (5 revisions)
https://dawn.googlesource.com/tint.git/+log/05abdf5096fa..ab215981fe11

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I3f448fa52adb3c25848d37631a1b8e8e3147add9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48901
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-23 19:37:03 +00:00
Dawn Autoroller d47c27ba10 Roll Tint from 145f865fb1 to 05abdf5096 (1 revision)
https://dawn.googlesource.com/tint.git/+log/145f865fb1cb..05abdf5096fa

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I844812e2373dff7786159d061164d3de5ccb5f4f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48920
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-23 09:15:23 +00:00
陈俊嘉 02336e6f99 Add UWP support
Add necessary cflags and cflags_cc for winrt compilation.
Add 'dawn_is_winuwp'.
Set 'dawn_enable_vulkan' and 'dawn_supports_glfw_for_windowing' when compiling for UWP.
Link d3d12, d3d11 and dxgi stub libs when compiling for UWP.
Use LoadPackagedLibrary instead of LoadLibraryA in DynamicLib when compiling for UWP.

Swapchain related changes will be in another commit.

Bug: dawn:766
Change-Id: I1210798a21cc175bab77281403d262d4bfb02d99
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48480
Commit-Queue: 陈俊嘉 <cjj19970505@live.cn>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
2021-04-23 02:16:12 +00:00
Dawn Autoroller e6a12d5efa Roll Tint from 26fa9927e8 to 145f865fb1 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/26fa9927e8c3..145f865fb1cb

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: dawn:728
Tbr: rharrison@google.com
Change-Id: I01e5af85052d6d20d3ddc0c28c03bc30f734d425
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48802
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-23 00:20:42 +00:00
Dawn Autoroller aa7e903423 Roll Tint from 943ded79d2 to 26fa9927e8 (7 revisions)
https://dawn.googlesource.com/tint.git/+log/943ded79d2b1..26fa9927e8c3

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: Ibad7a842bd1632259f69ddac93ef013fb6aff6f4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48801
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-22 18:51:02 +00:00
Brian Ho 5346e770c9 Add helper functions to iterate over ChainedStructs
This CL adds two helpers for more ergonomic processing of
ChainedStructs.

1. FindInChain(): Iterates through the chain and automatically
   casts the ChainedStruct into the appropriate child type before
   returning.
2. ValidateSTypes(): Verifies that the chain only contains structs
   with sTypes from a pre-defined set. This also allows the caller
   to specify one-of constraints.
3. ValidateSingleSType(): Verifies that the chain contains a
   single struct with a specific sType or is an empty chain. This
   is a common case of |ValidateSTypes()| and is separated out as
   a fast-path.

Change-Id: I938df0bf2a9b1800b1105fb7f80fbde20bef8ec8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47680
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-22 17:49:42 +00:00
Ryan Harrison b48d1f4b3d Add header for std::forward
Previously this was being indirectly supplied by <memory>, which has
been removed. Clang happily still finds std::forward, but GCC does
not.

BUG=dawn:768

Change-Id: I87e6bb6aa83bc7f3253c58e32fa0ba977752858c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48820
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-22 16:21:52 +00:00
Dawn Autoroller 5e57442beb Roll Tint from d5ceafee16 to 943ded79d2 (1 revision)
https://dawn.googlesource.com/tint.git/+log/d5ceafee1684..943ded79d2b1

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: Ife0021b0d5d82b6b86a1dcccbd446f273e4efad9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48800
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-22 14:02:54 +00:00
Hao Li aed656cd7a Clear resolve buffer to 0 for resolving unavailable queries
- Add vkCmdFillBuffer in ResolveQuerySet to clear the buffer to 0s for
  these unavailable queries if the buffer has been initialized or fully
  used which won't been initialized with 0s again.
- Because vkCmdFillBuffer has driver issue on Intel Windows, Skip some
  affected cases.
- Remove unsafe api checking from Occlusion Query.

Bug: dawn:434

Change-Id: Ib34f81d93b0de8f08f0eeebf3c8a967eeb5ecefb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-22 10:10:12 +00:00
Dawn Autoroller b29467ba7b Roll Tint from 98c2cf0e91 to d5ceafee16 (6 revisions)
https://dawn.googlesource.com/tint.git/+log/98c2cf0e9194..d5ceafee1684

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I3af649acd47b29ebfdb47a1667a4e5376fa3287c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48780
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-22 02:06:33 +00:00
Ben Clayton 6dd1d37da8 unittests: Add a position return value for vertex shaders
Fixes new validation errors added with:
https://dawn-review.googlesource.com/c/tint/+/48560

Change-Id: Icb9a3bc46574c365a812685d01aab336a11792c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48681
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-04-21 20:26:31 +00:00
Corentin Wallez b395605ab3 Add docs/contributing.md
Bug: dawn:23
Change-Id: I2cbf40c4079ea9d35c3d0c299c30e39b22eff80a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48420
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-21 18:05:01 +00:00
Corentin Wallez bda3796da9 WGSL: Replace last uses of var<in> and var<out>
Bug: dawn:755

Change-Id: Idaca6965fd2b5d0f2e0028d8edfff6c507050a45
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48240
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-04-21 16:40:50 +00:00
Dawn Autoroller a584ae7770 Roll Tint from c0810e7e6e to 98c2cf0e91 (4 revisions)
https://dawn.googlesource.com/tint.git/+log/c0810e7e6eba..98c2cf0e9194

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I1aacde7b41a2e7703a9c274c7a173abc954d0624
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48640
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 15:35:20 +00:00
Corentin Wallez ed1afa8108 client::Buffer: In debug mode, clobber mMappedData when it is freed
This will help detect cases where the mapped data is used after it is
freed, in particular in WebGPU tests around the interaction of mapping
and GC.

Bug: chromium:971949
Change-Id: I820d9885d39379fbc95c6504b9a4151053768d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48382
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-21 15:17:02 +00:00
Jiawei Shao d0e8dc0e92 D3D12: Initialize DXC in Device::Initialize()
This patch moves the initialization of DXC libraries from
BackendD3D12::GetOrCreateXXX() to Device::Initialize() so
that we don't need to deal with those lazy initializations
in the asynchronous path of Create*PipelineAsync().

BUG=dawn:529

Change-Id: I792847c138738ae8c300d7a1bf3d23fc8fecd746
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48580
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-04-21 14:35:01 +00:00
陈俊嘉 672105aa0a Add string to wstring conversion helper and related unittest
Bug: dawn:766
Change-Id: I318c630df01fcdb302d36873a783fdf1a39c608c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48200
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: 陈俊嘉 <cjj19970505@live.cn>
2021-04-21 11:05:50 +00:00
Dawn Autoroller 9446154d74 Roll Tint from 5b3d88b748 to c0810e7e6e (2 revisions)
https://dawn.googlesource.com/tint.git/+log/5b3d88b748e4..c0810e7e6eba

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: Iedfb57f930949d2d25679fcb63df858fd1f2d1ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48620
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 10:04:30 +00:00
Ryan Harrison 5147cb51e1 Fix MinBufferSizeDefaultLayoutTests.RenderPassConsidersBothStages
This test was passing on SPIRV-Cross due to SPRIV-Cross's
overreporting of binding information per entry point. On Tint it was
failing, because the resources in the vertex shader were not being
referenced, so not being reported. I have corrected the values passed
to the utility code that generates the shaders, so that it generates
the needed references.

I have also slightly tweaked the test, so it will distinguish between
failure states better.

BUG=tint:716

Change-Id: If88f600a36cba8b580d888e902b8d8102e05bd10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48520
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-21 08:52:30 +00:00
Dawn Autoroller 55c43bff00 Roll Tint from b696607338 to 5b3d88b748 (26 revisions)
https://dawn.googlesource.com/tint.git/+log/b69660733875..5b3d88b748e4

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: dawn:728
Tbr: rharrison@google.com
Change-Id: Iae4570aae425cd077d57bff98bec4e788bec63f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48447
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-20 19:13:40 +00:00
Austin Eng 9aadf94c15 SlabAllocator: Fix writing to freed memory on slab destruction
unique_ptr's destructor sets itself to null and frees its owned
memory. This is a problem because for the slab allocator, the
member variable holding the unique_ptr is inside the freed memory.

Bug: skia:10501
Change-Id: I41179261041fe415bb2af3667114b079f61b3c7b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48100
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-04-20 17:53:50 +00:00
Ben Clayton cd39ade86f Re-add const to TranslateToHLSLWithTint()
Addresses a late review comment:
https://dawn-review.googlesource.com/c/dawn/+/48060/8/src/dawn_native/d3d12/ShaderModuleD3D12.cpp#197

Change-Id: I71a85171a1dc2d98760f2a5fce5df4eb513f9467
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48385
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-20 14:32:19 +00:00
Ben Clayton 8091c68450 Cleanup transform usage
Use tint::transform::DataMap for inputs as well as outputs.

This allows tint to nest transforms inside each other (e.g. embedding
transforms inside sanitizers), and still having a consistent way to pass
data in and out of these transforms, regardless of nesting depth.

Transforms can also now be fully pre-built and used multiple times as
there is no state held by the transform itself.

Bug: tint:389

Change-Id: If1616c77f2776be449021a32f4a6b0b89159aa2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48060
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-04-19 19:42:19 +00:00
James Price eae70b75ae Update WGSL in tests with renamed builtins
These builtins have been renamed:
* frag_coord -> position
* sample_mask_in -> sample_mask
* sample_mask_out -> sample_mask

Change-Id: Ic40dc9f4e509587b7ac82e43abbf9eec68225d9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48300
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-19 15:29:49 +00:00
Dawn Autoroller 7f5a472258 Roll Tint from 4649377d05 to b696607338 (1 revision)
https://dawn.googlesource.com/tint.git/+log/4649377d0575..b69660733875

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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: Ifb72ff33369601363299fc9b1f4575f3f53cd0e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48280
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 14:46:39 +00:00
Corentin Wallez 0af4a834a9 dawn_native: Use refcount-safe methods for reentrant object creation
Previously all uses of reentrant object creation in Dawn native
needed to manually AcquireRef. Change them to use CreateFooInternal that
returns a ResultOrError<Ref<>> and are renamed to CreateFoo.

Bug: dawn:723

Change-Id: Ifcda3659d02cc5a4c63c248dc53af7fee7c4a61d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46626
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-04-19 08:52:35 +00:00
Dawn Autoroller b6c0dac110 Roll Tint from fe70c75bc5 to 4649377d05 (10 revisions)
https://dawn.googlesource.com/tint.git/+log/fe70c75bc573..4649377d0575

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 alanbaker@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Bug: None
Tbr: alanbaker@google.com
Change-Id: Ife30fda06c27a34af8a322f96d1cb4c50b5b23e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48180
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-17 13:08:03 +00:00
Brandon Jones 5e6a092703 Deprecate renderpass color/depth .attachment
As of https://github.com/gpuweb/gpuweb/pull/1352 the spec indicates that
GPURenderPassColorAttachmentDescriptor and
GPURenderPassDepthStencilAttachmentDescriptor should use .view rather
than .attachment to indicate the TextureView associated with the
render pass attachment.

Bug: dawn:762
Change-Id: I70d615e19d8e7aae5b26aa5965c7109289ab868b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47902
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-04-17 01:51:53 +00:00
James Price 12953caa42 Enable WGSLUnsortedStructIO test
Tint now sorts struct members with entry point IO attributes.

Bug: tint:710
Change-Id: I7bb37cab2f101fbcf55dd8b42ee3b3af1250bf1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47840
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2021-04-16 20:37:23 +00:00
James Price edb575d631 Revert "Temporarily stop running tests on D3D12 with use_tint_generator"
This reverts commit 5c9b6a8f81.

The issue has now been fixed in Tint and rolled into Dawn.

Fixed: dawn:758
Change-Id: Id7deb6cea9f22ee8c5f345a28d2d37499b47d692
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48080
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-16 13:19:15 +00:00