Commit Graph

9729 Commits

Author SHA1 Message Date
Ben Clayton a253a5f7e7 tools: Expand / clean-up the template WGSL type helpers
Fix `IsAbstract()` so that it doesn't consider most-nested element types.
Add `ElementType()` and `DeepestElementType()` helpers.
Add `OverloadUsesF16` as a helper for https://dawn-review.googlesource.com/c/dawn/+/96722.

Simplifies template code.

Change-Id: Iff5a9a7258caea06e00ee37c29e5298d9c35b799
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97361
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-07-27 19:36:49 +00:00
dan sinclair 8dbd4d0280 Add storage_class error reporting to generators and transform.
With the experimental push_contants PR we will have AST which can not be
generated by all backends. Historically this would trigger the fuzzers as
an error. This CL changes the storage_class to an error from an ICE and
updates the code so the fuzzers only error on ICE or Fatal errors.

Change-Id: I2039a3d4cb457d805d38e2d6a790121318d1f07d
Bug: tint:1620
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97281
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-07-27 18:54:05 +00:00
Ben Clayton f330229de5 tint/ast: Rename Builtin to BuiltinValue
This is what it is called in the spec, and avoids confusion with the builtin functions.

Change-Id: I5cd4a250351c10928e90b640a8c68c7834bcf2a0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97200
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-07-27 18:48:06 +00:00
Ben Clayton f50d56aa05 tint/ast: Generate ast::Extension from intrinsics.def
Emit unit tests for parsing and printing.
Emit benchmarks for parsing.
Uses intrinsics.def as a single-source-of-truth.
The generators provide a way to optimize the enum parsers.

Change-Id: I7f13128f510b2156c2ef724c89df7bb85dae17ed
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97151
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-07-27 18:32:19 +00:00
Dawn Autoroller 9e5415dbeb Roll SwiftShader from 1739966fee2a to 54bae6e27554 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/1739966fee2a..54bae6e27554

2022-07-27 srisser@google.com Expose uniformBufferArray dynamic indexing

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 enga@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: enga@google.com
Change-Id: Ibaa57941f9c5a4c83d86bc762218f062e47e7e98
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97308
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-07-27 18:28:46 +00:00
Ben Clayton a1571ac403 tint/inspector: Use a std::optional for workgroup_size
No-value represents a workgroup size that is derived from an override-expression.

Bug: dawn:1504
Bug: chromium:1346929
Change-Id: Idf6caa9d052aa56e8ef1913d16d1f68d2c5844ed
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97362
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-07-27 17:05:56 +00:00
Ben Clayton a123b892a5 tint/ast: Generate ast::StorageClass from intrinsics.def
Emit unit tests for parsing and printing.
Emit benchmarks for parsing.
Uses intrinsics.def as a single-source-of-truth.
The generators provide a way to optimize the enum parsers.

Change-Id: I1669c123d375f24aca45f3ea4abf04d7892673c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97150
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-07-27 16:36:35 +00:00
Antonio Maiorano bf8ee35498 const eval of clamp
Bug: tint:1581
Change-Id: Icffaf023021e704b3beaacf35136a9d6263b31e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97221
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-07-27 15:02:25 +00:00
Antonio Maiorano 4de90f0bb1 const eval of atan2
Bug: tint:1581

Change-Id: I6268e291540bc8c712f6925f0bcb82c5873359c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96902
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-27 14:51:27 +00:00
Zhaoming Jiang f8fb94d9e8 tint: Emitting enable directive for DP4A End-to-End test
This patch modify the test/tint/builtins/gen/gen.wgsl.tmpl to emit
enable directive for dot4I8Packed and dot4U8Packed built-in function.
The expectaion files are added.

