Commit Graph

12211 Commits

Author SHA1 Message Date
James Price 436fffe2a1 ir/spirv-writer: Emit function declarations
Emit the return type, function type, and the OpFunction
instruction. The body is just a label and a hardcoded OpReturn for now
and will be emitted properly in a future patch, along with entry point
declarations and function parameters.

Bug: tint:1906
Change-Id: Id7117da078bccd77a00afb54a63c9c55b13236f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131600
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-05-04 21:26:58 +00:00
Loko Kung 0edb5204ab Adds AllowUnsafeAPIs toggle and fixes code-paths to use it.
- Note unsafe API paths currently check both AllowUnsafeAPIs and
  DisallowUnsafeAPIs toggle, allowing unsafe APIs if either is set to
  explicitly allow them. This will be removed once users have been
  updated.

Bug: dawn:1685
Change-Id: If322cc6dbe5ac3a02a31956df6fed0f5d3ec8e8f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131400
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2023-05-04 21:09:40 +00:00
dan sinclair c9734160bc [ir] Add tests for compound operators.
This CL adds tests for the compound assignment builder_impl. The ops
which can not be compound assigned have been moved to report diagnostics
messages.

Bug: tint:1718
Change-Id: Ia3dbbf706f0f074fd988a2b1c01f3fb5cc602c04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131661
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-05-04 20:49:45 +00:00
dan sinclair eae9902c81 [ir] Add store test
This CL adds a simple test for the builder_impl for assignments.

Bug: tint:1718
Change-Id: Ia727ace4d01f107c6ac2ad1f8e430ef00ec43da9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131660
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-05-04 20:46:02 +00:00
Dawn Autoroller 5f4842e358 Roll ANGLE from cd171d2ef3ca to fbff065cdeb6 (5 revisions)
cd171d2ef3..fbff065cde

