Commit Graph

8501 Commits

Author SHA1 Message Date
Ben Clayton 72e3ba6b54 dawn_node: Fix macOS build
Generate exported node symbol stubs with weak linking. This keeps the linker happy, and these are replaced by the real node symbols at runtime.

Fix clang warnings.

Have WGPUBufferMapAsyncStatus_DestroyedBeforeCallback reject the promise with an AbortError.

Bug: dawn:1123
Change-Id: I503f889b027b6cfc0e458abf434d4888990fb67b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65560
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-30 18:04:01 +00:00
Corentin Wallez 547c4ed0ca Improve validation errors for CreateQuerySet
Bug: dawn:563
Change-Id: I7ed446f9fed3e8e9c2fdf367ea8cedcbbff334b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65561
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-30 17:55:50 +00:00
James Price ee23c17345 resolver: Deterministic constant ID allocation
Use global declaration order for allocating implicit
pipeline-overridable constant IDs, instead of iterating over an
unordered_map.

Bug: tint:1155
Change-Id: Ia5ff534c617b0d57e45fc20dd0a5a591854e6473
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65522
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-30 17:29:50 +00:00
James Price 5ffae32177 validation: Improve continue-bypasses-decl message
Attach the error to the continue statement, and add notes to show
where the variable is both declared and used.

Change-Id: Ie9939a5ca674e7216069bbb1d8dc82ab6949367c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65521
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-30 17:29:50 +00:00
James Price 7166f6ba93 validation: Fix continue-bypasses-decl check
An expression that is inside an if-statement condition does not have a
"current block", which is what we were using to see if the usage was
inside a continuing block. Use the current statement to find the
containing block instead.

Fixed: chromium:1251664
Change-Id: Icc808ca1cf6a1b51757da8303901fa5ecb693e83
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65520
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-30 17:29:50 +00:00
Ben Clayton 200ed613ba dawn_node: Add a tool to run the CTS
Bug: dawn:1123
Change-Id: I00e875727f7a130af2025b89346380d4ea944fe1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65160
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-30 17:08:41 +00:00
Ben Clayton 8bbcd8018d dawn_node: Move cmd/idlgen under a src directory
Creates a more idiomatic golang source tree.

Change-Id: Ifdb701e5aa2f391ca23d957bee59412a8cf7139d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65420
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-30 15:23:53 +00:00
Corentin Wallez 8f87d8af80 AdapterVk: Remove redundant VkPhysicalDevice limit check
Fixed: dawn:1147
Change-Id: I8bbd46b82cad27174ccc7cae79a592ff992070a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65540
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-30 15:13:00 +00:00
Ben Clayton ffe5114fed dawn_node: Fix conversion of BlendState
A silly typo was causing a large number of blending tests to fail.

Bug: dawn:1123
Change-Id: Ib6423ad6c58baab2db15034633f95bab7b0c7912
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65401
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-30 13:53:44 +00:00
Ben Clayton 7c9294584e dawn_node: Add message support to UNIMPLEMENTED()
Have UNIMPLEMENTED() take a variadic set of message arguments which are printed with the fatal error message.

Bug: dawn:1123
Change-Id: Idfa7ca71a8c59565434651a310d9e049349bb227
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-30 13:09:24 +00:00
Ben Clayton 7ed0624337 dawn_node: Begin implementing GPUSupportedFeatures
Requires setlike interface interop.

Bug: dawn:1123
Bug: dawn:1143
Change-Id: I1451f72b32b99858be871db99888f86872b53fd0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65245
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-30 07:17:33 +00:00
Ben Clayton 3e122818a2 dawn_node: Fix stack overflow with Write()
In review, the variadic overload of Write() was changed, which adjusted the overload resolution priorities W.R.T the single argument overload:

https://dawn-review.googlesource.com/c/dawn/+/64747/3..7/src/dawn_node/utils/Debug.h#b96

This caused the variadic overload to be picked for the single-argument case, leading to stack overflows when calling Write().

Fixed by using perfect forwarding for the single argument case of Write().

Bug: dawn:1123
Change-Id: I21ab290e9c2e4b92ab472552f809484fb7426a45
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65244
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-30 07:12:33 +00:00
Brandon Jones 4d2bc396ea Improve validation errors in RenderPipeline
Updates all validation messages in RenderPipeline.cpp to give them
better contextual information.

