Commit Graph

11457 Commits

Author SHA1 Message Date
Zhaoming Jiang be2ed98e05 Dawn: Require both DXC compiler and validator version being 1.6 or higher
This CL change the DXC version checking logic to get both DXC compiler
and validator version, which are not necessarily identical, and require
both version being 1.6 or higher to enable the use_dxc toggle.
This CL also modify the src/dawn/tests/BUILD.gn and add a copy target as
data_deps for "dawn_test" template, which copy DXC binaries from Windows
10 SDK 20348 to out directory, to ensure that windows trybots running
dawn_end2end_tests.exe (e.g. win-dawn-rel) can access a DXC of version
1.6 and can run end-to-end tests with DXC.

Bug: tint:1719
Change-Id: I39b48f3dffdf121d3749af7aa4b3d0bed1c22ea8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110340
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-11-24 02:07:48 +00:00
Rafael Cintron 36317d9839 Release D3D12 command queue in Device::DestroyImpl
Repeatedly creating and destroying WebGPU devices in a loop causes
large amounts of memory to pile up in the GPU process. Much of this
memory comes from the D3D12 command queue.

Releasing the command queue early in DestroyImpl before the destructor
runs goes a long way towards relieving the memory pressure.

Bug: chromium:1377789
Change-Id: I3ff9a5f6cb3ea3136e41079343532cbe732b6cc4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
2022-11-24 01:10:35 +00:00
Antonio Maiorano 9ba5f9e2c6 tint: const eval of transpose builtin
Bug: tint:1581
Change-Id: Ia614647bc4a3d24a53d45981ddcdb1c84ea84608
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111600
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-23 23:12:56 +00:00
Ben Clayton dd3fb05af7 Roll third_party/webgpu-cts/ 23c3bebbd..95541299f (6 commits)
Regenerated:
 - expectations.txt
 - ts_sources.txt
 - test_list.txt
 - cache_list.txt
 - resource_files.txt
 - webtest .html files


