Commit Graph

8374 Commits

Author SHA1 Message Date
Ben Clayton 8c30d752a0 resolver: Refactor Statement handling
Break up Resolver::Statement() into multiple resolver functions.
Move simple statement validation out to resolver_validation.cc

Change-Id: Ifa29433af0a9afa39a66ac3e4f7ca376351adfbf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71102
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-11-26 16:26:42 +00:00
Dawn Autoroller 018fb81432 Roll Tint from 9e1f3e271c to 0ea236f755 (7 revisions)
https://dawn.googlesource.com/tint.git/+log/9e1f3e271c83..0ea236f7556f

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
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: dawn:1203
Tbr: shrekshao@google.com
Change-Id: If26472b641f1ab609e2f6a43814e6a02d392c233
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71089
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-26 15:32:22 +00:00
Ben Clayton c5835eb4a0 test: Regenerated expected HLSL file
This new expectation file was added with a similar parent that changed the expected output.

Bug: tint:1112
Change-Id: Icb6175f68b6459385933d39e07460eb863ecb9ff
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71101
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-11-26 15:28:49 +00:00
Dawn Autoroller 2050e37521 Roll ANGLE from a092401558cd to d3aa873cf601 (9 revisions)
a092401558..d3aa873cf6

2021-11-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 1d924bd00379 to edeff1f2e7db (1 revision)
2021-11-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 1f986773b3b2 to b510b0864113 (93 revisions)
2021-11-26 stha09@googlemail.com Vulkan: add explicit template specialization for barrierImpl
2021-11-26 stha09@googlemail.com GCC: fix type conversion in FramebufferGL
2021-11-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from ad511b3c5051 to 1f986773b3b2 (589 revisions)
2021-11-25 jonahr@google.com Ignore the pixel unpack state for compressed textures.
2021-11-25 penghuang@chromium.org Add EGL_ANGLE_vulkan_image extension
2021-11-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 6402aa39e588 to b497675b7cba (3 revisions)
2021-11-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 17a11cfeb5f1 to 1d924bd00379 (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 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: I1b721dc478bdc73d2125eaa260297f44f94d7a8e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71088
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-26 15:23:42 +00:00
Corentin Wallez 088b3e8e30 Revert "Run GPU-less tests on macOS 11 bots."
This reverts commit 10bb40a03d.

Reason for revert: no Mac-11 in luci.flex

Original change's description:
> Run GPU-less tests on macOS 11 bots.
>
> Bug: chromium:1273555
> Change-Id: Ifcbdccd930180d2df28e8ab7b1b6e3ef93f8564b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70940
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>

TBR=cwallez@chromium.org,rharrison@chromium.org,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Ic8e70238b78c6cc37d95215d63eced52cf069573
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1273555
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70942
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-11-26 14:30:58 +00:00
Ben Clayton 0ea236f755 resolver: Forbid module-scope declarations from aliasing a builtin
Fixed: tint:1318
Change-Id: Ifcb1aced6885bebcf3eb883f39bfbd0871dae7b0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70663
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2021-11-26 09:56:19 +00:00
Corentin Wallez 9c97592628 Revert "Update Mac version and remove stale experiment"
This reverts commit 401d694d03.

Reason for revert: No Mac-11 in luci.flex

Original change's description:
> Update Mac version and remove stale experiment
>
> Moving Mac version from 10.15->11
>
> Also removes realms experiment, since it is no longer active and
> lucicfg was emitting a warning about it.
>
> BUG=chromium:1273569
>
> Change-Id: Ib0962a1330985da82336ea93cc9014c2439b452b
> Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71020
> Auto-Submit: Ryan Harrison <rharrison@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>

TBR=cwallez@chromium.org,rharrison@chromium.org,bclayton@google.com,noreply+kokoro@google.com,tint-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I66d3d1dbed04ecee2ebf8566e3eb126977728a1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1273569
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71100
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-26 09:16:01 +00:00
Antonio Maiorano e2528e9297 Reland "HLSL: force FXC to never unroll loops"
Now that I've landed this change to Dawn to disable FXC optimizations:
https://dawn-review.googlesource.com/c/dawn/+/70700,, we can reland this
change. The Tint-into-Dawn roll was failing because FXC would miscompile
certain loops into infinite loops when not unrolled.

Also reland
test/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.hlsl

Bug: tint:1112
Bug: dawn:1203
Change-Id: I641d68864b833e0fbe3b117d397b89ae96482536
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71000
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-11-25 18:44:50 +00:00
Ben Clayton 91785d277b resolver: Fix bug in dep graph SortGlobals()
If we encounter a global twice, the stack vector was not popped, which could trigger false cyclic-dependency errors. Because the cyclic dependency did not actually exist, later logic could break, expecting to find a global->global edge which did not exist.

Fixed: chromium:1273451
Change-Id: I9d99f1aeeaea042d9ed847a878c4717803122240
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70980
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-25 18:07:57 +00:00
Ben Clayton 0079a597e6 test: Add a test case for tint:1321
It's surprising that the fuzzers didn't find this, but I've confirmed that at least one of the fuzzers will fail with this case.
By adding a e2e test case, this will be used as a seed for the fuzzer corpus.

Bug: tint:1321
Change-Id: Ibf4bfa50bf376ae4cba401dfc31a2498fa3b9eec
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70982
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-25 18:02:36 +00:00
Ryan Harrison 401d694d03 Update Mac version and remove stale experiment
Moving Mac version from 10.15->11

Also removes realms experiment, since it is no longer active and
lucicfg was emitting a warning about it.

BUG=chromium:1273569

Change-Id: Ib0962a1330985da82336ea93cc9014c2439b452b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71020
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-11-25 17:54:58 +00:00
Corentin Wallez 10bb40a03d Run GPU-less tests on macOS 11 bots.
Bug: chromium:1273555
Change-Id: Ifcbdccd930180d2df28e8ab7b1b6e3ef93f8564b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70940
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-11-25 16:51:00 +00:00
Ben Clayton e0a560c8da transform: Don't consider type-ctor/casts as having side-effects
RemovePhonies was transforming:

_ = f32(1)
_ = vec2<f32>(1.0, 2.0)

into:

f32(1)
vec2<f32>(1.0, 2.0)

Which the resolver gets grumpy about, as these are expressions, not statements.

Fixed: chromium:1273230
Change-Id: Ie85d3cee705fa3f792db686c021d76331e241f17
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70960
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
2021-11-25 16:10:28 +00:00
Dawn Autoroller fc3a8547bc Roll Tint from 9756030d4e to 9e1f3e271c (1 revision)
https://dawn.googlesource.com/tint.git/+log/9756030d4eff..9e1f3e271c83

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
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: I90d9d1286659111a914c35779d6867d16de93e86
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70921
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-25 15:23:50 +00:00
Ben Clayton 9e1f3e271c Remove test.wgsl, add to .gitignore
Accidental commit of my test file for checking tint behavior.
Add to the .gitignore file so I don't accidentally check this in again.

Change-Id: Ie67f04cc307fa180d3a65d867a1777d008be8e17
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70981
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
2021-11-25 13:52:57 +00:00
Antonio Maiorano db6aa8a4ad Add "fxc_optimizations" toggle set to false by default
FXC sometimes miscompiles code when optimizing (/O2), and there is no
discernable workaround. This change sets the optimization level to /O0
when compiling shaders with FXC.

Also, no longer default to enabling EmitHLSLDebugSymbols in Debug
builds, which disabled optimizations (/Od). This confused me a few
times, and is not necessary since we can set this toggle via command
line.

Bug: dawn:1203
Bug: tint:1175
Bug: tint:1112
Change-Id: Ide9e6ecd45adeca951b8836dee91a8367eca3769
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70700
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-11-25 13:24:50 +00:00
Dawn Autoroller 802292eb52 Roll ANGLE from 6c172e4b87f2 to a092401558cd (3 revisions)
6c172e4b87..a092401558

2021-11-25 gman@chromium.org Metal:Fix GLSLTest_ES3.GLVertexIDIntegerTextureDrawElements Metal
2021-11-24 jmadill@chromium.org Vulkan: Revert change to sRGB override support.
2021-11-24 ianelliott@google.com Revert "Vulkan: Use vkResetQueryPoolEXT when available"

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: I442cc0d8546a32c6fca0fd7ce22d73eb61b2e561
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70920
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-25 10:43:21 +00:00
fujunwei 4e8769087a Add ability to generate constants from dawn.json
The "constant" category has two keys:
 - `"type"`: a string, the name of the base data type
 - `"value"`: a string, the value is defined with preprocessor macro

Remove deprecated constant InputStepMode.

BUG=dawn:1201, dawn:1023

Change-Id: If4308bd5b25dddd9453514ce362bebe4fd771a57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70704
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
2021-11-25 08:44:01 +00:00
Li Hao a329997e27 Add features of depth24unorm-stencil8 and depth32float-stencil8 texture formats
The depth240unorm-stencil8 and depth32float-stencil8 are optional
features. Enable them and add validation tests for texture creation
and texture view creation.

They are unimplmented on backends, skip their end2end tests.

TODO: add validtion for copy commands.

BUG=dawn:690

Change-Id: I980631d2f3fa6397a6125221a76980a15c8cb2f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-11-25 01:11:57 +00:00
Loko Kung 596e07f768 Suppresses SwapChainTests.ResizingWindowAndSwapChain for Linux/Vulkan/Nvidia.
See successful run here: https://chromium-swarm.appspot.com/task?id=576d23443b829010

Bug: dawn: 1191, dawn:1205
Change-Id: I45acffcd2b23d7aaf0634b89f1c63e5e7f4437b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70880
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-11-25 01:11:27 +00:00
Dawn Autoroller 53dfbaa2fa Roll ANGLE from 79f9d163b422 to 6c172e4b87f2 (4 revisions)
79f9d163b4..6c172e4b87

2021-11-24 m.maiya@samsung.com Add support for memory cleanup on process exit
2021-11-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8d493b8df0d4 to 6402aa39e588 (4 revisions)
2021-11-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9e727fadeb66 to 17a11cfeb5f1 (1 revision)
2021-11-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 592e51326747 to ad511b3c5051 (470 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: I58777475532427983cbec996c29423bd0241702f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70820
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-24 21:13:17 +00:00
Dawn Autoroller a8a38d83c9 Roll Tint from 1c1b9762ce to 9756030d4e (1 revision)
https://dawn.googlesource.com/tint.git/+log/1c1b9762ce60..9756030d4eff

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
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: I67f9942866dc3ec87add353266d447b3c95677c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70821
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-24 20:58:59 +00:00
Antonio Maiorano 13712ba4f3 Fix dumping of FXC compile flags
The logic was incorrect, printing "D3DCOMPILE_OPTIMIZATION_LEVEL2" for
levels 0, 2, and 3.

Bug: dawn:1162
Change-Id: I6ab7d9d3d22556b6602c778bddd99e5f2274b02b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70705
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-11-24 20:05:57 +00:00
Shrek Shao 2ec09921cc Add include RenderPipeline.h in DeviceMock.h
To unblock g3 dawn roll.

Change-Id: I92ea111dc4c65d4b2ff0c44e7f17799026afd96c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70800
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-11-24 19:55:07 +00:00
Loko Kung f008bb3b7e Update Vulkan's shader module destruction to remove cache for cleanup.
- Turns internal cache into a pointer so that we can deallocate it earlier for the destroy.

Bug: dawn:628
Change-Id: I69fd1e4be5ed5d8b7a28efebd9c2852bab3224b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70182
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2021-11-24 19:46:17 +00:00
Austin Eng 9756030d4e fuzzer: Implement BuildImpl for msl/hlsl Options structs
The default implementation of this was generating random data for
the underlying pointers of std::unordered_map, leading to crashes
when the map was accessed. This CL populates the map in a
structured manner with pseudo-random data.

Bug: chromium:1273001
Change-Id: Ic20ecab85bedba2a59587ebe4a5016be6e53e6f8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70701
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-11-24 16:22:18 +00:00
Dawn Autoroller 0cee4d9834 Roll Tint from 066c175852 to 1c1b9762ce (1 revision)
https://dawn.googlesource.com/tint.git/+log/066c17585214..1c1b9762ce60

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
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: Ibe0549523d44ecdf8e399b1d3e73252b60d15352
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70725
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-24 16:08:15 +00:00
Ryan Harrison 1c1b9762ce Add tests for fuzzers::RandomGenerator
BUG=tint:1019

Change-Id: Ia462080877a97348c5589bfa71231a832a7ebfd3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70081
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-11-24 14:55:05 +00:00
Dawn Autoroller 750978cfa0 Roll ANGLE from 97aa5187ed16 to 79f9d163b422 (6 revisions)
97aa5187ed..79f9d163b4

2021-11-24 abdolrashidi@google.com Vulkan: Implement GL_EXT_multi_draw_indirect
2021-11-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from b638c7fb7440 to 8d493b8df0d4 (2 revisions)
2021-11-24 syoussefi@chromium.org Vulkan: Fix image tiling when DRM format modifiers are specified
2021-11-23 abdolrashidi@google.com Implement GL_EXT_multi_draw_indirect
2021-11-23 msisov@igalia.com linux: enable angle gl for wayland only builds.
2021-11-23 j.vigil@samsung.com EGL: implement EGL_KHR_mutable_render_buffer

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: I28e69f93c036002d50030205e82ced97332b253e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70724
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-24 07:27:38 +00:00
Dawn Autoroller 5e8ad19d57 Roll Tint from b05e185a36 to 066c175852 (3 revisions)
https://dawn.googlesource.com/tint.git/+log/b05e185a3633..066c17585214

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
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: Ie7ebcf4e9e2e7b7333b3c5d9c24f06696f88f1e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70723
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-24 03:22:16 +00:00
Ben Clayton 066c175852 writer/hlsl: Prevent NPE on error
If the HLSL sanitizer errors, then there may be no ArrayLengthFromUniform::Result, so we check the pointer before attempting to dereference it.

Bug: chromium:1273230
Change-Id: I9575d20748720623a94ac86f45da14302b20440a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70740
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-11-24 00:08:28 +00:00
Corentin Wallez 4c10e82cf8 Vulkan: discover Vulkan instance versions higher than 1.2
Previously we would only discover 1.0 or 1.1, meaning that extensions
promoted to core in 1.2 wouldn't be properly discovered.

Bug: chromium:1269882
Change-Id: I38bc211a3358158ba5eccd6b361e4b1173e047fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70640
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-11-23 23:50:37 +00:00
Shrek Shao fb3c1c4d4b Fix sem::Node forward declare
To unblock g3 tint import

Change-Id: Id6591dc210e06c93ca09f15056ba5cbccae7d2a9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70703
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-11-23 22:51:38 +00:00
Dawn Autoroller 737d092b28 Roll Tint from 5af571bcbc to b05e185a36 (8 revisions)
https://dawn.googlesource.com/tint.git/+log/5af571bcbcf4..b05e185a3633

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
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: If8566ec34bc7f479cc65861775a02e8bd5c1b629
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70722
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-23 22:33:46 +00:00
Austin Eng 77ac40a7b0 Add adapterType to WGPUDeviceProperties
This Dawn-internal struct is used to send Adapter information from
the GPU to Renderer process. We need adapterType to determine the
isFallbackAdapter property of GPUAdapter in Chromium.

Bug: chromium:1266550
Change-Id: Ia0457119f45a165e7bdb5b85c43c120391c7001b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70580
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
2021-11-23 22:25:56 +00:00
Ben Clayton d1f0a14563 resolver: Track global uses in function decorations
Fixed: tint:1320
Change-Id: Ib92c37d4de0641d11e508be4d8e05d641e808be9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70662
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-23 21:46:48 +00:00
Ben Clayton b05e185a36 resolver: Support shadowing
Add transform::Unshadow to renamed shadowed symbols. Required by a
number of other transforms.

Replace Resolver symbol resolution with dep-graph.

The dependency graph now performs full symbol resolution before the
regular resolver pass.
Make use of this instead of duplicating the effort.

Simplfies code, and actually performs variable shadowing consistently.

Fixed: tint:819
Bug: tint:1266
Change-Id: I595d1812aebe1d79d2d32e724ff90de36e74cf4b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70523
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-11-23 20:45:51 +00:00
Ben Clayton e524ee1813 transform: Combine InlinePointerLets and Simplify
They are always used together, and can actually be simplified when
combined.
This transform cannot currently deal with shadowing, and will need
need to depend on a new 'unshadow' transform.

Fixes a long-standing bug where we'd get an ICE if we attempt to inline
a pointer let declaration with side-effects in a for-loop initializer.

Fixed: tint:1321
Bug: tint:819
Change-Id: I236fed688e33a4996e47310b5ece44c991b5249f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70661
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-11-23 20:45:51 +00:00
Ben Clayton f83ada8b5d resolver: Error on use of local decl in initalizer
`var x = x;`
`let y = y;`

Should not compile.

Bug: tint:819
Bug: tint:1266
Change-Id: I6944a8a95d49329ef754aea3374f20b0dc91e513
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70660
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
2021-11-23 20:45:51 +00:00
Ben Clayton 93fc113837 reader/spirv: Remove test that only tests SPIR-V val
The error message has recently changed, and is causing rolls to fail.
I don't see any reason why we're testing SPIR-V val here. Just remove the test.

Bug: tint:912
Change-Id: Ia24f81a8cc86edafe893493279f7aaa73f1d746a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70666
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-23 20:31:37 +00:00
Ben Clayton a40e45522b intrinsics: Deprecate isNan, isInf, isFinite, isNormal
These have all been removed from the spec as we cannot guarantee they will behave as expected on the various backends.

Bug: tint:1312
Change-Id: I9d7d81cfdc44489fffe08c5183ed8da84901a024
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70665
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-11-23 18:57:57 +00:00
Ben Clayton 7cff4c8745 test: Update expected output of FXC bug
Looks like this should have been part of bc5d8f6b

Bug: tint:1112
Change-Id: I62e98bbb5f8ca29a171d5d5baa65af55b3a090d4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70664
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-11-23 18:57:57 +00:00
Dawn Autoroller 62238ec684 Roll Tint from e85efca13f to 5af571bcbc (1 revision)
https://dawn.googlesource.com/tint.git/+log/e85efca13f87..5af571bcbcf4

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
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: I712012a8a91cf94948cdfa034967935efcf54f86
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70721
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-23 18:53:36 +00:00
Ben Clayton b93ba6ead5 resolver: DepGraph - Traverse types and decorations.
These also need to depend on types / values.

Bug: tint:819
Bug: tint:1266
Change-Id: Ia044d7823aca845dc57a887a164e07137d913429
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70522
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-23 18:40:27 +00:00
Dawn Autoroller 9b581f1f23 Roll ANGLE from f2bf9954b331 to 97aa5187ed16 (4 revisions)
f2bf9954b3..97aa5187ed

2021-11-23 ianelliott@google.com Vulkan: Use vkResetQueryPoolEXT when available
2021-11-23 syoussefi@chromium.org Vulkan: Don't attempt to convert vertices in empty buffers
2021-11-23 jmadill@chromium.org Update checked numerics library.
2021-11-23 sergeyu@google.com [Fuchsia] Fix SwiftShader ICD discovery

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: I0a6aa1015500a6485cc0a6742896812358a692c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70720
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-23 18:38:16 +00:00
Ben Clayton 1185d61648 utils: Add Lookup()
A find or return-default utility.
Rename `find_or_replace.h` to `map.h` which contains both these utilties that operate on maps.

Change-Id: Iaa76ea3f5c5a1210e413c131dd0556c126ee5d0a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70521
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-11-23 18:37:37 +00:00
Austin Eng 3482a80bdd Rename DeviceDescriptor -> DawnDeviceDescriptor
This is preventing supporting DeviceDescriptor from upstream
webgpu.h because the name conflicts with the existing struct.

A typedef using the original name DeviceDescriptor is added
until all embedders of Dawn are updated to use the new name.

Bug: dawn:160, dawn:689
Change-Id: Ib9cb7443b7e46e3ffe29d2ec109f2f1a831754e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70581
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-11-23 18:03:16 +00:00
Ben Clayton 5af571bcbc Document the process of generating code coverage
Update the script to check coverage generation is enabled, and provide a sensible error message if it is not.

Change-Id: I42f2b97d18bb3be2d081200cb682ea310476943f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70520
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2021-11-23 17:57:37 +00:00
Antonio Maiorano 7e851c91dd Make dump_shaders output FXC compile flags
For example, a non-Debug build will now output:

1: /* FXC compile flags */
D3DCOMPILE_PACK_MATRIX_ROW_MAJOR
D3DCOMPILE_OPTIMIZATION_LEVEL1

While a Debug build would output:

1: /* FXC compile flags */
D3DCOMPILE_DEBUG
D3DCOMPILE_SKIP_OPTIMIZATION
D3DCOMPILE_PACK_MATRIX_ROW_MAJOR
D3DCOMPILE_OPTIMIZATION_LEVEL1

This will be useful when using the CLI (fxc.exe) to make sure we pass it
the right flags.

Bug: dawn:1162
Change-Id: Ifffa2a0d1d0ccbb67ee7f5e1d0608d5946235bc5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70680
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-11-23 17:31:36 +00:00
Dawn Autoroller 0166526569 Roll ANGLE from b9e96af0a847 to f2bf9954b331 (3 revisions)
b9e96af0a8..f2bf9954b3

2021-11-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8e41c1d91f9d to b638c7fb7440 (8 revisions)
2021-11-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 6e23c082b73a to 9e727fadeb66 (3 revisions)
2021-11-23 gert.wollny@collabora.com Capture/Replay: Set FBO ID when generated on bind

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: If55e890cdcaf65ed1624fc4d6ff0c1dddcc7d92e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70563
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-11-23 13:39:36 +00:00