Commit Graph

4063 Commits

Author SHA1 Message Date
Austin Eng 346b58cfba Reland "Populate some D3D12 limits from the backend"
This is a reland of 167d299916
It skips MaxLimitTests.MaxBufferBindingSize on 32-bit Windows
until we have a way to test more reliably on that platform, or
until Dawn no longer allocates enormous staging buffers for zero
initialization.

Original change's description:
> Reland "Populate some D3D12 limits from the backend"
>
> This is a reland of aa8fcfc64b
> It changes MaxLimitTests to use at most a 512MB buffer on 32-bit
> platforms.
>
> Original change's description:
> > Populate some D3D12 limits from the backend
> >
> > Also bumps the required D3D feature level to 11.1
> >
> > Bug: dawn:685
> > Change-Id: I40bc3a162e0aee596d61118ba0dfe0bf9cb60d93
> > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65120
> > Commit-Queue: Austin Eng <enga@chromium.org>
> > Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
> > Reviewed-by: Corentin Wallez <cwallez@chromium.org>
>
> Bug: dawn:685
> Change-Id: I2e1df5f7ac0c9bbb6476ca2e1964a9af4afd89b6
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67145
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
> Commit-Queue: Austin Eng <enga@chromium.org>

Bug: dawn:685
Change-Id: Ie20a58d73ebfcd64a8c5e58d29d7fb35ee9fba0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67565
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-27 15:05:14 +00:00
Austin Eng 3c786cd418 Revert "Reland "Populate some D3D12 limits from the backend""
This reverts commit 167d299916.

Reason for revert: Still failing the roll because of OOM on x86.

Original change's description:
> Reland "Populate some D3D12 limits from the backend"
>
> This is a reland of aa8fcfc64b
> It changes MaxLimitTests to use at most a 512MB buffer on 32-bit
> platforms.
>
> Original change's description:
> > Populate some D3D12 limits from the backend
> >
> > Also bumps the required D3D feature level to 11.1
> >
> > Bug: dawn:685
> > Change-Id: I40bc3a162e0aee596d61118ba0dfe0bf9cb60d93
> > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65120
> > Commit-Queue: Austin Eng <enga@chromium.org>
> > Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
> > Reviewed-by: Corentin Wallez <cwallez@chromium.org>
>
> Bug: dawn:685
> Change-Id: I2e1df5f7ac0c9bbb6476ca2e1964a9af4afd89b6
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67145
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
> Commit-Queue: Austin Eng <enga@chromium.org>

TBR=cwallez@chromium.org,enga@chromium.org,rafael.cintron@microsoft.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ibad5ac7f28015da6a7334ba074aa975198591318
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:685
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67564
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-26 18:13:46 +00:00
Dawn Autoroller 5023ff548c Roll Tint from 6c4effe654 to e7ca884b3d (1 revision)
https://dawn.googlesource.com/tint.git/+log/6c4effe65445..e7ca884b3d12

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 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: alanbaker@google.com
Change-Id: I32e4b53aeb94b5fcac6a8cab193e4ba0980897b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67562
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-26 18:08:57 +00:00
Austin Eng f45478d65e Populate some Metal limits up from the backend
Bug: dawn:685
Change-Id: Idd36423e0f1f65c46ff835bfe90632b68505050c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64983
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-26 16:56:36 +00:00
Austin Eng 167d299916 Reland "Populate some D3D12 limits from the backend"
This is a reland of aa8fcfc64b
It changes MaxLimitTests to use at most a 512MB buffer on 32-bit
platforms.

Original change's description:
> Populate some D3D12 limits from the backend
>
> Also bumps the required D3D feature level to 11.1
>
> Bug: dawn:685
> Change-Id: I40bc3a162e0aee596d61118ba0dfe0bf9cb60d93
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65120
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>

