Commit Graph

12106 Commits

Author SHA1 Message Date
Antonio Maiorano 9386f73446 tint: Fix compilation error with latest MSVC 17.5.0
Not sure if MSVC is wrong here, but it now fails to compile this file
because it looks for `builtin::AddressSpace::kPrivate` within the inner
`builtin` namespace, rather than in `tint::builtin`.

Change-Id: I10f9e1bd58e6ba548d40823f03802320865f069d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121221
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2023-02-23 18:35:49 +00:00
dan sinclair 869bcabf88 Make attribute grammar generic.
This Cl updates the parser to use a generic attribute grammar.

Bug: tint:1845
Change-Id: Icd600a2d87f03972f60d89b27fe0eef7be7667d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121100
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-02-23 18:34:08 +00:00
Dawn Autoroller 20a82acf6a Roll SwiftShader from 3575b5479af5 to dca80fc3a894 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/3575b5479af5..dca80fc3a894

2023-02-23 bclayton@google.com tests/regres: Bump golang.org/x/text from 0.3.7 to 0.3.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 shrekshao@google.com,webgpu-developers@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: shrekshao@google.com
Change-Id: I8fed2b2ff92d062aef9b7e16912da946e0bd189b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121300
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>
2023-02-23 18:21:46 +00:00
jchen10 39b7330b5b Fix UV coord for TextureLoad
UV plane's coord should be half of that of Y plane for NV12.

Bug: chromium:1415832
Change-Id: Icee851e61eca1f7da291285100f8edcce482b511
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119860
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-02-23 13:03:52 +00:00
Dawn Autoroller d8a13ee60c Roll ANGLE from 177936ace37d to 389b86e7d76c (1 revision)
177936ace3..389b86e7d7

