Commit Graph

11731 Commits

Author SHA1 Message Date
dan sinclair eebbdef81a Split `BindingPoint` out of MultiplanarExternalTexture.
This CL moves the `using` statement for `BindingPoint` out to its own
file in `src/tint/writer/binding_point.h`. Usages of
`tint::transform::BindingPoint` have been updated to
`tint::writer::BindingPoint`.

Bug: tint:1855
Change-Id: Ife7d92807e0a65b93f21158d73a60d5068fc5da9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/123000
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-03-08 02:48:42 +00:00
Ben Clayton 068eb3ebda tint: Fix HLSL texture queries and re-add textureNumLayers()
... overloads for texture cube arrays

FXC is telling porkies, when it says "The array element count
of GetDimensions on TextureCubeArray objects is unavailable
on ps_5_1".

The actual issue, as identified by Teodor Tanasoaia at Mozilla,
is that the argument needs to be unsigned.

In fact, *all* the texture queries should have used an unsigned
scalar or vector for the output value. This has been broken
forever!

This reverts commit bd9f6e6684.

Change-Id: I3e217bec17c6fd203cff618b143ebef3d8a61927
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122980
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-03-08 02:48:34 +00:00
Loko Kung 4f98dd4706 Add maxFragmentCombinedOutputResources and validation for it.
- Suppresses maxStorageTexturesPerShaderStage CTS test because it needs
  to be modified to adhere to the new limit as well.

Bug: dawn:1665
Change-Id: I66c62bd94b613059633888210ec7e7b42dc3a1dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122461
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-08 02:45:50 +00:00
Dawn Autoroller 4268044143 Roll ANGLE from a8ba5112b817 to 56259f301082 (10 revisions)
a8ba5112b8..56259f3010