Bug: dawn:685
Change-Id: I2e1df5f7ac0c9bbb6476ca2e1964a9af4afd89b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67145
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-26 16:48:36 +00:00
Dawn Autoroller a6ddc8f0a2 Roll Tint from 0436d045ab to 6c4effe654 (1 revision)
https://dawn.googlesource.com/tint.git/+log/0436d045ab03..6c4effe65445

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 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: alanbaker@google.com
Change-Id: I85bf31bdd4c6dbb1d5e23831ea9fe8552b61f50e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67561
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-26 11:45:16 +00:00
Ben Clayton 9b92a7cbc2 Fix overridable constants
dawn:
* Zero-initialize the SpecializationDataEntry. For booleans, the first
  byte may be initialized, while the 3 other bytes may contain garbage.
  This can cause boolean specializations to be 'true' when 'false' was
  specified.

dawn_node:
* Implement conversion of GPUProgrammableStage's constants.
* Fix Napi::Object -> unordered_map conversion.
* Fix member name in error messages generated by
  'DictionaryMembersFromJS'

Bug: dawn:1041
Change-Id: I016ec4916fc73226dfe1bd8e7dc52a1e88e46a6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67383
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-26 10:40:46 +00:00
Shrek Shao f4c8a6ac9b Mark pipeline overridable constants as unsafe
Until all backend implementations are done.

Bug: dawn:1169
Change-Id: I16d184bec03bbc9a255ad33cf11aa615b1986389
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67422
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-26 02:06:36 +00:00
Dawn Autoroller 83d8966a26 Roll Tint from c73b57f2c6 to 0436d045ab (2 revisions)
https://dawn.googlesource.com/tint.git/+log/c73b57f2c68e..0436d045ab03

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 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: alanbaker@google.com
Change-Id: I5c196cb4349b623df30a38698ad40c81836ca8bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67520
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-25 22:27:43 +00:00
Dawn Autoroller 55aa57f2ec Roll Tint from 33c13c6e28 to c73b57f2c6 (1 revision)
https://dawn.googlesource.com/tint.git/+log/33c13c6e2802..c73b57f2c68e

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 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: alanbaker@google.com
Change-Id: Iee5cf4a8a2392de7e4c5c4a985686ca6c653c7c3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67460
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-25 17:37:23 +00:00
Austin Eng ec60b17964 Revert "Disable DrawIndexedIndirect"
This reverts commit d84d7f1ea3.

Reason for revert: CTS tests for this are now enabled.

Original change's description:
> Disable DrawIndexedIndirect
>
> Not passing CTS yet
>
> Bug: dawn:809
> Change-Id: Ib7c240372a8fdbd45803230292c374e2957c8d15
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65601
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: dawn:809
Change-Id: I3018fec67c278343956a6da68041bc6ec24d55f4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67420
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-25 16:16:53 +00:00
Ben Clayton 066ab14e34 wgsl: Remove unnecessary phony-assignments
A call-statement can now be made on a function that returns a value.

Bug: tint:1256
Change-Id: I9a3cc4e330f7441e09dc408bdc1cfa515adac392
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67382
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-25 15:27:52 +00:00
Ben Clayton 5c4ce7bd9b wgsl: Migrate from ignore() to phony-assignment
The rules have been relaxed about function values always needing to be
consumed, so a bunch of these phony-assignments can be replaced with the
RHS, but this will be done as a follow-up.

Bug: tint:1213
Change-Id: Ie7c4280f87b4ad7e5a429994b0b88ac22c2f3a9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67300
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-25 15:14:23 +00:00
Dawn Autoroller e0b5664f98 Roll Tint from 7b776f18b0 to 33c13c6e28 (1 revision)
https://dawn.googlesource.com/tint.git/+log/7b776f18b0a4..33c13c6e2802

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 jrprice@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: jrprice@google.com
Change-Id: I09027351697993119b69550d2ff6d7407c4d88d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67400
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-25 12:51:16 +00:00
Brandon Jones eb0d900506 Improving Metal backend validation messages.
Improves validation messages in various Metal backend files:

 - SamplerMTL.mm
 - ShaderModuleMTL.mm
 - SwapChainMTL.mm
 - TextureMTL.mm