2023-02-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from d9b79c6b8b96 to 6aac6345f869 (614 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 angle-team+autoroll@google.com,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: Ib082e5f0bff2730918a0991641de336dea4479ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121180
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-02-23 11:01:33 +00:00
Dawn Autoroller b7faf4d918 Roll SwiftShader from 64eb04027b9f to 3575b5479af5 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/64eb04027b9f..3575b5479af5

2023-02-23 pkasting@chromium.org Yet more C++20 build fixes.

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 shrekshao@google.com,webgpu-developers@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: shrekshao@google.com
Change-Id: Ic56f101e21507a5d102a048cac703ad1025d7977
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121140
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>
2023-02-23 04:10:01 +00:00
Antonio Maiorano 9776edf161 tint: Improve error message for array element stride in uniform storage
Bug: tint:1806
Change-Id: I673c41ce64c1cd2eb75ac93bf1ff9c51dab1c1d0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121042
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: dan sinclair <dsinclair@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-02-22 23:53:07 +00:00
shrekshao 182a7e89a6 Validate writable storage buffer bindings don't alias
Validate as the bind group lazy aspect at each dispatch/draw
call.

Use nested loops to iterate through each bind group and binding
to find if any aliasing exists, which has time complexity of
O(N^2) and can be further optimized to use O(NlogN) algorithm.

Bug: dawn:1642
Change-Id: I8c43128cdeea75352c194752fb22258b6a73430e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118440
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-22 23:20:50 +00:00
Dawn Autoroller 1dac81a23d Roll ANGLE from 31684d8c336a to 177936ace37d (2 revisions)
31684d8c33..177936ace3

2023-02-22 kkinnunen@apple.com Metal: disable 32-bit float filtering on iOS
2023-02-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 5d2ee2959f28 to d9b79c6b8b96 (576 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 angle-team+autoroll@google.com,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: Ib587cc6f0576be19245ae7be5c682f031147b4d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121080
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>
2023-02-22 21:15:58 +00:00
dan sinclair 187e0d5fe7 Add `requires` directive
This Cl adds the requires directive into Tint. Using the directive is
currently always an error as there is no valid value which can be used.

Bug: tint:1843
Change-Id: Idf77ba4e95ff0c1e177d02d1ba9598edc89a9812
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120740
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-02-22 20:57:28 +00:00
Loko Kung f35f1ff98c Refactors native mock classes to be more like the Null device.
- Plumbs all descriptors through so that the objects act much more like
  a real implementation.
- Lots of changes to DestroyObjectTests.cpp to update usages and test
  through the APIs when applicable.
- Put in defaults for the mock device and make it as easy to use as
  possible.

Change-Id: I85b243a18ec1872aff0172549aec0f599967ea0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119821
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
2023-02-22 20:38:37 +00:00
Ben Clayton 54a104e28f tint: Update constructor / conversion terminology
Rename:
* "type initializer" -> "value constructor"
* "type conversion" -> "value conversion"

Fixed: tint:1848
Change-Id: I3e86a4e944971cea970f0d137641517c36cb807d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121060
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-22 20:04:40 +00:00
Corentin Wallez cce5f48f0e Triage CTS failures
Bug: dawn:1677 dawn:1676 chromium:1410936
Change-Id: I3cc0e84b45dee7c97785c497e36cce8cbc169f74
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120984
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-02-22 20:02:55 +00:00
Antonio Maiorano 4be42e57de tint/run-cts: make dump-shaders also disable symbol renaming
Change-Id: If9e0db103135e3c7c7928a91f6995c56938bec3d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121040
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-22 19:58:53 +00:00
Corentin Wallez b4d2bbb24f Make Texture/QuerySet destroy always valid.
This follows the recent semantic from the WebGPU spec and fixes a couple
failing CTS tests.

Bug: None
Change-Id: I9197ea3fda6c15bd9302f8d60e70ee00f1d37708
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120980
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-22 18:12:57 +00:00
Austin Eng f16b9bbd6e Guard D3D12_FEATURE_D3D12_OPTIONS13 behind SDK version check
Bug: dawn:1216
Change-Id: I29054d51a5c4a24ce85619a22062973572eb1c61
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120983
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-22 17:27:04 +00:00
Ben Clayton afc53fa942 tint/resolver: Bring back enum suggestions
The dependency graph no longer errors if a symbol cannot be resolved, instead the ResolvedIdentifier now has an unresolved variant.
This is required as the second resolve phase only has the full context of the identifier usage, to provide the hints.

Also: Split Slice out of the utils/vector.h, so it can be used as a lightweight view over static data.

Fixed: tint:1842
Change-Id: I31fa7697790be24c35b7e4fab5ca903c8a7afbba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121020
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-02-22 17:15:53 +00:00
Ben Clayton b549b3051e tint: Validate @must_use on functions and builtins
Fixed: tint:1844
Change-Id: I812dd338925c1dccaa3029a46e10a0ea34a8ed54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120960
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-02-22 16:18:22 +00:00
Ben Clayton d84903201d tools: Add @must_use support to intrinsics.def
Emits the new OverloadFlag::kMustUse flag on the annotated overloads.
Nothing consumes this, yet.

Bug: tint:1844
Change-Id: I4eb0943a23eaf5de98cd63444a686cffe62fb36e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120920
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-02-22 13:52:21 +00:00
dan sinclair ce10962d82 Add parsing and emission of the `must_use` attribute.
This CL adds parsing of the `@must_use` attribute into the WGSL parser. The WGSL
generator is also updated to emit the attribute.

Bug: tint:1844
Change-Id: If8821c9ac534b866cbe042128a00a582a245c3de
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120821
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-02-22 13:36:01 +00:00
Dawn Autoroller dd57720d14 Roll ANGLE from c23dbe331608 to 31684d8c336a (11 revisions)
c23dbe3316..31684d8c33

2023-02-22 syoussefi@chromium.org Vulkan: Lazily create swapchain image views
2023-02-22 syoussefi@chromium.org Vulkan: Remove usage of VK_EXT_external_memory_host
2023-02-22 penghuang@chromium.org Fix EGLImage importing problem
2023-02-22 i.nazarov@samsung.com Revert "Fix dEQP-EGL.functional.mutable_render_buffer#basic"
2023-02-21 lexa.knyazev@gmail.com Add EXT_texture_mirror_clamp_to_edge entry points
2023-02-21 syoussefi@chromium.org Vulkan: Prune all statements without side effect
2023-02-21 kkinnunen@apple.com Metal: Fix crashes in EXT_b_f_e using temporaries
2023-02-21 lexa.knyazev@gmail.com Vulkan: Fix border color adjustment for emulated formats
2023-02-21 j.vigil@samsung.com EGL: Enable wayland types with autogen
2023-02-21 syoussefi@chromium.org Translator: Validate correct op usage in nodes
2023-02-21 i.nazarov@samsung.com Vulkan: Fix invalid assert in ContextVk::onSurfaceUnMakeCurrent

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 angle-team+autoroll@google.com,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: I543fbd63addf803647f73ece559eea0426d554e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121000
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>
2023-02-22 07:58:48 +00:00
Ben Clayton 5662f79b24 tint/ast: Remove unnecessary ast:: prefixes
These uses are already in the ast namespace, so do not need the extra qualification.

Change-Id: I5e66048c9485c55b72e61ffa5b85b17ba1c780d0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120761
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-02-22 00:08:55 +00:00
Austin Eng 4a88a3287e D3D12: derive T2T workaround from TextureCopyBetweenDimensionsSupported
Query D3D12_FEATURE_DATA_D3D12_OPTIONS13 to determine whether the device
supports copies between textures of different dimensions. If it does
not, or if D3D12_FEATURE_D3D12_OPTIONS13 is not supported, force enable
toggle
D3D12UseTempBufferInTextureToTextureCopyBetweenDifferentDimensions.

Fixed: dawn:1216
Change-Id: I976e7fad291126f8dcee31ce6b681314d38e69e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120882
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
2023-02-21 23:14:46 +00:00
Shrek Shao 053fca884a Run SubstituteOverride transform before Robustness
Fixed: dawn:1673
Change-Id: I57f3daf16c417713a850894d1c6fcbc31ef03da1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120822
Commit-Queue: Shrek Shao <shrekshao@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-02-21 23:12:33 +00:00
James Price 239b4298b3 tint/HoistToDeclBefore: Use explicit types
Hoisting a constant array with an abstract type may change its
materialized type when using type inference, so use explicit typing
instead.

Fixed: tint:1847
Change-Id: I890826945bac7a2b7d8a0b84967f9d3c9ba439b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120901
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-02-21 23:10:17 +00:00
Ben Clayton 60d3738102 tint: Fix ICE in ast::TemplatedIdentifier ctor
Invalid programs could attempt to construct an ast::TemplatedIdentifier with no template arguments.
In this situation an ast::Identifier should be constructed instead.

Bug: chromium:1417465
Change-Id: Id1516cd83679947b5346c69ce5453d72f4f93b49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120841
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-21 22:01:48 +00:00
dan sinclair 2f689a7efe Remove deprecated inspector fields.
This CL removes two deprecated fields from the inspector. The deprecated
alias to sem::SamplerTexturePair remains as it will require creating a
structure on the inspector side to replicate.

Change-Id: I6001fbd475260079dd49d50f8e8619241bb0b468
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120880
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-02-21 21:54:48 +00:00
Ben Clayton fdef033210 tint/resolver: Fix ICE in ResolvedIdentifier::String()
That resolve to parameters.

Bug: chromium:1417513
Change-Id: Id7722524acbd9a9a26543cb73f48c8823dd51356
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120840
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-02-21 21:07:35 +00:00
Ben Clayton f0b4dbb82d tint: Resolve @interpolate() args as expressions
This CL makes the builtin argument resolve as a shadowable enumerator
expression.

Bug: tint:1841
Bug: tint:1845
Change-Id: I5000ea91771fabb460c80c164bc7708fbbb0288c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120722
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-21 21:05:28 +00:00
Ben Clayton 650426b187 Run ./tools/format
Change-Id: Icf1925cd3c862c4e29ba41f7d8470991ba4017f3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120721
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-21 21:05:28 +00:00
dan sinclair a79c6603b2 Add `@must_use` AST node.
This CL adds the `@must_use` ast node and hooks it into the
program_builder.

Bug: tint:1844
Change-Id: I2ffe99bbf29ec287446788253aa8cf63cc4da50b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120820
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-02-21 18:49:40 +00:00
dan sinclair b92ff39724 Remove `static_assert` deprecation.
The `static_assert` builtin has been replaced with `const_assert`. This
CL removes the deprecation.

Bug: tint:1807
Change-Id: Ibcdc75e167bf6c1a6f74c295d9dcac7fff884d3a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120580
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-02-21 18:44:16 +00:00
Dawn Autoroller 0aa2cef37e Roll ANGLE from f76ecaeed1d0 to c23dbe331608 (1 revision)
f76ecaeed1..c23dbe3316

2023-02-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 36ad54ddae32 to 5d2ee2959f28 (282 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 angle-team+autoroll@google.com,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: I503b3bf1e5eae53a285c1533f4195c2dfda191e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120781
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>
2023-02-21 18:28:14 +00:00
Ben Clayton 4d3ff9711e tint: Resolve @builtin() args as expressions
This CL makes the builtin argument resolve as a shadowable enumerator
expression.

Bug: tint:1841
Bug: tint:1845
Change-Id: I2aaa2c63025752f25c113cf2fb38f4d91c2c16c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120680
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-02-21 17:33:54 +00:00
dan sinclair 21571709a2 Remove the `type` keyword.
`type` has been deprecated in favour of `alias`. This CL removes the
deprecation warning and moves `type` to a reserved word.

Bug: tint:1812
Change-Id: I05246b9887a0890ae8343a0a132bd6f93353d5ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120540
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-02-21 16:55:07 +00:00
Ben Clayton db9d4453f8 Roll third_party/webgpu-cts/ 87f8f3d61..13410d18b (2 commits)
Regenerated:
 - expectations.txt
 - ts_sources.txt
 - test_list.txt
 - cache_list.txt
 - resource_files.txt
 - webtest .html files


87f8f3d615..13410d18b4
 - 13410d Move `static_assert` and `type` to reserved words.
 - 2184a5 Update tests to use `alias`.

Created with './tools/run cts roll'

Change-Id: Ic00993d9fb940602af9f644faf785d3cb98e1bc1
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/+/120760
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2023-02-21 15:21:50 +00:00
Ben Clayton 2d6f90771b tint/reader/spirv: Remove stdout spam
Change-Id: I8e38535d32f3e82800740894d5d47256fa926b23
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120720
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-02-21 01:59:33 +00:00
Ben Clayton e58f89bf54 Roll third_party/webgpu-cts/ 631d877e7..87f8f3d61 (2 commits)
Regenerated:
 - expectations.txt
 - ts_sources.txt
 - test_list.txt
 - cache_list.txt
 - resource_files.txt
 - webtest .html files

631d877e75..87f8f3d615
 - 87f8f3 Add f32 matrix-scalar multiplication tests (#2286)
 - c87f10 webgpu/shader/validation: Remove types as keywords

Created with './tools/run cts roll'

Change-Id: I2638bd4fdadefb0c0dd52cc48c45d771870e79c5
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/+/120480
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-02-20 10:12:46 +00:00
dan sinclair accc687b32 Add tint layering doc.
A simple MD file to show the source set hierarchy which constrains where
includes can go in Tint.

Change-Id: Ia360430793faef01503260f29f88ef361bb91611
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120443
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-02-20 09:56:29 +00:00
Dawn Autoroller adcc598cc7 Roll ANGLE from 05e62f39412e to f76ecaeed1d0 (1 revision)
05e62f3941..f76ecaeed1

2023-02-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 3919c700dd2c to 36ad54ddae32 (501 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 angle-team+autoroll@google.com,bajones@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: bajones@google.com
Change-Id: I407ec70c5ab0bb740d35cceb7f32f61633cb6215
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120640
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-02-20 09:54:32 +00:00
dan sinclair 993a658af2 Move InterpolationSampling and InterpolationType to builtin.
This CL moves the ast::InterpolateSampling and ast::InterpolationType to
builtin::

Change-Id: Iad9365ff629cbb7b3b03de6a4cd9355a21ce287e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120442
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-02-20 08:37:45 +00:00
Jiawei Shao e4f947637a D3D12: Replace dst-alpha with one for formats without alpha
This patch replaces D3D12_BLEND_DEST_ALPHA with D3D12_BLEND_ONE
when the color target formats have no alpha-channel.

Using D3D12_BLEND_ONE is an optimization over
D3D12_BLEND_DEST_ALPHA as it means the GPU hardware doesn't
need to get destination pixel at all. As D3D SPED requires the
default value for missing components in an element format is
"0" for any component except A, which gets "1", using
D3D12_BLEND_DEST_ALPHA takes same effect with
D3D12_BLEND_ONE when the color target formats have no alpha
channel.

In addition, replacing D3D12_BLEND_DEST_ALPHA with
D3D12_BLEND_ONE also serves as a workaround against an Intel
driver issue about alpha blending.

Bug: dawn:1579
Change-Id: If79e4c8007b68dd35e142ba9cf8a4921e611890a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120120
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-02-20 03:10:32 +00:00
dan sinclair b5af23d588 Move diagnostic severity and rule to builtin.
This CL moves DiagnosticSeverity and DiagnosticRule into the builtin::
hierarchy.

Change-Id: I3884046f042d130fa44556f63163f0040381e69c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120440
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-19 17:34:44 +00:00
dan sinclair ef30aa400c Move type/builtin to builtin.
This CL moves type::Builtin to builtin::Builtin.

Change-Id: I8b058dfcac38f782e07393b69e38534175f67524
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120403
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-19 04:28:04 +00:00
dan sinclair ba082fdb48 Move TexelFormat to builtin
This CL moves ast::TexelFormat to builtin::TexelFormat.

Change-Id: Ifb39cc58babdd7e7aa89c19af5336a9498b082ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120402
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-19 04:14:19 +00:00
dan sinclair 2a65163c6d Move type::AddressSpace to builtin/
This CL moves the AddressSpace enum from type:: to builtin::

Change-Id: Ie8d533be4dd42b34eef164b64e2c9e0843de5c3d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120401
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-02-19 04:03:55 +00:00
dan sinclair b6cc4cbf89 Move type/access to builtin.
This CL moves the type::Access builtin to the builtin:: tree.

Change-Id: I3276d364f7b597671612a23c8823f0afd1914d81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120363
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-02-19 04:01:29 +00:00
Ben Clayton 79781f26d1 tint: Unkeyword 'var' template args
Change the address space and access mode in ast::Var from enums
to Expressions. Have the resolver resolve these, like we do for
other template arguments.

As the AST nodes now have identifier expressions, the tint-internal
'in' and 'out' address spaces have been prefixed with underscores to
prevent input code from using this.

Change-Id: Ie8abf371ee6a7031613709b83b575d2723418fcf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120405
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-02-18 17:13:18 +00:00
Dawn Autoroller 28ec26b678 Roll ANGLE from e1dfc00aa66b to 05e62f39412e (1 revision)
e1dfc00aa6..05e62f3941

2023-02-17 syoussefi@chromium.org Vulkan: Don't close render pass if rebind to same fbo

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 angle-team+autoroll@google.com,bajones@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: bajones@google.com
Change-Id: Ia076630d5cb714e4f4922ca103e760e8063c17cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120500
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-02-18 13:14:02 +00:00
Ben Clayton 1b90f93742 tint: Remove type::AddressSpace::kNone
Just use kUndefined.

Change-Id: I26eada75a31b26f83e132a9a15c8ff64f7821676
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120404
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-02-18 12:37:34 +00:00