Commit Graph

9553 Commits

Author SHA1 Message Date
James Price 7dd0ab791a tint: Show the source of non-uniformity
Show the original source of non-uniformity when producing errors from
the uniformity analysis.

Bug: tint:880
Change-Id: Id386ae8fa5ff1b1443d54c0b5ef12ab76b3b3f13
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89723
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-11 22:05:15 +00:00
James Price 9c03abfb55 tint: Show the reason for a uniformity requirement
When producing an error from the uniformity analysis, add notes to
show the underlying reason for the uniformity requirement.

For function calls that are required-to-be-uniform, show the innermost
builtin call that has the requirement.

For function parameters that are required-to-be-uniform, recurse into
that function to show where its requirement comes from.

Add some new tests to specifically test the error messages.

Bug: tint:880
Change-Id: Ib166fdeceaffb156a3afc50ebc5a4ad0860dc002
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89722
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-11 22:05:15 +00:00
James Price 874b61f1ba tint/uniformity: Retain control flow graphs
Move the control flow graphs to `FunctionInfo` so that they are not
destroyed when we finish processing the function.

This will make it easier to produce more detailed diagnostics for
uniformity issues, which will be coming in subsequent CLs.

There is no functional change in this CL.

Bug: tint:880
Change-Id: I1322fb54b16bd1c660799a62435fbdcd7fb39cb2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89822
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-11 22:05:15 +00:00
James Price be656f7984 tint: Implement uniformity analaysis
This implements the uniformity analysis as currently described in the
WGSL specification. Uniformity issues are presented as warnings, and
will be switched to errors in a future release.

A follow-up patch will improve the error messages, which currently
just show the point at which a uniformity was detected.

In a future release, once we have obtained initial feedback from
users, uniformity issues will become errors.

Bug: tint:880
Change-Id: I7d0b3080932c786c5d50b55720fec6d19f00d356
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88368
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Alan Baker <alanbaker@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-11 22:05:15 +00:00
Dawn Autoroller 3683c46b57 Roll SwiftShader from e0a1188d7652 to b7126bab3a19 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/e0a1188d7652..b7126bab3a19

2022-05-11 capn@google.com Fully enable MemorySanitizer instrumentation for GN builds

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 kainino@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: kainino@google.com
Change-Id: I402e1469b4f5c58f647f0dfae6c69bb5f18ee130
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89840
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-11 19:19:16 +00:00
Austin Eng ca8a54ed35 Raise base maxComputeWorkgroupStorageSize limit. 16352 -> 16384
Bug: dawn:1410
Change-Id: I0ad4873474614bcd62638583bf905ff2742eaae2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89821
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
2022-05-11 18:28:46 +00:00
Dawn Autoroller 75a31aa10a Roll ANGLE from a8ebdf2b5a8b to dd9b4afe5645 (8 revisions)
a8ebdf2b5a..dd9b4afe56

