Commit Graph

8945 Commits

Author SHA1 Message Date
Yunchao He 4e34192f9e Re-suppress WebGPU expectations
Bug: chromium:1328469, dawn:1319
Change-Id: Ic8a39707239fbe5b02a1be7a7a53be9d3afa3d46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91341
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-05-24 06:58:34 +00:00
dawn-autoroll 6fe6d6beda Roll vulkan-deps from 96612da0dde0 to aae529072cf3 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/96612da0dde0..aae529072cf3

Changed dependencies:
* vulkan-validation-layers: 888bb9d2e9..4e3ebb0b10

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 bclayton@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: bclayton@google.com
Change-Id: Icc52a2435c26ff905910ab0ebb6bcea7dc70982f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91282
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-05-24 06:09:44 +00:00
jchen10 c45f11ddb5 Add VideoViewsTests.CreateVideoTextureWithoutInitializedData
Chromium creates gbm_bo buffers without the
GBM_BO_USE_SW_WRITE_RARELY flag to hold the video frames from VAAPI
decoder. The added case could better cover this and catch the recent
mesa regression:
  https://gitlab.freedesktop.org/mesa/mesa/-/issues/5940

Bug: chromium:1258986
Change-Id: Ib8313b35fe90928aae03791560d80fdb47bcea32
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91081
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2022-05-24 03:01:15 +00:00
Brandon Jones 136a0a4269 Change External Texture YUV-To-RGB Matrix To Be Optional
Changes the yuv-to-rgb constant matrix to be optional during external
texture creation because it is not necessary for single-plane scenarios.

Bug: dawn:1082
Change-Id: I543f4009e58f1571b0be80abb6b464b2b8c9d749
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91280
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2022-05-24 01:41:43 +00:00
Corentin Wallez fb890c4122 Make Chromium's recurse_deps in Dawn get GLFW.
This will later be used to remove GLFW from the direct DEPS of Chromium,
which will help update GLFW at the same time as the BUILD.gn file change
for GLFW in Dawn.

Bug: dawn:1246
Change-Id: If39575c9a4bbc84c58a63a23dfbe1cb812ff3562
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91162
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-05-23 17:25:59 +00:00
dawn-autoroll ea356717b6 Roll vulkan-deps from 82a65519c521 to 96612da0dde0 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/82a65519c521..96612da0dde0

Changed dependencies:
* vulkan-validation-layers: bdd58dd007..888bb9d2e9

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 cwallez@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: cwallez@google.com
Change-Id: Id01a5753efc8e82476a00e0b1c92e99f81da64eb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91261
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-05-23 15:50:39 +00:00
Corentin Wallez 74771202c7 Add nullable annotations to webgpu.h
Bug: dawn:22
Change-Id: Ie14072e91bab3b69b8d98f15bcbdeaa6679ffcd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91240
Auto-Submit: 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-05-23 15:44:29 +00:00
Corentin Wallez cc2efbcdbf Roll third_party/webgpu-cts/ e48651de0..9618103c4 (3 commits)
Update expectations and ts_sources