Bug: tint:1497
Change-Id: I53331695fe2e6609858e94bc261383ba3028d77c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96640
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2022-07-27 13:27:56 +00:00
dawn-autoroll 6e9a9bf974 Roll vulkan-deps from 2ba30da31c86 to 7158d6e8eaad (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/2ba30da31c86..7158d6e8eaad

Changed dependencies:
* spirv-tools: 388ce0ee64..cc5fca057e

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 enga@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: enga@google.com
Change-Id: Ie97b760daeca0d7d50f69aad216f643e835b4df1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97128
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-27 11:16:46 +00:00
Jiawei Shao d144805688 Skip tests about writeonly storage texture In render pass on ANGLE
StorageTextureTests.WriteonlyStorageTextureInFragmentShader and
StorageTextureZeroInitTests.
WriteonlyStorageTextureClearsToZeroInRenderPass starts to fail on
the bots after the latest roll of ANGLE, so we have to temporarily
suppress them.

Bug: dawn:1503
Test: dawn_end2end_tests
Change-Id: Id8abf7c0a5bd30e5de12c838f871e1ab896ab4fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97127
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-07-27 10:09:25 +00:00
Ben Clayton 695a6d82ae tools/cmd/gen: Add more utilities to the templates
* Ensure that copyright years are preserved when regenerating.
* Add 'Split' function which maps to strings.Split.
* Add 'Scramble' function with messes with a string.
* Add 'Import' function which allows templates to be imported, allowing
  for reusable macros.

Change-Id: Ib77f59a989cf55addcced3e337c9031062a83470
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97149
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-27 01:10:15 +00:00
Brian Sheedy 2aea0e957f Add type to CTS runner message
Adds the "type" field to the websocket message sent
by the CTS JavaScript code with a value of
"TEST_FINISHED". This is in preparation for the
switch to using a heartbeat system for test timeouts
instead of a fixed timeout.

Bug: chromium:1340602
Change-Id: I886d89dbdfb1e3946dd8c59ecf23f9b18385b65e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97280
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@google.com>
Auto-Submit: Brian Sheedy <bsheedy@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-27 01:04:35 +00:00
Jiawei Shao dd96f830f9 Test non-zero buffer copy offset in DepthStencilCopyTests
This patch adds the tests on the buffer-texture copies with depth
stencil textures when buffer copy offset is not zero.

Note that the tests about texture-buffer copies with depth stencil
textures are temporarily skipped on D3D12 backends as there is still a
bug on the texture-to-buffer copies with depth stencil textures on some
D3D12 platforms. We will fix this issue in the next patch.

Bug: dawn:727
Test: dawn_end2end_tests
Change-Id: I1d92cca80945ad77506db5441c396ce3eea00cca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97180
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2022-07-27 00:57:55 +00:00
Dawn Autoroller a2a57b9b52 Roll SwiftShader from b6ddcf331865 to 1739966fee2a (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b6ddcf331865..1739966fee2a

2022-07-26 swiftshader.regress@gmail.com Regres: Update test lists @ b6ddcf33

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 enga@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: enga@google.com
Change-Id: I2aee59a151feb109f751c200e5a179a89dbf0924
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97124
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-07-27 00:56:35 +00:00
Ben Clayton 48085845bd tint/ast: Clean up StorageClass enum
Remove unused enum entries.
Add a ParseStorageClass() function. Have the WGSL parser use this.

First step to standardizing the way we parse enum-backed token sets.

Change-Id: I31c02816493beeabda740ff43946edce097f5fd1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97148
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-07-26 22:51:36 +00:00
Austin Eng ce8876074f Move code around in prep for CacheKey -> Stream refactor
Moves code around to simplify viewing the diff for Change
If7594c4ff7117454c1ab3d0afaeee5653120add8

Bug: dawn:1480, dawn:1481
Change-Id: Iecfe4356b1a933a46741cec185008ca1d927c0a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96903
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-07-26 21:01:24 +00:00
dawn-autoroll 290b3f5926 Roll vulkan-deps from 895da470d974 to 2ba30da31c86 (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/895da470d974..2ba30da31c86

Changed dependencies:
* glslang: 607771c362..7b75c5dc7d
* spirv-tools: e4cfa190df..388ce0ee64
* vulkan-validation-layers: 5be968397f..b15de0fef2

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 enga@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: enga@google.com
Change-Id: I6fc2aea66881739e706ac71e8bc8893a4fa724dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97240
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-07-26 20:11:55 +00:00
Ben Clayton c768e640f4 tint/intrinsics.def: Change language for enums
Previously enum members were added to the global namespace, so that
overload template parameters could be constrained to a single
enum-entry without the need to declare a matcher. While this was a minor
convenience feature, it means that you cannot declare an enum with
members that share the same name as a type. This will be very common for
extensions, like 'f16' where 'f16' is the name of an extension and a
type name.

Change scoping so that enum members need to be fully qualified. Also
change the intrinsic syntax so that enums always need to use a matcher
for enums.

Change-Id: Ided91130e9df537d38dc8ecb41325c0992dea14b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97146
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-07-26 17:49:54 +00:00
Corentin Wallez 1260a53018 Mark descriptor/options as optional for requestDevice/Adapter
These were not marked as optional previously because it would mean that
C++ methods would look like void F(a = null, b, c) which is invalid in C++
because default arguments must be contiguous and at the end of the
signature.

This commit adds a special case when optional=true where no_default=true
still marks the argument as optional, but doesn't produce a C++ default
argument.

Fixed: dawn:1502
Change-Id: I1b648d37edb94b8412109fc0a06a91bbbd31b8c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97002
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-07-26 17:36:44 +00:00
Ben Clayton d722e619b1 test/tint: Regenerate expectations
The headers have changed.

Change-Id: I45046ceb05d205015c3b462136ecf10c0057162e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97147
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-07-26 17:16:15 +00:00
Ben Clayton 02e9ce19ec tint: Make tint::ast::HasAttribute() accept multiple template arguments
Change-Id: I42efb3e603ac1d92c77e48784f7a9d010ade3047
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96021
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-07-26 16:40:15 +00:00
Corentin Wallez a55b686ded Remove unused dawn::native:🤘:GetMetalDevice
Bug: None
Change-Id: I07d4c2f4afce9202619e9def9dd1a214ae0906a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97203
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-07-26 16:28:45 +00:00
Ben Clayton cde5009be3 tools: Shuffle 'intrinsic-gen' tooling
Rename to 'gen', so that more templating can be added without having a confusing name.

Can now be run with './tools/run gen'

Move the bulk of the intrinsic-gen logic to `tools/src/tint/intrinsic`

Change-Id: I750989a5aa86272c10c2ad37adffe7def11c61f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97141
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-07-26 15:46:44 +00:00
dan sinclair 62c58a076c Stay at the EOF or Error token.
When the `next` token is requested, if we're already at EOF or Error
we can just return that token and stay at that index.

Bug: crbug:1347298
Change-Id: I1c31cf32a7030166c174d336455c7adabf97c6c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97220
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-26 14:59:54 +00:00
Ben Clayton ee36e39296 test/tint/builtins: Generate abstract numeric tests
Change-Id: I2da181af0694f73ec4be07ed40e4e70d49b53583
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97140
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-07-26 14:27:25 +00:00
Ben Clayton 0fba14e3c6 tint/val: Make DXC validation output stable
Replace the temporary file name with 'shader.hlsl', so that
skip-expectations can be stably re-generated.

Change-Id: I5ead2235e6e0d84ad67c8d90f8d06b812c8fd593
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97145
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-26 14:23:24 +00:00
Ben Clayton e9585f5548 tint/val: Fix HLSL validation with DXC
Unlike on Windows, where command line argument splitting is done by the
callee, on 'nix systems, the arguments need to be split by the caller.

Fixes issues where validation was different on windows to other
operating systems.

Change-Id: If55738c431586f706e3edf0ac683661f34b53391
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97144
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-07-26 14:19:54 +00:00
Dawn Autoroller 145cdafc5e Roll ANGLE from be7084466521 to a3cda6071438 (2 revisions)
be70844665..a3cda60714

2022-07-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 16e026a959f1 to b6ddcf331865 (2 revisions)
2022-07-26 cnorthrop@google.com FrameCapture: Fix and optimize multi-context reset

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 enga@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: enga@google.com
Change-Id: I73a9d44f1a8fb15034752e430909b0c076cca4a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97123
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-07-26 13:59:04 +00:00
Ben Clayton a4616ea7ca kokoro: Update DXC to v1.7.2207 - 2022/07/18
Change-Id: I8556a7d4e16ed0671a220534ab611df9b5b0db35
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97143
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-07-26 13:17:06 +00:00
Dawn Autoroller a971abcb20 Roll SwiftShader from 161e7cb70dba to b6ddcf331865 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/161e7cb70dba..b6ddcf331865

2022-07-25 srisser@google.com Expose float preserve capability

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 enga@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: enga@google.com
Change-Id: Ifa69aeabed31c813131ba6a7a56b6b60f6276399
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97122
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-07-26 11:17:17 +00:00
Ben Clayton 958a4642f1 tint/resolver: Use utils::Vector in a few places
Use the new vector type in some of the hot code paths of the resolver.

Bug: tint:1613
Change-Id: Ie56d8c96f73c9112f37934ad67e588513aafb982
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96282
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-07-26 07:55:24 +00:00
dawn-autoroll 4b3d53d141 Roll vulkan-deps from e1e1aedeed25 to 895da470d974 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/e1e1aedeed25..895da470d974

Changed dependencies:
* glslang: 6ef2e49216..607771c362

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 enga@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: enga@google.com
Change-Id: Ic1663d6bf44bc20d5b468b79f9f9a5869b985e18
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97181
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-26 06:59:24 +00:00
Dawn Autoroller 77f83cd4d2 Roll ANGLE from 4fdc37545da7 to be7084466521 (8 revisions)
4fdc37545d..be70844665

2022-07-25 syoussefi@chromium.org Vulkan: Remove the bindEmptyForUnusedDescriptorSets workaround
2022-07-25 jmadill@chromium.org dEQP: Isolate headers in tcuANGLEPlatform.h.
2022-07-25 ynovikov@chromium.org Remove suppressions for tests which pass with Intel Mesa 20.0.8
2022-07-25 lexa.knyazev@gmail.com Return INVALID_VALUE for online BC compression
2022-07-25 pkasting@chromium.org Avoid streaming a wide string to a (narrow) ostringstream.
2022-07-25 jmadill@chromium.org infra: Add sheriff_rotations to luci properties.
2022-07-25 ynovikov@chromium.org Update extension support (July 25, 2022).
2022-07-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from cb1dc55bc044 to e3066ef682d7 (11 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 enga@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: enga@google.com
Change-Id: I876c642791afe69eef7b1f4f312a9fa1d7e277c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97121
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-07-26 00:47:44 +00:00
dan sinclair d9a61cedaf Remove source copies in the parser.
This CL removes the copies of the `Source` and, in some cases, the token
name in the parser implementation.

Change-Id: I91c0797244a19fa5a36d39029d02823a20cee0cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97072
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-07-26 00:28:37 +00:00
Ben Clayton 4d1d143977 tint/utils: More Vector polish
* Added a class template argument deduction guide (CTAD) to infer the
  `T` and `N` template arguments. This lets you write `Vector{1,2,3}`
  instead of `Vector<int, 3>{1,2,3}`. This is important as a mismatch
  between the number of constructor arguments and the `N` template
  argument can cause silent heap allocations, which we're trying to
  avoid. The `T` deduction uses the same smarts as the return-type
  deduction of `Switch()`, so:
   * `Vector{1, 2.0}` would construct a `Vector<double, 2>`
   * `Vector{i32, u32}` would construct a `Vector<const sem::Type*, 2>`
* Removed the Vector(size_t) and Vector(size_t, const T&) constructors.
  This is a move away from the std::vector style API, but these are
  rarely more efficient than calling Reserve() and Push(), as you remove
  the redundant initialization. The main reason for doing this is to
  remove ambiguity between `Vector{1}` and `Vector(1)`.
* Added support for covariance conversion
  (`Vector<Derived*, N>` -> `Vector<Base*, N>`).
  Only supports pointers to `Castable`, as this can  only safely work
  with single-inheritance.
* Added support for conversion of `Vector<T*, N>` -> `Vector<const T*, N>`.
  This will remove pointless vector copies from the sem package.

Bug: tint:1613
Change-Id: I79b9f82d623f90afa14f8ba1613ee49cccceafeb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97020
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-25 23:37:34 +00:00
Dawn Autoroller 45db5df803 Roll SwiftShader from 16e026a959f1 to 161e7cb70dba (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/16e026a959f1..161e7cb70dba

2022-07-25 swiftshader.regress@gmail.com Regres: Update test lists @ 16e026a9

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 enga@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: enga@google.com
Change-Id: I0323dfb623ac4bac313a5d719d7b8634f862ce96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97120
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-07-25 21:06:39 +00:00
dawn-autoroll 1bafc5aab6 Roll vulkan-deps from 50a58c2a73cb to e1e1aedeed25 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/50a58c2a73cb..e1e1aedeed25

Changed dependencies:
* vulkan-validation-layers: bbff1dc594..5be968397f

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 enga@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: enga@google.com
Change-Id: I93c63ce463f489100b826a06b110c75f29aeb115
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96988
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-25 18:05:08 +00:00
Yuly Novikov 7e33dcba5b Remove Linux Intel suppressions fixed in Mesa 20.0.8
Bug: dawn:1111, dawn:1050
Change-Id: If3036921655abca967ed2793b03982dfb1b815b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97100
Auto-Submit: Yuly Novikov <ynovikov@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-07-25 17:04:28 +00:00
dan sinclair 0cbf5a922f Pre-parse token list.
This CL updates the parser and lexer to pre-parse the token list and
then the parser works off the list of tokens. This allows the parser to
work with references to the tokens and not have to worry about them
going stale.

For any splittable token a placeholder token is injected after the
token. If the token ends up getting split the placeholder is overwritten
with the new type.

Change-Id: I5a8ccca15d8c14b5027df7dd2734be6753e46fa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97070
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-25 16:43:08 +00:00
Ben Clayton 1308395055 Add tools/cfi/ignores.txt
Empty file. Allows you to build with Control Flow Integrity enabled.

Bug: dawn:1407
Change-Id: I8a67382c9c50cfdf005dba6d46cd148fdaba0fc3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97005
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-07-25 15:56:38 +00:00
dan sinclair 833ccab384 Optimize the lexer match method.
This CL updates match to compare against characters instead of strings.
If the prefix character doesn't match we stop checking for any
punctuation which starts with that character.

Change-Id: Ifddc1ff3f3936ab3a53c37e080394ed35dc2aecf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97065
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-25 14:54:18 +00:00
dan sinclair 08482ec7ed Expand ASCII short circuit.
This CL expands the ASCII short circuit to add the number range and _
into IsXIDContinue.

IsXIDStart is updated to filter out anything less then the first
sequence after the (a-zA-Z) blocks as they won't be XIDStart but do cover
all of the common ASCII punctuation characters.

Change-Id: Ib839d9840f5a1ecc3d2e80774b11af2444e9f439
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97071
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-25 13:41:21 +00:00
dan sinclair b0499e446f Add optional attribute trailing commas.
This CL allows optional trailing commas on attribute lists.

Bug: tint:1423
Change-Id: I80f3b1580c95cac328b4ab846c6a3d4999fe34cb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96907
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
2022-07-25 13:30:18 +00:00
Zhaoming Jiang 659d58ceca tint/resolver: Fix BuiltinCall validator nullptr deref
This patch fix a nullptr dereference case in Validator::BuiltinCall,
which check if a no-return-value built-in is called in something other
than call statement. Such call may don't have a statement context at all.

Bug: chromium:1346830
Change-Id: Ieef02daa5c93a3ac253cd7a7366a53e0fc7887b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96986
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-07-25 12:18:38 +00:00
Dawn Autoroller 401ac122d5 Roll ANGLE from e3933465d88f to 4fdc37545da7 (1 revision)
e3933465d8..4fdc37545d

2022-07-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f00ffae9c319 to 50a58c2a73cb (6 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 enga@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: enga@google.com
Change-Id: Icc430fa4d51ac60e4ee788ee217ef1161f79d53e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97083
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-07-25 11:53:48 +00:00
Corentin Wallez 3b7e08857c tint test-runner: exclude .fxc/dxc.hlsl from glob
Bug: tint:1620
Change-Id: I5d5182025c140f71b69d3a9e540ae9ef8aec04e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97003
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2022-07-25 08:47:38 +00:00
dan sinclair f9a43b982d Remove unused string.
We saved the string in the lexer try_float for use in error messages,
then changed the message to not show the string. This CL removes the
creation of the float string.

Change-Id: I9bb381bebe31f25609c66d5ccda91de0277199cc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97069
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-07-24 19:45:17 +00:00
dan sinclair 3f9cc84d0a Short circuit IsXIDStart check.
Our common case is ASCII characters but, because those come at the start
of the XID Start range they'll end up being checked _last_ as we binary
search through the range. This means we're getting the worst case
behaviour for our common character.

This CL adds a quick check for [a-zA-Z] at the start of IsXIDStart to
quickly determine if we're an ascii character.

Change-Id: Iae733b0e8a64c855764cf58c0563a407e6a81f7d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97068
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-07-24 19:06:07 +00:00