Bug: dawn:563
Change-Id: Iccf2714c781c2e1d52eaf00bf81f1d5643635cf7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65484
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-09-30 01:30:12 +00:00
Dawn Autoroller 56f3807741 Roll Tint from efe1f14685 to 1ca6fbad8f (1 revision)
https://dawn.googlesource.com/tint.git/+log/efe1f1468521..1ca6fbad8f23

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 cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I765d24e35a9934ff25a3218a2447df0a732f6a93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65482
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-29 21:53:23 +00:00
Brandon Jones d6d2584480 Add debug group logging to validation errors
Updates the formatted error messages to display as:

Error message text.
 - While context 2.
 - While context 1.

Debug group stack:
 > "Debug Group Label 2"
 > "Debug Group Label 1"

Bug: dawn:563
Change-Id: I66f5ed59d3e6960722c0d1faf7eaa770d9774eb6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65480
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-29 19:39:02 +00:00
James Price 1ca6fbad8f msl: Use a struct for threadgroup memory arguments
MSL has a limit on the number of threadgroup memory arguments, so use
a struct to support an arbitrary number of workgroup variables.

This commit introduces a `State` object to this transform, which is
used to track which structs have been cloned eagerly, in order to
avoid duplicating them.

Bug: tint:938
Change-Id: Ia467db186e176a08f160455eab5fd3b3662f56b8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65360
Auto-Submit: James Price <jrprice@google.com>
Kokoro: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-29 18:56:17 +00:00
Brandon Jones 9b643b72f7 Improve validation errors, Part 3
Modified ConsumedError and TryEncode methods to allow for top-level
error context messages. Applied them to:
 - ComputePassEncoder
 - ProgrammablePassEncoder
 - RenderEncoderBase
 - RenderPassEncoder
 - Device

Bug: dawn:563
Change-Id: I4a989763f57afbcf6b1cfe87ccaaba502ebd29fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65101
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-29 18:39:23 +00:00
Dawn Autoroller caba9139a0 Roll Tint from ac958bd1dd to efe1f14685 (1 revision)
https://dawn.googlesource.com/tint.git/+log/ac958bd1dd8b..efe1f1468521

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 cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I299e6c0a81c2a6bdf39115554c39060af08efaff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65460
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-29 16:29:22 +00:00
Ryan Harrison efe1f14685 Roll third_party/spirv-tools/ c3adcb034..ba4b390c3 (1 commit)
c3adcb034f..ba4b390c36

