Commit Graph

11590 Commits

Author SHA1 Message Date
Li Hao 23a35c8a26 Add more tests in white_box/D3D12GPUTimestampCalibrationTests.cpp
Add more coverage for timestamp query on D3D12 backend to make sure
timestamps are converted correctly:
- All timestamp queries inside and outside passes
- The 'disable_timestamp_query_conversion' toggle disabled and enabled

Bug: dawn:1250

Change-Id: Ibdc6b35faed7cc1e1a8b60df4a5032914b411bc1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108022
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-04 08:43:57 +00:00
Loko Kung a4314fabb4 Minor build/include fixes for google3 roll.
Change-Id: I2f9ba7f98acdf9441d80d3a1169b36bee44a2e0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108545
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-11-04 01:44:43 +00:00
Takahiro e8cd0beb74 GPUBuffer.unmap() shouldn't validate buffer state
WebGPU specification was updated that GPUBuffer.unmap()
shouldn't validate buffer state.

https://github.com/gpuweb/gpuweb/pull/3368

This commit reflects it to the Dawn implementation.

Bug: dawn:1528
Change-Id: Ie66f68214bd6896a4d674ed00addc3ffb539c235
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106264
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
2022-11-04 00:08:27 +00:00
dan sinclair 16b4cf87d0 Template cmake for generated files.
This CL adds a cmake function to make it easier to integrate
files generated from the intrinsics file.

Change-Id: If2a593fad9703075ea91a29f72d482b34cc9dc1d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108462
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-03 21:10:40 +00:00
Dawn Autoroller f7437910b8 Roll ANGLE from a48a2c7a277a to 9340f01d390b (8 revisions)
a48a2c7a27..9340f01d39

2022-11-03 lexa.knyazev@gmail.com Metal: Restore load actions after attachment updates
2022-11-03 syoussefi@chromium.org Revert "Vulkan: Implement EGL_EXT_device_drm[_render_node]"
2022-11-03 bsheedy@chromium.org Migrate ANGLE regexp filters
2022-11-03 robert.mader@collabora.com Vulkan: Implement EGL_EXT_device_drm[_render_node]
2022-11-03 chris@rive.app Add an EXT_shader_pixel_local_storage impl of PLS
2022-11-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from da2edceb04a8 to a113fba5d946 (1 revision)
2022-11-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 2c98c5af6539 to 5da1d1188b33 (352 revisions)
2022-11-03 gert.wollny@collabora.com translator: handle tesselation shaders when force-init outputs

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 alanbaker@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: alanbaker@google.com
Change-Id: I3ee5928efc9d688c41138b710c704d8017a7b907
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108520
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-11-03 20:13:45 +00:00
dan sinclair 6590cc4fd9 Add missing benchmark test.
There is a benchmark test for builtin_value which was not added
into the benchmark code. This cl adds the missing test.

Change-Id: I6fc0eee0a50cad31f516024125be11e434df0ac0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108461
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-03 19:37:49 +00:00
Ben Clayton 8fa6c25b78 tint: Add Initialize() / Shutdown() public APIs
Have Initialize() bind the Program printer - which is helpful for debugging.
Call these from dawn/node.

This allows dawn/node to print programs when things go wrong.

Change-Id: I32d8805381d2939e82dc6ea383b9860fbb5fb69e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107684
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-11-03 19:16:26 +00:00
Ben Clayton 02f04d914d tint/transform: Polyfill bit-shift with RHS modulo
Fixed: tint:1453
Fixed: tint:1543
Change-Id: Idb5af752d7a3bb9e181cc47430ad4ddfb707873d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108440
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-11-03 19:15:17 +00:00
dan sinclair 91e27f25f9 Add const-eval for `floor`.
This Cl adds const-eval for the `floor` builtin.

Bug: tint:1581
Change-Id: I992eba3aa6c66707e923907a4bb912c2f6f8d290
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108343
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-03 17:10:49 +00:00
dan sinclair 11cecc1e4f Revert "Add CMake build option to generate intrinsic files."
This reverts commit c22b8b9dc8.