Bug: dawn:563
Change-Id: I076c08bb3dbecc430d5d4d7fbfeea48166070688
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67320
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-22 17:39:20 +00:00
Dawn Autoroller 1ca2dd6fb6 Roll Tint from c2fa68e551 to 7b776f18b0 (1 revision)
https://dawn.googlesource.com/tint.git/+log/c2fa68e55145..7b776f18b0a4

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 jrprice@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: jrprice@google.com
Change-Id: I16fc28a1e7150d9f188294ccd9772dca08e44dc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67340
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-22 10:02:25 +00:00
Dawn Autoroller 6a52ab2f11 Roll Tint from 092326894e to c2fa68e551 (4 revisions)
https://dawn.googlesource.com/tint.git/+log/092326894e9c..c2fa68e55145

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 jrprice@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: jrprice@google.com
Change-Id: Icd518b3ab52329b70d02362fd9bacb09529ce918
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67222
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-22 05:13:35 +00:00
Brandon Jones 4ce84fcfe1 Improving Vulkan backend validation messages.
Improves validation messages in various Vulkan backend files:

 - vulkan/DeviceVk.cpp
 - vulkan/ShaderModuleVk.cpp
 - vulkan/SwapChainVk.cpp
 - vulkan/TextureVk.cpp
 - vulkan/external_memory/MemoryServiceDmaBuf.cpp
 - vulkan/external_memory/MemoryServiceOpaqueFD.cpp
 - vulkan/external_memory/MemoryServiceZirconHandle.cpp
 - vulkan/external_semaphore/SemaphoreServiceFD.cpp
 - vulkan/external_semaphore/SemaphoreServiceZirconHandle.cpp

Bug: dawn:563
Change-Id: I521fecc29e7919413aa6210eff050848689296a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67122
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-21 23:45:54 +00:00
Dawn Autoroller 6daae26497 Roll Tint from 042bd02747 to 092326894e (6 revisions)
https://dawn.googlesource.com/tint.git/+log/042bd0274733..092326894e9c

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 jrprice@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: jrprice@google.com
Change-Id: I9caf51cf3d558c5e2600d21c33df4975cff767a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67221
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-21 23:37:54 +00:00
Brandon Jones c19f27b80d Revert "Improve validation errors for encoders"
This reverts commit c7e6bb0d8d.

Reason for revert: clusterfuzz identified issue https://bugs.chromium.org/p/chromium/issues/detail?id=1262112

Original change's description:
> Improve validation errors for encoders
>
> Improves the validation messages in ComputePassEncoder.cpp,
> ProgrammablePassEncoder.cpp, RenderBundleEncoder.cpp, and
> EncodingContext.cpp/h to give them more contextual information.
>
> Bug: dawn:563
> Change-Id: I87c46c4bfda1375809fae93239029ea4e3b9c0a2
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67000
> Commit-Queue: Brandon Jones <bajones@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: dawn:563
Change-Id: I259ccde1735c4201ff2736562cfe4689e9a22f62
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67321
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-10-21 23:14:54 +00:00
Antonio Maiorano ceb46e788c dawn_node: add "enable/disable-dawn-features=<comma-separated-values>"
Same as Chrome's args, this allows us to set the
DeviceDescriptor::forceEnabledToggles and forceDisabledToggles when
creating the GPUDevice.

Example: node cmdline.ts ... --gpu-provider-flag=enable-dawn-features=dump_shaders ...

Bug: dawn:1163
Change-Id: Ib5db71355f72e5d08f8fe87313c5e3d63ee236c3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66963
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-21 23:02:34 +00:00
Antonio Maiorano c6745901f0 dawn_node: add "dlldir=<path>" flag
Only used on Windows builds for now, this flag adds the input path to
the DLL search paths. The main purpose is to ensure we load the right
version of D3D dlls, such as d3dcompiler_47.dll from the Chrome output
dir, rather than the default one in the Systems directory.

Bug: dawn:1163
Change-Id: I8e696dd877ec715e1e54d8589af8275e62c90937
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66962
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-21 21:46:44 +00:00
Antonio Maiorano 821f1a8a60 dawn_node: add "dawn-backend=<value>" flag
As an alternative to setting the "DAWNNODE_BACKEND" env var.