$ git log c3adcb034..ba4b390c3 --date=short --no-merges --format='%ad %ae %s'
2021-09-28 afdx Suppress protobuf warning (#4551)

Created with:
  roll-dep third_party/spirv-tools

Change-Id: I18d47adbb1f076514917ce188cf127de9c2961b4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65440
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
2021-09-29 15:30:16 +00:00
Ben Clayton d6ecf83c19 dawn_node: Add Module.cpp
This is the node plugin entrypoint

Bug: dawn:1123
Change-Id: I4a48b047482a7c9f1a0f10cc2a5a02721d103b8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-29 09:51:21 +00:00
Corentin Wallez cac3e7e110 Revert "OpenGL: delete shaders and pipelines when they are not used any longer"
This reverts commit a57c1db878.

It produces a GL_INVALID_VALUE in ColorStateTest.ColorWriteMask

BUG=dawn:529

Change-Id: I3511057daf24baaf895b86cbda2a3a21e58d77fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65384
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-09-29 09:15:02 +00:00
Ben Clayton bc207f7193 dawn_node: Add binding/GPUDevice.cpp
Bug: dawn:1123
Change-Id: Ied4baca4d5eea41ad13ee488978a8f2354d5f8d0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64919
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-29 08:48:43 +00:00
Jiawei Shao 3c0925b480 Avoid redundant creation of RenderPipelineBase in GetCachedRenderPipeline
This patch removes a redundant creation of RenderPipelineBase object
in GetCachedRenderPipeline(). Instead, we directly compute the blueprint
hash from the uninitialized backend render pipeline object.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I3c7a2acfc01ab9e1e631793030ea06c9ae908aa2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65000
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-29 00:49:01 +00:00
Jiawei Shao a57c1db878 OpenGL: delete shaders and pipelines when they are not used any longer
Previously on OpenGL backend the GL pipelines and shaders are never
deleted. With this patch the GL pipelines and shaders will be able to
be destroyed correctly after they are not needed any longer.

BUG=dawn:529

Change-Id: I4f7f22c7b536825363fe1ecc0f5ffd1bb86fd774
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-29 00:48:22 +00:00
Ben Clayton 126dc7d20f dawn_node: Add binding/GPUBuffer.cpp
Bug: dawn:1123
Change-Id: I4ba8d69bcd91a1fa0ed43a5ca063c7ff14d7d031
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64918
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-28 21:51:28 +00:00
Brandon Jones ea5d768f94 Improve validation errors, Part 2
Updated validation messages in:
 - CommandBufferStateTracker
 - RenderBundleEncoder
 - RenderEncoderBase
 - RenderPassEncoder

Bug: dawn:563
Change-Id: I0e8f133333bf759921e5db1b1908ee2dc882c504
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64982
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 21:35:43 +00:00
Dawn Autoroller 7c73488b37 Roll Tint from 2228ad19af to ac958bd1dd (3 revisions)
https://dawn.googlesource.com/tint.git/+log/2228ad19afa9..ac958bd1dd8b

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 cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: Ia0f0c73338034434eb8732ba0c2371b4aa840ab0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65222
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-28 20:47:31 +00:00
shrekshao e99ad765ae Overridable constants vulkan implementation and tests
Add vulkan backend implementations and tests.
Disabled some tests that fail due to tint missing
features and issues.

Bug: dawn:1041, tint:1155
Change-Id: Iac161317450cff59627e08b1228bffde4cef71da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64981
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-28 20:15:52 +00:00
Ben Clayton 6e57843e67 Fix build on GCC: Add missing include
Change-Id: Id5c8701a673c8fececb83e94dab909272d2f6c00
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65341
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 19:52:35 +00:00
Ben Clayton 5d1613db8e dawn_node: Fix Converter<Napi::TypedArrayOf<T>>::FromJS
The conversion should only pass if the element type matches.

Bug: dawn:1123
Change-Id: I700a445e8d281afdc36d1b6f9be73767ca89d4ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65240
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 18:08:13 +00:00
Alastair Donaldson ac958bd1dd Injected failure in fuzzer target
To test whether black-box fuzzing is working, this change injects an
assertion failure into tint_black_box_fuzzer_target. Once it has been
established that this failure is found by the black box fuzzers, it
should be removed.

Bug: https://crbug.com/1246587
Change-Id: I408bdb116e817879edcec025f644e6f0f6f8bb73
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65340
Auto-Submit: Alastair Donaldson <afdx@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Alastair Donaldson <afdx@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-09-28 17:31:44 +00:00
Ben Clayton 5a18c2aab8 dawn_node: Add binding/GPURenderBundleEncoder.cpp
Bug: dawn:1123
Change-Id: Id2d8e77456869562a680a5bd7eb2056b1e319311
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64912
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-28 17:30:11 +00:00
Ben Clayton c6b786e0fc dawn_node: Add binding/GPUAdapter.cpp
Bug: dawn:1123
Change-Id: I5eee0036acf4db18dd103f863c4f07511a0cee25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64917
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 16:56:31 +00:00
Aleksi Sapon 9a10674bb9 CMake: fix third parties when dawn is a sub-build
Set BUILD_TESTING to OFF, mainly so Abseil doesn't build its tests,
which aren't configured properly for sub-builds.

Use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR, so third
parties are built in the same directory as the rest of dawn.

Change-Id: I51a2c0887bfb42c1c21223c41bfcbd2816e34034
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-28 16:48:01 +00:00
Ben Clayton ffcebe8c2c dawn_node: Add binding/GPUCommandEncoder.cpp
Bug: dawn:1123
Change-Id: Iadc53f1e5629fb58f12c5305cba965b1ef38ffea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64915
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 16:46:12 +00:00
Ben Clayton 334714b312 dawn_node: Add binding/GPUComputePassEncoder.cpp
Bug: dawn:1123
Change-Id: Ied735455b04f52ba214b3ef9ef41edb78d9ed6fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64914
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 16:16:41 +00:00
Ben Clayton c5d9650308 dawn_node: Add binding/GPU.cpp
Bug: dawn:1123
Change-Id: I9d962a149c4bbb0fc8749fdb77c6ad29c59f0111
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64916
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-28 16:14:21 +00:00
Ben Clayton 6104800416 dawn_node: Add binding/GPUQueue.cpp
Bug: dawn:1123
Change-Id: I629008de8b096da537737df18d7173e96d433394
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64913
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 16:07:32 +00:00
Ben Clayton c06b8132ec dawn_node: Add binding/GPURenderPassEncoder.cpp
Bug: dawn:1123
Change-Id: I0f288e1b3c19f0063f346e5801be7e07eaf1818a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64911
Reviewed-by: Corentin Wallez <cwallez@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-28 16:02:46 +00:00
Corentin Wallez 347a597f7d Only call WillBeginRenderPass when encoder is current
Fixes an ASSERT when a render pass is started while another pass is
already current.

Bug: chromium:1253090
Change-Id: I085c1de225f9ba30a7f368fad3b1d8a97ed92c63
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65241
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-09-28 15:55:42 +00:00
Dawn Autoroller e2c74d0b9d Roll Tint from 9c7cd9e9c3 to 2228ad19af (1 revision)
https://dawn.googlesource.com/tint.git/+log/9c7cd9e9c3ee..2228ad19afa9

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 cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I0a5de452569e9c696da2acc49b31d7998896f938
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65221
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-28 15:43:51 +00:00
Corentin Wallez 0f1eb1ea3c Roll third_party/gpuweb-cts/ 177a4faf0..b0291fd96 (252 commits)
177a4faf0a..b0291fd966

$ git log 177a4faf0..b0291fd96 --date=short --no-merges --format='%ad %ae %s'
2021-09-24 hao.x.li Implement api,validation,state,device_mismatched: Part Ⅰ (#741)
2021-09-22 kainino empty commit
2021-09-23 jiawei.shao Use vertex-only pipelines when initializing depth aspects (#754)
2021-09-21 rockot require indirect-first-instance for indirect draws with firstInstance > 0 (#752)
2021-09-20 kainino Add a NumberRepr class that represents f/i/u 64/32/16/8 (#747)
2021-09-17 yunchao.he Fix a bug about max color attachment (#749)
2021-09-14 yunchao.he Test buffer related validations for texture copies (#690)
2021-09-14 jiawei.shao Add operation tests on T2T copy with multisampled color textures (#739)
2021-09-13 enga Test compute shader variables are zero initialized (#743)
2021-09-13 enga Update default limits to match the spec (#745)
2021-09-14 hao.x.li Update destinationOffset alignment to 256 in resolveQuerySet tests (#742)
2021-09-10 enga Add an option to automatically batch large lists of subcases (#733)
2021-09-10 9856269+sarahM0 wgsl abs() built-in function execution test (#730)
2021-09-10 shaobo.yan Remove CopyImageBitmapToTexture (#738)
2021-09-09 9856269+sarahM0 wgsl type parameter generator (#731)
2021-09-10 hello Fix tools/deno (#734)
2021-09-09 kvarkus Include tools in the deploy (#735)
2021-09-09 bajones Update all uses of 'gpupresent' to 'webgpu' (#740)
2021-09-01 9856269+sarahM0 add noop unique id (#729)
2021-08-31 hao.x.li Implement api,validation,state,device_mismatched: helper functions (#717)
2021-08-27 kainino Test postMessage on ArrayBuffer from getMappedRange (#728)
2021-08-27 rockot Introduce expectGPUBufferRepeatsSingleValue (#723)
2021-08-27 rockot some stress tests for shaders and render passes (#722)
2021-08-27 kainino fix async race condition in expectCompileResult (#726)
2021-08-26 sarahmashay remove accidently added file
2021-08-25 84498356+jzm-intel Implement veretx_access validation test: Part 1 (#698)
2021-08-21 sarahmashay wgsl cts for builtin fucntions
2021-08-20 yunchao.he Revise validation tests for depth/stencil formats for copies (#719)
2021-08-19 yunchao.he Validate texture format for copies (#691)
2021-08-19 shrekshao Reftests expand with formats, write canvas methods, and compositingAlphaMode (#696)
2021-08-19 tojiro Remove template that wasn't really helping anyone
2021-08-18 tojiro Addressing more feedback
2021-08-18 tojiro Refactored as suggested by Kai
2021-08-12 tojiro Expanded tests to render passes and render bundles
2021-08-11 tojiro More tests and working on other pipeline types.
2021-08-11 tojiro Added three more tests and fixed issues
2021-07-01 tojiro Implementing preliminary api,operation,command_buffer,programmable,state_tracking:* tests
2021-08-18 shaobo.yan Pipeline_layout_compat: Add buffer and sampler binding equivalent checks (#701)
2021-08-17 kainino Constrain type to guard against future bugs like #716 (#718)
2021-08-17 yunchao.he Fix a bug in api/validation/image_copy/image_copy.ts (#716)
2021-08-17 hao.x.li api,validation,encoding,programmable,pipeline_bind_group_compat plan (#697)
2021-08-17 jiawei.shao Add operation tests on copyTextureToTexture with depth/stencil - Part II (#706)
2021-08-13 tojiro Change depth/stencil sample type to 'depth'
2021-08-14 mehmetoguzderin Fix project name (#714)
2021-08-14 mehmetoguzderin Use split account for previews (#712)
2021-08-13 rockot Implement some initial stress tests (#709)
2021-08-12 bajones Updating deprecated TextureUsage flags (#710)
2021-08-12 shrekshao Remove some alpha blending factor validation (#708)
2021-08-12 kainino re-hide extra stacks from different subcases, fix bug
2021-08-12 kainino Undo hiding of extra lines of message, and don't hide extra logs from different cases
(...)
2021-05-12 tojiro Style fix suggested by Kai
2021-05-12 kainino Use more subcases (#561)
2021-05-12 kainino Document cases/subcases and ParamsBuilder better (#562)
2021-05-12 bajones Review createBindGroupLayout spec (#559)
2021-05-12 shrekshao Add DrawIndirect test (#558)
2021-05-11 kainino Fix sampledTextureBindingTypeInfo (#560)
2021-05-11 shaobo.yan Expand operation tests for copyToTexture,ImageBitmap (#545)
2021-05-06 kainino api,operation,buffers,map: describe, clean notes, add cases (#552)
2021-05-05 bajones Reviewed createBindGroup spec (#554)
2021-05-05 bajones Added some CompilationInfo tests. (#548)
2021-05-04 kainino gen_wpt_cts_html: always split down to individual tests (#544)
2021-05-04 kbrussel Add compute,basic,large_dispatch test. (#555)
2021-05-04 enga Update/cleanup map_oom.spec.ts (#551)
2021-05-04 kainino docs: nits, add pointer to a good reference test (#550)
2021-05-04 rharrison Update variable_and_const.spec.ts shader to match current WGSL spec (#553)
2021-04-29 kainino doc: make heading clearer
2021-04-29 kainino small docs updates
2021-04-29 mehmetoguzderin Reduce expire field to 10 days (#547)
2021-04-28 enga Fix WGSL storage_buffer->storage in by_sampling.ts (#546)
2021-04-28 kainino operation,vertex_state: add todo (#541)
2021-04-26 hao.x.li Add validation tests for occlusion query (#539)
2021-04-16 kainino attachment -> view
2021-04-16 kainino blending renames, remove wrong test plan
2021-04-16 kainino storeOp: required
2021-04-16 kainino computeStage -> compute
2021-04-22 jrprice Use new WGSL entry point IO syntax (#543)
2021-04-21 kainino Replace fence tests with new onSubmittedWorkDone tests (#536)
2021-04-21 corentin Add tests for GCing GPUBuffer before their mappings. (#542)
2021-04-20 kainino Update bindings API usage (#538)
2021-04-19 jrprice Replace builtin(position) with builtin(frag_coord) (#540)
2021-04-16 shrekshao Update WGSL const -> let and remove '-> void' (#537)
2021-04-16 alanbaker Fix some storage buffers (#534)
2021-04-14 kainino add deprecation linter, but disabled for now
2021-04-14 kainino Suppress deprecation warnings
2021-04-14 kainino replace incidental usages of fence with onSubmittedWorkDone
2021-04-14 kainino TODOs for new binding structure
2021-04-14 kainino update DefaultLimits
2021-04-14 kainino rename extension->feature in capability_info
2021-04-14 kainino extensions->features pt 1
2021-04-14 kainino fix easy deprecations
2021-04-14 kainino roll types, fixes for Iterable color/extent/origin (#532)
2021-04-13 kainino roll types (#531)
2021-04-13 kainino Try again to get space at the top of the PR template
2021-04-13 corentin Update README.md (#530)
2021-04-14 hao.x.li Add selectDeviceForQueryTypeOrSkipTestCase to gpu_test.ts (#529)
2021-04-12 yunchao.he Add tests for mipmap with various formats (#528)
2021-04-09 yunchao.he Fix bugs for texture creation validation (#527)
2021-04-08 enga Add tests for GPUBlendComponent (#526)
2021-04-08 kainino Use <hr> because github won't keep the extra blank lines above the ---
2021-04-08 kainino Much more verbose checklists (#525)

Created with:
  roll-dep third_party/gpuweb-cts

Change-Id: I8d82c7299f74140b1ada627c5b1161f8e12c96b1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65280
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-09-28 15:40:54 +00:00
Corentin Wallez f490798fe6 Roll spirv-headers and spirv-tools
Roll third_party/spirv-headers/ 1d4e3a7e3..ae217c178 (13 commits)

1d4e3a7e3a..ae217c1780

$ git log 1d4e3a7e3..ae217c178 --date=short --no-merges --format='%ad %ae %s'
2021-09-16 gleese Remove 'Kernel' capability from fast-math flags
2021-09-09 74654571+BedrockDotPng Update CMakeLists.txt
2021-08-27 greg Add nonsemantic.shader.debuginfo to Bazel
2021-07-28 marijn spirv.core.grammar: Remove duplicate OpArbitraryFloatPowNINTEL declaration
2021-08-10 alele Add support for SPV_NV_ray_tracing_motion_blur.
2021-07-28 nikita.rudenko Fix minor details in SPV_INTEL_optnone extension
2021-07-28 nikita.rudenko Implement SPV_INTEL_optnone extension (#230)
2021-07-20 gleese Correct grammar for LocalSizeHintId
2021-06-28 frustumo Clay is an internal framework of Tellusim Technologies Inc.
2021-05-20 kloczek Rename spirv-headers.pc to SPIRV-Headers.pc
2021-05-19 kloczek removed excesive space in configure_file() line
2021-05-19 kloczek Fixed substituted string with paths and version
2021-05-18 kloczek Add spirv-headers pkgconfig file

Roll third_party/spirv-tools/ 640b17b5f..c3adcb034 (86 commits)

640b17b5fb..c3adcb034f

$ git log 640b17b5f..c3adcb034 --date=short --no-merges --format='%ad %ae %s'
2021-09-24 stevenperron Adce refactor (NFC) (#4547)
2021-09-24 greg Handle NonSemantic.Shader Debug[No]Line (#4530)
2021-09-23 greg Fix inst_buff_addr_check to handle struct loads (#4489)
2021-09-23 jmadill GN: Fix build for debuginfo codegen. (#4536)
2021-09-22 alanbaker Update SPIRV-Headers (#4543)
2021-09-21 alanbaker Fix checks for offset in nested structs (#4531)
2021-09-21 afdx Fix UBSan error in spirv-dis fuzzer (#4517)
2021-09-20 stevenperron Fix extract with out-of-bounds index (#4529)
2021-09-15 greg spirv-opt: Switch from Vulkan.DebugInfo to Shader.DebugInfo (#4493)
2021-09-15 greg Add preserve_interface mode to aggressive_dead_code_elim (#4520)
2021-09-14 afdx spirv-fuzz: Account for differing signedness in WrapVectorSynonym (#4414)
2021-09-14 afdx spirv-opt: Avoid integer overflow during constant folding (#4511)
2021-09-14 stevenperron Roll external/googletest/ b7d472f12..955c7f837 (111 commits) (#4521)
2021-09-13 alanbaker Fix infinite loop in validation (#4523)
2021-09-13 afdx Fix UBSan kokoro config (#4522)
2021-09-13 alanbaker Fix bad order of checks in atomic validation (#4524)
2021-09-13 stevenperron Handle out-of-bounds accesses in VDCE (#4518)
2021-09-12 alanbaker Change validator boolean tests to avoid asserts (#4503)
2021-09-10 alanbaker Fix infinite loop in GetBlockDepth (#4519)
2021-09-10 dneto Fix validation message for cooperative matrix column type (#4502)
2021-09-10 afdx Add UBSan kokoro configuration (#4512)
2021-09-08 alanbaker Add some missing switch validation (#4507)
2021-09-07 afdx spirv-val: Fix ubsan error (#4505)
2021-09-07 gleese Remove environment features that are never used (#4491)
2021-09-03 dneto fix parsing of bad binary exponents in hex floats (#4501)
2021-09-02 afdx Adjust build for fuzzer targets to support OSS-Fuzz (#4498)
2021-09-02 jaebaek Set threshold for reduce-load-size pass (#4499)
2021-08-31 stevenperron Handle exported functions in ADCE (#4495)
2021-08-30 antiagainst Only add `-DSPIRV_CHECK_CONTEXT` for Debug builds (#4496)
2021-08-27 kubak spirv-lint: Add lint based on divergence analysis (#4488)
2021-08-26 gleese Add a feature for allowing LocalSizeId (#4492)
2021-08-25 jaebaek Start SPIRV-Tools v2021.4
2021-08-25 jaebaek Finalize SPIRV-Tools v2021.3
2021-08-24 jaebaek Update CHANGES
2021-08-23 greg spirv-val: Validate vulkan debug info similarly to opencl debug info (#4466)
2021-08-23 52670911+dong-ja Add divergence analysis to linter (#4465)
2021-08-19 46493288+sfricke-samsung spirv-val: Fix WorkgroupSize VUID 04425 (#4482)
2021-08-18 52670911+dong-ja spirv-lint: add basic CLI argument handling (#4478)
2021-08-18 alanbaker Fix matrix stride validation (#4468)
2021-08-18 alanbaker Don't double count variables for location validation (#4474)
2021-08-18 jmadill GN: Suppress unreachable code warnings. (#4476)
2021-08-18 jaebaek Add spirv-opt convert-to-sampled-image pass (#4340)
2021-08-16 alanbaker Disallow loading a runtime-sized array (#4473)
2021-08-16 nicolas.capens Fix early-out for Clamp constant folding (#4461)
2021-08-16 nicolas.capens Don't fold unsigned divides of an constant and a negation (#4457)
2021-08-16 61918637+5265644D61736F6E fix SIGSEGV when reading from a non-existant file (#4453)
2021-08-13 alanbaker Limit location validation (#4467)
2021-08-12 alanbaker Update SPIRV-Headers (#4463)
2021-08-10 greg spirv-opt: Add handling of vulkan debug info to DebugInfoManager (#4423)
2021-08-09 52670911+dong-ja spirv-opt: Add dataflow analysis framework (#4402)
2021-08-09 52670911+dong-ja Remove PCH from source/lint/CMakeLists.txt (#4459)
2021-08-06 52670911+dong-ja Add new target for spirv-lint (#4446)
2021-08-06 alanbaker Add a section releases to the README (#4444)
2021-08-05 alanbaker Fix array layout validation slowdown (#4449)
2021-08-05 mostaphaashraf1996 spirv-fuzz: Support AtomicStore (#4440)
2021-08-05 bclayton fuzzers: Disable suggest-destructor-override warning (#4439)
2021-08-05 afdx Add CMake rules for libFuzzer targets (#4445)
2021-08-03 mostaphaashraf1996 spirv-fuzz: support AtomicLoad (#4330)
2021-08-03 alastair.donaldson Add GraphicsFuzz shaders to fuzzer corpus (#4429)
2021-08-02 bclayton Fuzzer: Default the new constructor parameter (#4438)
2021-07-29 alanbaker Fix validator crash (#4418)
2021-07-29 alastair.donaldson spirv-fuzz: Add minimal SPIR-V example to test shaders (#4415)
2021-07-29 52670911+dong-ja spirv-opt: Rename ControlDependenceAnalysis::DoesBlockExist to HasBlock (#4412)
2021-07-28 greg spirv-opt: Add specific handling of vulkan debug info differences (#4398)
2021-07-28 alastair.donaldson spirv-fuzz: Allow inapplicable transformations to be ignored (#4407)
2021-07-28 alastair.donaldson spirv-fuzz: Quit fuzzer pass when no types are available (#4409)
2021-07-28 52670911+dong-ja spirv-opt: Add more tests to control dependence  (#4410)
2021-07-28 52670911+dong-ja Add control dependence analysis to opt (#4380)
2021-07-27 alastair.donaldson spirv-fuzz: Use reference in CanMakeSynonymOf (#4401)
2021-07-26 kqenro Fix public deps on generated headers (#4386)
2021-07-25 cwallez BUILD.gn: introduce finer grained internal targets for Tint (#4399)
2021-07-23 vasniktel Initialize context in `opt::Instruction`'s move constructor (#4397)
2021-07-22 alastair.donaldson spirv-fuzz: Fix problem with instruction context (#4394)
2021-07-22 alastair.donaldson spirv-fuzz: Avoid out-of-bounds access (#4395)
2021-07-22 alastair.donaldson spirv-fuzz: Fix vector wrapping fuzzer pass (#4392)
2021-07-22 afdx spirv-fuzz: Tighten checks on null and undef pointers (#4367)
2021-07-22 alanbaker Fix local size hint id tests (#4400)
2021-07-21 greg spirv-opt: Where possible make code agnostic of opencl/vulkan debuginfo (#4385)
2021-07-20 jamessliu2020 spirv-fuzz: TransformationWrapVectorSynonym that rewrites scalar operations using vectors (#4376)
2021-07-20 mostaphaashraf1996 spirv-fuzz: Support atomic operations opcode (#4348)
2021-07-16 olvaffe CMake: add ENABLE_RTTI option (#4382)
2021-07-16 greg Add common enum for debug info instructions from either opencl or vulkan (#4377)
2021-07-16 kubak Don't mention VS2013 in PR review instructions (#4384)
2021-07-16 kubak Explain how to run tests with CMake and Bazel (#4383)
2021-07-15 mostaphaashraf1996 spirv-fuzz: Don't replace memory semantics / scope operands (#4349)
2021-07-15 jmadill Add missing fuzzer header dependency. (#4381)

Created with:
  roll-dep third_party/spirv-tools
Created with:
  roll-dep third_party/spirv-headers

Change-Id: I0983f72c8fa3fe7a4c844b43402b3c02fc40ebdf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65264
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-09-28 15:40:27 +00:00
Loko Kung 8d195d511d Refactors dawn_native objects for list tracking and adds destroy skeleton API.
Adds generated headers in dawn_native for object type tracking similar to that used in dawn_wire. Splits ObjectBase into ObjectBase and ApiObjectBase for clearly differentiation, and adds virtual function to identify the type of ApiObjects. Updates error generation to utilize new object typing for generating messages.

Bug: dawn:628, dawn:840, dawn:563
Change-Id: Ia4f831fcbfb29a70ed5a35d47ed622921e744c84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64820
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-28 15:40:01 +00:00
egj 2228ad19af Regex fuzzer: Add return statement inside a randomly-chosen function
Adds a return statement in the body of a randomly-chosen function.
The return value is a randomly-chosen identifier or literal from
the WGSL shader.

Fixes: tint:1115.

Change-Id: Icdc4ff669cda343244e158ce791b4085fd52f7b9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/61781
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Alastair Donaldson <afdx@google.com>
Commit-Queue: Alastair Donaldson <afdx@google.com>
2021-09-28 14:57:54 +00:00
Ben Clayton 7b04930aa0 dawn_node: Add binding/GPUShaderModule.cpp
Bug: dawn:1123
Change-Id: I0b0bd50314c656a527913d5dffa73032e6cdcdf2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64910
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 14:09:40 +00:00
Ben Clayton 05944b0f97 dawn_node: Add binding/GPUTexture.cpp
Bug: dawn:1123
Change-Id: I2858cc2b86aa9189a92a2f4a9f0988a9f7b36953
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64909
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 13:58:00 +00:00
Ben Clayton ca9bc676aa dawn_node: Add binding .cpp files for trivial types
All UNIMPLEMENTED()s are TODO.

Bug: dawn:1123
Change-Id: Ie51b807d8a2a2ba376416d77de383dd627d04a07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64908
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 13:56:01 +00:00
Ben Clayton 118d2dd19e dawn_node: Add binding/Converter.[cpp,h]
The interop -> Dawn conversion utility class.

Bug: dawn:1123
Change-Id: I8a2a352eb730a4a528f6a0262d5b21e08d85b413
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64907
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 13:18:40 +00:00
Ben Clayton 3e5848a4de dawn_node: Add all the headers for the binding classes
Nothing includes these yet.

Bug: dawn:1123
Change-Id: Ia2178d4bc9bf2c8f8f586493568b2864063d3fc7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64906
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 13:09:30 +00:00