Commit Graph

12439 Commits

Author SHA1 Message Date
Austin Eng 039e886f9b Reland "Allow internal errors for pipeline creation failure"
This is a reland of commit e241d64d25
It adds handling and tests for internal errors in the wire

Original change's description:
> Allow internal errors for pipeline creation failure
>
> Change-Id: I6b8c109ae67e230fea3fb14511c2b3562191c0fa
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132300
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Loko Kung <lokokung@google.com>

Change-Id: Icfda2d04bbb340fc4fdacf5ae65593bf958172fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132441
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-11 00:06:38 +00:00
Loko Kung 0214a30479 Renames C++ object Release function to MoveToCHandle.
Bug: dawn:1639
Change-Id: If4aaeefbb629cbef4302bbb430e09d740f057d8f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132273
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
2023-05-10 23:48:22 +00:00
Peng Huang b8233deafe d3d11: enable FragDepthTests end2end test
Bug: dawn:1705
Bug: dawn:1805
Change-Id: Ibe663a6be07eb9c17b2165073d6a973b72c23e5f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132023
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-10 23:23:09 +00:00
Austin Eng ccc78f6be4 Revert "Allow internal errors for pipeline creation failure"
This reverts commit e241d64d25.

Reason for revert: Missing the change to handle the enums in the wire

Original change's description:
> Allow internal errors for pipeline creation failure
>
> Change-Id: I6b8c109ae67e230fea3fb14511c2b3562191c0fa
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132300
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Loko Kung <lokokung@google.com>

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

Change-Id: I12309e85e888cc400729f88bb2340e8ecdf6b798
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132440
Auto-Submit: Austin Eng <enga@chromium.org>
Kokoro: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2023-05-10 20:36:33 +00:00
Austin Eng 3d511b3b7e Intentionally leak MTLDevice.counterSets to workaround a crash
Some drivers over-release this object when is accessed more than
once.

Bug: chromium:1443658
Change-Id: I861a74e7756dcf16b0a2d25a85bf47815b6779f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132262
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-10 20:08:42 +00:00
Brandon Jones dfaeb429f8 Add test for D3D12 descriptor heap allocation lifetimes
Adds a white box test to ensure that D3D12 descriptor heap allocations
only are valid during the serial they are created on.

Bug: dawn:1701
Change-Id: I1e1587ab602d5472fbba9e751bf3cd1e6e5ead11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132266
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2023-05-10 18:51:52 +00:00
François Beaufort 48e2b114be Emit warning if zero-size dispatch/draw
This CL make sure developers are warned when zero-size dispatches and
draws occur. Even though those are valid, it is good to encourage
developers to avoid them when possible.

Bug: dawn:1786
Change-Id: I99cbe8d556569d2e779b7b9c64739c3e5da8e290
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132222
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Fr <beaufort.francois@gmail.com>
2023-05-10 18:30:55 +00:00
Ben Clayton 9f83fa1d1b tint/ir: Remove 'type' field from Instruction
ir::Value has a virtual Type() method. Implement this on the subclasses
that actually have a type.

Removed pointless memory usage on instructions that have no value.

Also un-getter some fields to match the other IR code.

Change-Id: Ibf545a582d5cbb820410c9aaec0312692e803373
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131745
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-10 17:56:14 +00:00
Peng Huang c872e6a552 d3d11: support uniform buffer with other GPU accelerated usage
d3d11 doesn't allow creating a constant buffer with other GPU
accelerated usage.  This CL workarounds problem by creating two
buffers one for uniform buffer usage, one for other usage, and
copy content to uniform buffer when it is needed.

Bug: dawn:1755
Bug: dawn:1798
Bug: dawn:1721
Change-Id: I26bfee1cca2204f6464ba611872c490165e97f68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132020
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-10 17:21:53 +00:00
Dawn Autoroller 173164384c Roll ANGLE from b0f9c01ec303 to 97a23603240d (3 revisions)
b0f9c01ec3..97a2360324