Bug: dawn:1163
Change-Id: I33ace14e7603b97caf7286a109a31160853f62e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66961
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-21 20:56:34 +00:00
Brandon Jones 1d55306255 Improving D3D12 backend validation messages.
Improves validation messages in various D3D12 backend files:

 - CommandBufferD3D12.cpp
 - ShaderModuleD3D12.cpp
 - SwapChainD3D12.cpp
 - TextureD3D12.cpp

Bug: dawn:563
Change-Id: I00607012f5bec81780c419993fc32dc0984dad27
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67143
Commit-Queue: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-21 20:21:54 +00:00
Antonio Maiorano 0cd8edc31b Add /third_party/gpuweb to .gitignore
Change-Id: I0a854b633ae04029d54f4607fbb81522d0461113
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67260
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-10-21 19:47:14 +00:00
Antonio Maiorano e772615b53 dawn_node: add support for input flags
This change replaces the ".gpu" export with ".create()" function that
accepts an array of flags. These will be used by cmdline.ts to set flags
such as what dawn backend to use. We currenly environment variables, but
this will be more flexible.

Bug: dawn:1163
Change-Id: If2fb35811cac45e16121fbd828f997ef3d795f36
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66960
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-21 19:34:34 +00:00
Brandon Jones 7dc906a4c9 Improve validation messages for surface/swap chain
Updates validation messages with more contextual information in:
 - ChainUtils.h
 - Device.cpp
 - SpirvValidation.cpp
 - Surface.cpp
 - SwapChain.cpp

Bug: dawn:563
Change-Id: I486512791caaf1acf4607539aa5ad11daf1ab9be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67140
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-21 19:25:04 +00:00
Dawn Autoroller 853c61d0a6 Roll Tint from 8cab28c9f9 to 042bd02747 (1 revision)
https://dawn.googlesource.com/tint.git/+log/8cab28c9f9cd..042bd0274733

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 jrprice@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: jrprice@google.com
Change-Id: I82ea4bc58ad60b483500942af0ee6e986f8f7e4f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67220
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-21 18:50:34 +00:00
Brandon Jones fc5cae6a19 Improving OpenGL backend validation messages.
Improves validation messages in various OpenGL backend files:

 - BackendGL.cpp
 - BindGroupGL.cpp
 - CommandBufferGL.cpp
 - DeviceGL.cpp
 - PipelineGL.cpp
 - QueueGL.cpp
 - ShaderModuleGL.cpp

Bug: dawn:563
Change-Id: Idd5751b6f68ea435e5f3c045dcbfd0e5c049fce6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67144
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@google.com>
2021-10-21 16:37:45 +00:00
Aleksi Sapon 08b9654751 Zero the index offsets before an indirect draw
Prevent reusing offsets from a previous direct draw.
Update test to verify that values are updated correctly
for each draw. Add tests for indirect draw offsets.

Bug: dawn:548
Change-Id: Ice8325a8a41b8a4375767156dbaba3ee3d714f3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67121
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-21 14:29:44 +00:00
Dawn Autoroller 08acbb72d0 Roll Tint from 347c74e671 to 8cab28c9f9 (1 revision)
https://dawn.googlesource.com/tint.git/+log/347c74e67126..8cab28c9f9cd

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 jrprice@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: jrprice@google.com
Change-Id: I019ccc8ec65b2ebbdb0a25905add40d18d2106de
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67182
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-21 10:28:23 +00:00
Dawn Autoroller 0383297416 Roll Tint from e81d7dc3c8 to 347c74e671 (1 revision)
https://dawn.googlesource.com/tint.git/+log/e81d7dc3c80a..347c74e67126

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 jrprice@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: jrprice@google.com
Change-Id: Icb73bb7a2d1e3e134f583842df9cb75f22408dd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67181
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-21 03:54:09 +00:00
Dawn Autoroller 4d12edb97d Roll Tint from 7103f51603 to e81d7dc3c8 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/7103f51603dc..e81d7dc3c80a

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 jrprice@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: jrprice@google.com
Change-Id: I739ba24d7b59f6c533a2d38d2deb58936deaa43c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67180
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-20 22:18:38 +00:00
Austin Eng 05a3187b41 Revert "Populate some D3D12 limits from the backend"
This reverts commit aa8fcfc64b.

