Commit Graph

10167 Commits

Author SHA1 Message Date
Dawn Autoroller fc013af417 Roll SwiftShader from 0296680c782c to a07b3fb6b3bd (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/0296680c782c..a07b3fb6b3bd

2022-08-02 capn@google.com Support AddressSanitizer instrumentation of LLVM JIT routines

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

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/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: lokokung@google.com
Change-Id: I7e721266f8a964459e1c3cdb94279d280290cc48
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98101
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-08-03 09:49:45 +00:00
Ben Clayton 52f852fa28 test/tint: Regenerate SKIP expectations
`./test/tint/test-all.sh ./out/active/tint --generate-skip`

A bunch of these got missed by https://dawn-review.googlesource.com/c/dawn/+/98020, as I assumed only `glsl` and `spvasm` backends would be affected.

Some are just refreshes of existing skips

Bug: tint:1632
Change-Id: I1b003a56143b52e8e47bef8a10fec2878a48be06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98120
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-03 09:47:48 +00:00
Zhaoming Jiang 7d7976d590 tint: Add end-to-end tests for expressions using f16 types
This patch add DXC compile flag "-enable-16bit-types" and change profile
to SM6.2 when validating generated HLSL using DXC if f16 extension is
enabled in the WGSL program.
The patch add Tint end-to-end test cases for expressions using f16 type,
including constructor, binary operator, splat, zero-init, and others.
Testcases that use f16 types in uniform or storage buffer are SKIPped,
because such usage is not implemented yet.

Bug: tint:1473, tint:1502
Change-Id: I481ab3d12cbb822f11ef85ba807bca3f9770089b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96252
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2022-08-03 08:45:25 +00:00
Ben Clayton 7d04cedce3 tint/resolver: Pre-allocate containers
Reserve the memory for the dependency graph containers.
Reduces expensive heap allocations.

Change-Id: Ia650fcb9f9e461afb8b240c9472a9a478a9968d1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98081
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-03 08:43:15 +00:00
Ben Clayton 6d66921053 tint/resolver: Reduce small-vector sizes
The vector sizes for expression traversal were excessive.
Reduce.

Change-Id: I3a2b7e7ba4cd82310565b883f85322834275ea8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98082
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-08-03 08:00:15 +00:00
Dawn Autoroller 04e68a7032 Roll ANGLE from 6e6f3e6da27c to 05d86e06003b (9 revisions)
6e6f3e6da2..05d86e0600

2022-08-03 romanl@google.com Add temporary logging of gold_session.Initialize stdout.
2022-08-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from d268b4c8a6b1 to 0920d63e6fcc (256 revisions)
2022-08-02 jmadill@chromium.org Skip multi draw indirect tests on Linux/Intel/Vulkan.
2022-08-02 romanl@google.com Refactoring: move a few common functions to angle_test_util.
2022-08-02 cnorthrop@google.com Tests: Add Octopath Traveler trace
2022-08-02 jmadill@chromium.org Skip TimerQueriesTest flakes on NV/Linux.
2022-08-02 jmadill@chromium.org Skip flaky tests on Linux/Vulkan.
2022-08-02 jmadill@chromium.org Skip flaky image load/store tests on Win/D3D11.
2022-08-02 jmadill@chromium.org Skip flaky test on SwiftShader.

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 lokokung@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: lokokung@google.com
Change-Id: I41d9df0eb65a6679d23781af0868da6c2f818ed0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98100
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-08-03 07:11:35 +00:00
Ben Clayton b4744ac359 tint/writer: Handle static_asserts
These (with exception to the WGSL writer) are not emitted.

Bug: tint:1625
Change-Id: Id8b36b5c83a6fe2dab042cf46b0c3dbca75e0926
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97962
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-03 07:01:08 +00:00
Ben Clayton 759ac33cd1 tint/resolver: Optimize intrinsic lookups
Replace use of std::unordered_map with a utils::Vector.
Significantly reduces heap allocations.

Change-Id: I501bfffb7620df9b4e09cd8569c39e418b25e32a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98080
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-08-03 06:55:57 +00:00
dan sinclair 6f8d945dd6 Sync reserved token list to WGSL spec.
This CL updates the list of reserved words to match the WGSL spec. The
use of a reserved word is changed from an error to a deprecation at the
moment be cause the majority of the list would be new errors.

Bug: tint:1633 tint:1624
Change-Id: I498db41689cdd666dfb291b1a6761a1182c87ec8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98042
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-03 02:49:28 +00:00
dawn-autoroll cc5dc15304 Roll vulkan-deps from 2d409ca4e3b6 to c9c304a87f47 (17 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/2d409ca4e3b6..c9c304a87f47

Changed dependencies:
* spirv-tools: 8dc0030ecb..54cd5e1963
* vulkan-loader: 0bcddf345f..d4801c93c5
* vulkan-tools: e734be0bb5..8ac3b50e9d
* vulkan-validation-layers: cbdb019150..aa7ee26f15

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 lokokung@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: lokokung@google.com
Change-Id: I16e313e655236f9f02255582db4da08a13f4e304
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98023
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-08-03 00:52:05 +00:00
Loko Kung 16ee6f8566 Suppresses failing tests due to tint:1632.
Bug: tint:1632
Change-Id: I432cc08d5a7f9e47bcd5381e144a7d8195d3e45e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98062
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Loko Kung <lokokung@google.com>
2022-08-02 23:35:45 +00:00
Ben Clayton 02791e95f3 tint/resolver: Resolve static_assert
No readers produce this, yet.

Bug: tint:1625
Change-Id: I94ce3e5afd7bd81b0a5059451136aa0eed7e9283
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97961
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-08-02 23:28:28 +00:00
Ben Clayton bfd1a81364 tint/ast: Add StaticAssert node
Nothing uses this, yet.

Bug: tint:1625
Change-Id: I93aa21d2a8090bebbbfbbe3dba7d60818a0e3a5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97960
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-08-02 23:16:25 +00:00
Brandon Jones 462f648896 Make adapter info device matching more flexible
Previously all of the device IDs I was aware of for a given vendor could
be comfortably filtered with a single mask, but there's at least one
exception that has come up since that indicates that support for
multiple different masks per vendor is necessary.

This change allows devices to be identified in groups, with each group
being given a different mask or no mask at all. Architectures may be
shared between groups.

Also added the ability to mark a device group as internal, which will
generate the helper functions (like `IsVendorArchitecture()`) for the
internal architectures but not allow them to be exposed in
GPUAdapterInfo. Internal device IDs may overlap with non-internal ones.

Finally, added some validation logic to prevent duplicate deviceIds or
conflicts between device sets/architectures. This was actually supposed
to be in an earlier CL but somehow got omitted from the version that
eventually landed.

Bug: dawn:1498
Change-Id: Icb8bfbee47324cbd9791f63089877ace86c763db
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96900
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2022-08-02 22:14:35 +00:00
dan sinclair ce6246502c Add `global_directive` rule to the WGSL parser.
This CL adds the `global_directive` rule into the WGSL parser and
moves `enable_directive` under that rule. This matches the WGSL
specification.

Bug: tint:1633
Change-Id: I48b809cd1d2f2ffa6ec0d83474c716d4015e1dea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98041
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-02 21:17:05 +00:00
Loko Kung 99fa7b9e7f test/tint: Suppresses vulkan-dep failures in crbug.com/tint/1632
Bug: tint:1632
Change-Id: Ie80a94821ddb0cdd467df2b9ee64adae32efde21
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98020
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-02 21:06:55 +00:00
Dawn Autoroller 0ce539ce2c Roll SwiftShader from 678ffefb1b3b to 0296680c782c (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/678ffefb1b3b..0296680c782c

2022-08-02 capn@google.com Strip only the leading underscore from Mach-O symbols
2022-08-02 swiftshader.regress@gmail.com Regres: Update test lists @ 678ffefb

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

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/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: lokokung@google.com
Change-Id: I5df23390a012fe44771cb7d005c27c89bcef8d09
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98001
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-08-02 20:51:45 +00:00
dan sinclair ab5fc1c4dc Fixup utils::Vector merge conflicts.
This CL fixes various util::Vector calls that were needed after
the push constant CL landed.

Change-Id: I0a21ad61ece6327b8789c5c083f4d1fcfd6339b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98040
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
2022-08-02 19:43:14 +00:00
Dawn Autoroller c2272b852e Roll ANGLE from c517463abe8a to 6e6f3e6da27c (6 revisions)
c517463abe..6e6f3e6da2

2022-08-02 eddiehatfield@google.com Convert GLenum to string for failed trace prereq message
2022-08-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4818e22b9347 to 9501e63393f3 (1 revision)
2022-08-02 ynovikov@chromium.org Revert "[Metal] Disable ANGLE's Metal backend on older GPUs."
2022-08-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 67158b90f83c to 678ffefb1b3b (2 revisions)
2022-08-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from bfa66f9bea8c to d268b4c8a6b1 (202 revisions)
2022-08-02 kbr@chromium.org [Metal] Disable ANGLE's Metal backend on older GPUs.

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 lokokung@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: lokokung@google.com
Change-Id: I02917e2e2177e292ceb583323a3bcfb78b3c0466
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98000
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-08-02 18:18:23 +00:00
dan sinclair 73778d3b0b Add support for >>= and <<=.
This CL adds `<<=` and `>>=` to the supported operators in WGSL. The
ExpandCompoundAssignment transform is used to convert to the expanded form.

Bug: tint:1594
Change-Id: I20519052c52d4b69bc90def1acc5c0a30c36fd8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97980
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-08-02 18:18:05 +00:00
Yunchao He 6f0884983f Revise Intel GPU generations in gpu_info.json
Intel Xe is also called Intel Gen 12. Quite a few Intel architectures
are classified into Gen 12. Some of these architectures are Gen 12
LP (low power), while the others are Gen 12 HP (high performance,
for example, some Intel discrete GPUs). For more details, see
https://en.wikipedia.org/wiki/Intel_Xe. We need to separate Intel Gen
12 LP from Intel Gen 12 HP for some toggles on D3D12 backend.

Bug: dawn:949

Change-Id: Id5d10c0ecb31ca9e323ede65c3d55e6d4954370e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97901
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: yang gu <yang.gu@intel.com>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-02 18:10:05 +00:00
Li Hao e37f0a1943 cts: Use intel-gen-9 instead of intel-hd-630-family tag
There are many devices in Intel HD630 family, we cannot enumerate all
their device ids in the tag. We want cts to run as expected on other
Intel devices of the same architecture, add generation-based tag
intel-gen-9 to include a broad range of devices in the expectations.

Bug: dawn:1444
Change-Id: I80b6ae64ea2efc41bcc68e1c917919a86ec87f44
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97760
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-08-02 17:32:44 +00:00
Ben Clayton 783b169bf4 tint/ast: Migrate to utils::Vector
Change-Id: I10dd2feeaeb86a1ee7769d2bfd172e49c2805cb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97843
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-08-02 17:03:35 +00:00
Ben Clayton 34d46731bb tint: Replace VectorRef with ConstVectorRef.
The elements of the VectorRef is now immutable, but can be
moved, if the caller relinquishes ownership by explicitly using
std::move() at the callsite.

Also add utils::Empty as a way of signalling that a vector should be
constructed with no elements. This is helpful in templated code where
{} cannot be used due to overload ambiguity.

Change-Id: I24a50a13956b0692771a8bc9046336ad46261562
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97842
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-02 16:52:25 +00:00
Corentin Wallez bdc619f5ef dawn: Make adapter creation error less scary in stdout.
Bug: chromium:1348664
Change-Id: Ieba886ccc6c0d8813cd175c648849c92b3820f2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97840
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-02 16:46:25 +00:00
Ben Clayton cae5547aee docs/tint: Update OT changes for `array()`
Fixed: tint:1628
Change-Id: Ic865a0247176185b68e76513911341d0a4bbebd9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97920
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-08-02 16:14:25 +00:00
Ben Clayton 27f0ea69ea test/tint: Add end-to-end tests for inferred arrays
Bug: tint:1628
Change-Id: Ic3019f5d1db4c7b28c80292075ec68d79f286697
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97664
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-08-02 16:08:45 +00:00
Corentin Wallez fa1a5478d3 Better specify CIPD deps for CMake and Go
This fixes `gclient sync` on ARM64 macs.

Fixed: dawn:1464
Change-Id: I2112793667cf0282100d2155e9b86f10cbe758df
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97940
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-08-02 16:07:45 +00:00
dan sinclair 4abf28e29b tint: Add basic support for chromium_experimental_push_constant.
This extension adds support for the push_constant storage class such
that it can be tested with WGSL test files. The real goal is to allow
future transforms that will add push constants that the SPIRV writer
will output.

The extension:

 - Adds the `chromium_experimental_push_constant` enable.
 - Allows the push_constant storage class for global variables.
 - Adds validation that the types are host-shareable for push_constant
   variables, and that they don't contain f16 (must be 32bit types
   only).
 - Validates that at most one push_constant variable is statically used
   per entry-point.
 - Skips validation that the extension has been enabled if
   kIgnoreStorageClass is used.

Tests are added:

 - For parsing of var<push_constant>
   - Caught a missing conversion.
 - For each of the validation rules.
 - For the wrapping of push constants in structs if needed by
   AddSpirvBlockAttribute.
 - For the layout and type rules of the storage class.
 - For a shader with multiple entry-points using various push constants.
    - Caught a missing reset of the previous push constant variable in
      the validation check that at most one is used.
    - Caught the missing wrapping in structs that had to be added to
      AddSpirvBlockAttribute.
    - Caught incorrect logic when adding diagnostics about the call
      graph leading to the reference to push constants.

Bug: tint:1620
Change-Id: I04a5d8e5188c0dcef077f2233ba1359d1575bf51
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96682
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-08-02 15:55:35 +00:00
Alastair F. Donaldson 24d36b0227 AST fuzzer: fix change unary operator mutation
The "change unary operator" mutation now ignores the indirection
operator.

Fixes: tint:1631
Change-Id: Ie1878d8bf65807f3319858b62292bc97fba81044
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97680
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Alastair Donaldson <allydonaldson@googlemail.com>
2022-08-02 15:42:21 +00:00
jchen10 27343ffdb3 Explicitly reset mDeleter when moving Blob
It's not automatically cleared to empty when moving on ChromeOS, so
the same mDeleter can be executed more than once.

Bug: chromium:1348193

Change-Id: If96a73f0b9bf62b2212a9f47108c465d6c911617
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97865
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-02 15:32:45 +00:00
Dawn Autoroller 27a70c4d0a Roll SwiftShader from 67158b90f83c to 678ffefb1b3b (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/67158b90f83c..678ffefb1b3b

2022-08-01 sugoi@google.com Increase subTexelPrecisionBits from 4 to 8
2022-08-01 swiftshader.regress@gmail.com Regres: Update test lists @ 80aaa8a7

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

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/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: lokokung@google.com
Change-Id: Ieaa7c1b3827b26228e187cf8494a676a607b57f3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97864
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-08-02 06:45:33 +00:00
Dawn Autoroller 4f487891ff Roll ANGLE from 9af3ae0dc6e9 to c517463abe8a (9 revisions)
9af3ae0dc6..c517463abe

2022-08-02 lexa.knyazev@gmail.com Add NoUnclampedBlendColor limitation
2022-08-01 cclao@google.com Vulkan: Reduce Framebuffer dirtyBits for swapchain only changes
2022-08-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from e810ac85e1c8 to bfa66f9bea8c (1114 revisions)
2022-08-01 cnorthrop@google.com Tests: Add Ni no Kuni trace
2022-08-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 73766817e984 to 4818e22b9347 (9 revisions)
2022-08-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 80aaa8a74b74 to 67158b90f83c (2 revisions)
2022-08-01 cclao@google.com Vulkan: Fix RefCountedDescriptorPoolHelper leak
2022-08-01 romanl@google.com Add flag --save-screenshots (implied by --screenshot-dir).
2022-08-01 jmadill@chromium.org infra: Update wrangling docs with Sheriff-o-Matic.

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 lokokung@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: lokokung@google.com
Change-Id: I0421c79a0a9ac392b80e931b86a5e1816acd2a0c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97863
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-08-02 04:28:45 +00:00
Zhaoming Jiang 0ea0d4b16e tint/resolver: Test f16 types in materialize unittests
This patch add f16 types materialize unittests.

Bug: tint:1473, tint:1502
Change-Id: Ifc4e991cf19e58a9fbfb4f032462d548694c2a5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97820
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2022-08-02 03:16:34 +00:00
Jiawei Shao 8c590acda0 Remove the deprecated toggle DEPRECATED_DumpTranslatedShaders
Bug: dawn:792
Change-Id: I2eee16490617c3371bfd65a69aca678aa4a6f3dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97780
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2022-08-02 01:45:34 +00:00
Loko Kung cbadf96e79 Roll third_party/webgpu-cts/ 65130c197..94fd83896 (9 commits)
Update:
 - expectations.txt
 - ts_sources.txt
 - resource_files.txt
 - webtest .html files


65130c1970..94fd83896c
 - 94fd83 Expand readbackFromWebGPUCanvas test with alphaMode (#1673)
 - 7af1f6 Implement `mix` f32 tests (#1719)
 - 3fefce Validate a shader without an entry point is valid. (#1729)
 - 3dc2fe Add non-entrypoint tests to the builtin validation. (#1728)
 - 573361 Add test to validate parsing of `@builtin` (#1726)
 - c660f5 Trailing comma in `@align` should be valid. (#1727)
 - d1c579 Add test to allow builtin values as identifiers (#1725)
 - bab564 Implement `trunc` f32 tests (#1724)
 - 8fd9d5 Add `frag_depth` builtin validation. (#1723)

Created with './tools/run cts roll'

Change-Id: I55c38e9b2b32f6fdebd3d7d9fc5d29ef8f8054ee
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97862
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-02 00:49:14 +00:00
Li Hao 9afd92be3f Implement timestampWrites on D3D12 and Vulkan backends
Metal implementation is more complex and has more issues, submit D3D12
and Vulkan frist and another CL for Metal.

Bug: dawn:1250
Change-Id: I718d323e01bb41b0209bfd1f1026faf64b4f1076
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97640
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2022-08-02 00:20:34 +00:00
Shrek Shao 9ec183ed9f Update VertexStepMode::VertexBufferNotUsed jsrepr to undefined
As suggested in an emscripten update,
VertexStepMode::VertexBufferNotUsed will be undefined in jsrepr
in generated files.

Bug: dawn:1000
Change-Id: I3ad96f66f2965d6aa589174225eee538ec97d060
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97900
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2022-08-01 23:03:14 +00:00
Ben Clayton 6835c8df3e tint/reader: Parse arrays with no type / size
Bug: tint:1628
Change-Id: Ieb3c07e7dae6fd1e5acf4dd4819312092e5b5bf5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97586
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-08-01 21:42:54 +00:00
Ben Clayton 86329e286b tint/cmd: Dump disassembly with --verbose
Change-Id: I2701117b6c253b632091a59fc1a63d97526d5ce2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97500
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-08-01 19:56:24 +00:00
Ben Clayton 92f2cb79b5 tools/gen: clang-format generated .cc, .h and .inl files
Change-Id: I5a79cc0b5da1967632d9df02e058a8e3e5073d2d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97441
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-08-01 19:29:14 +00:00
Ben Clayton 4aa360db5d tint/resolver: Fix null-deref.
Check the result of Materialize() for an index accessor.

Bug: chromium:1347541
Change-Id: Iac1b030a1923c96d65d531a0ca5fd1f4bd4271b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97851
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-08-01 18:46:54 +00:00
Ben Clayton db5d2ea4f2 tint/writer/wgsl: Emit inferred-type arrays
Bug: tint:1628
Change-Id: If0907ee7c4dc3d0216aba0282dc2c5203a3ea727
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97590
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-08-01 18:11:25 +00:00
Dawn Autoroller 19e9673e0a Roll SwiftShader from 80aaa8a74b74 to 67158b90f83c (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/80aaa8a74b74..67158b90f83c

2022-07-29 capn@google.com Update SPIR-V Tools to 54cd5e196
2022-07-29 capn@google.com Update SPIR-V Headers to 0bcc62492

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

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/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: lokokung@google.com
Change-Id: I22865bec8aaf6497ae227a8844d5504cf8f28546
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97861
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-08-01 17:49:43 +00:00
Ben Clayton 4a65620716 tint/resolver: Handle array() constructors
If the array constructor has no explicit type and count, infer from the
arguments.
Implement and test array materialization.

Also:
* Change sem::AbstractNumeric::IsConstructable() to return true. This
  has changed in the WGSL spec.
* Fix the test-helper builder for DataType<array<N, T>> - it was
  incorrectly calculating the array size.

Bug: tint:1628
Change-Id: I0ec4e55b469ca6423b4d1848f27bb11df4fa683b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97663
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2022-08-01 17:36:54 +00:00
Antonio Maiorano 70a43fa5b9 tint: Fix doxygen error.
Change-Id: Ibca03d2838aac894ccd46a6999f2d8ab745ed15b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97881
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-08-01 17:25:44 +00:00
Antonio Maiorano 239a92d2d0 tint: transform::RemovePhonies: skip builtins with no side effects
This transform was attempting to remove builtins with no side
effects, such as a call with abstract int/float args, which is unhandled
by this transform. For example, this would cause the transform to ICE:

_ = clamp(1, 2, 3);

Fixes ClusterFuzz issue crbug.com/1348739.

Bug: chromium:1348739
Change-Id: Ie355eb36c6c020417c2d93f2dc434c11dbb72d1f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97880
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-08-01 17:21:54 +00:00
Ben Clayton 6315a27778 tint/resolver: Tidy up type_constructor_validation_test.cc
Rename tests to remove redundancy.
Add missing 'Source' flavoured constructors to ProgramBuilder. Use them.

Change-Id: I9a41db2ebc8fdc12e2654836247370844990272a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97662
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-08-01 17:18:04 +00:00
Ben Clayton bf32bd4e96 tint/ast: Tighten AST definition of runtime-sized array
Just checking whether the count is nullptr is not sufficient to know
whether the array is fixed-size:

`array` represents a infered type, infered fixed-size array
`array<T>` represents an explicit type, runtime-sized array
`array<T, N>` represents an explicit type, explicit fixed-size array

Bug: tint:1628
Change-Id: I03f547078c015d1d2a8a38308bb5e41c733715ec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97589
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-08-01 17:04:54 +00:00
Stephan Hartmann b779b2b13d IWYU: add cstdint for uint*_t in dawn::native::Blob
Bug: chromium:957519
Change-Id: Id7bf01df556fd9dd1ac7e587bfecd2a522122c9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97841
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
2022-08-01 16:02:43 +00:00