2023-03-07 angle-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from 5d7ca659e804 to eca4b370b5aa (34 revisions)
2023-03-07 i.nazarov@samsung.com Vulkan: Remove "rx::vk::ImageHelper" move constructor.
2023-03-07 lexa.knyazev@gmail.com Fix stencil format exposure
2023-03-07 i.nazarov@samsung.com Vulkan: Move PersistentCommandPool out of the CommandsState.
2023-03-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 49ce61395065 to 4ac540bc62cf (1 revision)
2023-03-07 lexa.knyazev@gmail.com GL: Complete EXT_blend_func_extended
2023-03-07 i.nazarov@samsung.com Vulkan: Add and use ScopedQueueSerialIndex helper class.
2023-03-07 lexa.knyazev@gmail.com Metal: Implement ANGLE_stencil_texturing
2023-03-07 romanl@google.com Revert "Add vulkan format image fallback for R16G16B16"
2023-03-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 868e24501649 to 2821f7bf7cf2 (569 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,senorblanco@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: senorblanco@google.com
Change-Id: Ib9d17e38a1645e8fda6a6467ecf9140abf5928ba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122921
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-03-07 22:28:56 +00:00
Dawn Autoroller ac984e9a9f Roll SwiftShader from 0ba0b45490cd to 3764eb85917a (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/0ba0b45490cd..3764eb85917a

2023-03-07 ossu@google.com Fix vkWaitSemaphores when VK_SEMAPHORE_WAIT_ANY_BIT

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 senorblanco@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: senorblanco@google.com
Change-Id: I3b05b96eaaed2c433d049afe560c1655c125652c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122920
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-03-07 19:33:21 +00:00
dan sinclair 0917fbb147 Reland "Add writer to emit the AST."
This reverts commit 5e56551551.

Change-Id: I2c3da583090ebef87cc71a743746d741345847c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122782
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-03-07 18:28:38 +00:00
dan sinclair 2fe7f19026 Use `absl::from_chars` instead of `strtod`
This CL switches Tint to use `absl::from_chars` instead of `strtod` in
order to have locale independent parsing of floats.

Bug: tint:1686
Change-Id: Icb3d9a40928a1cb154b32629f7e39173d80e4563
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122780
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-03-07 18:20:23 +00:00
dan sinclair 64196ad60a Add array length options header to `tint.h`.
The `array_length_from_uniform_options.h` is being included directly by
Dawn. This CL moves the include to the `tint.h` file and has the dawn
usage include that instead.

Change-Id: Iaa77d76bc62fe5038f5b6b93d51478ceed85ac9e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122781
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-03-07 16:51:01 +00:00
Austin Eng 142bddf7da Fix #ifdefs for spvtools
Change-Id: I76d8d983e44e04be4abfbb25678cab8d926fbd6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122840
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-03-07 09:27:45 +00:00
Dawn Autoroller 67e7c9fec0 Roll ANGLE from 71f6d54c8d36 to a8ba5112b817 (15 revisions)
71f6d54c8d..a8ba5112b8

2023-03-07 gert.wollny@collabora.com Capture/Replay: Deal with swap called in different contexts
2023-03-07 gert.wollny@collabora.com Capture/Replay: Add fixture SetCurrentContextID
2023-03-07 gert.wollny@collabora.com Capture/Replay: Drop context ID from file and frame func names
2023-03-07 syoussefi@chromium.org Vulkan: Fix reserved UBOs for default uniforms
2023-03-07 syoussefi@chromium.org Vulkan: Remove reserved UBO for driver uniforms from limits
2023-03-06 cclao@google.com Vulkan: Minor clean up in CommandProcessor.cpp
2023-03-06 romanl@google.com SYNC-HAZARD-READ-AFTER-WRITE: VkNonDispatchableHandle on x86
2023-03-06 cclao@google.com Vulkan: SurfaceVk should only wait for GPU work that uses it
2023-03-06 romanl@google.com Make SYNC-HAZARD-READ-AFTER-WRITE case less specific.
2023-03-06 romanl@google.com Reland "MSRTSS uses AppendToPNextChain due to non-NULL pNext."
2023-03-06 i.nazarov@samsung.com Vulkan: Fix move constructor/assignment of Resource classes.
2023-03-06 cclao@google.com Vulkan: Change ResourceAccess::Write to ResourceAccess::ReadWrite
2023-03-06 i.nazarov@samsung.com Vulkan: Add useResetCommandBufferBitForSecondaryPools feature.
2023-03-06 i.nazarov@samsung.com Vulkan: Use *_POOL_CREATE_TRANSIENT_BIT in OneOffCommandPool
2023-03-06 romanl@google.com Suppress another SYNC-HAZARD-READ-AFTER-WRITE case.

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,senorblanco@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: senorblanco@google.com
Change-Id: I8b2b920242b5f48690008eac5d22fa829fd15a1b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122860
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-03-07 09:10:19 +00:00
Takahiro aab78efc56 Add suppressions to webpu-cts/expectations.txt
Temporary suppressions for some depth-stencil CTS tests that the
dawn implementations goes ahead of. The supporessions should be
removed when the CTS will be updated and rolled.

These suppressions are needed for
https://chromium-review.googlesource.com/c/chromium/src/+/4270352

Change-Id: If3ee5ee9adc112c9dc5815dacc0adf967a9f5451
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122561
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
2023-03-07 06:01:30 +00:00
Austin Eng f244bffdd5 Fix build of tint_cmd_helper
spvtools_headers are not available without tint_build_spv_writer

Change-Id: If4539715b0e685c9b54bf24719a905fb0265a402
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122820
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-03-07 02:41:45 +00:00
Zhaoming Jiang c2657b21d5 Dawn: Promote DisallowUnsafeAPIs as instance toggle
This CL add Instance and Adapter toggle stage, and promote
DisallowUnsafeAPIs as an instance toggle, and can be required using
DawnTogglesDescriptor chained in instance descriptor when creating
instance. The instance's toggles state will get inherited to adapters
and devices it create. Related tests are implemented and updated.

Toggles inheritance can be overriden if not forced, so requiring
DisallowUnsafeAPIs when creating device is still available and working
like before.

Note that currently we don't have toggle of adapter stage, and can not
require toggles when creating adapter, until follow up CLs implement it.
Currently the toggles state of a adapter is simply inherited from
instance.

Bug: dawn:1495
Change-Id: I6bf7aa0f950a99451afcc2cab5322c924b7d9520
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122021
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2023-03-07 02:03:54 +00:00
Jiawei Shao e5ca66806f Vulkan: Use VK_QUEUE_FAMILY_IGNORED on buffer barriers
This patch uses VK_QUEUE_FAMILY_IGNORED on buffer barriers to align
with what we are doing on image barriers.

Bug: dawn:1688
Change-Id: Icabae22270fc9c92a69ce18e0a63db49de9d7481
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122444
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-07 00:43:08 +00:00
Austin Eng aaae3ffada Vulkan: make mappableBuffersForEagerTransition ref buffers
There are some scenarios where buffers can be used in pending
commands that are not retained by a command buffer.

They must be retained in the set of mappable buffers for eager
transition to prevent a use-after-free violation.

Fixed: chromium:1421170
Change-Id: I452d80b2513a7726a003d44e2a7850292d798bb1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122580
Auto-Submit: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
2023-03-06 22:09:26 +00:00
Ben Clayton 8525ff29da tint/transform/robustness: Implement predicated mode
This change overhauls the Robustness transform to support three modes,
per address space:
* ignore    - Disable robustness checks for the address space
* clamp     - Clamp indices / texture args to ensure they're in
              bounds. This was the old behavior, and continues to
              be the default.
* predicate - Condition all indexing / textureLoad / textureStore /
              atomic* operations on the bounds check. If any
              dependent value is out of bounds, then the operation
              is skipped.

This change also fixes multiple expression evaluation of the texture
builtin 'level' argument.

Change-Id: I2e300ddff2c8d3183a9701f06985ce1b262baf2c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122343
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-03-06 21:05:01 +00:00
Dan Sinclair 5e56551551 Revert "Add writer to emit the AST."
This reverts commit a753ad47a4.

Reason for revert: This seems to be breaking `gn check` when the option is not enabled. Not sure why the preprocessor guard isn't working. Will fix and reland later.

Original change's description:
> Add writer to emit the AST.
>
> This CL adds a new `SyntaxTree` writer and a `dump-syntax-tree` option
> to the `tint` program which emits a copy of the AST to the terminal.
>
> Change-Id: I83f6cd7aad3413b0a823728e8aac0d551421b33a
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122540
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>

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

Change-Id: Icaac76f8daba6034658cf05e15f15676ce2bf155
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122760
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-03-06 20:30:23 +00:00
dan sinclair 5ab2928f6a Convert `strtoll` to use `std::from_chars`.
This CL updates the lexer to use `std::from_chars` which is locale
independent over `strtoll` which honours locale.

Bug: tint:1686
Change-Id: Ic773038fffaa9e2042dec9d94e310c73d05180b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122603
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-03-06 20:21:52 +00:00
Dawn Autoroller 07286c1dee Roll ANGLE from 3aa64876bb22 to 71f6d54c8d36 (6 revisions)
3aa64876bb..71f6d54c8d

2023-03-06 hitawala@chromium.org Add vulkan format image fallback for R16G16B16
2023-03-06 i.nazarov@samsung.com Vulkan: Fix freeing Command Buffers with wrong Pool.
2023-03-06 cnorthrop@google.com Tests: Add Harry Potter: Hogwarts Mystery trace
2023-03-06 i.nazarov@samsung.com Vulkan: Condition in "collectGarbage()" replaced with "ASSERT".
2023-03-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 04e5d38379bd to 49ce61395065 (7 revisions)
2023-03-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 1ad22b27f996 to 868e24501649 (579 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,senorblanco@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: senorblanco@google.com
Change-Id: If3b6ea3f69d49d97fede4b99361ec8ab1a47d72e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122700
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-03-06 19:51:37 +00:00
Le Hoang Quyen 8ab7dbe424 DawnNative: Defer callbacks' triggerings to APITick().
Currently in the middle of some functions, we execute callbacks
immediately such as inside Buffer::APIMapAsync(), Device::HandleError()
or Queue::Submit().

Firstly, this has risks. The functions might be in a middle of modifying
internal states. By triggering callbacks, users might call API
functions again which could further modify the internal states
unexpectedly or access the states in an inconsistent way.

Secondly, upcoming thread safe API which locks the public functions with
a mutex might encounter deadlock. Because callbacks might cause
re-entrances which would unexpectedly lock the public function again.

This CL attempts to limit number of functions that are allowed to
trigger callbacks. Other functions that want to trigger callbacks will
instead enqueue a request to execute callbacks in the next
Device::APITick() call.

Currently the functions that will be allowed to trigger callbacks are:
- Device::WillDropLastExternalRef()
- Device::APITick()
- Device::APISetLoggingCallback()
- Device::APISetUncapturedErrorCallback()
- Device::APISetDeviceLostCallback()

Bug: dawn:1672
Change-Id: Iabca00f1b6f8f69eb5e966ffaa43dda5ae20fa8b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120940
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-06 19:03:26 +00:00
Ben Clayton 77a90cb796 test/tint/builtins/gen: Use returned value
It appears that FXC and DXC do some validation post dead-code-elimination.
These tests have been updated so that the return value is assigned to a storage buffer, ensuring that all validation is performed.

Many DXC tests are affected by https://github.com/microsoft/DirectXShaderCompiler/issues/5082, which have been SKIP'ed.

Fixed: tint:1859
Change-Id: I0001a9a9821846cd0855c3d8ce2bec79ab8e64ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122662
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2023-03-06 18:25:08 +00:00
dan sinclair a753ad47a4 Add writer to emit the AST.
This CL adds a new `SyntaxTree` writer and a `dump-syntax-tree` option
to the `tint` program which emits a copy of the AST to the terminal.

Change-Id: I83f6cd7aad3413b0a823728e8aac0d551421b33a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122540
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-06 17:48:33 +00:00
Ben Clayton 63d0fabeb1 tint: Fix HLSL emission for out-of-order storage / uniform buffers
Recent changes to DecomposeMemoryAccess meant we lost the dependency information between the user of a module-scope variable of the storage / uniform address space and the variable.

Add dependency information to ast::InternalAttribute so this can be tracked.
This change also means that symbol renaming after the DecomposeMemoryAccess should work.

Fixed: tint:1860
Change-Id: Icfa2925f95c2ac50702522df514cd11bde727546
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122660
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-06 15:43:16 +00:00
Ben Clayton fd387a37c3 tint: Fix WGSL emission of const_assert
Fixed: tint:1858
Change-Id: I5cd2fc4d7dc0a9a0bd48330366a99dd726e42659
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122661
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-03-06 14:03:08 +00:00
Dawn Autoroller e61ed4520f Roll ANGLE from 51ddcabfd3ab to 3aa64876bb22 (1 revision)
51ddcabfd3..3aa64876bb

2023-03-06 abdolrashidi@google.com Revert "Vulkan: Attempt to fix the tsan complain regarding volk."

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,dsinclair@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: dsinclair@google.com
Change-Id: I98d6316d1fa407cb5b4621232a2533812d05a270
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122640
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-03-06 06:29:24 +00:00
Dawn Autoroller 6e75461ea9 Roll ANGLE from 84644dd34663 to 51ddcabfd3ab (2 revisions)
84644dd346..51ddcabfd3

2023-03-04 chris@rive.app Enable pixel local storage by default
2023-03-03 romanl@google.com Call XFlush after XDestroyWindow.

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,dsinclair@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: dsinclair@google.com
Change-Id: Ie8a6c15339c4e8cd6c02235f0dffba0391868fa4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122620
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-03-04 12:43:33 +00:00
Ben Clayton bd9f6e6684 tint: Remove textureNumLayers() overloads for texture cube arrays
These are not supported in HLSL shader model 5.1

See: https://github.com/gpuweb/gpuweb/issues/3913
Change-Id: Ic33666ff910f04e3f561cbc40c9db14c5de59284
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122524
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-03-04 00:55:16 +00:00
Ben Clayton 431ec3db38 .vscode: Simplify build setup task
Also now works on windows (assuming bash is the main terminal) - still better than a TODO

Change-Id: I817143bb1c0dc95346dcf2c23f115c35a55349e5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122522
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-03-04 00:49:51 +00:00
Ben Clayton 3a431d71be tint/intrinsics.def: Fix textureStore overload
The texture_storage_3d overload should allow for unsigned coordinates.

Change-Id: I6278571fb9dc7bba644a4ba88cce6b8bd7c790bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122521
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-03-04 00:43:21 +00:00
Ben Clayton 472815d3c1 tint: Fix build on windows + cmake
Change-Id: Id24e6c27a00700123e1677585ff7759c0bbcfe07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122523
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-03-04 00:15:24 +00:00
Dawn Autoroller db19adeb51 Roll ANGLE from 3fed0866a88c to 84644dd34663 (6 revisions)
3fed0866a8..84644dd346

2023-03-03 romanl@google.com Improve logging to make batch failures more clear.
2023-03-03 penghuang@chromium.org Temporarily disable multisampled render to texture on Android
2023-03-03 cclao@google.com Vulkan: Always checkCompletedCommands from finishResourceUse
2023-03-03 i.nazarov@samsung.com Vulkan: Add missing mutex lock into resetCommandBuffer().
2023-03-03 romanl@google.com Revert "MSRTSS uses AppendToPNextChain due to non-NULL pNext."
2023-03-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 051119636a02 to 1ad22b27f996 (594 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,dsinclair@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: dsinclair@google.com
Change-Id: I372362fc1ade1345d7efbfa5f3e94ebc3cebdd67
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122560
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>
2023-03-03 22:26:00 +00:00
Ben Clayton 67e1de42c2 tint/transform: Reduce verbosity of TINT_PRINT_PROGRAM_FOR_EACH_TRANSFORM
Print the input program, and the output of each run transform.

Significantly reduces stdout spam, and also shows you transform input - which is what you really want.

Issue: tint:1853
Change-Id: Iaea0dc16de63daffcf0b0c715af14d194b700468
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122480
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-03 18:38:38 +00:00
Marshall Greenblatt 1fb13a7fd4 win: assert non-empty $windows_sdk_version
BUG=chromium:1420723
Change-Id: I90c248bb7ad89b6def9782af41e5ec04a99adea7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122440
Commit-Queue: Marshall Greenblatt <marshall@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-03 15:21:47 +00:00
Ben Clayton a5193704f6 dawn/native: Initialize tint
Bug: tint:1853
Change-Id: Id6242163f0670a62ed94ac01dcd575b403145b4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122383
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-03 14:23:39 +00:00
Ben Clayton f7910f5b95 tint.h: Remove 'libspirv.hpp' include
This does not belong in the public header - the spirv writer public header does not depend on it.

Change-Id: Id1b2107c3a2003632e1868c2d6a337ddbb0c8b48
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122382
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2023-03-03 14:20:53 +00:00
Dan Sinclair dd2f36205d Roll third_party/webgpu-cts/ 6e39b5d2f..0557875f3 (15 commits)
Regenerated:
 - expectations.txt
 - ts_sources.txt
 - test_list.txt
 - cache_list.txt
 - resource_files.txt
 - webtest .html files


6e39b5d2f2..0557875f39
 - 055787 Update external_texture,expire test case (#2283)
 - dcfa5b Removes OOM errors in error scope tests since we can't cause OOM. (#2331)
 - 534e6b Rename to GPUShaderModule.getCompilationInfo() (#2291)
 - 9d8e1a Depend on github.com/gpuweb/types instead of npm @webgpu/types (#2332)
 - 4505a1 Updates BGL sampleType when using multisampling for validation errors. (#2329)
 - 716bd3 Prompt for reload only if this is the full CTS (#2318)
 - 267cb4 Test minStorageBufferOffsetAlignment and minUniformBufferOffsetAlignment
 - 6b70b1 Refactor limit_utils.ts so we can test more limits
 - 1713e6 OperationError -> GPUPipelineError
 - bf1b1e Fix WGSL warning for maxStorageTexturesPerShaderStage.spec.ts
 - 07c420 Validate maxColorAttachments and maxColorAttachmentsBytesPerSample
 - 5bd2ce Refactor limit_utils.ts so we can test more limits
 - 6b9071 Test maxInterStageShaderComponents and maxInterStageShaderVariables
 - 539f8f Test maxDynamic(Uniform|Storage)BuffersPerPipelineLayout
 - 762133 Convert more OperationError to GPUPipelineError. (#2314)

Created with './tools/run cts roll'

Change-Id: Ic8c9d2ad9391bbb2fa0bed667f2e4167bf45c86b
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/+/122420
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2023-03-03 11:39:10 +00:00
Ben Clayton b902e56ae7 dawn/test: Display an error message if toggles aren't recognised
Instead of cryptically crashing in release builds.

Change-Id: I22d222c6d6550010c3484e1f18397cef22602b92
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122384
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-03 11:21:52 +00:00
Dawn Autoroller ea1fc1daeb Roll ANGLE from 62e5870452e1 to 3fed0866a88c (3 revisions)
62e5870452..3fed0866a8

2023-03-03 lexa.knyazev@gmail.com Implement EXT_texture_mirror_clamp_to_edge
2023-03-02 cclao@google.com Vulkan: Remove iterator from FixedQueue class
2023-03-02 cclao@google.com Vulkan: Do immediate cleanup after finishOneCommandBatch

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,dsinclair@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: dsinclair@google.com
Change-Id: Iee8d77ba92d11571f6198cf33a5126ad1a1772af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122441
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-03-03 08:20:24 +00:00
shrekshao ffe4c6fbaa Add label info for storage binding aliasing error msg
Bug: dawn:1642, dawn:840
Change-Id: Ice1661539b40d605a93e805acf7609fd3315606d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122460
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2023-03-03 01:19:26 +00:00
Loko Kung 861dfd89e8 Removes duplicated maxBufferSize in limit macros.
- Note the duplication (in LIMITS_MAX_BUFFER_SIZE and LIMITS_OTHER)
  caused tiering to be overridden.
- Also updated binding size test to align buffer sizes properly since
  the test was failing locally for me.

Fixes: dawn:1683
Change-Id: I8d05f863ea9bf4dc8e620b7803bedb913af9f67b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122260
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-03-02 21:51:03 +00:00
dan sinclair 6cc183c85a Generic template and forward in stringstream.
This CL updates the templates in the StringStream to match more types.
All of the internal `operator<<` methods have been converted over to
StringStream. The precision was increased in order to better match the
precision needed to read back as a double.

Bug: tint:1686
Change-Id: Iaa15cf247f174967dd1014647ba5a74804997c22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122080
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-03-02 21:28:45 +00:00
Ben Clayton 03de0e83ae Move tint::transform::Robustness to a santizier transform
There's no good reason for this to be public.
Move it into the writers, and expose a 'disable_robustness' option to
turn it off. This can be expanded to hold more fine-grain control in the
future.

Change-Id: I6ea6e54a27b2ae0fbcba5fdf45539063045cc15a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122203
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-03-02 20:48:48 +00:00
Dawn Autoroller 902c9e5726 Roll ANGLE from 8019f2939c9a to 62e5870452e1 (2 revisions)
8019f2939c..62e5870452

2023-03-02 cclao@google.com Vulkan: Attempt to fix the tsan complain regarding volk.
2023-03-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 03859909b0fa to 051119636a02 (640 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,dsinclair@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: dsinclair@google.com
Change-Id: If2f55e1d010564142ade87a43a35bc2e388a60a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122400
Reviewed-by: dan sinclair <dsinclair@google.com>
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>
2023-03-02 19:08:21 +00:00
Ben Clayton d7ee9c1510 tint/sem: Add Declaration() override for IndexAccessorExpression
Convenience overload to return ast::IndexAccessorExpression instead of ast::Expression

Change-Id: Ib239fd6d5742425a629fc76e1b564a3c7781ca2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122342
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Ben Clayton <bclayton@chromium.org>
2023-03-02 18:29:38 +00:00
Ben Clayton 1edc272904 tint/transform: Implement CreateASTTypeFor() for pointers
Change-Id: I83b0bb28194be559e6e60caca6f2dc1871e65743
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122340
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@chromium.org>
2023-03-02 17:47:24 +00:00
Ben Clayton 57be2ff2eb tint: Change CloneContext::Replace() to replace the map entry
instead of silently being a no-op on second call.

This allows for repeated updates of a node's mapping, which is useful
for immediate-mode style cloning.

Change-Id: I6bd2851cbe67d3886d37cefc3ef9de488d4b0878
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122300
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-03-02 17:45:21 +00:00
Ben Clayton 26157557e8 tint/transform/utils: Add HoistToDeclBefore::Replace()
Handles statement replacement of for-loop initializer and continuing
statements.

Change-Id: I83ddf6fbd9b19f5022f7b02d7aebcbd95ab4c1f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122302
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-03-02 17:37:53 +00:00
Ben Clayton c0c8abc569 tint/resolver: Add missing ResolvedIdentifier case for 'let'
Prevents an ICE.
I had this trigger, but I'm now struggling to find a reproduction.

Only used to print a diagnostic when things go wrong.

Change-Id: Iab78c3bcaaf1afb2f556247f8a419f93a727ec96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122341
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-03-02 17:36:37 +00:00
Ben Clayton 3cde73cb1a tint/transform/utils: Correctly scope for-loop init
When using HoistToDeclBefore on a for-loop initializer, the inserted
statement would be scoped outside the for-loop. This was incorrect.

Change-Id: I764d07068e907cc203145ac8d6f0110b1b73e667
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122301
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-03-02 17:18:27 +00:00
Ben Clayton b990d393f5 test/tint: Update SKIP "expectations"
Change-Id: I131522625051426e93624fbe4f4763071f26ad72
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122202
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-02 09:25:40 +00:00