Reason for revert: Failing the Dawn->Chromium roll
https://ci.chromium.org/ui/p/chromium/builders/try/dawn-win10-x86-deps-rel/18903/overview

Original change's description:
> Populate some D3D12 limits from the backend
>
> Also bumps the required D3D feature level to 11.1
>
> Bug: dawn:685
> Change-Id: I40bc3a162e0aee596d61118ba0dfe0bf9cb60d93
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65120
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>

TBR=cwallez@chromium.org,enga@chromium.org,rafael.cintron@microsoft.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I17b44455f3b46f1855ab59808ece1e11bf73275d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:685
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67141
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-20 21:19:49 +00:00
Brandon Jones 520539f8f9 Various validation error improvements
A grab bag of validation error message improvements in the following
files:

 - Adapter.cpp
 - BackendConnection.cpp
 - BindGroup.cpp
 - CommandBuffer.cpp
 - CommandBufferStateTracker.cpp
 - ComputePipeline.cpp
 - Device.cpp
 - Instance.cpp
 - Limits.cpp
 - Queue.cpp

Bug: dawn:563
Change-Id: Ied9f660fc22302d3fd5af4796de32efec529ca05
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67001
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-20 17:42:38 +00:00
Dawn Autoroller 6ec86e0411 Roll Tint from 8645953be2 to 7103f51603 (1 revision)
https://dawn.googlesource.com/tint.git/+log/8645953be246..7103f51603dc

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 jrprice@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: jrprice@google.com
Change-Id: I8668b4d1931950bb9576c741272460380d0754a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67080
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-20 17:23:08 +00:00
Brandon Jones c7e6bb0d8d Improve validation errors for encoders
Improves the validation messages in ComputePassEncoder.cpp,
ProgrammablePassEncoder.cpp, RenderBundleEncoder.cpp, and
EncodingContext.cpp/h to give them more contextual information.

Bug: dawn:563
Change-Id: I87c46c4bfda1375809fae93239029ea4e3b9c0a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67000
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-20 17:13:48 +00:00
Austin Eng aa8fcfc64b Populate some D3D12 limits from the backend
Also bumps the required D3D feature level to 11.1

Bug: dawn:685
Change-Id: I40bc3a162e0aee596d61118ba0dfe0bf9cb60d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65120
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-20 16:32:48 +00:00
Dawn Autoroller 8b8c5d444a Roll Tint from 54180d6631 to 8645953be2 (1 revision)
https://dawn.googlesource.com/tint.git/+log/54180d6631b3..8645953be246

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 jrprice@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: jrprice@google.com
Change-Id: I0f7c70e37171e600f536341541ab84c93da41e79
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67040
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-20 08:45:28 +00:00
Dawn Autoroller ba0d653b8c Roll Tint from c34f08dd45 to 54180d6631 (1 revision)
https://dawn.googlesource.com/tint.git/+log/c34f08dd4589..54180d6631b3

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 jrprice@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: jrprice@google.com
Change-Id: I34b98662905cba87067893543a6c9a36f819e303
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67020
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-20 03:53:17 +00:00
Jiawei Shao 1349ca182e D3D12: Support [[num_workgroups]] for Dispatch
This patch implements [[num_workgroups]] on the API side for
Dispatch() calls by setting num_workgroups.xyz as root constants.

This patch also adds a temporary validation that on D3D12 backend
using a compute pipeline with [[num_workgroups]] in a
DispatchIndirect call is not supported.

BUG=dawn:839
TEST=dawn_end2end_tests