2023-05-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9ebfb6b54814 to a62e8dbc3467 (1 revision)
2023-05-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e672f7dbab42 to 917d7c4c0a58 (53 revisions)
2023-05-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from d08108198321 to 1e9340f9e024 (1189 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,rharrison@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: rharrison@google.com
Change-Id: I83c2a7d603ce9df18c01dc77fc6dd029713a3405
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132275
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-10 17:02:19 +00:00
Ben Clayton c95576ed7b [tint] Fix syntax_tree build
Missing utils:: namespace on TrimSuffix().

Change-Id: I184bee79dc2c807730c1be0a532b290441d5f4ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132323
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2023-05-10 16:05:50 +00:00
Peng Huang 05330ab9dd d3d11: fix render pass msaa resolve problem
Bug: dawn:1804
Change-Id: I16373eae35d1a8fb1317a4a11811787bd91d1236
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2023-05-10 14:52:15 +00:00
Ben Clayton 42de29e088 tint/ir: Add an initializer field to Var
Fixed: tint:1930
Change-Id: I16b4414a2e575a4fb60c70d4eec7a1d69db8818b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131742
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-05-10 14:29:02 +00:00
Peng Huang 9ac6c02fb2 d3d11: support external image
Bug: dawn:1724
Change-Id: I80e397331672a611a1bc2d805187b9c01c2e0530
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132360
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2023-05-10 13:03:32 +00:00
dawn-autoroll 7a0b6dada7 Roll vulkan-deps from 0f7f3243cd47 to 917d7c4c0a58 (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/0f7f3243cd47..917d7c4c0a58

Changed dependencies:
* glslang: a02dde76f6..14e57abf26
* spirv-cross: 4faeb81f3f..54b48a2f3a
* spirv-tools: e803fe6717..51892874ba
* vulkan-validation-layers: ff11896ba3..43968206cb

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC rharrison@google.com,webgpu-developers@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: rharrison@google.com
Change-Id: I95d16df9b833104c473c5d659a798e7bd0d5b1ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132400
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-05-10 11:46:11 +00:00
Ben Clayton 88417687fa tint/ir: Add name metadata to Module
Register the name of 'var' and 'let' variables when building the IR.
Use the names of these variables when printing the disassembly.

Change-Id: I56ee24a29333f1bc8f97459bc1cfca5c3a59e79d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131741
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-05-10 09:44:10 +00:00
Colin Blundell 2107af0396 [Vulkan] Add support for transient attachments
This CL adds support for the transient attachment feature and texture
usage flag to Vulkan, using the usage flag to allocate textures via
lazily-allocated memory if the latter is available.

Testing is covered by the
MultisampledRenderingWithTransientAttachmentTest now being run on
Vulkan due to transient attachments feature now being supported on
Vulkan.

Bug: dawn:1695
Change-Id: I45a04d21b1b6ea612086a368b9c77a0ff43e93f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130180
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Colin Blundell <blundell@chromium.org>
2023-05-10 09:08:50 +00:00
James Price 49bae34149 [ir][spirv-writer] Implement binary add instructions
Adds a `Value()` method to the writer which gets the ID for a value,
which could either be a constant or an instruction result.

Bug: tint:1906
Change-Id: I57f5e0cfea1e3b8322702090714bac49d003ba75
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132285
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-10 03:58:42 +00:00
Dawn Autoroller 7b233269fe Roll ANGLE from 6134a19f1c9a to b0f9c01ec303 (5 revisions)
6134a19f1c..b0f9c01ec3

2023-05-09 sky@chromium.org metal: adds feature that minimizes generated shader differences
2023-05-09 cnorthrop@google.com Android: Galaxy S23 support
2023-05-09 ynovikov@chromium.org Revert "Retry flaky failures on SwiftShader *SAN builds."
2023-05-09 geofflang@chromium.org Store the temp file name in a std::string instead of stack array
2023-05-09 cnorthrop@google.com Scripts: Fix non-root hash check

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,rharrison@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: rharrison@google.com
Change-Id: Icf0f057e2b576f7cb2cb2240c05be628de917b2f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132341
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-05-10 03:34:20 +00:00
Loko Kung 5e155b23d2 Remove lingering disallow_unsafe_apis toggle usage.
Bug: dawn:1685
Change-Id: I6c9da45efac12986095be5dd1a3ed2a536b76d64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132302
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Loko Kung <lokokung@google.com>
Auto-Submit: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-10 01:45:54 +00:00
Peng Huang b6e73aa50a d3d11: support multisampled rendering and enable related tests
Bug: dawn:1804
Bug: dawn:1705
Change-Id: Ic90a42dab7149af261af790ca393d8a595e3ec4c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132021
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-05-10 01:44:26 +00:00
Dawn Autoroller 9af5ceb553 Roll SwiftShader from 9ebfb6b54814 to a62e8dbc3467 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/9ebfb6b54814..a62e8dbc3467

2023-05-09 hwennborg@google.com [llvm] Use LLVM-style include guard in regex_impl.h

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 rharrison@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: rharrison@google.com
Change-Id: I70af1e62dce4ac712366c16cc8b65a62ac1539f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132340
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-05-09 23:39:02 +00:00
Brandon Jones 48b6e6e791 Roll third_party/webgpu-cts/ b83a6ae70..499ce7de2 (5 commits)
Regenerated:
 - expectations.txt
 - ts_sources.txt
 - test_list.txt
 - cache_list.txt
 - resource_files.txt
 - webtest .html files


b83a6ae708..499ce7de28
 - 499ce7 WebGPU GPUBuffer.mapState MAP_READ mode (#2592)
 - 0d1ecc Fix large limit value rounding error (#2599)
 - a3359a Bump WebGPU types to v0.1.32
 - 9cbede Formatting fixes
 - ee328c Updated uses of timestampWrites

Created with './tools/run cts roll'

Change-Id: Ide4788c2f7ff738ac518f19da09d30376802a992
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/+/132122
Auto-Submit: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-05-09 23:24:11 +00:00
Peng Huang 2c9f88ef1d d3d: fix driver description
Bug: dawn:1705
Change-Id: I3077bcc8e136359afc7da036dea5284aef59c3c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132281
Commit-Queue: Peng Huang <penghuang@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-05-09 23:15:17 +00:00
Peng Huang 49db496a51 d3d11: support external image
This CL implements external image for d3d11 backend and enables
related tests.

Bug: dawn:1705
Bug: dawn:1724
Change-Id: Ib95e024fdc1837e3edb198dcf9255ebde8fa9fe7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131201
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2023-05-09 23:11:53 +00:00
James Price 5e7807f02b [ir][spirv-writer] Emit blocks
All instructions are unimplemented, and the only supported branch
target is the function terminator.

No new tests, as this only handles returning from an empty function.

Bug: tint:1906
Change-Id: I05cf5d252d96d37757c3ac1f84b79d0586c36b97
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132283
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-09 22:20:16 +00:00
dawn-autoroll 21703b9cb5 Roll vulkan-deps from 22678499e76d to 0f7f3243cd47 (18 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/22678499e76d..0f7f3243cd47

Changed dependencies:
* glslang: a3310b7cff..a02dde76f6
* spirv-tools: 01055c60cf..e803fe6717
* vulkan-loader: a6f06c091b..6c787b7fb3
* vulkan-validation-layers: 8d4cf0f2f1..ff11896ba3

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC rharrison@google.com,webgpu-developers@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: rharrison@google.com
Change-Id: I1e90e530fa7478b98706cb379eb95dd9a21ef2b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132265
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-09 22:16:23 +00:00
James Price 577b164b91 [ir][spirv-writer] Emit scalar constant values
Use a hashmap to de-duplicate constants.

Bug: tint:1906
Change-Id: Ic2654e1819d8c3c0199ce3f723f20877495ed0f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132282
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-05-09 21:57:36 +00:00
Austin Eng e241d64d25 Allow internal errors for pipeline creation failure
Change-Id: I6b8c109ae67e230fea3fb14511c2b3562191c0fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132300
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
2023-05-09 21:27:20 +00:00
Ben Clayton a8236a5529 tint/ir: Remove value id field.
There's a few reasons for this change:
* Not all values have identifiers, and carrying redundant fields is
  inefficent.
* Not all IDs will be integers - much like LLVM IR and SPIR-V, we will
  likely want to disassemble with textual identifiers, so a uint32_t
  is not ideal, and a std::string is even more bloat for each value.
* Transforms don't use identifiers, but instead raw pointers. We don't
  want to encourage using IDs as they're simply a less-efficient way to
  refer to values.
* This makes values consistent with types and flow-control blocks, as
  they will both have their disassembly ID generated by the
  disassembler.

The next step will be to add a hashmap to the module so that
pre-declared value names can be stored out-of-band.

Bug: tint:1718
Change-Id: I80beafc165f2bde54cc44a91015776926ca952b2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131740
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-05-09 21:17:59 +00:00
Ben Clayton 1c56265ee1 test/tint: Fix spvasm expectation
Change-Id: I4f8ff98b980d9dd9a89e7e4407f6e1cbd1eaaf0a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132320
Kokoro: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-05-09 20:09:58 +00:00
Ben Clayton 3731ce8f21 tint: Use new string utilities in various places
Change-Id: I8c97a8a92f5e5e3d9768933589aa304ff52ab103
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131748
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2023-05-09 17:34:08 +00:00
Ben Clayton ce1025fde3 tint/utils: Add more string utilities.
Change-Id: If15bbf8bd662b55222fef87c22cd8beb0447ac4c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131747
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2023-05-09 16:54:43 +00:00
James Price fbef69b61c [ir][spirv-writer] Fix MSVC build
Change-Id: I11b674b422be0499c5016d4617703ce40cc63f85
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132280
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-05-09 16:50:22 +00:00
James Price 6c18123058 [spirv-reader] Avoid name clashes with builtins
An OpName decoration for a result ID may end up unintentionally
shadowing a WGSL builtin function.

Fixed: tint:1932
Change-Id: I1b1302629c69b7bdf7a0a0c97d3ad6ce3d0d587b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132080
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2023-05-09 16:41:15 +00:00
Ben Clayton 567a53e87c tint/utils: Add Vector::Any(), Vector::All() and predicates
Can be used to write simple whole-vector comparision checks.

Change-Id: I441a7e8d6b626a5a32ef3db9043e771f792900d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131746
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-09 15:10:05 +00:00
Dawn Autoroller 2fb010f909 Roll ANGLE from fbca2b29271c to 6134a19f1c9a (3 revisions)
fbca2b2927..6134a19f1c

2023-05-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ecefa6c65969 to 9ebfb6b54814 (1 revision)
2023-05-09 abdolrashidi@google.com Suppress more of VUID-vkCmdDraw-None-0784x
2023-05-09 abdolrashidi@google.com Suppress VUID-vkCmdDrawIndexed-None-0784x

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,rharrison@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: rharrison@google.com
Change-Id: I96d678f96e5322e1d2abaf30bcd1621f96b1c333
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132241
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-09 13:32:44 +00:00
Loko Kung dcaedad707 Updates CTS tooling to use new 'allow-unsafe-apis' toggle.
Bug: dawn:1685
Change-Id: Ie5dc18dfff51c6e116dd5c4ea322a41fb249ca37
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131584
Auto-Submit: Loko Kung <lokokung@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-05-09 12:26:47 +00:00
James Price 13ca70fa08 Reland "ir/spirv-writer: Emit entry point declarations"
Emit the OpEntryPoint instruction with the pipeline stage. Interface
variables will be done later.

Emit OpExecutionMode instructions for the workgroup size and fragment
shader origin, depending on the pipeline stage.

This is a reland of commit 90789ea1f8
with compilation fixes for MSVC.

Bug: tint:1906
Change-Id: If5290df504ebc8925b3c52510acab123edfd1073
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131800
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-05-09 12:25:07 +00:00
James Price 81fc109822 [tint] Fix unshadowing of abstract const users
Unwrap sem::Materialize as well as sem::Load when looking for users of
a renamed declaration.

Fixed: tint:1934
Change-Id: I7d5ade1f902dbdb4cf3b4f7552b78359f5b3ea9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132060
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-05-09 10:59:58 +00:00
James Price e162a1adee [spirv-writer] Don't emit abstract accessor source
When traverseing an accessor expression, stop as soon as we hit a
source object that has a constant value. This prevents us from trying
to emit expressions that have abstract types and no materialization
nodes.

Bug: chromium:1442551
Change-Id: I8296ae58e63624e647052cdf966dbff15630a4d8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132040
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-05-09 10:57:21 +00:00
James Price f91b77dd6d [spirv-reader] Use builtin matrix aliases
This makes the generated WGSL more concise and readable.

Change-Id: I78a722b9a86264d3bbf219445628dc5597cbfd62
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132141
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: David Neto <dneto@google.com>
2023-05-09 10:40:06 +00:00
James Price 114bae24b0 [spirv-reader] Use builtin vector aliases
This makes the generated WGSL more concise and readable.

Change-Id: Ia486a74796a4029aaac1c4d051d304d05f1d5ea2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132140
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-05-09 10:36:41 +00:00
Austin Eng 5696997251 Improve runtime minBindingSize validation message
The message now reports the group/number of the binding that failed
validation, as well as the buffer.

Bug: dawn:1604
Change-Id: Ib08a3eace5ec5ebaf9eecce01eb397b5c0681bd1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131843
Reviewed-by: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2023-05-09 02:37:54 +00:00
jchen10 46014f69a0 d3d11: enable CompressedTextureFormatTests
Bug: dawn:1801
Bug: dawn:1705

Change-Id: I4b63d865ceb3a20a16917030b608309452aeb045
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131844
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2023-05-09 02:27:41 +00:00
jchen10 f083783f7e d3d11: VertexBufferTracker
This introduces VertexBufferTracker to correctly track pipeline's
vertex buffer state.

Bug: dawn:1799
Bug: dawn:1705
Change-Id: I06f32b501a3637b22318ec201b1953eba6ed0cf2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131700
Reviewed-by: Peng Huang <penghuang@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2023-05-09 02:22:42 +00:00
jchen10 b4425f537c d3d11: enable FirstIndexOffsetTests
Bug: dawn:1803
Bug: dawn:1705

Change-Id: I54ee08aa79da6c37c4c9b70db1f815d2d52e7756
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131940
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-05-09 01:25:25 +00:00
Dawn Autoroller 3912f57afc Roll ANGLE from 1a847d4a6e6a to fbca2b29271c (6 revisions)
1a847d4a6e..fbca2b2927

2023-05-08 geofflang@chromium.org Metal: Build built-in shaders from source on the simulator
2023-05-08 angle-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from 446f1da0d121 to e672f7dbab42 (2 revisions)
2023-05-08 abdolrashidi@google.com Add instruction for trace tests w/multiple devices
2023-05-08 lexa.knyazev@gmail.com Metal: Implement ANGLE_polygon_mode
2023-05-08 lexa.knyazev@gmail.com D3D11: Implement ANGLE_polygon_mode
2023-05-08 geofflang@chromium.org Reland: Metal: Embed precompiled default shaders.

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,rharrison@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: rharrison@google.com
Change-Id: Id34355b8e420b88dad3d1b463b5d62e0b43a614b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132120
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-09 00:08:23 +00:00
Dawn Autoroller dc27194124 Roll SwiftShader from ecefa6c65969 to 9ebfb6b54814 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/ecefa6c65969..9ebfb6b54814

2023-05-08 natsu@google.com Align allocations to 4096 on Android hosts

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 rharrison@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: rharrison@google.com
Change-Id: I3cc3a2feb9817913387bb4927e1844d612962514
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132100
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-08 19:54:59 +00:00
Austin Eng 1a8bb02624 Ensure commands are submitted before exporting the last signaled event
Consumers of the event expect it to be signaled after all work
enqueued thus far. Ensure that commands are flushed to ensure this.

Fixed: dawn:1691
Change-Id: I1409c668119a12e5e50a1ce2924ebc16d0470a4d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131880
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
2023-05-08 19:43:35 +00:00