Reason for revert: Cost not worth benefit.

Original change's description:
> Add CMake build option to generate intrinsic files.
>
> This Cl adds an option to cmake to generate the intrinsic files
> as part of the buid.
>
> Change-Id: I785fbaa57b6d3b3ecd16e36b2f2baaa5da3cc9d9
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108000
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Reviewed-by: Ben Clayton <bclayton@chromium.org>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Idc57ea21d9d9152703e0a6d99fa518e8da079092
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108460
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-03 16:28:51 +00:00
dan sinclair abd6a7d9d4 Add const-eval for `ceil`
This CL adds const-eval for the `ceil` builtin

Bug: tint:1581
Change-Id: I32957d17000df1a8a59ce37f49b6177d1087406c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108342
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-03 15:59:23 +00:00
Dan Sinclair 465df13196 Revert "This CL updates the cmake files to use go run directly."
This reverts commit a950d4539e.

Reason for revert: Ran into issues integrating into all the required build environments.

Original change's description:
> This CL updates the cmake files to use go run directly.
>
> Instead of using the tools/run script this CL updates CMake
> to directly invoke go run. This should work around issues
> with multiple writers of the gen binary and fixup windows issues.
>
> Change-Id: Ie27f45a1d132e9ec100cad709bb92da8558b4fb3
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108045
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>

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

Change-Id: I10e7796d4f11661f2055c08202c84e56355ec397
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108420
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-03 15:09:03 +00:00
dan sinclair 9cbc7e1e54 Implement const-eval for `acos`
This CL adds const-eval for the `acos` builtin.

Bug: tint:1581
Change-Id: I01c0f48e73eedf87cf9c912715487f8eea44f64e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108341
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-03 14:49:23 +00:00
dan sinclair b3518d8b4d Implement const eval of `abs`
This CL adds const-eval for the `abs` builtin.

Bug: tint:1581
Change-Id: I6ee25c07620990f72a6962441aec62ae7665653e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108340
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-03 14:47:18 +00:00
Dan Sinclair 5ae03c266a Revert "Scaffolding for generation of intrinsics files."
This reverts commit 6c5db2afa6.

Reason for revert: Ran into issues integrating into all the required build environments.

Original change's description:
> Scaffolding for generation of intrinsics files.
>
> This CL sets up the basis for the intrinsic file generation. All of
> the GN and CMake pieces are setup, but they aren't hooked into the
> main build yet. That will be a followup which just enables the
> generation in order to allow easy reverting.
>
> Change-Id: Iccac59377076ed6ac66eeaf0be965be2f49bc738
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107981
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: If289cd2769faea6466bcae68c3c58cf416b3567a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108421
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-03 14:25:37 +00:00
Antonio Maiorano 11f0c52bfb tint: const eval of extractBits
Bug: tint:1581
Change-Id: I56e9b7de9aef803eaf6304c122f40e5a0c4dce67
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108203
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-11-03 13:03:08 +00:00
dan sinclair 58eca19f33 Add const-eval for `all`.
This CL adds const-eval for the `all` builtin.

Bug: tint:1581
Change-Id: Ib1d857ba24114c61e1a90b30dd66d063edfa136d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107464
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-03 12:07:49 +00:00
Ben Clayton aa4b64f4c8 tint/utils: Optimise HashmapBase::Scan()
Avoid an integer modulo for each scan iteration.

Change-Id: Ie80af4620b39769db622b4ab175b5639cf9ade8e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108260
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2022-11-03 11:44:15 +00:00
Ben Clayton 6e3f9fa53d Roll third_party/webgpu-cts/ 0439f3ed8..074471be8 (3 commits)
Update:
 - expectations.txt
 - ts_sources.txt
 - resource_files.txt
 - webtest .html files

