Commit Graph

12300 Commits

Author SHA1 Message Date
Takahiro 5e4aad952e Make maxBindingsPerBindGroup 1000
To follow the WebGPU spec update
https://github.com/gpuweb/gpuweb/pull/4050

Bug: dawn:1767
Change-Id: Iec5c60de7af5cb8b8e1baa7fc378a6551c6b5bd1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129380
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
2023-04-27 13:51:54 +00:00
dan sinclair 5e344a338f [ir] Split AST and SEM sources out of core ir.
This CL moves the need to pull in SEM and AST into a specific
`libtint_ir_builder_src` library. This will make it a GN error if we
accidentally try to use the SEM or AST inside the IR after the initial
construction.

This required move the `ToProgram`/`FromProgram` methods out of
`ir::Module` and into an `ir::Converter` class.

Bug: tint:1921
Change-Id: I2e6ae195f9a100030b43f35a2c5dad634433147f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129661
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-04-27 11:56:58 +00:00
Dawn Autoroller 664e1e0702 Roll ANGLE from 8b97c8d3e6b4 to 5c0b4251bd2c (4 revisions)
8b97c8d3e6..5c0b4251bd

2023-04-26 cnorthrop@google.com Reland "Tests: Add Gacha Life trace"
2023-04-26 syoussefi@chromium.org Vulkan: Remove generic syncval suppression about storage buffers
2023-04-26 i.nazarov@samsung.com Vulkan: Fix regression not calling mRenderer->notifyDeviceLost
2023-04-26 cnorthrop@google.com Scripts: Update setup for restricted_trace_perf

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,enga@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: enga@google.com
Change-Id: Id1cc55e52bc766333277f60254d288ab717aee29
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129720
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-27 07:04:01 +00:00
dawn-autoroll 2ac5e44e91 Roll vulkan-deps from 66646c61d508 to f2700925e4c4 (7 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/66646c61d508..f2700925e4c4

Changed dependencies:
* spirv-tools: 9e627132a8..d4c0abdcad
* vulkan-validation-layers: 4c747443f6..ef48791b3f

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 enga@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: enga@google.com
Change-Id: Icce5d78537ce519d093d632b86e374373719edef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129700
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-27 06:31:59 +00:00
Austin Eng 3a0a827ebe Revert "Disable SamplerTests on NVIDIA D3D11"
This reverts commit f8ef5e95ac.

Reason for revert: Not the cause of flakes.

Original change's description:
> Disable SamplerTests on NVIDIA D3D11
>
> Suspect to be causing flakes in D3D12 sampler tests
>
> Bug: dawn:1779
> Change-Id: I7a8518683142191e05c7befed078d69abdaf9b77
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129280
> Reviewed-by: Loko Kung <lokokung@google.com>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Austin Eng <enga@chromium.org>

Change-Id: I72630f21d861acd9e266a0ac0c80e917f4f440bb
Bug: dawn:1779
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129600
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2023-04-26 22:21:23 +00:00
James Price 9d3af6521b tint/ir: Add GN option for building the IR
This currently requires that we are not building with Chromium.

Bug: tint:1911
Change-Id: I6c37afe6c2b8250b30d244e8cc2274253b6ce8f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129560
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-04-26 22:05:42 +00:00
Brandon Jones 1040f0e087 Show encoder in command buffer/render bundle messages
Having labels like [CommandBuffer from CommandEncoder "B"] will
provide greater context when developers don't provide labels to
every tier of object.

Bug: dawn:1746
Change-Id: Ibf72f97e054ff943b33c210e457422466e46a013
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127120
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-26 21:19:29 +00:00
Ben Clayton 47dd30117d tint/resolver: Resolve builtin structs
Allow the resolver to understand builtin structures, like
__frexp_result_f16. This allows backend transforms to declare the types,
even if they're "untypable" by the user.

Bug: chromium:1430309
Change-Id: I392709118182a058f737ccf1b7b46fc6b0b7264d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129482
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-04-26 18:27:53 +00:00
Ben Clayton d3b09b90e3 tint/resolver: Add builtin_structs.h / .cc
Contains the builtin structure creation logic moved out from
intrinsic_table.cc.

Bug: chromium:1430309
Change-Id: I2207f9ae42c6d7343c2f2ffa81effde59e6023fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129481
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-26 18:25:03 +00:00
Loko Kung aae9f6bc5f Fully deprecates DawnTogglesDeviceDescriptor.
Change-Id: I81ac6e70e086e1f5839733d2dd35c283ed6eba68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128681
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2023-04-26 17:50:55 +00:00
Dawn Autoroller 439abaecf7 Roll ANGLE from d37c97d18a21 to 8b97c8d3e6b4 (3 revisions)
d37c97d18a..8b97c8d3e6

2023-04-26 i.nazarov@samsung.com Implement build option for load-time GlobalMutex allocation.
2023-04-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 23e97b79fb91 to 3076b4c0d8ce (3 revisions)
2023-04-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from f0378c0e540a to 0b6a55056c05 (687 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,enga@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: enga@google.com
Change-Id: Ifebeec9daf9e72cd1e7e30144b14db3f79a4b5cc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129540
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-04-26 17:49:12 +00:00
James Price 72d1ea4ac2 tint/resolver: Remove duplicate nullptr check
Change-Id: If4226d5427c2be270701b7b8d29e9f2ba5aa5ed5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129500
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-26 17:35:51 +00:00
Le Hoang Quyen 759238b962 Suppress MultithreadTests.Device_Dropped*OnAnotherThread
These tests seem to cause flakiness in other sampling tests on NVIDIA.

Bug: dawn:1779
Change-Id: Ide341033a4f13d8294021752ad3d18850a7369d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129400
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-26 17:18:13 +00:00
dawn-autoroll dcf3080dee Roll vulkan-deps from b01372cf570a to 66646c61d508 (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/b01372cf570a..66646c61d508

Changed dependencies:
* spirv-headers: cfbe4feef2..e08a279cf9
* vulkan-validation-layers: 9f57d75849..4c747443f6

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 enga@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: enga@google.com
Change-Id: I7230f4601ec192e0d1b0e033f7ac2d0d2e19752d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129520
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-26 17:11:20 +00:00
dan sinclair 135ab2b39f [ir] Rename instr.
This Cl renames the `instr` variables to `inst`.

Bug: tint:1718
Change-Id: Icf3b8c2f612c8dfe4b469d90327fef90ad813a0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129460
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-04-26 14:46:03 +00:00
Loko Kung abfa45baa4 Deprecates use of filter mode for mipmap filters.
Change-Id: I77044ee7f0ce1b066dd8c8a1ee1b34e07f5e9766
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128660
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-26 08:03:20 +00:00
Dawn Autoroller fd87e9d676 Roll ANGLE from 97c2cbd64f6e to d37c97d18a21 (11 revisions)
97c2cbd64f..d37c97d18a

2023-04-25 lexa.knyazev@gmail.com Metal: Implement OES_shader_multisample_interpolation
2023-04-25 vikassoni@chromium.org Add extension to skip texture renderability validation in ANGLE.
2023-04-25 cnorthrop@google.com Android: Build traces outside of APK
2023-04-25 lexa.knyazev@gmail.com D3D11: Ignore sample mask and A2C for single-sampled rendering
2023-04-25 syoussefi@chromium.org Vulkan: Fix access mask of generateMipmap's blit
2023-04-25 geofflang@chromium.org Prefer Metal over CGL for querying device registry IDs.
2023-04-25 lexa.knyazev@gmail.com GL: Enable NV_shader_noperspective_interpolation on ES
2023-04-25 lexa.knyazev@gmail.com GL: Fix readPixels for snorm color buffers
2023-04-25 geofflang@chromium.org D3D11: Fix instanced vertex streaming data copies.
2023-04-25 syoussefi@chromium.org Vulkan: Use Android TLS for *valid* global context
2023-04-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from dd55e592406d to 23e97b79fb91 (2 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,enga@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: enga@google.com
Change-Id: I7cebf3f02070b3890912924c8e7e5cac2c83e5cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129340
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-26 04:19:04 +00:00
dawn-autoroll 523fbbca76 Roll vulkan-deps from a52479099cf2 to b01372cf570a (4 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/a52479099cf2..b01372cf570a

Changed dependencies:
* spirv-tools: 25ad5e19f1..9e627132a8
* vulkan-validation-layers: 3d530f6921..9f57d75849

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 enga@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: enga@google.com
Change-Id: Iadf0118de47e24a849543fa4cca61d713fec11c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129360
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-26 03:52:51 +00:00
Dawn Autoroller 81c11d6f6e Roll SwiftShader from 23e97b79fb91 to 3076b4c0d8ce (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/23e97b79fb91..3076b4c0d8ce

2023-04-25 natsu@google.com Add back arm files to only arm targets
2023-04-25 natsu@google.com Split LLVM16 srcs based on target.
2023-04-25 natsu@google.com Fix "multiple rules generate <>.o"

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 enga@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: enga@google.com
Change-Id: I93085d6eb0f47bb4d6657491a15511f35f0df618
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129320
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-26 01:58:09 +00:00
David Neto 97d3554f99 dawn/node: fix binding for GPUBufferMapState
This fixes a linking problem.
The conversion function should be a member of the Convert class,
not a freestanding function.

Change-Id: Ifa351e4ba6fb0e95fed311a11e9dc56e13eb1a0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129260
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-26 00:34:53 +00:00
Austin Eng f8ef5e95ac Disable SamplerTests on NVIDIA D3D11
Suspect to be causing flakes in D3D12 sampler tests

Bug: dawn:1779
Change-Id: I7a8518683142191e05c7befed078d69abdaf9b77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129280
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2023-04-26 00:21:14 +00:00
dan sinclair aa97bb5327 [ir] Add assignment statements
This CL adds Assignment and CompoundAssignment statements to the IR
builder.

Bug: tint:1718
Change-Id: I3037da0115c7f4fe68941565b7e48866d421bbbf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129201
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-04-26 00:15:31 +00:00
dan sinclair 5b541ff3c2 [ir] Mark const variable as skipped.
The const variables should all have been const-eval'd and turned into
`constants` at the usage sites. This CL updates the IR to skip constants
when emitting.

A TODO is added to validate they aren't used when identifier expressions
are supported.

Bug: tint:1718
Change-Id: I77328a0cbd3d7f6692d1d1057d6953fcf762cfd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129240
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-04-26 00:10:40 +00:00
dan sinclair 5aa7ef2bc0 [ir] Add Unary expressions
This CL adds support for UnaryOpExpressions and converts them into Unary
instructions in the IR.

Bug: tint:1718

Change-Id: I736e29cec5e722b7c7f1b0f4f22ce55a3d3e4109
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129221
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-04-26 00:08:35 +00:00
Loko Kung d2aaf76eb9 Removes maxFragmentCombinedOutputResources limit and tests.
Bug: dawn:1756
Change-Id: I1fe73eb7987cdffdb2653e1072c4946b5bc3ef4c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127660
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2023-04-25 22:46:23 +00:00
dan sinclair 339719967e [ir] Remove internal `bool` returns.
This CL updates the IR builder implementation to remove the `bool`
return values and use the diagnostics as the source of truth for if the
conversion works.

This requires disabling a couple tests as they depend on identifiers
which aren't implemented. Previously the `worked` because it would just
return an ID value that would be emitted, but now they end up being an
error.

Bug: tint:1718
Change-Id: I00bc8845393cf4fae7b3eb0f5cfffb8c5fc1dec0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129220
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-04-25 22:02:22 +00:00
Austin Eng d0d6fc911c Return a pointer to a global static for zero-length GetMappedRange
Bug: chromium:1430985
Change-Id: Iaca7a21487a5a7e2b41dd9a363a7efd913a0f208
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129180
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brendon Tiszka <tiszka@google.com>
2023-04-25 21:33:22 +00:00
dan sinclair 69108d048b [ir] Add ir::Discard
This CL adds support for discard into the IR. The `discard` statement is
handled as an instruction in the current block. The `discard` is a
`demote_to_helper` in WGSL so control flow has to continue after the
discard, it just predicates writes. So, an instruction seems like the
most logical way to express.

Bug: tint:1718
Change-Id: I0d2fb029631523d72a7811d0be0715732427c302
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129200
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-25 20:44:18 +00:00
Peng Huang 65786ac998 d3d11: unmmap staging buffer before copy from it
D3D11 requires that buffers are unmapped before being used in a copy.

Bug: dawn:1772
Change-Id: I58c6d587538836a6aa70abecd8a764fc50c1e9ec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128740
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2023-04-25 19:33:04 +00:00
James Price ae39e6d628 spirv-reader: Declare multiuse constant composites
When an OpConstantComposite result is used by multiple instructions,
declare it as a module-scope `const` instead of inlining the constant
at each use site. This fixes an issue whereby the spirv-reader was
massively inflating the size of the WGSL it produces, which was caught
via an OOM fuzzer bug.

Bug: oss-fuzz:57795
Change-Id: Iac8c6a2147a7e2ebfddbaacae9fcb1dbe0b59e9d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128881
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2023-04-25 19:16:25 +00:00
James Price a41693babb tint/msl: Avoid cloning a built-in struct
This prevents us from crashing when a module-scope private variable
has an inferred type that is a built-in struct. We instead fail to
resolve the generated code.

Bug: chromium:1430309
Change-Id: I71c6eacf28096380227ed1043821ecc3d33ffb40
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129140
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-04-25 18:15:40 +00:00
James Price 99a0ded622 tint: Use type::Struct::Name in CreateASTTypeFor
The declaration may be nullptr, so doing this avoids a potential
nullptr deref when the struct is an internal type (e.g. frexp
result). In these cases we will now fail to resolve the resulting
code, which is a little better than just crashing.

A future change will update the resolver to allow us to use the
internal struct names from our transforms.

Bug: chromium:1430309
Change-Id: Ic72b5105bf3159c448c20dd9228d73b25a632b69
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129120
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-04-25 18:10:19 +00:00
Austin Eng 2dc9fe842d Return static pointer address for zero-length GetMappedRange
Bug: chromium:1430985
Change-Id: I0d13fce695bd999dd9e6a8127b91cea15276df22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128960
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2023-04-25 16:46:40 +00:00
Le Hoang Quyen 648db6cfb2 Add "MSAA resolve to mip lvl 1" multithread test.
Bug: dawn:1662
Bug: dawn:462
Change-Id: I13743fcd6f66c515c43b380b00b9235a24fa5a65
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127080
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2023-04-25 16:19:30 +00:00
Loko Kung 654416e15b Deprecation changes to rename some FilterMode enums to MipmapFilterMode.
Change-Id: I0df2677cfd454a2f38e580acd08089694486f6ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128680
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2023-04-25 16:03:22 +00:00
dan sinclair 03f9f5f538 [ir] Rename ir::Temp
This CL renames ir::Temp to ir::Runtime to better reflect that this is a
runtime generated ID.

Bug: tint:1718
Change-Id: I24edbe0e2e19303f50355117ec7cd4b5b8f45aef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129100
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-04-25 15:07:26 +00:00
Ben Clayton 41428ad681 dawn/node: Updates for latest IDL
Change-Id: I5028187160fabe8217a39ffc0d20a6fbb59d3cc8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129001
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-04-25 14:45:38 +00:00
dawn-autoroll f7d9116998 Roll vulkan-deps from 79949f0f1146 to a52479099cf2 (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/79949f0f1146..a52479099cf2

Changed dependencies:
* vulkan-validation-layers: 83f332de2f..3d530f6921

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 enga@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: enga@google.com
Change-Id: I38cfbb0ac9e74c17007dce020011012c2daf9d10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128981
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-25 13:26:50 +00:00
Dawn Autoroller 6810e08793 Roll ANGLE from 22b51592fcb6 to 97c2cbd64f6e (4 revisions)
22b51592fc..97c2cbd64f

2023-04-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from c7304c21065f to f0378c0e540a (682 revisions)
2023-04-25 uioptt24@gmail.com Remove ANGLE code comments related to base::clamp
2023-04-24 romanl@google.com Disable angle_restricted_trace_gold_interpreted_tests
2023-04-24 i.nazarov@samsung.com Implement new "Global Mutex" functionality.

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,enga@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: enga@google.com
Change-Id: I7798d4666a5bfd9d70d30ed7a58959d9712081e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129060
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-25 13:23:30 +00:00
Dawn Autoroller 496e8730c5 Roll SwiftShader from c0e5813a9b77 to 23e97b79fb91 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/c0e5813a9b77..23e97b79fb91

2023-04-25 bclayton@google.com Fix offsets when texture sampling / fetching

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 enga@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: enga@google.com
Change-Id: I54768f46894d4447805adb3bc7bcab57c7144b08
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129061
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-25 12:41:43 +00:00
Peng Huang 96b09d29b2 d3d11: enable ColorStateTests and CommandEncoderTests
Bug: dawn:1705
Change-Id: I2d477ea3d9a42332f21c61c9b2b1d2ac48d8e631
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128760
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-04-25 10:58:29 +00:00
Yan,Shaobo 90d5154b5f Fix Cmake build on Android
Update CMakeList.txt for Dawn cmake build on Android platform

Bug: dawn:1765
Change-Id: I559dddcf378ccaa0868bfccac904b627e3ea22c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128780
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Albin Bernhardsson <albin.bernhardsson@arm.com>
2023-04-25 10:12:48 +00:00
Corentin Wallez 154bb3460c Use a reasonable workgroup size for ComputeBoids.
Bug: None
Change-Id: I7fb1d37173fe234e5bcdc33645d0cbc7b7ca3021
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129000
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2023-04-25 10:05:18 +00:00
Le Hoang Quyen 20e3e34ce7 Disable some whitebox tests if implicit device sync is enabled.
Whitebox tests call internal functions directly. However, when
implicit device synchronization feature is turned on, some of these
functions will expect that the device is already locked. Thus leading
to assertion failures.

So we need to disable the tests when this feature is turned on.

Bug: dawn:1662
Change-Id: I1d65b4779c933313b5835f1bddbc57703b3ced53
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
2023-04-25 09:08:34 +00:00
Peng Huang c1b3c74316 d3d11: use Texture::Copy for copy data to staging texture used in CopyTextureToBuffer
Bug: dawn:1768
Change-Id: I7f6488cf54764585eef61766c3d2a829ef186783
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-04-25 03:08:31 +00:00
dawn-autoroll 20a24c9419 Roll vulkan-deps from 4b61bdad813f to 79949f0f1146 (6 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/4b61bdad813f..79949f0f1146

Changed dependencies:
* vulkan-loader: 07d1854c67..f035e57c17
* vulkan-validation-layers: 86e3809a9d..83f332de2f

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 enga@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: enga@google.com
Change-Id: I8da286b0dbe6e0d8cd9b4f245cf3a282d5e91bab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128882
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-25 00:06:06 +00:00
Dawn Autoroller 21bfdaf87e Roll SwiftShader from dd55e592406d to c0e5813a9b77 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dd55e592406d..c0e5813a9b77

2023-04-24 jif@google.com [LLVM16] Fix crash when findLSB is called with 0.

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 enga@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: enga@google.com
Change-Id: I16db4e1b6b1da0641b531ce0c664dea3e21dfcf2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128940
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-24 23:25:55 +00:00
Dawn Autoroller f5d72229eb Roll ANGLE from c59739b19897 to 22b51592fcb6 (5 revisions)
c59739b198..22b51592fc

2023-04-24 i.nazarov@samsung.com Implement fast GetCurrentThreadId() function.
2023-04-24 i.nazarov@samsung.com Prevent recursive GlobalMutex locking by ANGLE itself.
2023-04-24 blundell@chromium.org [ContextEGL] Check for default FBO being null in onUnmakeCurrent
2023-04-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from b1e5b9348e77 to e3b9db9ad121 (11 revisions)
2023-04-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from bfd1e43ef9d6 to 4b61bdad813f (12 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,enga@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: enga@google.com
Change-Id: I24b52a189dcda18e65f5bf0a5891f500ab054e65
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128920
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-04-24 23:14:54 +00:00
Le Hoang Quyen 23f4396177 Add more multithread tests.
Bug: dawn:1662
Change-Id: I2b2c66c6f9a7b512ae9f8010a082e7306feaa6f3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122060
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-04-24 20:12:00 +00:00
Peng Huang 653e99478e d3d11: enable some d3d11 end2end tests
Bug: dawn:1705
Change-Id: Id990739ec3905f146aeff2086b4c019b21798fdf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128761
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
2023-04-24 19:48:47 +00:00