2022-05-11 senorblanco@chromium.org D3D: minor cleanup for image load/store.
2022-05-11 syoussefi@chromium.org Vulkan: Set dynamic state after binding pipeline
2022-05-11 gert.wollny@collabora.com PerfTests: Add support for eglCreateImage and eglDestroyImage
2022-05-11 lexa.knyazev@gmail.com D3D9: Enable OES_fbo_render_mipmap
2022-05-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 27ef4a0d9701 to b768d03422ea (7 revisions)
2022-05-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from e4a6f2d74d3c to e0a1188d7652 (1 revision)
2022-05-11 gert.wollny@collabora.com util: Add calls for createImage* and destroyImage* to GLWindow
2022-05-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 46c13be19f0f to 693c7419bd5c (567 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 kainino@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: kainino@google.com
Change-Id: I7787ca5bee127d3641981cefdf6da66fd0ef80c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89820
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-11 16:45:45 +00:00
Corentin Wallez cd98763946 Triage the createView:array_layers failure.
Bug: dawn:1380
Change-Id: I6a7117bfcab76fe55e8901c4da78415ef517ceeb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89665
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-05-11 16:32:35 +00:00
dawn-autoroll 3739c7e3a9 Roll vulkan-deps from b17c2c5b5b53 to b768d03422ea (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/b17c2c5b5b53..b768d03422ea

Changed dependencies:
* vulkan-validation-layers: ce37b9affe..817dd5363e

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 kainino@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: kainino@google.com
Change-Id: I594524c8955325b99d4d2ad4d9131362e8556bd5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89800
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-11 16:20:55 +00:00
dan sinclair 857f21e8b5 Fix race condition on metal backend with mCompletedSerial.
There is currently a race condition in the metal backend with the
updating of `mCompletedSerial`. It is currently possible for the
`addCompletedHandler` to set to one value and then have the
`CheckAndUpdateCompletedSerial` call immediately set it back to
a lower value. This can then cause hangs as the serial never
correctly updates again.

This was happening on `dawn.node` when running a large number of
CTS test cases all at the same time.

Change-Id: I28fc58ab2b3737ca8039559718e539ce819e88bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89780
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-05-11 15:15:55 +00:00
James Price 8e68f0aad7 tint: Resolve empty loop continuing blocks
Otherwise, calling `Sem().Get()` on an empty loop continuing block
will return nullptr, which causes issues when inspecting the semantic
information of ast::BlockStatement nodes generically.

Change-Id: Ib3665b750c96eda02355fa879cf6300b8d69293a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89721
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-11 13:50:33 +00:00
James Price 2cf32b13d7 tint: Make ScopeStack key type generic
The scope stack has potential uses other than mapping from symbols.

Change-Id: I1eaedb9a9c913a7b2cda41bb99a986c552a66110
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89720
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-11 13:50:33 +00:00
James Price 791b4351d1 tint: Add transform to disable uniformity analysis
This is done via a new extension, which in the future could also be
used by shader authors as an escape hatch while we are still refining
the analysis.

The transform is run by the sanitizers for all of the non-WGSL
backends.

Bug: tint:880
Change-Id: Ibe90d7437d34c741a91eda65dff6d21d8469b9c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88464
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-11 13:50:33 +00:00
Ben Clayton 6a8cfd4153 Roll third_party/webgpu-cts/ ecf480422..0a1288f5e (21 commits)
Update expectations and ts_sources

ecf4804228..0a1288f5e8
 - 0a1288 Revert "Simplify device selection" and dependent commits (#1384)
 - 0afe04 Merge pull request #1383 from kainino0x/nit
 - ccfaca wgsl: Add support for f64 to Scalar (#1369)
 - 3ab573 Fix crash in GPUTest.init awaiting provider (#1381)
 - 753740 Fix order in package.json (#1380)
 - fb4eee wgsl: Stub tests for the textureGather builtin. (#1378)
 - c676c8 wgsl: Stub tests for textureDimension. (#1375)
 - 96f821 wgsl: Adds stub tests for textureGatherCompare (#1379)
 - d4a2b9 Skip whole case if there is no device
 - e38ab0 Fix skipping tests when device isn't available
 - dae9db [wgsl] Add missing @const decorations. (#1374)
 - 90d78b [wgs] fixup mix signature to match spec. (#1373)
 - 35c672 [wgs] sync modf text with spec update. (#1372)
 - 2398e8 [wgsl] reserve binding_array. (#1371)
 - a4f874 Explicitly specify 2d texture views in some cases (#1370)
 - a91256 Remove 'await's from selectDevice calls
 - c072e8 Simplify device selection
 - 47bd25 Encapsulate OOM-cleanup in DevicePool
 - 9be8bf factor out DeviceSelectionDescriptor
 - 229e43 Allow eventualExpectOk to accept Promise.all (#1368)
 - a6e1f5 wgsl: Generalize unary and binary f32 arithmetic case generation (#1367)

Created with './tools/run cts roll'

Change-Id: I9cc819aa118220b44f1df6511a7f557ec38a01c6
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/+/89663
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-05-11 09:53:45 +00:00
Dawn Autoroller b2004907a3 Roll ANGLE from 9872c1d63f38 to a8ebdf2b5a8b (11 revisions)
9872c1d63f..a8ebdf2b5a

2022-05-10 yuxinhu@google.com Basis Universal Texture Experiment
2022-05-10 geofflang@google.com Metal: Log the shader source when a shader fails to translate
2022-05-10 lexa.knyazev@gmail.com D3D: Mark images clean after syncing from storage
2022-05-10 johnstiles@google.com Fix crash when calling certain gl APIs before initialization.
2022-05-10 gert.wollny@collabora.com Capture/Replay: rename ANGLE_CAPTURE to ANGLE_CAPTURE_GL
2022-05-10 antonio.caggiano@collabora.com Re-land: "Vulkan: GBM platform"
2022-05-10 syoussefi@chromium.org Vulkan: Support wide lines
2022-05-10 jmadill@chromium.org Vulkan: Clean up flag passing in ImageView init.
2022-05-10 senorblanco@chromium.org D3D11: fix 3D texture blits.
2022-05-10 syoussefi@chromium.org Vulkan: Refactor UtilsVk dynamic state handling
2022-05-10 jmadill@chromium.org Vulkan: Determined sized-ness of format in initImageViews.

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 kainino@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: kainino@google.com
Change-Id: I2897d54f02281ebeaa561cf3bfa8e7f82729e0a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89760
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-11 03:27:32 +00:00
Corentin Wallez a569015325 Fix gn check for dawn_unittests.
Fixed: dawn:1404
Change-Id: I203762d4f090554a87b3422023f54627fcc6b4b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89404
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-05-11 00:22:55 +00:00
Corentin Wallez ed4e5ee093 Fix warning in dawn.node for the newly added shader-f16 extension.
Bug: None
Change-Id: I0729dc75ad393d9f8c8b4409da4f3cc0f3acce74
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89660
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-11 00:14:44 +00:00
dawn-autoroll e6ca60d749 Roll vulkan-deps from 27ef4a0d9701 to b17c2c5b5b53 (6 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/27ef4a0d9701..b17c2c5b5b53

Changed dependencies:
* spirv-cross: 0c8a79b0b5..940efca099
* spirv-tools: ad3514b732..f74b85853c
* vulkan-headers: 8ba8294c86..33d4dd987f
* vulkan-validation-layers: 40437fb6ed..ce37b9affe

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 kainino@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: kainino@google.com
Change-Id: I7c866674ed68c018b6737149a740226cc03de8b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89701
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-11 00:09:55 +00:00
Kai Ninomiya 63cea3f8c0 Revert "[chromium-style] Adding constructors and destructors."
This reverts commit efab8c894e.

Reason for revert: breaks check_static_initializers check in Chromium
https://chromium-review.googlesource.com/c/chromium/src/+/3636809/
due to the line `static Format kUnusedFormat;` in Texture.cpp.

Error: file "Texture.cpp" is not expected to have static initializers in binary "chrome"

# Static initializers in chrome:
# 000101 _Unwind_Resume@plt
# 000101 guard variable for std::__1::ios_base::Init::Init()::init_the_streams
# 000101 std::__1::DoIOSInit::DoIOSInit()
# 000101 std::__1::DoIOSInit::~DoIOSInit()
# 000101 std::__1::ios_base::Init::Init()::init_the_streams
# 000101 __cxa_atexit@plt [registers a dtor to run at exit]
# 000101 __cxa_guard_abort
# 000101 __cxa_guard_acquire
# 000101 __cxa_guard_release
# 000101 __dso_handle
# InstrProfilingRuntime.cpp __llvm_profile_initialize
# Texture.cpp dawn::native::Format::Format()
# Texture.cpp dawn::native::kUnusedFormat
# Texture.cpp __dtor__ZN4dawn6nativeL13kUnusedFormatE
# Texture.cpp atexit
# iostream.cpp: (empty initializer list)
# Found 15 static initializers in 4 files.


Original change's description:
> [chromium-style] Adding constructors and destructors.
>
> This CL adds missing constructors and destructors.
>
> Bug: dawn:1405
> Change-Id: I0a0ea7ca50643d48cfc4a4dcf4ce46ff37ed10ad
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89200
> Reviewed-by: Austin Eng <enga@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>

TBR=enga@chromium.org,dsinclair@chromium.org,bclayton@google.com,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I86daffc227c2411e8c2c69cc4683224320f4480c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:1405
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89702
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-05-10 23:32:44 +00:00
Ben Clayton 824e824709 tint: Rename float / int literal tokens
Rename:
• kFloatFLiteral -> kFloatLiteral_F
• kIntILiteral   -> kIntLiteral_I
• kIntULiteral   -> kIntLiteral_U

As suggested in review:
https://dawn-review.googlesource.com/c/dawn/+/89031/comments/b37253a3_e830b482

Bug: tint:1504
Change-Id: I4120f2904d8614152d4c804c226c9710f2ef8653
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89661
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-10 22:26:04 +00:00
Ben Clayton 508e4a5a82 tint: Add abstract AInt and AFloat typedefs
Add ProgramBuilder expression helpers for these.

Bug: tint:1504
Change-Id: I921dc4ebe0b97a5e451d98a19ad97df7f60384b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89032
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-10 22:08:04 +00:00
Dawn Autoroller b7bbe7cbbb Roll SwiftShader from e4a6f2d74d3c to e0a1188d7652 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/e4a6f2d74d3c..e0a1188d7652

2022-05-10 syoussefi@google.com Fix dynamic state for line width

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 kainino@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: kainino@google.com
Change-Id: Ic5b6af9fc1e2d9fff7b5052a79a3f81ae16868d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89680
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-10 22:00:24 +00:00
dan sinclair a5ff0e9dc3 [warnings] Add Wsuggest-override and Wsuggest-destructor-override.
This CL adds the `-Wsuggest-override` and
`-Wsuggest-destructor-override` warnings and fixes up the identified
issues.

Change-Id: I0ec1303a822abc258ce34d3bf1900e37ade6a8dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89561
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-10 18:44:34 +00:00
Austin Eng 552045a559 Don't use incremental build in webgpu-cts/scripts/list.py
The incremental build can become stale for unknown reasons,
breaking presubmits. Disable it for now.

Bug: dawn:1395
Change-Id: I83a71da0006ee3184b8df2996d8e53b6efbcc20a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89640
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-10 18:17:54 +00:00
Ben Clayton 0a3cda9911 tint: Replace all ProgramBuilder float literals with '_f' suffix
Unsuffixed float literals are currently treated as f32,
but will shortly become AbstractFloat. To keep tests behaving
identically to how they are currently, change all float literals
to explicitly use the f32 '_f' suffix.

Bug: tint:1504
Change-Id: I2a00725ee1b34a6efbe15ac4ba438c00c4416dd8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89402
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-10 17:30:15 +00:00
Corentin Wallez a439e7b89c DawnTest: Make error/device loss mocks StrictMocks
Any unhandled error or device loss in the tests that are not expected
should cause a test failure. Mocks other than StrictMock will not cause
a failure and instead just write to stdout (or not write at all).

Fixed: dawn:1412
Change-Id: I2dd108da8fa6ba2cd7967790de4d7fa4b9f821ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89600
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-10 17:06:34 +00:00
Ben Clayton 636e3d0111 tint: Add a negation operator to Number
Use this for expressing negative i32s.
Replacing `i32(-123)` with `-123_i` is more readable as the former looks
like it should be generating a WGSL cast, which it does not.

Bug: tint:1504
Change-Id: Iead3885b903e1f707b8a7e6b9090d65930df118e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89401
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-05-10 16:02:06 +00:00
Ben Clayton 17fa42d527 tint: Prevent Expr() implicit conversion to bool
Enfore that the Expr(bool) overloads are only used if the argument type
is explicitly a bool.

Fix a test bug where this was happening.

Change-Id: I5d7520be4859a700265d62b322416a90f278b2d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89400
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-05-10 15:29:14 +00:00
Ben Clayton 41285aa578 tint: Lex different tokens for float suffixes
Generate different tokens for:
• 'f' suffixed float literals
• unsuffixed integer literals

'f' and unsuffixed are currently both treated as f32 by the resolver,
but this is the first step to supporting abstract floats.

Bug: tint:1504
Change-Id: Id3b1fe420b6eb8901f88d6a5de06ef4f54aa3edf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89031
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-05-10 14:55:34 +00:00
Corentin Wallez dd5947ff76 Triage WebGPU CTS expectations
Bug: chromium:1234041, chromium:1309194
Bug: dawn:1319, dawn:1357, dawn:1398

Change-Id: Id7ad9350b6294d986f4ac6235d47bf36378344c6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88307
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-10 13:57:24 +00:00
Dawn Autoroller 33bd1bf069 Roll ANGLE from 2b8172b9b21e to 9872c1d63f38 (4 revisions)
2b8172b9b2..9872c1d63f

2022-05-10 romanl@google.com Switch deqp merge to python3
2022-05-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 626b2fd72bde to 27ef4a0d9701 (2 revisions)
2022-05-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 1dd93361b1d9 to e4a6f2d74d3c (2 revisions)
2022-05-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 7f78f00fdc5c to 46c13be19f0f (273 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 kainino@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: kainino@google.com
Change-Id: I38c430e4855d6411e43abdc627ba1c04eccebdc3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89620
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-10 13:49:19 +00:00
dan sinclair 010f32bca0 [warnings] Add -Wunused-macros
This CL adds the `-Wunused-macros` warning and removes the unused macro
found.

Change-Id: I1b2aa925f89e19ff6184e34b59d5ee076cb3807c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89560
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-05-10 13:31:16 +00:00
dawn-autoroll 2985c867e2 Roll vulkan-deps from 7de4282f2446 to 27ef4a0d9701 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/7de4282f2446..27ef4a0d9701

Changed dependencies:
* vulkan-validation-layers: 14155d96ed..40437fb6ed

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 kainino@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: kainino@google.com
Change-Id: I0e22fed55b987af998febefa6041d19a44d924b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89580
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-10 09:48:22 +00:00
Jiawei Shao 6c9e475211 tint: Support dot4I8Packed and dot4U8Packed in sem
This patch adds the support of dot4I8Packed and dot4U8Packed in
semantics under the extension "chromium_experimental_dp4a".

Bug: tint:1497
Test: tint_unittests
Change-Id: I659172fcb8953ba13b49664c6c9ad75724ff5957
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88962
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-10 09:05:54 +00:00
Corentin Wallez 4b6d3f4346 ShaderModule: Don't create an inspector just to reflect exts
Bug: tint:1472

Change-Id: Ifc170c3da531dd17015f0f36dfccfaa8e250b50c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89403
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-05-10 06:41:24 +00:00
Dawn Autoroller c167ae12aa Roll SwiftShader from f5cda7835ab7 to e4a6f2d74d3c (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f5cda7835ab7..e4a6f2d74d3c

2022-05-09 swiftshader.regress@gmail.com Regres: Update test lists @ f5cda783

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 kainino@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: kainino@google.com
Change-Id: I5a8ddeb7f11baf419ece7340f8ada7342e1496b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89541
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-10 03:43:15 +00:00
Corentin Wallez 65271f6645 Vk: Run SingleEntryPoint before BindingRemapper.
This avoids Tint validation errors between transforms caused by unused
entry-points having conflict with the remapped bindings.

Fixed: dawn:1363
Change-Id: If7d22d09905816bfe777ab22211af21513f98698
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89441
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
2022-05-10 03:33:34 +00:00
Dawn Autoroller 7c2680badd Roll ANGLE from 78d88796b44b to 2b8172b9b21e (12 revisions)
78d88796b4..2b8172b9b2

2022-05-09 cclao@google.com Vulkan: Add missing initialization for mTotalMemorySize
2022-05-09 syoussefi@chromium.org Vulkan: Remove suppressions and workarounds for old AMD/Windows
2022-05-09 ynovikov@chromium.org Revert "Vulkan: GBM platform"
2022-05-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from bc117969dbb5 to 7f78f00fdc5c (162 revisions)
2022-05-09 geofflang@chromium.org Reset the program executable if async linking fails.
2022-05-09 antonio.caggiano@collabora.com Vulkan: GBM platform
2022-05-09 cclao@google.com Vulkan: Fix VVL error for black desert mobile
2022-05-09 lexa.knyazev@gmail.com Add CopyTextureTest.ClearAfterCopySubTexture
2022-05-09 jmadill@chromium.org Vulkan: Use ImageView layer count functions in TextureVk.
2022-05-09 geofflang@chromium.org HLSL: Disambiguate functions that have int/uint parameters.
2022-05-09 jmadill@chromium.org Vulkan: Always init image views using image format.
2022-05-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 74e34ab97aeb to 1dd93361b1d9 (3 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 kainino@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: kainino@google.com
Change-Id: I72e6442157d95911d35e9f0b4857c0e6826162c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89540
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2022-05-10 00:52:25 +00:00
dan sinclair efab8c894e [chromium-style] Adding constructors and destructors.
This CL adds missing constructors and destructors.

Bug: dawn:1405
Change-Id: I0a0ea7ca50643d48cfc4a4dcf4ce46ff37ed10ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89200
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-05-10 00:14:04 +00:00
Loko Kung bfe9f91975 Remove NiceMock on device lost callback.
- Unexpected device lost should result in an error.

Fixes: dawn:1412
Change-Id: I6fe0b1ccc3e4b51cc85b9a058f8eac65c7622d89
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89500
Auto-Submit: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-05-09 23:10:54 +00:00
dan sinclair 61f30bad1e [chromium-style] Adding/moving constructors and destructors.
This CL adds missing constructors and destructors. Others are moved
from the header file to implementation files.

Bug: dawn:1405
Change-Id: I06657d4a4faa437ca5a95a0067a8f9f9bbc89d12
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89181
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-05-09 22:22:18 +00:00
Ben Clayton b61e0452f8 tint: Add unary-ops to the intrinsic table
• Declare all the unary ops in the intrinsics.def file.
• Reimplement the bulk of Resolver::UnaryOp() with the IntrinsicTable.

This will simplify maintenance of the operators, and will greatly
simplify the [AbstractInt -> i32|u32] [AbstractFloat -> f32|f16] logic.

Bug: tint:1504
Change-Id: Ifc646d086fc93cfbe3f3f861b8c447178664c1f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89028
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-05-09 21:22:24 +00:00
Brandon Jones 7378612ca5 Remove Unsafe API Toggle Check For Multiplane External Textures
Removes check for Unsafe API toggle for multiplane external textures.
This is no longer needed now that the the implementation is functional.

Bug: dawn:1409
Bug: chromium:1323647
Change-Id: Iaf1c1b6bd053b68e306df61759ee9d81777f9b87
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89460
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
2022-05-09 20:35:43 +00:00
dan sinclair 357bfa89d8 [chromium-style] Adding/moving constructors and destructors.
This CL adds some missing constructors and destructors. Others are moved
from the header file to implementation files.

Bug: dawn:1405
Change-Id: I17e98f6da48518112bafb0876679cc3989ba2548
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89160
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-09 20:28:54 +00:00
dawn-autoroll c5931800f2 Roll vulkan-deps from 626b2fd72bde to 7de4282f2446 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/626b2fd72bde..7de4282f2446

Changed dependencies:
* spirv-tools: ffc8f2d455..ad3514b732

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 kainino@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: kainino@google.com
Change-Id: I6b7055e94a761c0e50e8a4e9bc687fcd1a57aa11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89461
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-09 20:12:15 +00:00
Ben Clayton 9fb29a364e tint: Add binary-ops to the intrinsic table
• Declare all the binary ops in the intrinsics.def file.
• Reimplement Resolver::BinaryOpType() with the IntrinsicTable.

This will simplify maintenance of the operators, and will greatly
simplify the [AbstractInt -> i32|u32] [AbstractFloat -> f32|f16] logic.

Bug: tint:1504
Change-Id: Ie028602e05b59916c3f2168c92f200f10e402b96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89027
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-05-09 20:00:13 +00:00
dan sinclair bcdb6e9da8 [chromium-style] Split mock constructors/destructors to cpp files.
This CL moves the constructors and desctructors for the  native
unittest mocks into separate cpp files.

Bug: dawn:1405
Change-Id: I20dccaa8114f3d7f8b61da1c1495648cb7328148
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89121
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-05-09 18:24:53 +00:00
Ben Clayton e6e96def66 tint: Add operator support to intrinsic-gen
Adapt the builtin parsing and resolving to also support operators.
Will be used to generate intrinsic table entries for operators.

This will simplify maintenance of the operators, and will greatly
simplify the [AbstractInt -> i32|u32] [AbstractFloat -> f32|f16] logic.

Bug: tint:1504
Change-Id: Id75735ea24e501877418812185796f3fba88a521
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89026
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-05-09 18:08:23 +00:00
dan sinclair d84daed72c [chromium-style] Fixup a few chromium-style issues.
This CL fixes a few missing overrides and updates some `auto`'s to
have a `*` on them.

Bug: dawn:1405
Change-Id: I621cd35fb10d8308a5831db11c22a3595e52e295
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89120
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-05-09 16:26:44 +00:00
Dawn Autoroller abd1840550 Roll SwiftShader from 1dd93361b1d9 to f5cda7835ab7 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/1dd93361b1d9..f5cda7835ab7

2022-05-09 swiftshader.regress@gmail.com Regres: Update test lists @ 1dd93361

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 amaiorano@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: amaiorano@google.com
Change-Id: If30396118d110b52f5395bb6101efc7ff2fe7dcd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89420
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-09 14:27:23 +00:00