0439f3ed86..074471be83
 - 074471 Fix extractBits tests to not test overflow cases for const input source (#1958)
 - 2fb4b1 val: Implement 'pass_end_none' and 'pass_end_twice' tests (#1917)
 - f3f3be val: Introduce encoder_open_state.spec.ts to test when an encoder is open (#1921)

Created with './tools/run cts roll'

Change-Id: I8a378c41f24e11808cd0680e6c1154ef593c94d0
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Include-Ci-Only-Tests: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108121
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-11-03 10:15:02 +00:00
jchen10 61d6d21091 Byte counting WriteBuffer/Texture to submit
Only tag to submit when the total size is larger than the threshold,
so that we can make as few submits as possible meanwhile avoiding OOM.

Bug: chromium:1258986
Change-Id: I7190e1bb942bfaffc5cd424ce4743173735b25e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106418
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2022-11-03 09:58:59 +00:00
Yan,Shaobo e8dd681f19 Provide origin info for ExternalTexture
Current ExternalTexture visible related info only contains width and height.

But not all the visible rect started at (0, 0). This CL add visibleOrigin to contain origin info and record (width, height) in
visibleSize

Bug: chromium:1361363
Change-Id: I3d8931e490c97740f152653383f07d0a2d984dd3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108024
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
2022-11-03 09:03:01 +00:00
Ben Clayton c6b381495d tint/transform: Refactor transforms
Replace the ShouldRun() method with Apply() which will do the
transformation if it needs to be done, otherwise returns
'SkipTransform'.

This reduces a bunch of duplicated scanning between the old ShouldRun()
and Transform().

This change also adjusts code style to make the transforms more
consistent.

Change-Id: I9a6b10cb8b4ed62676b12ef30fb7764d363386c6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107681
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-11-03 08:41:19 +00:00
Dawn Autoroller de6db384aa Roll ANGLE from e3d0bee63fe9 to a48a2c7a277a (8 revisions)
e3d0bee63f..a48a2c7a27

2022-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from c8d10c0b09ab to 2c98c5af6539 (5653 revisions)
2022-11-02 solti@google.com add tips in ANGLE wrangling doc
2022-11-02 syoussefi@chromium.org Vulkan: Remove the disableFifoPresentMode feature
2022-11-02 zzyiwei@chromium.org Repurpose enableCompressingPipelineCacheInThreadPool
2022-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from e6504a2a091c to da2edceb04a8 (12 revisions)
2022-11-02 chris@rive.app Finish renaming GL_PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE
2022-11-02 watfordcalvin@gmail.com Update Mesa build variable usage
2022-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 66e533688e2a to a7a3fb39310c (7 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-dawn-autoroll
Please CC alanbaker@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: alanbaker@google.com
Change-Id: I3fefaeaa63c108042fb923743550fcd5b46b3137
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108281
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-03 02:15:12 +00:00
Dawn Autoroller a5d956a5c7 Roll SwiftShader from da2edceb04a8 to a113fba5d946 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/da2edceb04a8..a113fba5d946

2022-11-02 nicolascapens@google.com Revert "Increase subPixelPrecisionBits from 4 to 8"

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 alanbaker@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: alanbaker@google.com
Change-Id: I264529a9885bad4175447e280d5649b6891e2b68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108320
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-11-02 23:05:11 +00:00
Antonio Maiorano 336f3536e5 tint: const eval of insertBits
Bug: tint:1581
Change-Id: Id89530eb90d3c75bd1f99dd67a78cad1c923c6f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107924
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-11-02 20:40:23 +00:00
Ben Clayton e372511e1b tint/utils: Rework Hashmap / Hashset
Previously Hashmap used to internally use a Hashset which held entries
of key-value pairs. This was cute, but meant that a Hashset held mutable
entries, which was a bag-of-bugs waiting to happen (change the entry to
hash as something different and you're now in an entirely broken state).

Pull the complex bits of Hashset out to HashmapBase, and have both
derive from that. I've opted for inheritance over composition here to
reduce the amount of structure chasing you'd have to do without
debugger pretty-printers.

Change-Id: I99e72244b69206a994edabfefd0e28d5d74d08d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108240
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-02 19:46:49 +00:00
Ben Clayton 9535f72209 tint/validator: Hint 'var' instead of 'const'
Involves expanding the source range of a variable declaration so we can point at something that can include the 'const'.

Fixed: tint:1740
Change-Id: Ie8f784de34a1792002aaa708c1b77053be54f1b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108120
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-02 18:14:59 +00:00
James Price fd9c3fe4bc tint/uniforimty: Remove short-circuit special-case
Now that expressions can only ever have the `Next` behavior,
short-circuiting operators will always reconverge.

Change-Id: Ib9fe4c774191b8a304fa7f7a6eafdfa6c6e6f18a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108202
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2022-11-02 18:01:31 +00:00
Ben Clayton c81f9dce07 tint: Implement const-eval of quantizeToF16
Bug: tint:1581
Change-Id: I5cf9806bde7875282d3b67731dbb88666523f598
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108142
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-02 17:29:48 +00:00
Dan Sinclair 749abeaafb Revert "Add GN build option to build using generated files."
This reverts commit 7cd8db1155.

Reason for revert: Breaking the Skia roll.

Original change's description:
> Add GN build option to build using generated files.
>
> This CL hooks the generated files into the GN build
> behind a `tint_build_use_generator` flag.
>
> Change-Id: I4926b2c9c1a349f26be8a1f8a4508e1e31dab813
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108041
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Reviewed-by: Ben Clayton <bclayton@chromium.org>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>

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

Change-Id: I3b920791bc2b6d22d9cbeb1310a2e89fbd1e8cd1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108205
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-02 17:07:25 +00:00
dawn-autoroll a9e0ed7c79 Roll vulkan-deps from bd979ff3dc04 to a7a3fb39310c (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/bd979ff3dc04..a7a3fb39310c

Changed dependencies:
* spirv-cross: 3cecac74c6..744279ec78
* vulkan-loader: a17d7fc737..3f29209dd6
* vulkan-validation-layers: bdbb7a6897..18a0e59294

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 alanbaker@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: alanbaker@google.com
Change-Id: I0c9aff3e9108b869abd99e8c59c0701468119356
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108167
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-11-02 16:35:35 +00:00
Ben Clayton 698cd29c77 Roll third_party/webgpu-cts/ 1340d36c8..0439f3ed8 (13 commits)
Update:
 - expectations.txt
 - ts_sources.txt
 - resource_files.txt
 - webtest .html files


1340d36c8f..0439f3ed86
 - 0439f3 Fix insertBits tests to not test overflow cases for const input source (#1955)
 - bc24cc Implement `unpack2x16float` tests (#1934)
 - 1c4d99 Properly handle potential FTZ in quantizeToF16 tests (#1947)
 - 0f0cf4 Implement `unpack4x8snorm` tests (#1950)
 - e113fd Update encoder_state.spec.ts
 - cf33c4 val: Add a control case to 'pass_end_invalid_order' test (#1948)
 - 4df655 wgsl: Add robustness tests for builtin shadowing (#1939)
 - 7fc3ca val: Use doCompute,doRender helpers in empty_bind_group_layouts_requires_empty_bind_groups.* tests (#1919)
 - 23834e GPUBuffer.unmap() shouldn't fail even on unmapped or destroyed buffers (#1929)
 - 3bf23a Implement `unpack2x16snorm` tests (#1935)
 - 608c8a Handle error from division in unpack2x16unorm (#1944)
 - da3915 Implement `unpack4x8unorm` tests (#1943)
 - 41a299 Implement `unpack2x16unorm` tests (#1941)

Created with './tools/run cts roll'

Change-Id: Ifa3d71feac10bee37d84b2f444b90c7ef287a6a9
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Include-Ci-Only-Tests: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108141
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-02 15:07:30 +00:00
dan sinclair a950d4539e This CL updates the cmake files to use go run directly.
Instead of using the tools/run script this CL updates CMake
to directly invoke go run. This should work around issues
with multiple writers of the gen binary and fixup windows issues.

Change-Id: Ie27f45a1d132e9ec100cad709bb92da8558b4fb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108045
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-02 14:53:57 +00:00
Ben Clayton bdd5bbe0c5 tint/transform/utils: HoistToDeclBefore polish
A new HoistToDeclBefore::InsertBefore() overload that takes a statement
builder. Required for supporting multiple clones.

Remove Apply() - it was API smell that wasn't needed.

Spring-clean the implementation

Change-Id: If448d2e1945ad6d988d1bdb30487d89efced2f0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104043
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-02 13:45:49 +00:00
Ben Clayton 2d63e321fd tint: Add callback overloads to CloneContext::Insert*
Change-Id: I2fc0b93d3ea3ba0d9d64fe575364f188db564b8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104041
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-02 13:40:41 +00:00
Dawn Autoroller 808be6cdad Roll ANGLE from f3e047b5d77c to e3d0bee63fe9 (2 revisions)
f3e047b5d7..e3d0bee63f

2022-11-02 gert.wollny@collabora.com retrace: Check for the output json file after upgrade
2022-11-01 cnorthrop@google.com TraceTest: Route eglGetError through WGL

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 alanbaker@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: alanbaker@google.com
Change-Id: I3e1b0df72d8149353a0080f111837fab990df71b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108082
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-11-02 11:46:52 +00:00
Ben Clayton b5c213b995 tint/resolver: Fix failures with no error
Invalid values to @binding(), @group() and @location() would fail resolving without an error diagnostic. This later triggers and ICE.

Refactor duplicate @location resolving in 4 places to a single method.

Canonicalize the diagnostic messages for attributes.

Remove a bunch of TODOs

Bug: chromium:1380212
Bug: tint:1633
Change-Id: Id2cc6ba4b807f12f350a2a31ef87fa0f185b64c3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108144
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-11-02 07:49:23 +00:00
Dawn Autoroller 61ee66af99 Roll SwiftShader from e6504a2a091c to da2edceb04a8 (12 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/e6504a2a091c..da2edceb04a8

2022-11-01 capn@google.com Guard against pSparseMemoryRequirements == NULL
2022-11-01 swiftshader.regress@gmail.com Regres: Update test lists @ dc3b53ab
2022-11-01 capn@google.com Increase subPixelPrecisionBits from 4 to 8
2022-11-01 capn@google.com infra: Update lucicfg generated files
2022-11-01 capn@google.com infra: Make tryjobs run on change upload
2022-11-01 capn@google.com Move state variables from Spirv to SpirvShader
2022-11-01 capn@google.com Rename SpirvShader to Spirv
2022-11-01 jbauman@google.com Remove libz.so from llvm dependencies
2022-11-01 sugoi@google.com VK_KHR_global_priority implementation
2022-11-01 capn@google.com Default to masking stores in helper invocations
2022-11-01 swiftshader.regress@gmail.com Regres: Update test lists @ b3efa1fb
2022-11-01 sugoi@google.com Manual dEQP update

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 alanbaker@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: alanbaker@google.com
Change-Id: Ia6054195522b06ca8df4700f42eaedc1bc878a76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108081
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-11-02 03:07:35 +00:00
Zhaoming Jiang 6ab5d3c151 Tint/transform: make AddBlockAttribute always do wrapping if possible
This CL make transform AddBlockAttribute always try to wrap types used
by buffer variables into a struct, in order to generate valid GLSL code
for assigning one buffer struct variable to another buffer struct
variable.

Fixed: tint:1735
Change-Id: I009d8a9ca7ecea1dc0ad6164275c964a18acb33f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108023
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2022-11-02 02:25:38 +00:00
Ben Clayton 2bea9055f4 tint: Implement runtime quantizeToF16()
Fixed: tint:991
Fixed: tint:1741
Change-Id: I55dbabce6d28adf5abb710dc1e3e879c5aaa6be5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108140
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-02 00:09:50 +00:00
dawn-autoroll c5fc8ef273 Roll vulkan-deps from f8fbc1af1572 to bd979ff3dc04 (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/f8fbc1af1572..bd979ff3dc04

Changed dependencies:
* spirv-cross: 677299cc56..3cecac74c6
* vulkan-validation-layers: a52d085822..bdbb7a6897

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 alanbaker@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: alanbaker@google.com
Change-Id: Ifc7350b046740081d74bbdadb1e37b872a78d835
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108180
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-11-01 23:12:09 +00:00
Ben Clayton 5e4fc69a69 tools/intrinsic: Handle CRLF
Fixes cryptic error message:

error calling Sem: src/tint/intrinsics.def:14:1: unexpected '

Change-Id: Ic343e77f6a1976ebdc4952eb590751c34b014be8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108143
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-01 22:45:35 +00:00
James Price 35da054624 tint/cmake: Fix test source paths
Change-Id: I69aec703de0ab96175b5ea79f3d0ae4f5ccb9227
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108201
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
2022-11-01 21:51:14 +00:00
Dawn Autoroller 95cbf2e514 Roll ANGLE from 67ee49768691 to f3e047b5d77c (10 revisions)
67ee497686..f3e047b5d7

2022-11-01 srisser@google.com Add new retrace command get_min_reqs
2022-11-01 akihiko.odaki@gmail.com Debug: Handle LOG_EVENT on Apple platform
2022-11-01 chris@rive.app Implement an allow list for PLS
2022-11-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from af6c033bca19 to 66e533688e2a (81 revisions)
2022-11-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from cd9da0fefcef to e6504a2a091c (1 revision)
2022-11-01 gert.wollny@collabora.com retrace: Add --show-test-stdout arg to validation
2022-11-01 gert.wollny@collabora.com Capture/Replay: Special-case EGL image attribute pointer write
2022-11-01 gert.wollny@collabora.com retrace: Add a catch-all clause to report all errors
2022-11-01 gert.wollny@collabora.com Capture/Replay: Emit always gContextMap2 when capturing traces
2022-11-01 lexa.knyazev@gmail.com Suppress new clip distance tests on iOS

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 alanbaker@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: alanbaker@google.com
Change-Id: I64e24f8eb35775d96a32266472cdf91343f6b41b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108160
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-11-01 21:43:40 +00:00
dan sinclair ed0649dec4 [IR] Fix setting of if merge target
When emitting the if true/false blocks we attempt to set the merge
target if the start block hasn't branched. This isn't right, as if the
block branched to other control flow, then that isn't the end of the
flow chain for that branch. We have to look at the current branch
target, and, if it exists, branch that to the if merge block.

Bug: tint:1718
Change-Id: Ifcafc4dd12c805efbee9d1dbcbc42c6add8f06a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107861
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-01 18:17:21 +00:00
dan sinclair 9261261da8 [IR] Add ability to dump IR graph to dot
This CL adds the ability to dump an IR graph to a dot file. The
`--dump-ir-graph` option is added to the main tint command. The IR code
is moved behind a TINT_BUILD_IR flag in order to allow the GN build to
continue to build the tint program.

Bug: tint:1718
Change-Id: I0953fe2a59a34c21bb6cd288cb90e9d0298af793
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107860
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-01 18:15:50 +00:00
dan sinclair 1c755b68e6 [IR] Add support for `for` statements
This CL adds the ability to convert a for statement into a loop control
flow node.

Bug: tint:1718
Change-Id: Ibd55ae3b202518d3362267eaa1f507dce6a9fe56
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107804
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-01 17:11:25 +00:00
dan sinclair 0dce067e28 [IR] Add support for `while` statements.
This CL adds `while` statement support into the IR builder, converting
them into loop flow nodes.

Bug: tint:1718
Change-Id: I6dbaa24a0082463281dc933f02805169836fedd6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107803
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-01 17:09:39 +00:00
dan sinclair 7cd8db1155 Add GN build option to build using generated files.
This CL hooks the generated files into the GN build
behind a `tint_build_use_generator` flag.

Change-Id: I4926b2c9c1a349f26be8a1f8a4508e1e31dab813
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108041
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-01 17:03:48 +00:00
dan sinclair 50c29f6d38 [IR] Add support for `fallthrough`.
This CL adds `fallthrough` support to the IR building. Fallthrough is
deprecated but needs to be supported until removed from Tint.

Bug: tint:1718
Change-Id: I52ce4cc9953384a450ad09422b2ba38943284a42
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107802
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-11-01 17:03:05 +00:00