Commit Graph

9312 Commits

Author SHA1 Message Date
Ben Clayton 3b3ef36241 tint/sem: Add Type::DeepestElementOf()
Like `ElementOf()`, but returns the most nested element type.

Change-Id: Ieb97f830293d4714d0d5ddc0c9304e41e994f61b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94324
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-06-21 09:35:22 +00:00
dawn-autoroll ae3fc8393b Roll vulkan-deps from 849699c0a626 to 1765af41ecf5 (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/849699c0a626..1765af41ecf5

Changed dependencies:
* vulkan-loader: e26be655eb..477fb9e188
* vulkan-validation-layers: 6e8fb40b3b..9342a262d9

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC bajones@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: bajones@google.com
Change-Id: I04dd740a322618650a138918f3dd97e7d85111b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94440
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-21 07:31:42 +00:00
Dawn Autoroller ffd3351ac5 Roll ANGLE from 9ea490f54e18 to 21c89c14831c (2 revisions)
9ea490f54e..21c89c1483

2022-06-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 2b79b2f8aec2 to f833544ff898 (8 revisions)
2022-06-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4ede36c4734b to 45c701a7067d (2 revisions)

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

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
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: bajones@google.com
Change-Id: Ib6c03a7fe9c06b81ecb716595d5e11ff1a00b968
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94400
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-21 01:32:02 +00:00
Ben Clayton 7ee324551c tint/ast: Add 'const' AST node
Nothing currently generates or consumes these (yet).

Bug: tint:1580
Change-Id: I892956d33fcd587be85659781108a236b2839b3c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94323
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-06-20 20:46:22 +00:00
dan sinclair 42fdeb2c8c Remove test/tint/BUILD.gn
The Chrome side of this change has landed so we can remove the forwarding
BUILD.gn file.

Bug: dawn:1275
Change-Id: Iabf2ba1419d3ae670f712aec9d95c75f2c74e662
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94360
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-06-20 19:33:52 +00:00
Ben Clayton 22d8dea091 tint/resolver: Fix ICE when failing to materialize
If the abstract numeric cannot materialize to the target type, we could
ICE before the validation handles this bad case. To fix, simply hoist
the validation earlier.

Bug: chromium:1337524
Change-Id: Icc603b056900131cfdb029b517f1c3d030b2ecb4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94322
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-20 19:23:02 +00:00
Ben Clayton e4e4854b77 tint/resolver: Clean up 'let' / 'override' resolving
Split the logic out of Resolver::Variable().

Primes the resolver for the introduction of 'const'

Bug: tint:1580
Change-Id: Id67280ed5c8c73a69c62728fb5a81a08f13628a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93785
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-06-20 19:17:52 +00:00
dawn-autoroll 49dd20d1c1 Roll vulkan-deps from 45c701a7067d to 849699c0a626 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/45c701a7067d..849699c0a626

Changed dependencies:
* spirv-tools: fbcb6cf4c8..2eff41e707
* vulkan-tools: 01ad714caf..6f57b1fa23

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC bajones@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: bajones@google.com
Change-Id: I616588ae5618ff3914df111e28c815fc8a230c7f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94341
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-20 18:36:02 +00:00
Ben Clayton ee49b1ed95 tint/resolver: Clean up 'var' resolving
Split the logic out of Resolver::Variable().

Also correctly allows type inference of module-scoped 'var's.

Fixed: tint:1584
Change-Id: I32eb11f0a847775137fef937da6f4032a3b3c2b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93784
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-20 15:30:41 +00:00
James Price 80fdd624a0 tint: Process functions in dependency order
For this transform, this will help when we promote private variables
to function scope when only referenced by a single function.

Bug: tint:1509
Change-Id: I04f7b8e1a8531a13317617604a49cafe4f7d47f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94001
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: David Neto <dneto@google.com>
2022-06-20 14:51:13 +00:00
Ben Clayton a823ea10a0 dawn: Fix GCC warnings about functions not returning
Change-Id: Ia55a6549508a3259b97a35d2c06659a86633bc9e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94321
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-06-20 14:35:22 +00:00
Ben Clayton bf55236e13 dawn: Fix GCC build
It's not valid for an explicit template specialization to declare a storage class (`static`). GCC correctly catches this, while Clang is too relaxed.

Use C++17's 'inline' instead. The alternative is to push the initializers and values into the cpp file.

This breakage was introduced in: https://dawn-review.googlesource.com/c/dawn/+/93604

Bug: dawn:1451
Change-Id: Ib3e61d233e16fd7828f8a2ae0909eedbd24ee52e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-06-20 13:45:21 +00:00
James Price 46583621c0 tint: Refactor ModuleScopeVarToEntryPointParam
Split the main Process() function up into smaller functions to make it
less unwieldy.

Change-Id: Ibbe3141a82221879b9d4ed232eebdd0344f1698c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94000
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-20 12:39:33 +00:00
Dawn Autoroller 159e78f50b Roll ANGLE from 878bbfaac0b3 to 9ea490f54e18 (1 revision)
878bbfaac0..9ea490f54e

2022-06-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 58c59e887244 to 36bd948bdb66 (551 revisions)

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

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
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: rharrison@google.com
Change-Id: I3911a08034fcdb9c3117a793aa98070c6fe5be03
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94280
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-20 11:56:11 +00:00
Corentin Wallez 04f12142bd dawn::wire::client: Make object constructors less barebones.
This uses the variadic template arguments to Client::Make to
pass more data to object constructors and move the copying of data from
descriptors into the constructors.

This required adding a descriptor to the textures created in
ReserveTexture. The descriptor should come from the outside to give the
correct reflection data to textures (for example textures from
GPUCanvasContext). So a descriptor argument is added to ReserveTexture
that currently defaults to nullptr, but will be required once current
uses are updated.

Bug: dawn:1451
Change-Id: I44cbd5718b8d75fdde3ab1321d24f69a8e2486de
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93142
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-06-19 20:13:01 +00:00
Corentin Wallez a55b29e0bd dawn::wire::client: Make ObjectTypeToTypeEnum a template variable.
Bug: dawn:1451
Change-Id: I21cba4b245b2b574104471da973000d552f1c7de
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93604
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-06-19 19:19:11 +00:00
Dawn Autoroller 35199a30ae Roll ANGLE from 7f57d12b1e57 to 878bbfaac0b3 (1 revision)
7f57d12b1e..878bbfaac0

2022-06-18 m.maiya@samsung.com Vulkan: Account for 2DArray textures during robust resource init

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

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
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: rharrison@google.com
Change-Id: I38409c0536fa066259f65df885dd7b28f9b7f46c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94260
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-18 20:51:40 +00:00
Ben Clayton a05e31b5af tint/resolver: Clean up parameter resolving
Change-Id: If5069575e319a1b04682596c2ab364b414300370
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93782
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-18 17:26:40 +00:00
dan sinclair 369b0b4618 Remove old src/include folder
This CL removes the src/include folder which was used to forward old
header includes to the new include/ location. The various BUILD rules
which referred to these folders are also removed.

Bug: dawn:1275
Change-Id: Ic0bdc8cf900833af25199ee3e41708953c7c1eec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94026
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-18 16:16:11 +00:00
dan sinclair 3f64e38ba0 Fixup unused function and variable.
This CL fixes build issues seen on the fuzzers when they disable
logging.

Bug: chromium:1337052
Change-Id: I91f6853a7550ccbffb924a5fb65cd89086f78853
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94241
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-06-18 15:38:00 +00:00
dan sinclair 0a4e2a1373 Remove NOLINT lines from c++17 headers
The depot_tools cpplint.py has been updated to accept the c++17 headers
so we no-longer need to mark with NOLINT.

Bug: dawn:1379
Change-Id: I938a4cac5ca881cd1b556f4b8d58741b6a1e6af1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94240
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-06-18 14:34:00 +00:00
James Price c7f7ca3d9e tint: Simplify ++/-- handling in transform
Now that we have untyped literals, we can just add `1` rather than
adding either `1u` or `1i`.

Bug: tint:1488
Change-Id: I59512be8fc67b1bf45088478da7c93bed37a69b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94141
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-06-18 14:22:15 +00:00
Dawn Autoroller 43dfe9356e Roll ANGLE from ca96cba9c5dc to 7f57d12b1e57 (4 revisions)
ca96cba9c5..7f57d12b1e

2022-06-18 syoussefi@chromium.org Vulkan: Disable cache warmup on ChromeOS SwANGLE
2022-06-17 ynovikov@chromium.org Skip CompressedTexSubImage3DValidationPerSlice capture_replay
2022-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 21fa1f0acbfa to 4ede36c4734b (10 revisions)
2022-06-17 syoussefi@chromium.org Vulkan: Fix marking external images as renderable

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

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
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: rharrison@google.com
Change-Id: I5f16d4d57a8e094957bf4d2c231256fde3fcb42c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94220
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-18 07:07:40 +00:00
dawn-autoroll 25eb5cd02e Roll vulkan-deps from 4ede36c4734b to 45c701a7067d (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/4ede36c4734b..45c701a7067d

Changed dependencies:
* vulkan-validation-layers: 679d107398..6e8fb40b3b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC rharrison@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: rharrison@google.com
Change-Id: I6ba2a34223421ba81a43576cffe57f11ee1b41a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94200
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-18 06:14:40 +00:00
Corentin Wallez 0ebe86d1ca dawn::wire::client: Merge object allocators, add variadic Make.
This commit changes all the [Object]Allocators from the Client into a
PerType<ObjectStore> member that contains a bunch of ObjectStore acting
on ObjectBase.

Adds a new (template) member functions to the client, Make/Get/Free that
act on any object type, and update all the uses of previous
[Object]Allocator to use these new methods.

Also removes generated code that was generated per object type in favor
of using the type-generic ObjectAllocator.

Bug: dawn:1451
Change-Id: I6463b2fc4a827e3000c2a666abf08aa1a71c3b3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93141
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-06-17 21:21:39 +00:00
Dawn Autoroller e57c296035 Roll ANGLE from 5975eb034505 to ca96cba9c5dc (8 revisions)
5975eb0345..ca96cba9c5

2022-06-17 jmadill@chromium.org Make ReadEntireFileToString return a std::string.
2022-06-17 ynovikov@chromium.org Increase batch timeout with sanitizer
2022-06-17 ynovikov@chromium.org Revert "Temporarily remove win-trace from CQ"
2022-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from cfcb44322bcc to 2b79b2f8aec2 (1 revision)
2022-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 96b247286bab to 58c59e887244 (150 revisions)
2022-06-17 gert.wollny@collabora.com Capture/Replay: Allow capturing of external textures
2022-06-17 gert.wollny@collabora.com Capture/Replay: Don't capture tex levels that are out-of-range
2022-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 893946636054 to e22ec5fc4cbf (13 revisions)

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

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
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: rharrison@google.com
Change-Id: Ife9daa1963b333b319381bc1960a1b8b3833b6a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94120
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-17 17:37:59 +00:00
Austin Eng 0213292dd7 Allow the DepthClipControl struct, validate the feature is enabled
This change allows the DepthClipControl struct to be chained on the
render pipeline descriptor, but disallows it from being used unless
the feature is enabled. The feature is not enabled on any backend
yet.

Bug: dawn:1178
Change-Id: I37f5c991103dd86c0e61a6ad8cd71cbd86401a9b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93948
Reviewed-by: Shrek Shao <shrekshao@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-17 17:26:59 +00:00
dawn-autoroll baffaef571 Roll vulkan-deps from 3fa0753fea3a to 4ede36c4734b (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/3fa0753fea3a..4ede36c4734b

Changed dependencies:
* spirv-cross: 197a273fd4..99b59b3528
* spirv-tools: bfc611b03e..fbcb6cf4c8
* vulkan-headers: ec9b96aae5..3be1df310b
* vulkan-loader: 71e43122c9..e26be655eb
* vulkan-tools: 2661f654ad..01ad714caf
* vulkan-validation-layers: d667189bc8..679d107398

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC rharrison@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: rharrison@google.com
Change-Id: Icec31dc80d258a61c9ad50d313d3ab16950b47c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94025
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-17 16:46:49 +00:00
Zhaoming Jiang d713669329 Tint: Fix VectorizeScalarMatrixConstructors to run for ref to scalar
This patch make VectorizeScalarMatrixConstructors transform run for
reference to scalar as well as scalar types node, i.e. run for
`mat2x2<f32>(v[2])`, where `v` is a f32 vector, as well as
`mat2x2<f32>(1.0)`.

Bug: tint:1589
Change-Id: I5d3e367ee6a9826b3e1add3495aaac0ae326be14
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94023
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2022-06-17 15:36:59 +00:00
dan sinclair 889a499ef4 Remove test/tint/BUILD.gn.
This Cl moves the contents of the test/tint/BUILD.gn file into the
src/tint/BUILD.gn file. This moves the tests into the same build file as
what is being tested. This is more in line with how the CMakeLists.txt
file is setup.

This removes the need to update 2 BUILD.gn files when adding new files
and tests to tint.

Bug: tint:1517
Change-Id: I9beb8a8bff7c10ac875647246ad4362f7e60f7da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94040
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-06-17 13:01:59 +00:00
Ben Clayton ecb46b33cc tint/resolver: Move texture validation to the right place
Validating sampled and multisampled texture types does not belong in Validator::Variable().

Change-Id: Ie0f2502508c28af6fb6d3f4d7803171d946c511b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93783
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-06-17 12:52:20 +00:00
Ben Clayton dcdf66ed5b tint/ast: Derive off `ast::Variable`
Add the new classes:
* `ast::Let`
* `ast::Override`
* `ast::Parameter`
* `ast::Var`

Limit the fields to those that are only applicable for their type.

Note: The resolver and validator is a tangled mess for each of the
variable types. This CL tries to keep the functionality exactly the
same. I'll clean this up in another change.

Bug: tint:1582
Change-Id: Iee83324167ffd4d92ae3032b2134677629c90079
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93780
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-17 12:48:51 +00:00
Zhaoming Jiang be6fb2a8d2 tint: Fix emitting vector constant in HLSL writer
This patch fix the issue that HLSL generator emit wrong constant
element index for vectors with all elements being the same, which may
cause error when emitting a matrix constant with sub columns having
identical elements.
Corresponding unit test is implemented.

Bug: tint:1588
Change-Id: Ia40b3f1a676d84aadaa5ce900677547fb15abe7f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94041
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-06-17 12:48:46 +00:00
Corentin Wallez 65d61d76a3 Log: Fix unused variable warnings when DAWN_DISABLE_LOGGING
Bug: chromium:1337052
Change-Id: I86df0a26af345630905b4ee94c03bbac60504474
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94100
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2022-06-17 10:25:29 +00:00
Dawn Autoroller e6882752ce Roll ANGLE from a62204c35579 to 5975eb034505 (10 revisions)
a62204c355..5975eb0345

2022-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from e6f032b42bce to 96b247286bab (303 revisions)
2022-06-16 cclao@google.com Vulkan: Promptly destroy cached framebuffer when it becomes invalid
2022-06-16 yuxinhu@google.com Enable ExposeNonConformantExtensionsAndVersions
2022-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 50754c3c19c0 to 893946636054 (1 revision)
2022-06-16 syoussefi@chromium.org Vulkan: Useful implementation of program binaries
2022-06-16 syoussefi@chromium.org Vulkan: Rename getShareGroupVk to getShareGroup
2022-06-16 m.maiya@samsung.com Vulkan: Prune superseded staged updates in a texture
2022-06-16 hob@chromium.org Support BGRX8 for framebuffer blits
2022-06-16 ynovikov@chromium.org Further suppress MultithreadingTestES3 hanging tests on Linux SwANGLE
2022-06-16 ynovikov@chromium.org Temporarily remove win-trace from CQ

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

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
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: rharrison@google.com
Change-Id: I36d79af29fe19b850a4d9a024ef13e305b3c6c7a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94060
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-17 04:08:30 +00:00
dan sinclair 4b88dbcf8e Fixup continue support in while loops.
The generators were not setting `emit_continuing_` when emitting while
loops. This caused a crash when a `continue` was encountered. This CL
adds the `emit_continuing_` setup to the while emission. It also guards
the `emit_continuing_` usage with making sure the function is setup.

Bug: tint:1490
Change-Id: Ia89c49e567acda71a1f851a582103723cff71d49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93960
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-06-16 15:27:38 +00:00
Dawn Autoroller b4b82f55af Roll ANGLE from c31e783fb845 to a62204c35579 (18 revisions)
c31e783fb8..a62204c355

2022-06-16 brianosman@google.com Guard all imports of wayland.gni with angle_use_wayland
2022-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 20c04524ee8a to cfcb44322bcc (4 revisions)
2022-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from c8885f7596b7 to e6f032b42bce (339 revisions)
2022-06-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1762849caed4 to 21fa1f0acbfa (11 revisions)
2022-06-15 dnfield@google.com Missing include for std::isdigit
2022-06-15 romanl@google.com Ensure ANGLERenderTest.mTestParams lifetime using unique_ptr
2022-06-15 jmadill@chromium.org Expose the EGL Display Context Set in the DisplayState.
2022-06-15 romanl@google.com Turn missing {trace_name}.json trace files into test failures.
2022-06-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 664494793778 to c8885f7596b7 (146 revisions)
2022-06-15 romanl@google.com Always log FATAL, ERR messages
2022-06-15 ianelliott@google.com Enable perFrameWindowSizeQuery on Android
2022-06-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 41a77d56876c to 664494793778 (497 revisions)
2022-06-15 constantine.shablya@collabora.com Add GL_NV_read_depth_stencil
2022-06-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ee0d0b41a626 to 20c04524ee8a (21 revisions)
2022-06-14 hob@chromium.org Enable X11 defines on ChromeOS
2022-06-14 gert.wollny@collabora.com Vulkan: set storage external memory before the description
2022-06-14 antonio.caggiano@collabora.com GN: Wayland build overrides
2022-06-14 ynovikov@chromium.org Skip flaky hanging MultithreadingTestES3 on Linux SwANGLE

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

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
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: rharrison@google.com
Change-Id: I8f2ae2c3eab531b3856d084d45fc26cc08956f6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93924
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-16 15:09:38 +00:00
dan sinclair 57dcd3601c Fixup merge test issue
The while loop and let error message landed about the same time and there were
merging issues that didn't get caught by CQ.

Change-Id: I5cd606f1809cc29fa2366d3b78883fa0cfc3b394
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93961
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-06-16 13:44:38 +00:00
dan sinclair 49d1a2d950 Add while statement parsing.
This CL adds parsing for the WGSL `while` statement.

Bug: tint:1425
Change-Id: Ibce5e28568935ca4f51b5ac33e7a60af7a916b4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93540
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-06-16 12:01:27 +00:00
Ben Clayton d10f3f4437 Add bclayton's chromium account to OWNERS
OWNERS appear to be more strictly enforced now.

Change-Id: I9c0ddb86fdba08aff84057151c0ac622d960cb12
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93787
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-06-16 09:57:41 +00:00
Ben Clayton 2a8861d20e tint: Rework errors around variable declarations
Standarize the messages, using 'let', 'override' or 'var'.

Module-scope 'let' needs to be replaced with 'const', but baby steps.

Bug: tint:1582
Change-Id: I290aede118a30ab0f4294c89ec43005371c87b45
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93446
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-06-16 08:36:30 +00:00
Zhaoming Jiang 418e873ad2 tint: Make sure enable directives go first in ordered_globals
This patch change DependencyAnalysis::SortGlobals() to make sure that
'enable' directive nodes go before any other global declarations in the
sorted global node list, and thus ensure that all extensions will be
registered by reslover before dealing with any other global declarations.
This is necessary because some transforms will add AST nodes before any
other global nodes, and these added nodes should be handled by resolver
after 'enable' nodes are handled.

Bug: tint:1472
Change-Id: Idc2253fc055b0f121cb0cafcaca5275c23ed7b0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93760
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-16 08:30:17 +00:00
James Price 33563dc7d7 tint/transform: Move State to anonymous namespace
Copy/pasting this transform as a starting point for new transforms
causes the `State` classes to clash, and weird things happen. This
prevents that from happening.

Change-Id: Ia1c6b2b96e4d6375309aed535d7a87372b839792
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93880
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-06-16 08:28:22 +00:00
shrekshao 4a63612cd2 Fix alphaToCoverageEnabled and sample_mask output validation
Bug: tint:506
Change-Id: Ie2cf5b7f446d89c92491068b56027b13807cb807
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93700
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2022-06-16 00:11:20 +00:00
dawn-autoroll da317984ee Roll vulkan-deps from 21fa1f0acbfa to 3fa0753fea3a (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/21fa1f0acbfa..3fa0753fea3a

Changed dependencies:
* spirv-tools: 76ebfb989f..bfc611b03e

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC rharrison@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: rharrison@google.com
Change-Id: Ia7d516c0c5c0bf97e1bf5e17de4f2b7eddcee5a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93860
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-16 00:06:57 +00:00
James Price 3e38d7effe tint: Remove support for smoothStep builtin
The new spelling `smoothstep` was introduced in M102.

Fixed: tint:1483
Change-Id: Ia5e1401f8f09450a3a767b0bb975216bd85be8db
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93360
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-06-15 23:32:14 +00:00
Ben Clayton 446b1a7df1 tint/clone_context.h: Template the vector allocator type
Currently nothing in Tint uses a different allocator type, but this
allows the CloneContext to support different allocators, the day we do.

Change-Id: I70367bd3710128d0708b3369f66b441344b789f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93602
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-06-15 21:36:27 +00:00
Ben Clayton 2032d03400 tint/transform: Remove use of StorageClass on parameter
Parameters don't have storage classes or access qualifiers. This was
just (ab)using the fact that a parameter uses the same AST type as a
'var'.

Also simplify the parameter disable validation logic.

Bug: tint:1582
Change-Id: Ic218078a410f991e7956e6cb23621a94a69b75a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93603
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-06-15 19:32:37 +00:00
dawn-autoroll 357b5eba4c Roll vulkan-deps from 4e67065f9f8e to 21fa1f0acbfa (10 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/4e67065f9f8e..21fa1f0acbfa

Changed dependencies:
* glslang: adbf0d3106..bffcf209cb
* spirv-tools: 8f7f5024f8..76ebfb989f
* vulkan-loader: c3601d4d91..71e43122c9
* vulkan-tools: ef9db7a8ec..2661f654ad
* vulkan-validation-layers: b986019b6f..d667189bc8

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC rharrison@google.com,ynovikov@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: rharrison@google.com,ynovikov@google.com
Change-Id: Ide4e535a94a856ad33006bec79256ddc52f96c58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93840
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-15 18:31:27 +00:00
David Neto 7bdeb49d64 Fix comment on constructor parameter
Change-Id: I29d19188f189d2c2ff7b70058782cf7a89e1dabd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93820
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-06-15 16:49:37 +00:00