Change-Id: Iaee2ffd162e9420e4e80944fbb222f10a4600c6a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66580
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-10-20 00:58:48 +00:00
Dawn Autoroller a5c0c8f6be Roll Tint from 7d0fc07b20 to c34f08dd45 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/7d0fc07b202b..c34f08dd4589

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 jrprice@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: jrprice@google.com
Change-Id: I0ddb113535dec2b713322dfdb50e9c9b04df7ab8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66941
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-19 23:05:17 +00:00
Austin Eng d97b29cd86 Populate supported Vulkan limits from the backend
This commit also unifies the initialization process for Adapters.
InitializeImpl() initializes the actual backend adapter.
InitializeSupportedFeaturesImpl() checks base WebGPU features and
discovers additional supported features.
InitializeSupportedLimitsImpl() checks base WebGPU limits and
queries the adapter's maximum supported limits.

Some of these limits from the backend are still overriden in the
frontend because they are limited by internal Dawn constants.

Bug: dawn:685
Change-Id: I43efb0b678dd45f8f89cd62d13104dd00b197da1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64980
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2021-10-19 22:52:14 +00:00
Loko Kung bf9b3cc5a9 Moves DestroyApiObject call into ApiObjectBase::DeleteThis
- Moving the call into DeleteThis should make it so that derived classes don't need to explicitly implement a destructor that calls DestroyApiObject.

Bug: dawn:628
Change-Id: I145f42e7e4c144cc0d2d7c7f609744399d514fe1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66840
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-19 22:43:13 +00:00
Ben Clayton 74635bc6e9 dawn_node: Use the new CTS server runner
This allows tests to be streamed to N node processes, without incurring the cost of re-scanning the test lists for each case.
It also means that there is an increased chance of state leakage. `--isolate` is a new flag that uses the old behavior of running each test in a separate process.

Depends on: https://github.com/gpuweb/cts/pull/789

Change-Id: Ifc92d1cc07a9de3b2751bed0971f3424d0c247ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66920
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-10-19 21:27:23 +00:00
Yunchao He d2c9cd369d Add validation rule for depth/stencil between bundle and pass
If we use render bundle, the compability validation between
writeDepth/Stencil in DepthStencilState in render pipeline and
depth/stencilReadOnly in DepthStencilAttachment in render pass
will become two steps:
  1. validation between render pipeline and render bundle during
    RenderBundleEncoder's SetPipeline().
  2. validation between render bundle and render pass during
    RenderPassEncoder's ExecuteBundles().

So, render bundle is like a bridge for this compability validation
between pipeline and pass.

The first step has been done in previous patch. The patch does
the second step.

Bug: dawn:485

Change-Id: I1226494e901c07bdb9f565bce7b9073d420f2fe2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66842
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-10-19 21:10:23 +00:00
Ben Clayton 4168780f81 dawn_node: Run CTS serially if --j 0 is specified
Spinning up new devices for each test can take a long time.
Specifying --j 0 will run a single instance of node, with the given query to run.

Change-Id: I27c161bb76f5deaaa505ab5ae361ea6a0942a130
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66880
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-10-19 20:32:32 +00:00
Ben Clayton 06b827ee92 dawn_node: Only rebuild CTS if something has changed
https://github.com/gpuweb/cts/pull/788 significantly improves the performance of incremental builds, but it can still take around 2 seconds to do that incremental build.

Have the run-cts tool scan the CTS source tree for the most recent modification, and only rebuild if the timestamp is more recent than the last build time.

Significantly reduces startup overhead of the tool.

Change-Id: I7e9227127c02e6d4dc8875a577178956bf5e2481
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66822
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-19 20:07:15 +00:00
Antonio Maiorano 1bf932e7b4 D3D12: dump disassembled DXBC when dump_shaders is enabled
Useful for debugging FXC bugs.

Bug: dawn:1162
Change-Id: If4fc7d0f16370d15235a6c872309fe1536dd9edc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66900
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-19 19:42:22 +00:00
Ben Clayton e9cbd4896a dawn_node: Track promises
These should always be resolved or rejected.
The Fatal() call, when a promise is not resolved or rejected, is currently disabled due to https://github.com/gpuweb/cts/issues/784.

Bug: dawn:1123
Change-Id: Ie0e8ac187ad70be0fea41cd66956d0bfd9c53212
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66821
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-19 19:18:42 +00:00