23c3bebbdb..95541299f6
 - 955412 Remove `line`, `lineadj` and `point` from reserved words. (#2015)
 - 39eb80 Reduce the number of test cases generated for atan2 (#2010)
 - 5bc45b op: Implement 'blend_components_clamp' test in blending.spec.ts (#1976)
 - a2798b op: Implement 'color_write_mask,channel_work' in color_target_state.spec.ts (#2011)
 - 21a8e0 op: Add 'color_write_mask,blending_disabled' to blending.spec.ts (#1994)
 - fa3aad Implement rg11b10ufloat-renderable validation test (#1988)

Created with './tools/run cts roll'

Change-Id: I23233032c2ee360ed915892918165fa1f3a06628
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Include-Ci-Only-Tests: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111560
Kokoro: Kokoro <noreply+kokoro@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2022-11-23 22:44:21 +00:00
dan sinclair b785dc1e39 Update parser to match * and & spec change.
The * and & operator grammar was updated in the spec to closer
match other languages. This CL updates the Tint WGSL parser to
match the current spec.

Bug: tint:1756
Change-Id: I81b7c373bbd6a540b9273813c63a29487e2907ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111580
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-23 21:33:11 +00:00
Ben Clayton d6800098e7 Add tools/src/cmd/git-stats
Can be run with:
./tools/run git-stats

Change-Id: Ie46be01ff3318ff50acdb13eb809d5304f867f04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111180
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
2022-11-23 21:08:52 +00:00
Ben Clayton 7c6e229a18 tint/utils: Make Hashmap::Find() safer to use
Don't return a raw pointer to the map entry's value, instead return a new Reference which re-looks up the entry if the map is mutated.

Change-Id: I031749785faeac98e2a129a776493cb0371a5cb9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110540
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-23 21:04:25 +00:00
Ben Clayton 597ad53029 tint/transform: Add HoistToDeclBefore::VariableKind
Enums are scientifically proven to be 96.4% better than a bool for parameters.

Also throw in kConst because we can.

Change-Id: I788504d8d452d6a879d2d675891e3171db6a40f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111244
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-23 20:05:10 +00:00
Ben Clayton ed998e91ab tint: Suffix builtin return types with '_f32'
If the template type is f32.

See: https://github.com/gpuweb/gpuweb/pull/3629
Change-Id: Ia686d77b4dbc169d7ef69a91d67e45357bee199f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111442
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-23 19:57:00 +00:00
Antonio Maiorano 05c8daac42 tint: const eval of determinant builtin
Bug: tint:1581
Change-Id: Ifed8202ba2346eee435ee4e3d0e82ab614a86255
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111281
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Kokoro: Antonio Maiorano <amaiorano@google.com>
2022-11-23 19:16:15 +00:00
Dawn Autoroller 43fe9bec16 Roll SwiftShader from 4078f769562a to 2a5928cb17d1 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/4078f769562a..2a5928cb17d1

2022-11-23 capn@google.com infra: Also automatically run win-swangle-try-tot-swiftshader-x64

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 shrekshao@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: shrekshao@google.com
Change-Id: I1cb1f7e1bfaf2c1e3d9860b87cf1066f448c9e0c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111540
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-11-23 18:49:05 +00:00
dawn-autoroll 41911d0558 Roll vulkan-deps from bd2c589d0d34 to 46af29f17d19 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/bd2c589d0d34..46af29f17d19

Changed dependencies:
* vulkan-validation-layers: ddef7e6c17..986f716dc7

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 shrekshao@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: shrekshao@google.com
Change-Id: I04c102c3b199e16b31f291090ec002ce0aaa3f4c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111520
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-11-23 18:45:37 +00:00
dan sinclair 5180be6b1d Remove reserved words.
The `line`, `lineadj` and `point` reserved words were removed from
the spec. Update Tint to match.

Bug: tint:1769
Change-Id: I219bcf1d6053013133b8e369bb01c86af7bb9193
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111320
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-23 18:21:41 +00:00
Ben Clayton 69c2c34326 tint: Implement const-eval of frexp()
Also add abstract overloads.

Bug: tint:1581
Fixed: tint:1768
Change-Id: Icda465e0cfe960b77823c2135f0cfe8f82ed394f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111441
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-11-23 18:21:38 +00:00
Takahiro d743778ed5 Also reject mapAsync if the buffer is being mapped
To reflect the WebGPU spec change at
https://github.com/gpuweb/gpuweb/pull/3348

Bug: chromium:1355994
Change-Id: I0159cbd9e1977a05453e3c562a2b0649a0ff930f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110448
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-23 18:19:52 +00:00
dan sinclair f2ad5fd260 Add const-eval for `log` and `log2`.
This CL adds const-eval routines for `log` and `log2`.

Bug: tint:1581
Change-Id: I052b5ddd3bc8bdcd7c0925fa7912dcbe1a60e299
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111323
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-23 17:34:40 +00:00
Corentin Wallez 7a9fe30b11 CompilationMessages: compute offsets directly to take \r\n into account.
Bug: dawn:1357
Fixed: tint:1684
Change-Id: Ia1e9af3ff3ccb0fe674a838b966fa8a49ff8fb4f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111060
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-23 17:20:44 +00:00
dan sinclair ae739d6d1c Add const-eval for `exp` and `exp2`.
This CL adds const-eval routines for `exp` and `exp2`.

Bug: tint:1581
Change-Id: I59cc77aee64bfadf6ff10548f27f3d253b68a129
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111322
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-23 16:37:21 +00:00
Austin Eng e9ad15ae7f Add tolerances to pass several tests on Mac M1 and SwiftShader
Bug: none
Change-Id: I1fea9b59d3d151d2f94fda0793ad47493d98f6fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105780
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-23 16:20:03 +00:00
James Price 79f05996e1 cmake: Use -Wno-poison-system-directories
This fixes the build on certain macOS systems.

Change-Id: Ifac6d77c81982d0f147dd8197cf68a33d5cc909e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111480
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
2022-11-23 15:50:49 +00:00
Ben Clayton 47fb4f9c57 tint/ir: fix double-underscore in identifier
This is reserved in C++, and triggers a warning-as-error for gcc

Change-Id: I0595977e690f9e0e7d5e1b6dd1fdeb74183fc378
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111440
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
2022-11-23 15:00:51 +00:00
Ben Clayton 31b7fca82c tint: Add abstract overload of modf
Required fleshing out resolver handling of abstract structures.

Bug: tint:1768

Change-Id: Icb2983ac9bf37d4e260735cfdba5ac5e7dfe3ee2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111400
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-23 15:00:20 +00:00
Dawn Autoroller cd9873f8f0 Roll ANGLE from 27727e501aee to 494640e54bf3 (3 revisions)
27727e501a..494640e54b

2022-11-23 gert.wollny@collabora.com Capture/Replay: Make secondary contexts current during MEC
2022-11-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 2e2c857c4980 to ab42c3da0f40 (572 revisions)
2022-11-23 yuxinhu@google.com Revert "Vulkan: Remove useRelaxedPrecision" and "Vulkan: remove SpirvVaryingPrecisionFixer"

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 shrekshao@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: shrekshao@google.com
Change-Id: I8828351a06741c42fffd454b2f0928421c654019
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111420
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-11-23 13:41:55 +00:00
Ben Clayton 9dc770baef test/tint: Expand modf end-to-end tests
Check that these work as a mix of constant and runtime.

Bug: tint:1581
Change-Id: I572122d9425c4bb8e60125879f9829d765580d1f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111243
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-23 10:39:48 +00:00
Loko Kung bf3fecfc4b Ensures blob cache is always available, even if it is just a placeholder
Bug: dawn:549
Change-Id: I7efbaa58d93691648107fc6b94d76596a77f6516
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111140
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
2022-11-23 08:55:57 +00:00
Dawn Autoroller 36e6b82df7 Roll SwiftShader from d34588e0d62f to 4078f769562a (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d34588e0d62f..4078f769562a

2022-11-23 swiftshader.regress@gmail.com Regres: Update test lists @ d34588e0

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 shrekshao@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: shrekshao@google.com
Change-Id: I9af144c0aabe0672df2bb8cfbe65b815a8e3c074
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111360
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-11-23 05:07:40 +00:00
Loko Kung c7e156fb7b Deprecates enable_blob_cache toggle in favor of a disable version.
Bug: dawn:549
Change-Id: I5ba4c3e381ae73c356b2e4700df3f463278c979c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110840
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-23 02:32:42 +00:00
dawn-autoroll 32a31ac379 Roll vulkan-deps from 96f4fdc41b84 to bd2c589d0d34 (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/96f4fdc41b84..bd2c589d0d34

Changed dependencies:
* vulkan-validation-layers: 0582b9aab4..ddef7e6c17

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 shrekshao@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: shrekshao@google.com
Change-Id: I32975fbcabdd0bbeed06b4cdbad54c121a9f7cbf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111340
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-11-23 02:25:20 +00:00
dan sinclair 0acbb4e047 Remove if-break deprecation
This CL removes support or if-break and requires the use of break-if.

Bug: tint:1724
Change-Id: I8311de2f0ce11b5af7fada71d258ae441f9e42f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111100
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-23 02:14:05 +00:00
dan sinclair 669e15e139 [ir] Add EmitBinary
This CL adds the machinery to emit binary operations to the IR. The
debug helper is split into Debug and Disassembler. The Disassembler is
used to help test the IR output.

Bug: tint:1718
Change-Id: Iffdd3be92e69a87828655ac41be91b34d5618174
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110841
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-23 02:11:52 +00:00
dan sinclair f6fcf0a3ef [ir] Add conditions to if and switch nodes.
This CL updates the if and switch nodes to store the condition value in
a register. The EmitExpression is updated to return a Register and the
builder updated to emit the expressions for the if, break-if, while,
and switch expressions.

Bug: tint:1718
Change-Id: Ie710812c74e8b9423a4aa997db451d9cdf304feb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110784
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-23 02:09:43 +00:00
Jiawei Shao 806c58324c Wire: Make validation error prior to OOM if mappedAtCreation == false
This patch updates the validations about CreateBuffer() with dawn_wire
to match the latest WebGPU SPEC.

According to the SPEC, the validations in CreateBuffer() should be
executed in the below order:
1. If mappedAtCreation == true, return nullptr and a RangeError will be
   generated in Chromium.
2. Validate BufferDescriptor and check if there is OOM at device timeline
3. Check if there is OOM at content timeline

Bug: dawn:1586
Change-Id: I97ff5f82a42208442ddf6e46e66381c3b3680450
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109040
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2022-11-23 02:06:11 +00:00
dan sinclair a8bc296259 [spirv-reader] Emit break-if as needed.
This CL updates the SPIRV-Reader to emit `break-if` nodes instead of
`if-break` statements.

Bug: tint:1724
Change-Id: I8cd568f5e90a950acc5a42a470345273a5f1e6bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111103
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-23 01:51:24 +00:00
Dawn Autoroller b119d3b15f Roll ANGLE from 12fa46f07dfc to 27727e501aee (12 revisions)
12fa46f07d..27727e501a

2022-11-22 lexa.knyazev@gmail.com Fix ProvokingVertex typos
2022-11-22 abdolrashidi@google.com Vulkan: Add memory allocation/deallocation counter
2022-11-22 cclao@google.com Vulkan: Retain mCurrentGraphicsPipeline if RP started
2022-11-22 lexa.knyazev@gmail.com Refactor validation of partial compressed texture uploads
2022-11-22 geofflang@google.com GL: Only reset transform feedback varyings when necessary.
2022-11-22 capn@google.com Support versioned library names
2022-11-22 romanl@google.com Cleanup: Use XAllocSizeHints, move to helper.
2022-11-22 syoussefi@chromium.org Vulkan: Initial support for VK_EXT_graphics_pipeline_library
2022-11-22 cnorthrop@google.com Perf tests: Add --fixed-test-time-with-warmup
2022-11-22 lubosz.sarnecki@collabora.com Reland "util/X11Window: Set PMinSize and PMaxSize hints."
2022-11-22 cnorthrop@google.com TraceTest: Route EGLSync entry points through WGL
2022-11-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from a3f4f653c783 to ca8ca2aba961 (7 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 shrekshao@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: shrekshao@google.com
Change-Id: I2b344987af6e006d2842f604a49a330d35f85e6c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111300
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-11-23 00:46:27 +00:00
dan sinclair a5b73a0fde [ir] Implement EmitLiteral.
This CL fills in the EmitLiteral method. Each literal is emitted as the
appropriate type of register. The literal is not added to the current
flow block as it is not yet used.

Bug: tint:1718
Change-Id: Ic6a576bcc08dc6ea251b60d1d079929ac4d97981
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110783
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-23 00:34:48 +00:00
Ben Clayton 329dfd7cbd tint: Implement const-eval of modf
Bug: tint:1581
Change-Id: I53151ebf43601cd6afcdd2ec91d0ff9c4e650ef3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111241
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-23 00:05:05 +00:00
Antonio Maiorano 92d858ac3c tint: const eval of length builtin
Bug: tint:1581
Change-Id: Ie6dc9da6b48c606af03da023c835ec36a99dd362
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110981
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-11-23 00:00:45 +00:00
James Price 89f15fc57e dawn/node: Fix shared library build
dawn.node now uses tint::Initialize() and tint::Shutdown(), and so
needs to link against libtint.

Fixed: tint:1765
Change-Id: I03e575b4709c43a6052ed3ca635376251c3323c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111080
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-22 23:25:16 +00:00
Loko Kung 2e1b359087 Add wire serialized command buffer padding.
Pads serialized wire command buffers to 8 bytes so that we don't have
misaligned write/reads which can cause SIGILL depending on platform and
compilation mode, i.e. -c dbg in google3 builds.

- Adds helpers for aligning sizeof calls.
- Adds constant for wire padding (8u).
- Modifies BufferConsumer to allocate according to padding. This
  guarantees that when we [de]serialize stuff, the padding should be
  equal on both sides.
- Modifies extra byte serialization code (adding CommandExtension
  struct). This makes it clearer that each extension needs to be
  padded independently. Otherwise, before in wire/client/Buffer.cpp,
  since the read/write handle sizes were being passed as a sum, but
  read out separately from the BufferConsumer, we corrupt our pointers.
- Adds some simple unit tests.

Bug: dawn:1334
Change-Id: Id80e7c01a34b9f01c3f02b3e6c04c3bb3ad0eff9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110501
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-22 23:19:43 +00:00
Austin Eng c982cd45c4 Use TINT_REFLECT for OverrideId
Adds tint_public_config to Dawn's internal config so Tint headers
can be included.

Fixed: dawn:1594
Change-Id: I4068fd95b6eae3138fbcc04f29f054c7cffdcf12
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111260
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Shrek Shao <shrekshao@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Austin Eng <enga@chromium.org>
2022-11-22 22:23:55 +00:00
shrekshao f9c6633006 Update inter stage variable subsetting validation and add tests
Sync up with current WebGPU spec to allow FS input being a
subset of VS output instead of requiring a strict match.
This patch involves changing the validation and adding tests,
together with using the TruncateInterstageVariables for hlsl
generator to workaround the extra limit for D3D12 backend.

Bug: dawn:1493
Change-Id: I2d4ba7f43dbe57f17ecd5c5d659f4ca93bb682a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109460
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Shrek Shao <shrekshao@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-22 21:36:27 +00:00
shrekshao 7f760cb25c Tint truncate interstage variable transform
Add a transform to truncate unused user interstage variables by
adding a new truncated shader io struct wrapper of the original
one, with a truncate function to do the assignments called
at the return statement.

This transform is meant to be run after CanonicalizeEntryPointIO,
and will only be run under hlsl/generator_impl.cc to workaround
the extra register limitation for interstage variables on D3D FXC.

Bug: dawn:1493
Change-Id: I69081189ad7d4b76f2371fcc079f67dced2e9944
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104620
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2022-11-22 21:30:10 +00:00
dan sinclair 840bf6fc6d [ir] Add a Register class.
This CL adds a class to store register information for the IR. The
register can hold various types of data depending on if it's a f32, i32,
temporary, etc register.

Bug: tint:1718
Change-Id: I025af70f2b145c9697f1d7f996d0e98022eea829
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110782
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-22 20:43:49 +00:00
dan sinclair 2664229fd5 Cleanup some grammar.
This CL updates some grammar in break-if error messages.

Change-Id: I15ab6b98fd1b12dd4e6db16a28f0e311e9fee453
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111102
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-22 20:13:11 +00:00
Ben Clayton 6559903234 tint/resolver: Split constant checking to utility
And add basic support for builtins returning structures.

Bug tint:1581

Change-Id: I67f987339b9a344e1915c69c9991803f0665305d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111242
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-22 19:53:21 +00:00
Antonio Maiorano d6d30f4256 tint: const eval of dot builtin
Bug: tint:1581
Change-Id: Ie7768f8bf254509c1795207de0a1d8b07a317555
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110984
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-22 15:02:55 +00:00
Ben Clayton b2e6b7b865 tint/resolver: Consistently use ConstEval::Result
Fixed: tint:1661
Change-Id: I527b5e2d03abeb53b177a1c69952953864ec0913
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111240
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2022-11-22 14:14:38 +00:00
Austin Eng 8a68537de2 Check buffer state is not destroyed before internally calling unmap
Calling UnmapInternal would set the state to Unmapped, allowing the
buffer to be mapped again even though it is destroyed.

Bug: chromium:1388920
Change-Id: Ibb4da332bafd44a0d4900c8ea5bfbd674bbc35e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111121
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-11-22 13:34:06 +00:00
dan sinclair e02377c2b3 [ir] Testing updates.
This CL renames the `Build` method in the test helper to be
`CreateBuilder` to maek the intention clearer. A second,
`CreateEmptyBuilder` is provided to allow for easier testing of
expressions.

The `current_flow_block` and `builder` are moved to public so they can
be used/updated during testing.

Bug: tint:1718
Change-Id: I663d4c7a3c76e6bf5396ca05f54fe634d35d0d56
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110781
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-22 13:15:08 +00:00
dawn-autoroll 3769b4b696 Roll vulkan-deps from 02a2dfb562a1 to 96f4fdc41b84 (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/02a2dfb562a1..96f4fdc41b84

Changed dependencies:
* vulkan-validation-layers: fc1c628605..0582b9aab4

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 shrekshao@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: shrekshao@google.com
Change-Id: I658060f336d36ed299435a48a6fd2dc52b9744d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111220
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-11-22 12:23:48 +00:00