Commit Graph

9135 Commits

Author SHA1 Message Date
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
Ben Clayton 7b776f18b0 Deprecate Ignore()
It's been removed from the spec:
https://github.com/gpuweb/gpuweb/pull/2127

Fixed: tint:1213
Change-Id: I163fe807765bb1ac0580b398f4897daea555216a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67067
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-22 06:23:12 +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
Ben Clayton c2fa68e551 Migrate more tests from Ignore() to phony-assignment
The `Ignore()` intrinsic is about to be deprecated, so don't use it for testing.

Bug: tint:1213
Change-Id: I314ecaeb9a9c337c7b6980189054120a74807ebd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67066
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-22 00:21:44 +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
Ben Clayton cc7c4f309b ProgramBuilder: Migrate away from using Ignore()
The `Ignore()` intrinsic is about to be deprecated, so don't use it for testing.

Bug: tint:1213
Change-Id: Ib5d5966da6d566a9f02940970ebd79d520b5e0e8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67065
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-21 23:28:44 +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
James Price a41694e9a3 validation: Allow interpolate(flat) on integral IO
Produce a warning if the attribute is missing for integral vertex
outputs or fragment inputs. This will become an error in the future,
as per the WGSL spec.

Add the attribute to E2E tests.

Bug: tint:1224
Change-Id: Ia1f353f36cb7db516cf9e8b4877423dec3b3e711
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67160
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-10-21 23:08:44 +00:00
Ben Clayton 1aa98e62c0 Implement phony assignment
Bug: tint:1213
Change-Id: Ib1ebc4947405c4ada7a9bdbc6bd5a36447bbd234
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67064
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-21 23:04:44 +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
Stephen White 092326894e GLSL: emit UBO and SSBO interface blocks.
Do not emit block-decorated structs.
Combine them with the variable into a uniform or buffer interface block.

Bug: tint:1223
Change-Id: I16263ea449ecab705319dc440275b7d169021bc9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67243
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-21 21:24:14 +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
Stephen White 1e896001e6 GLSL: Don't use a typedef for array returns.
Covered by GlslGeneratorImplTest_Function.Emit_Function_WithArrayReturn

Bug: tint:1258
Change-Id: I181641ebe170ec359d9833e9022e6e70747fde9a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67240
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-10-21 20:43:15 +00:00
Ben Clayton f164a4a723 ast: Add TraverseExpressions()
An ast::Expression traversal helper extracted from Resolver.

Change-Id: I88754cbc86cc12cbf8348fb36a3f038904017f3d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67202
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-10-21 20:38:54 +00:00
Ben Clayton 72789de9f5 resolver: Remove rule that call statements to functions must return void
Fixed: tint:1256
Change-Id: Ibff78a1009d57afd7af8867952a9444daaf13a9c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67201
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2021-10-21 20:36:04 +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
Stephen White 38ed53ce8f GLSL: factor out the emission of struct members.
This will be needed for emitting UBO and SSBO interface
blocks.

Bug: tint:1223
Change-Id: I1cdc75b67a4fe612dcf8094a7d73b8bf1f85f40a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67242
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-10-21 19:49:44 +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
Ben Clayton 8fca34546b ast: Add PhonyExpression
Represents the `_` in a phony assignment `_ = <expr>`

Bug: tint:1213
Change-Id: Ifb070277b7872aa5ae405e467e28191e625c4c5a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67062
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-21 18:33:14 +00:00
Ben Clayton 042bd02747 fuzzers: Fix build
error: identifier 'writeonly__bindings' is reserved because it contains '__' [-Werror,-Wreserved-identifier]

I see no reason for the local variables, so I've just removed them.

Change-Id: Ib4047e12d5b55a204c56b06196052fef04def97d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67200
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-10-21 17:21:04 +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
Ben Clayton 8cab28c9f9 intrinsics: Add scalar overload of all() & any()
Fixed: tint:1253
Change-Id: I0bdc865a9df9e0171c09daa9918b25bba033ba3b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67061
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2021-10-21 09:39:13 +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
David Neto 347c74e671 wgsl: decimal float: point is optional; can use E for exponent
Also: Check for too-small non-zero magnitude on negative numbers too.

Fixes: tint:1255
Change-Id: I3c231ce197c56e1ec517708b8073d49a8ae67ccb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67100
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: David Neto <dneto@google.com>
2021-10-20 22:07:43 +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
Ben Clayton e81d7dc3c8 reader/wgsl: Lex underscore tokens
Bug: tint:1213
Change-Id: Ic5f2bfb2da0bf0f9511f029a93c7007266b2984c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67063
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-20 19:59:23 +00:00
Peter Kasting 0da0c95dc3 Silence -Wunused-but-set-variable in new code.
Bug: chromium:1203071
Change-Id: Id94bf93784f939c212c8da2be4755160cfb9f8e0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67081
Auto-Submit: Peter Kasting <pkasting@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2021-10-20 19:33:53 +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
Ben Clayton 7103f51603 writer/msl: Fix swizzling on packed vectors
Metal 1.x does not support swizzling on packed_vec types.
Use array-index for single element selection (permitted on LHS and RHS of assignment)
Cast the packed_vec to a vec for multiple element swizzles (not permitted as the LHS of an assignment).

Fixed: tint:1249
Change-Id: I70cbb0c22a935b06b3905d24484bdc2edfb95fc2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67060
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-20 16:12:33 +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
Ryan Harrison 8645953be2 Refactor Inspector fuzzing
It is always on now when using tint::CommonFuzzer, and runs before &
after the transform step.

This CL also adds missing API coverage to the Inspector fuzzing code.

Errors found with the Inspector are now reported as fuzzer failures
and should generate bug reports.

BUG=tint:1250,tint:1251,tint:1250

Change-Id: I1c1bcbddf81a35620f89c5b7a648c44e6a1f2952
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66980
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Alastair Donaldson <afdx@google.com>
2021-10-20 05:01:03 +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
Alastair Donaldson 54180d6631 Remove WGSL and SPIR-V reader fuzzers
Fuzzing of the WGSL and SPIR-V readers is well covered by fuzzers that
do both reading and writing. This change removes the fuzzers that only
do reading.

Fixes: tint:1254
Change-Id: Ice93016a6e95be7a2e8418387c35f20be13266e5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66923
Auto-Submit: Alastair Donaldson <afdx@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2021-10-20 00:59:31 +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