2023-05-04 junov@chromium.org Replace GetResourceFromHashSet with map lookup
2023-05-04 syoussefi@chromium.org Vulkan: Make eglPrepareSwapBuffersANGLE thread-safe
2023-05-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 94976560d112 to 446f1da0d121 (11 revisions)
2023-05-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b89ed2f23a03 to ecefa6c65969 (1 revision)
2023-05-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 70803179b4b8 to becaac9672a0 (552 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-dawn-autoroll
Please CC alanbaker@google.com,angle-team+autoroll@google.com on the revert to ensure that a human
is aware of the problem.

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

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

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

Bug: None
Tbr: alanbaker@google.com
Change-Id: I5bc27fcedb2361334ddd2602d10c1db605c2ecc2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131640
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-04 20:15:19 +00:00
James Price 02b5b224e3 ir/spirv-writer: Add support for scalar types
Also add a test helper header with some base classes that derive from
the IR builder.

Bug: tint:1906
Change-Id: If642bc64a50b6cae10363018a8dea8547ab9f542
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131441
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-05-04 18:50:49 +00:00
dan sinclair b169165633 [ir] Add tests for unary conversion.
This CL adds tests for the builder_impl unary conversion.

Bug: tint:1718
Change-Id: Ie0b6dae94e2c8d3d702331448daa0de54181851d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131582
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
2023-05-04 18:15:42 +00:00
dan sinclair 63716c55cc [ir] Spit builder_impl tests.
This Cl splits apart the builder_impl test file in order to make it
easier to determine what has been tested.

Bug: tint:1718
Change-Id: Ib2f4d11a398b26fd774eb8c60555475053f20e0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131581
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-05-04 18:01:26 +00:00
dan sinclair 34f41c7bad [ir] Change unary not to a binary equal
This CL removes unary `not` and instead emits `x == false`. When coming
back out of IR we can detect the `== false` and convert back to a `!`.

Bug: tint:1928
Change-Id: I905493182533ac2787ab9fe9245c8b53d51c1298
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131580
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-05-04 17:09:07 +00:00
dawn-autoroll 6500875f1a Roll vulkan-deps from 2d619be101a0 to 8e73a587d79d (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/2d619be101a0..8e73a587d79d

Changed dependencies:
* spirv-tools: 2189ad7a5a..65f03bea4e
* vulkan-headers: 870a531486..bae9700cd9
* vulkan-validation-layers: c15c9d7b24..94f89255bc

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC alanbaker@google.com,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: alanbaker@google.com
Change-Id: Ia95134f2e51d861ce31e81df68490bdf3b35db13
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131503
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-04 14:32:25 +00:00
François Beaufort 8cb4581943 Remove WGPUBufferMapAsyncStatus error
Bug: chromium:1431622
Change-Id: I5e779a210d6b4de9f9290f069dd23c0f841212d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131560
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Fr <beaufort.francois@gmail.com>
2023-05-04 13:34:27 +00:00
dan sinclair e964f5163c [ir] Update type display in disassembly, remove string methods.
This CL consolidates the various ToInstruction and ToValue methods into
the disassembler. The type output is updated to prefix `:` instead of
surrounding by `()`.

Bug: tint:1718
Change-Id: I69e2d96ffbfe2113932740ce69d0967d29d41541
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131460
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-05-04 13:34:06 +00:00
James Price b298b6a222 ir/function: Add missing <array> include
Change-Id: I13c1d6d102e1fe11bd05320e8d363719b94f2552
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131540
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
2023-05-04 11:54:19 +00:00
Ben Clayton 29bff642fc ir: Use std::optional::value_or to simplify code
Change-Id: Iaf3ec58a70cd49c508c3279f62c029440b82c599
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131520
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-05-04 11:53:31 +00:00
Antonio Maiorano f789854a94 tint: fix undetected overflow in const-eval refract
Bug: oss-fuzz:58526
Change-Id: I59a2e9151036da6aba83c523605664b54002f3dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131342
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-05-04 08:42:15 +00:00
Jiawei Shao c81bc4521f D3D12: Disable the toggles about alpha blending on latest Intel driver
This patch disables all the toggles about the alpha blending issue on
the latest Intel D3D12 driver which has the fix against all the related
driver bugs.

Bug: dawn:1579
Change-Id: Ief8b08fd00df1b2872d663245d728374fb38a5b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2023-05-04 08:07:28 +00:00
François Beaufort b22c5a465c Handle new errors to WGPUBufferMapAsyncStatus
This CL raises "mapping already pending", "offset out of range", and
"size out of range", and "validation error" error to make it easier
for developers to know why APIMapAsync fail in those cases.

Bug: chromium:1431622

Change-Id: I6f04751b2d67420a51d94aeac39ffbfd6e126fbf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129740
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Fr <beaufort.francois@gmail.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-05-04 06:46:19 +00:00
Dawn Autoroller dac162716c Roll ANGLE from 248445608dd3 to cd171d2ef3ca (7 revisions)
248445608d..cd171d2ef3

2023-05-03 abdolrashidi@google.com Vulkan: Enable async pipeline cache compression
2023-05-03 syoussefi@chromium.org WebGL: Limit total size of private data
2023-05-03 i.nazarov@samsung.com Revert "Vulkan: Simplify present history logic"
2023-05-03 syoussefi@chromium.org Vulkan: Handle inactive render pass in draw-based clear
2023-05-03 angle-autoroll@skia-public.iam.gserviceaccount.com Manual roll vulkan-deps from 7873f429a5c2 to 94976560d112 (18 revisions)
2023-05-03 i.nazarov@samsung.com Vulkan: Simplify present history logic
2023-05-03 cnorthrop@google.com Vulkan: Suppress new VUID-vkCmdDraw-None VVL errors

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-dawn-autoroll
Please CC alanbaker@google.com,angle-team+autoroll@google.com on the revert to ensure that a human
is aware of the problem.

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

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

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

Bug: None
Tbr: alanbaker@google.com
Change-Id: Ic75841af092b77bda94708d22b73515af99f913c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131480
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-05-04 06:30:21 +00:00
Brandon Jones 45b44fdb9f Remove DawnDeviceDescriptor code paths
This was listed as deprecated and has been for a while (at least a
year.) No code paths in Dawn make use of it and the few remaining
uses in Chrome are being removed in
https://chromium-review.googlesource.com/c/chromium/src/+/4501347

Bug: dawn:1797
Change-Id: Ifff4e5609e228080361e5d3a20a881eaf811ab6c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131321
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2023-05-04 02:01:52 +00:00
James Price 8f9ea96c20 tint/writer/spirv: Add path for generating from IR
This adds a GeneratorImplIr class and an option to the SPIR-V writer
to use it instead of the AST-based GeneratorImpl class.

The Tint exe now has a --use-ir flag which will use this path.

Bug: tint:1906
Change-Id: I34cc5c7468c8faf4a808669da8c44551ad01da8f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131341
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-05-04 01:31:36 +00:00
dawn-autoroll 1164fe7475 Roll vulkan-deps from 94976560d112 to 2d619be101a0 (8 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/94976560d112..2d619be101a0

Changed dependencies:
* glslang: dfc97740ff..bc6b2bc17a
* spirv-headers: 7f1d2f4158..268a061764
* spirv-tools: a525dccbe8..2189ad7a5a
* vulkan-loader: 71254bedee..ab6f4023be
* vulkan-validation-layers: 631fde41b2..c15c9d7b24

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC alanbaker@google.com,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: alanbaker@google.com
Change-Id: I29e334e941fe4b2efbf3074a339b466dc2a12cbc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131420
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-04 01:13:02 +00:00
Peng Huang 9cc2930453 d3d11: compile d3d11 backend in chromium build
So code search cross ref can work for d3d11 backend. Chrome webgpu
will only discover D3D12 device right now, so this build d3d11
backend should not break things.

Bug: dawn:1705
Change-Id: I2cb6753fe2be1588c9cf1190742f8169164d1662
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131200
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2023-05-03 23:42:25 +00:00
Austin Eng 2046163766 WebGPU CTS: Send CONNECTION_ACK when the websocket is open
Bug: chromium:1434762
Change-Id: Id287588565356eca8222a0ef43a35619a1f6f8b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131360
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@google.com>
2023-05-03 23:36:12 +00:00
James Price 057b7f326e tint/writer/spirv: Use Diagnostics() for errors
Brings the SPIR-V writer in line with other writers.

Change-Id: Iaa261150de953b414f966dd004bd48f7315ceb0c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131221
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-05-03 23:25:01 +00:00
James Price cb8f3308a3 spirv-reader: Error for OpUndef image argument
We can't generate meaningful WGSL for this case, so just avoid
crashing.

Bug: oss-fuzz:58112
Change-Id: I6c02d9113c237171fdafcd06e063a62f26cae9c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128900
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: David Neto <dneto@google.com>
2023-05-03 23:11:55 +00:00
James Price f885a90a5f tint/writer/spirv: Create Module class
Move the generic code for building up a SPIR-V module from Builder to
a new Module class. This can then be reused by the new IR-based SPIR-V
writer.

Switches to naming of methods to camel case to bring in line with the
rest of the codebase.

Bug: tint:1906
Change-Id: I7775edff6fe56328c6562559c016a19097b50805
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131340
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-03 22:54:15 +00:00
dan sinclair 09b02ffc7b [ir] Split the Terminator into two nodes.
This CL moves to having a `FunctionTerminator` and a `RootTerminator` so
we can assert if the IR is in a function depending on the terminator
seen.

Bug: tint:1929
Change-Id: Ie9e3aed71b7cf3b91439efbcca20885ec2cabe24
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131281
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
2023-05-03 22:13:28 +00:00
dan sinclair 69bb5dd816 [ir] Add function return information.
This Cl adds information into the IR on the function return type and any
associated attributes.

Bug: tint:1915
Change-Id: I74cbf2613b4ae575e33a61d04d30b515df6ba796
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131300
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-03 21:31:51 +00:00
dan sinclair 9d9a38336e [ir] Add function attributes
This CL adds the pipeline_stage and workgroup_size attributes into the
IR function.

Bug: tint:1915
Change-Id: I245dbf0104a1784cff364535106b3e520322ac73
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130920
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-05-03 19:22:31 +00:00
dan sinclair 4cadbc4daf [ir] Handle IdentifierExpression
This Cl adds a scope stack into the IR builder and uses it to replace
IdentifierExpressions with the relevant IDs. If the IdentifierExpression
was const-eval'd then it will be replaced by the constant value.

Bug: tint:1919
Change-Id: I54e38d56bd24e2ced1818c509115dd5a5149cb40
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130900
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-05-03 19:20:48 +00:00
Austin Eng 94bc4cf046 Log HLSL for dump_shaders even if HLSL compilation fails
Fixed: dawn:1681
Change-Id: I56abb56c47d97105fac541a49c377cc0222feb10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130460
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2023-05-03 19:19:19 +00:00
Peng Huang a246d8d3c2 d3d: remove external image related name alias from d3d12 namespace
Bug: dawn:1705
Bug: dawn:1724
Change-Id: Idd62c8f0a4f77ec975161fad7e981efb8326a2a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131220
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2023-05-03 18:03:27 +00:00
Austin Eng 249f8d5aa2 d3d: match maxStorageBufferBindingSize and maxBufferSize
Fixed: dawn:1751
Change-Id: I77303bf23a9a64e38acc72d9f039097b4d901306
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131280
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Kokoro: Austin Eng <enga@chromium.org>
2023-05-03 17:41:29 +00:00
Albin Bernhardsson 42b688bcff Fix Vulkan swapchain synchronization
It is necessary to use a semaphore to synchronize rendering and
presenting even when the graphics and present queues are the same.

This fixes rendering artifacts encountered on a Mali-G78 device.

Bug: dawn:269
Change-Id: Ieb0240d3668b7f9f68857ed3cf8d3bfea18cf33a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130221
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Albin Bernhardsson <albin.bernhardsson@arm.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2023-05-03 17:06:13 +00:00
Dawn Autoroller 1f0aa9b1f5 Roll ANGLE from a73e546cf108 to 248445608dd3 (1 revision)
a73e546cf1..248445608d

2023-05-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 4c9976e5d118 to 70803179b4b8 (627 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-dawn-autoroll
Please CC alanbaker@google.com,angle-team+autoroll@google.com on the revert to ensure that a human
is aware of the problem.

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

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

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

Bug: None
Tbr: alanbaker@google.com
Change-Id: If37760d061eccb3890f1d93e166670dd23032505
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131260
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-03 16:34:29 +00:00
Ben Clayton 1545ca191b tint: Remove Program|ProgramBuilder::FriendlyName()
Now that we don't need the symbol table to get the names of the types, we can just call FriendlyName() on the type directly.

Change-Id: I39478f5b8847ee032e77c15fd0de0665ddbf4811
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130220
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
2023-05-03 16:26:40 +00:00
dan sinclair 6ac51c1c57 [ir] Update binary and unary names.
This CL removes the LogicalAnd and LogicalOr binary kinds, and updates
the names in binary and unary to drop `bit_` and `log_` prefixes.

Bug: tint:1718
Change-Id: Ie180549ee5ecfad65fff9e4b4db86dd8a8b54833
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130800
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-05-03 16:25:44 +00:00
Dawn Autoroller 95edbb6ecc Roll SwiftShader from b89ed2f23a03 to ecefa6c65969 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b89ed2f23a03..ecefa6c65969

2023-05-03 stha09@googlemail.com IWYU: add cstdint for uintptr_t in llvm-10.0 Signals.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 alanbaker@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: alanbaker@google.com
Change-Id: Ifec5e137adecdf98cb3131a48afc02fa9af78c5b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131240
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-03 15:38:31 +00:00
Antonio Maiorano fa00fe9d41 tint/hlsl+glsl: fix workgroupUniformLoad polyfills
The BuiltinPolyfill transform expects the DirectVariableAccess transform
to run after it, but this regressed as part of
https://dawn-review.googlesource.com/c/dawn/+/122203

Add unit test along with e2e 1926.wgsl test.

Bug: tint:1926
Change-Id: I5107453ce152b12e6f2f36930846e1fffa775708
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131020
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-05-03 15:30:54 +00:00
dan sinclair e903396ff2 [ir] Emit short-circuit as an `If` node
This Cl removes the `&&` and `||` logical binary nodes and replaces them
with a var declaration and if node.

Bug: tint:1925
Change-Id: I9f25411a9b9c909fa25f2f37cbd51181ac584acc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130500
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-05-03 14:59:03 +00:00
dawn-autoroll 83d8c42fc6 Roll vulkan-deps from a2f18114f866 to 94976560d112 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/a2f18114f866..94976560d112

Changed dependencies:
* glslang: 9c7fd1a33e..dfc97740ff
* vulkan-validation-layers: da863a2fc1..631fde41b2

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC alanbaker@google.com,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: alanbaker@google.com
Change-Id: I6b698d820c8ad1f37bf7a950e84f9e769d2be84d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131161
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-03 11:48:42 +00:00
Loko Kung 2966d3ad08 Adds pass labels into the commands and plumbs through for Metal.
Bug: dawn:1784
Change-Id: Ie71360d83c4f3c47821916ebf8a187662e3f286f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131100
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-05-03 07:33:18 +00:00
Loko Kung 2552dd3c9f Plumbs labels for the following Metal objects:
- Buffers
- Pipelines
- QuerySets
- Samplers
- Shaders
- Textures

Change also includes:
- Metal debug name utilities

Bug: dawn:1784
Change-Id: Iddd2546f842c794570c225577d35c82e56809c6c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130940
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2023-05-03 05:57:06 +00:00
Dawn Autoroller 83ffcdecc2 Roll ANGLE from acbba2222ec7 to a73e546cf108 (8 revisions)
acbba2222e..a73e546cf1

2023-05-02 abdolrashidi@google.com Vulkan: Add pending memory size for VMA images
2023-05-02 cnorthrop@google.com Vulkan: Restore stencil write mask workaround for ARM
2023-05-02 lexa.knyazev@gmail.com Vulkan: Implement polygon mode extensions
2023-05-02 cclao@google.com Vulkan: Dirty VertexArray binding bit if buffer storage change
2023-05-02 cclao@google.com Vulkan: Add bit mask vertex array buffer binding point.
2023-05-02 syoussefi@chromium.org Initialize display TLS at thread creation time
2023-05-02 romanl@google.com angle_end2end_tests Pixel 6 shards: 4 -> 8
2023-05-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4b61bdad813f to 7873f429a5c2 (45 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-dawn-autoroll
Please CC alanbaker@google.com,angle-team+autoroll@google.com on the revert to ensure that a human
is aware of the problem.

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

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

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

Bug: None
Tbr: alanbaker@google.com
Change-Id: I320c5808cf7ac24f026d5cd4c9552155ff6a0dab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131120
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-03 03:09:47 +00:00
Loko Kung b27e2bfa71 Adds generation for WGSL descriptor to rename source->code.
- Adds a deprecation warning for the incorrect usage.
- Adds test to verify that the warning is emitted and that the results
  are equal.
- Fixes all existing tests to use the newer code path.

Change-Id: I01bf85137ad1c66966e1aa0259ae03fc5247ba25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130320
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-05-03 02:23:25 +00:00
Stephen White fed6b6b35b Turn AdapterBase into a wrapper class.
Change AdapterBase from an alias to PhysicalDeviceBase to a thin
wrapper class holding a ref to a PhysicalDeviceBase. This way,
mutiple AdapterBases can point at the same PhysicalDeviceBase.

For now, InstanceBase wraps all PhysicalDeviceBases discovered by a
backend in a single AdapterBase. In the future, this relationship will
become many-to-one.

Since Devices now maintain a ref on the AdapterBase wrapper (in order to
query toggles, etc), PhysicalDeviceBase::CreateDeviceImpl() now takes
the AdapterBase as an argument, so that the PhysicalDeviceBase knows
which AdapterBase to vend a Device for.

Note that the Toggles also still remain on the PhysicalDeviceBase, to
be moved up to the AdapterBase in a future change.

Bug: dawn:1774
Change-Id: Idef5d24fbd66d8552959230e246e453abddcc736
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131001
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2023-05-03 01:29:44 +00:00
Austin Eng 5eb3619d3e Add error context to clarify which depth/stencil function/op is validated
Fixed: dawn:1735
Change-Id: I5e3e3e67bb6fd01c10257a2a8c39ba29b49e0933
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131081
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <toji@google.com>
Kokoro: Austin Eng <enga@chromium.org>
2023-05-03 00:51:08 +00:00
Austin Eng e89f88b600 Add error context on Queue::API* methods
Fixed: dawn:1747
Change-Id: Icc8f4dbc6fcf69c117f880b5ef9d54cf256f7062
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131080
Reviewed-by: Brandon Jones <toji@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2023-05-03 00:43:42 +00:00
Peng Huang 80cf5e51cc d3d11: enable some compute shader tests
Known issues:
 d3d11 buffer cannot be uniform and storage at same time.
 DispatchWorkgroupsIndirect doesn't work correctly.

Bug: dawn:1705
Bug: dawn:1791
Bug: dawn:1792
Change-Id: I14df33c441198fcde9063ad85251da30c4b12c6a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131060
Commit-Queue: Peng Huang <penghuang@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-05-02 22:29:23 +00:00
dawn-autoroll 3aea647bc2 Roll vulkan-deps from 969451385cab to a2f18114f866 (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/969451385cab..a2f18114f866

Changed dependencies:
* spirv-tools: 0ce36ad785..a525dccbe8
* vulkan-validation-layers: ba3336fb8c..da863a2fc1

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-dawn-autoroll
Please CC alanbaker@google.com,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: alanbaker@google.com
Change-Id: Ia8275f3396fc1aa978895892ef0b7f4548a4418a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131040
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-05-02 21:43:44 +00:00