e48651de01..9618103c4a
 - 961810 refresh origin trial tokens
 - 666c19 resource_init: Specify view dimension in checkContentsBySampling
 - b5cc68 Fix memory leak in vertex_buffer_OOB,vertex_step_mode (#1459)

Created with './tools/run cts roll'

Change-Id: If30569b2b6aaf98c30c363671793f990136021fc
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/+/90644
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-23 13:44:10 +00:00
Corentin Wallez e89b311a5d CommandAllocatorTests: Fix a couple use-after-move.
Fixed: dawn:1416
Change-Id: I489dcfaf2584968869d9ac72da3c41dd6d1e3ba3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91161
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-23 09:57:39 +00:00
Jiawei Shao 318f6acd56 Skip several dawn_end2end_tests on specific platforms
Bug: dawn:1423, dawn:1429
Test: dawn_end2end_tests
Change-Id: Idc9d573f02f7ef70d1901a786e73d362d60697bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91064
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-05-23 01:07:53 +00:00
James Price 8d9adb0219 tint/cmake: Always build Tint as a static library
The shared library build of Tint is currently broken with CMake, since
we set -fvisibility=hidden and do not export any of Tint's publicly
used APIs.

Change-Id: I7e4478a3a060fef3e5775dc32bae944363188ec5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90740
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-22 00:41:53 +00:00
Dawn Autoroller 5f61c95432 Roll SwiftShader from e07da52caba5 to b5cb037f0292 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/e07da52caba5..b5cb037f0292

2022-05-20 swiftshader.regress@gmail.com Regres: Update test lists @ 73679602

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 cwallez@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: cwallez@google.com
Change-Id: Iae31e3c15f12f8f49660a1dea7bd15e8c333ca21
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91201
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-21 08:21:31 +00:00
dawn-autoroll 47a970feb4 Roll vulkan-deps from 0198743a9a64 to 82a65519c521 (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/0198743a9a64..82a65519c521

Changed dependencies:
* glslang: 2439e6d56d..86ff4bca1d
* vulkan-loader: ad05e878ee..3772b036e0
* vulkan-validation-layers: 3136bfbaef..bdd58dd007

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 cwallez@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: cwallez@google.com
Change-Id: I6a6e2c50e65f2ad6aa2110ebc1c8f4f42e947c29
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91121
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-05-21 04:17:22 +00:00
Ben Clayton 55c0c9d950 tint: Add abstract numerics to vector and matrix constructors
These are the first intrinsics to support abstract-integers and
abstract-floats.

Nothing can use these yet, as the resolver hasn't had abstract numerics
enabled in production builds.

Bug: tint:1504
Change-Id: I2760f72f5d3c68c30c2e7de5ae5fb290dce64d3f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91027
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-05-20 23:43:21 +00:00
Ben Clayton d3de38d7e3 tint: Simplify the resolver constant evaluation
And expand the handling to include matrices.

Bug: tint:1504
Change-Id: I6fd9ce239d13acf0e2f74b8ea19dfac3457e348c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91026
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-05-20 19:55:50 +00:00
Ben Clayton 8f4f449540 tint/writer: Do not attempt to use invalid programs
Attempting to emit shader code from an invalid program is unsafe.

The WGSL writer is used for dumping information which is valuable for debugging bad programs, so this has not been changed.

Bug: chromium:1327461
Change-Id: I4497fcb19d126ef6c872e2bcda8e9b79044aeb68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91163
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-05-20 19:41:50 +00:00
Dawn Autoroller 34f4e1ecd3 Roll SwiftShader from 73679602bc0b to e07da52caba5 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/73679602bc0b..e07da52caba5

2022-05-20 penghuang@cromium.org Adjust {min,max}ImageExtent to {0,0} and 4K

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 cwallez@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: cwallez@google.com
Change-Id: Ib4f5ec61dba595a1da2c0b8d835bdabc849cc5e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91141
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-05-20 18:46:21 +00:00
Corentin Wallez 84e7f68366 Validate that the device is alive when creating an ExternalTexture
Fixed: dawn:1419
Change-Id: If536978889b9c2b41e63f0035183da4c2f8fe379
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91160
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2022-05-20 18:05:50 +00:00
Dawn Autoroller ce662a1e8e Roll ANGLE from f674e501f243 to 52c42e5a824d (10 revisions)
f674e501f2..52c42e5a82

2022-05-20 thakis@chromium.org Temporarily disable deprecation warnings for VK-GL-CTS
2022-05-20 senorblanco@chromium.org D3D: fix whole-array assignment to SSBOs.
2022-05-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c37d1e2ab98c to 880c9e0050c6 (19 revisions)
2022-05-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 2933d3126969 to 73679602bc0b (4 revisions)
2022-05-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 170d12460fd5 to f0d8ec07c77f (430 revisions)
2022-05-20 syoussefi@chromium.org Vulkan: Dynamic state for vertex stride
2022-05-20 brianosman@google.com Insert Metal polyfill for Matrix /= Scalar when needed
2022-05-20 yuxinhu@google.com Suppress Flaky Tests
2022-05-20 yuxinhu@google.com Update capture replay expectation file
2022-05-20 gman@chromium.org Metal: Upstream buffer cache fix from WebKit

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 cwallez@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: cwallez@google.com
Change-Id: Ia5bf0a849847224f3c197b1db8217f808af80e0a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91140
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-05-20 17:48:36 +00:00
Corentin Wallez a4216e72d4 Remove passing WebGPU expectations
Bug: dawn:1319
Change-Id: Iae82a3ea568f1a178e4f516ee55f7028defd528a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90665
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-05-20 17:29:50 +00:00
Ben Clayton 6522837acb tint: Add `enable_abstract_numerics` flag on Resolver
When enabled, unsuffixed literals will be treated as abstract numerics.
By having this disabled by default, we can build up the tests without
the risk of breaking production code.

This flag is enabled for resolver unit tests. This can safely be done
with no change in tested behavior, as all tests use the '_i' or '_u'
literal suffixes, so currently there are no tests that exercise abstract
numerics.

Bug: tint:1504
Change-Id: I39523ff6e235a12533b1dd98587b580bed98300f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91025
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2022-05-20 17:18:50 +00:00
Stephen White 249dcd8f87 Switch ANGLE backend to D3D11 on Windows for DawnTest.
This will test the same path currently exercised by the
WebGPU/Compat prototype in Chrome.

Suppress failing tests.

Bug: dawn:1420
Change-Id: Ie3d55e387ece292a98ec15eeaa04b6fad25e3be7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-05-20 17:16:21 +00:00
Austin Eng a526167e33 Make child objects ref the device and add a mechanism to break cycles
Update child objects to ref the device. This allows them to outlive
the device, making the implementation more robust such that it is OK
to drop the device before other objects.

Dropping the last external reference to the device is currently an
implicit device.destroy(). This destruction breaks possible ref cycles
where the device refs internal objects which have a back ref to the
device.

Bug: dawn:1164
Change-Id: I02d8e32a21dcc5f05e531bd690baac4a234b5f6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90360
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-05-20 16:57:01 +00:00
Corentin Wallez ece20a7948 dawn: Validate that depth-stencil attachments encompass all aspects.
Fixed: dawn:1394
Change-Id: I208e130cbe46f50954b73057a9f8fc647d914995
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90220
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2022-05-20 16:16:40 +00:00
dawn-autoroll 86b6de56ac Roll vulkan-deps from 880c9e0050c6 to 0198743a9a64 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/880c9e0050c6..0198743a9a64

Changed dependencies:
* vulkan-validation-layers: 0ce518899c..3136bfbaef

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 cwallez@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: cwallez@google.com
Change-Id: Ic503054cff8ef2f8973727c3d9c7daf14ce8e988
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91082
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-20 14:45:50 +00:00
Corentin Wallez afbc260f14 Roll third_party/webgpu-cts/ 8f2742e4a..e48651de0 (6 commits)
Update expectations and ts_sources

8f2742e4a4..e48651de01
 - e48651 Draw vertex buffer access test for vertex step mode buffer (#1450)
 - 0dd740 sort and comment
 - 36b070 part 4: no-floating-promises
 - bd4473 part 3: no-unnecessary-type-assertion
 - 31154b part 2: unbound-method
 - 05a264 Add "recommended" typescript-eslint lints (part 1)

Created with './tools/run cts roll'

Change-Id: If45ec0f188f2b875bd6a839a3385403ddc33dcf4
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/+/90802
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-05-20 13:31:15 +00:00
Ben Clayton 43581f1fb6 tint: Add new methods to semantic Switch nodes
• Add sem::SwitchStatement::Cases()
• Add sem::CaseStatement::Selectors()
• Add ast::SwitchStatement -> sem::SwitchStatement mapping

Removes a bunch of hopping between the AST and SEM to get at this data.

Change-Id: If48d78e7a386aa0b34c6d00ad9af1d53cb236f12
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91024
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-05-20 12:28:00 +00:00
Ben Clayton a2ce4ecc8b tint: Add more helpers to resolver_test_helper.h
• Add Name() method so we can print the type name without having to
  create a ProgramBuilder.
• Add a DataType for f16.
• Add AST() methods on DataType<AInt> and DataType<AFloat> which return
  nullptr.

Change-Id: I130648655e114c658a0c2985822630a71a683dd6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91023
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-05-20 12:11:00 +00:00
Ben Clayton d99af03663 tint: Add utils::UniqueVector::data()
Change-Id: Ibbd4f595c5fdaacf93c13757878ed06675e735c6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91022
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-05-20 09:03:50 +00:00
Jiawei Shao 3607cb8465 D3D12: Reference all signatures when destroying pipeline layout
This patch implements PipelineLayoutD3D12::DestroyImpl() where we
call ReferenceUntilUnused() to all the root and command signatures
so that they won't be destroyed when they are referenced by GPU
operations in-flight on command queue.

BUG=dawn:1422
TEST=dawn_end2end_tests

Change-Id: I54df7b53645c9beaaa2e7b74aef54e0f6d37c440
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90940
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2022-05-20 08:33:00 +00:00
Jiawei Shao 9ebba367e8 D3D12: Support feature chromium_experimental_dp4a
Bug: tint:1497
Test: dawn_end2end_tests
Change-Id: I57d5c06c15c0c366c7cc239426e5eee3a7237101
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90028
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-05-20 08:21:00 +00:00
Austin Eng 0c5aaf4833 Update expectations.txt for passing tests
Bug: chromium:1322180, dawn:1410
Change-Id: Iee9baa1a68961217664862c6e8bd31394ae6bf0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91061
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-20 08:19:40 +00:00
Dawn Autoroller 132a8f48fe Roll SwiftShader from f43948c7ac0e to 73679602bc0b (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f43948c7ac0e..73679602bc0b

2022-05-19 swiftshader.regress@gmail.com Regres: Update test lists @ 2933d312
2022-05-19 capn@google.com Revert workaround for MemorySanitizer scalar SSE false positives
2022-05-19 sugoi@google.com Revert "Stop skipping VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT"

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 cwallez@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: cwallez@google.com
Change-Id: Ia2dcbc1f9c48c0fc3ba6e75c0920011ac8e0ddd8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91120
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-05-20 03:56:30 +00:00
Dawn Autoroller 0d57a2ecfd Roll ANGLE from 06fa297b6b31 to f674e501f243 (7 revisions)
06fa297b6b..f674e501f2

2022-05-20 cnorthrop@google.com Tests: Add Bridge Constructor Portal trace
2022-05-19 yuxinhu@google.com Suppress Vulkan Validation Error
2022-05-19 ynovikov@chromium.org Fix trigger.py to run mb.py with python3
2022-05-19 syoussefi@chromium.org Vulkan: Reserve varying for xfb if pre-rotation is enabled
2022-05-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from dbb1f3a2b2f7 to 170d12460fd5 (586 revisions)
2022-05-19 pkasting@chromium.org Roll third_party/rapidjson/src/ 7484e06c5..781a4e667 (156 commits)
2022-05-19 ynovikov@chromium.org Fetch gn binary for the correct architecture on linux.

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 cwallez@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: cwallez@google.com
Change-Id: I951d9a4a3f65efab6f84a0816629b6aa03c2c598
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91100
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-05-20 03:23:21 +00:00
Antonio Maiorano ab4c035762 tint: fix HLSL countOneBits and reverseBits for i32 args
These two functions in HLSL only accept and return uint. Thus, if the
result of these calls is passed to a function that wants int, it will
fail, or call the uint overload if one exists. Fixed by casting the
result to int if the arg is int.

Bug: tint:1550
Change-Id: Id4c0970a29ac4c83ee5b78be8d2762e05e4a3f03
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91001
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-20 01:58:40 +00:00
dawn-autoroll 782577accf Roll vulkan-deps from f1a5c8f12c26 to 880c9e0050c6 (6 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/f1a5c8f12c26..880c9e0050c6

Changed dependencies:
* vulkan-tools: a9bee4cbb2..689140c204
* vulkan-validation-layers: c9d29f7da2..0ce518899c

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 cwallez@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: cwallez@google.com
Change-Id: Ic75f271d79d4e9fc7ab0430288483f1223548380
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91080
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-05-20 01:10:09 +00:00
Ben Clayton e9ce8326b7 tint: Minor, miscellaneous cleanups
• Rename the 'friendly names' for the abstract numeric types so they match
  the style in the intrinsic table.
• Fix a comment so the literal type is correct.

Change-Id: Ie8d7363743c8c359340de3bc6db9a3456d299d34
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91021
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-19 23:05:40 +00:00
Ben Clayton eee9f88ba2 tint: Extract intrinsic-table common type to helper
• Add sem::Type::Common() which returns the 'common' type for the list of
  types.
• Migrate intrisnic table to use this.
• Add a whole-lotta-tests.
• Deduplicate and improve the EXPECT_TEST() macro. Move it to a common home.

Bug: tint:1504
Change-Id: I1564f67ecf87fc594f3f54274da906ff0d822795
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91020
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2022-05-19 22:54:00 +00:00
Ben Clayton 1b35e3f9a8 tint: Add new sem::Type helpers
Add:
• sem::Type::is_abstract_or_scalar()
• sem::Type::ElementOf()

Use these to clean up some code in src/tint/sem/constant.cc.

Bug: tint:1504
Change-Id: I78e06b580a750c97ac654af4b0b364ddd3de6596
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90534
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-05-19 21:55:29 +00:00
Ben Clayton e5a67ac891 tint: Remove ast::CallExpression -> sem::Call implicit mapping
With abstract materialization, any ast::Expression may map to the new
sem::Materialize node. Because of this, we can't assume that an
ast::CallExpression maps to a sem::Call, as it might be wrapped by a
sem::Materialize.

Remove the mapping, and fix up all the code that was relying on this.

Fixes are done by either:
• Calling `UnwrapMaterialize()->As<sem::Call>()` on the semantic
  expression. This is done when the logic may assume it's possible for
  the expression to be a Materialize node.
• Using the explicit sem::Info::Get<sem::Call>() template argument to
  cast the semantic type to sem::Call. This is done when the logic
  either knows it is impossible for the expression to be a Materialize.

The backends have been stubbed, as we'll want to emit the constant value
for these nodes. It's likely that we'll just use the FoldConstants
transform to strip all Materialize nodes from the tree. For now, be
defensive.

Bug: tint:1504
Change-Id: If9231b300fc30c7fe886c17a804ead8ee2988285
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90533
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2022-05-19 21:50:59 +00:00
Ben Clayton 7b921fb4c7 tint: No-op Resolver refactoring
• Split type_ctors_ into array_ctors_ and struct_ctors_. These are the
  only two type constructors that we need to cache in the Resovler. All
  other types are cached in the IntrinsicTable. By making these two
  separate fields, there's no way we can accidentally put other types in
  there. This is slightly more optimized too, as each map is smaller,
  and the keys hold less data.
• Drop the 'const' on vectors that are std::move()'d. A const object
  cannot be moved, and this results in a silent copy. Fix the logic of
  BuiltinCall() and FunctionCall(), as these were happily using the
  vectors that had been moved.
• Extract the messy Texture-Sampling collection logic out into two
  functions.

The rest of the changes are tweaks required to handle abstract numerics
and materialization, which will be put up for review shortly. Landing
the no-op refactoring now reduces review noise later.

Bug: tint:1504
Change-Id: Iffc8039360d6138c3ac9b456be6ca7b8451ede9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90532
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-05-19 20:19:49 +00:00
Austin Eng 86a617f110 Add InsertBraces: true to .clang-format
Bug: none
Change-Id: I4b4f2a4abfea7adcea406f458bc4e4a13b0e8c43
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-19 20:08:19 +00:00
Ben Clayton 2081ee43bf tint: Add sem::Materialize
A new semantic expression node that wraps another semantic node. Used to
indicate the point at which compile-time, abstract numeric typed
expressions are implicitly converted to a concrete type.

Bug: tint:1504
Change-Id: I52e256bbbdeaa9d9eff4cb93b6f937dd00bdc5cb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90531
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-05-19 19:32:29 +00:00
Ben Clayton 6ac00ed0c0 tint: IntrinsicTable: Add abstract numeric types
These aren't used by anything (yet). Baby steps.

Bug: tint:1504
Change-Id: Icf0261ec9c6802f004d9f1bc4780a6376ebb8dfb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90530
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-05-19 18:30:39 +00:00
Ben Clayton b1fa457ab3 tint: IntrinsicTable: Use [[display]] name for type matchers
TypeMatcher::String() was not respecting the [[display]] decoration of
the matcher's sub-types. By calling TypeMatcher::String() on the sub-types,
we can display the custom type names in diagnostics.

Bug: tint:1504
Change-Id: I0856fee31231f9c048d2e3028d25c4d261fbb008
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90529
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-05-19 18:26:09 +00:00
Ben Clayton 0a63c6d2fb tint: intrinsic-gen: Fix parsing of multiple decorations
Change-Id: I61365dea17ab9174cfcb2d513cf1f7ee28ce0647
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90528
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-05-19 18:05:09 +00:00
Ben Clayton b0664684cd tint: Support tuples in utils::Hash().
Change-Id: I6c4da42dae52d7e02de8f59756949d476935e6b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90527
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-05-19 17:59:19 +00:00
Brandon Jones e61a390b31 Make External Texture ColorSpace Conversion Configurable
Changes external texture creation to use constants provided by Chromium
instead of hardcoded values.

Bug: dawn:1082
Change-Id: Icfe58f5585732b1e66d2faa50d3aee4a8c53bf84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89703
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-19 17:44:29 +00:00
Corentin Wallez 92244ec9d4 Roll third_party/webgpu-cts/ e518bfe8a..8f2742e4a (15 commits)
Update expectations and ts_sources

e518bfe8a4..8f2742e4a4
 - 8f2742 Raise maxComputeWorkgroupStorageSize from 16352 to 16384 (#1390)
 - 706082 wgsl: Add stubs for the pack and unpack methods. (#1425)
 - 33d851 wgsl: Stub tests for the textureStore builtin. (#1423)
 - 8610c8 wgsl: Add stub tests for textureSampleLevel. (#1422)
 - 5d6c16 wgsl: Stub synchronization builtin functions. (#1426)
 - c57922 Duplicate params: catch in ParamsBuilder, improve error in loadTreeForQuery (#1424)
 - f923e0 Update pipeline output targets validation with different writeMask (#1174)
 - 17582e wgsl: Add stub tests for textureSampleGrad. (#1421)
 - dc8142 wgsl: Add stub tests for textureSampleCompareLevel. (#1420)
 - fe9154 wgsl: Stub tests for textureSampleCompare (#1418)
 - a0c703 wgsl: Add stubs for the read-write-modify atomic operations. (#1417)
 - 2b89c0 wgsl: Add stubs for the atomicStore builtin. (#1416)
 - 776015 wgsl: Stub tests for the atomicLoad builtin. (#1415)
 - 544877 wgsl: Add stub tests for the textureSample builtin. (#1414)
 - d6dc47 wgsl: Fixup coord parameters in texture tests. (#1410)

Created with './tools/run cts roll'

Change-Id: Ibe57ebc6643921cae7bc3fae6f82459673106dd9
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/+/90860
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-19 16:57:40 +00:00
Yunchao He 26934d9503 D3D12: set correct data layout of dst texture for B2T copy
When we initialize the dst texture before T2T copy, we clear a
buffer with zeros and do a B2T copy in order to initialize the
texture. The T2T copy may only copy a subrect of the texture's
subresource, so does the initialization via B2T copy. As a result,
the buffer can store compact zeros for that exact subrect and then
do an exact B2T copy to initialize that area.

However, the current B2T copy uses incorrect data layout for the
buffer, making some part of the dst texture uninitialized, and
even leading to D3D12 runtime validation errors sometimes if it
goes beyond the boundary of staging buffer pool (4MB).

This change fixes this bug via using the exact height of copy area
to replace dataLayout.rowsPerImage (unnecessary padding rows included)
for the height of each depth image for 3D textures.

Bug: dawn:1288
Change-Id: I303e0d363039a6a87e352a8445898031e673cf4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90780
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-05-19 16:35:09 +00:00