Commit Graph

4254 Commits

Author SHA1 Message Date
Dawn Autoroller 1085d4f418 Roll Tint from 2bd1321133 to 540992ba90 (5 revisions)
https://dawn.googlesource.com/tint.git/+log/2bd13211331a..540992ba9052

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: Ia47328391eaf77061e4acfed1dee087e54a189c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66680
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-16 01:12:08 +00:00
Dawn Autoroller c11a14f413 Roll Tint from 4dfa394a3c to 2bd1321133 (4 revisions)
https://dawn.googlesource.com/tint.git/+log/4dfa394a3c22..2bd13211331a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: Ifabe28746cd8426026c71c0b7cd5bd400e7949da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66622
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-15 19:28:43 +00:00
Ben Clayton 1affadcab7 CMake: Disable Tint's GLSL writer
Currently enabling this build target requires a dependency on glslang, which Dawn does not provide.
Just disable this target while we figure how we want to tackle this.

Bug: tint:1217
Change-Id: I79f2ef6e1b007e69ad4aa0d40500b0d1c6a52d6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66605
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-15 19:10:23 +00:00
Yunchao He 79d2099125 Add depth/stencilReadOnly and validations in RenderBundleEncoderDescriptor
This change adds two arguments depthReadOnly and stencilReadOnly
into RenderBundleEncoderDescriptor in order to follow WebGPU spec.
It also adds one more validation rule: depthReadOnly must be equal
to stencilReadOnly if depthStencilFormat has both depth and stencil
aspects in RenderBundleEncoderDescriptor. We have already had a
similar validation rule in RenderPassDepthStencilAttachment in
RenderPassDescriptor.

Bug: dawn:485

Change-Id: I32c45b2bd90c7041aa881d8589720a9146d6ac7e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66501
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-10-15 16:56:13 +00:00
James Price 17dd734e54 dawn_node: Document `npm install` step for CTS
If you have a fresh checkout of CTS and miss this step, you get errors
when running the CTS scripts that are hard to figure out.

Change-Id: I12c63455a165d2c37beae75fedd34a4da6c30f28
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66640
Commit-Queue: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-15 16:40:12 +00:00
Dawn Autoroller 98dc0ebe4c Roll Tint from c40d15d5da to 4dfa394a3c (1 revision)
https://dawn.googlesource.com/tint.git/+log/c40d15d5da08..4dfa394a3c22

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: I1b1a3710052f92ec8f8307d029ab4057d1bd2486
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66620
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-15 14:36:22 +00:00
Austin Eng 4948c81344 Reland "Add deps to enable performing the cmake build of dawn_node on CQ"
This is a reland of ecbdd8fbe7
It prefixes the DEPS variables with "dawn_". Because they are globals,
they may collide with other variables in other projects.

Original change's description:
> Add deps to enable performing the cmake build of dawn_node on CQ
>
> (and the cmake build of Dawn in general)
>
> Bug: dawn:688
> Change-Id: If7c037a03d237372739aed1f5dc78bffb7975a24
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65603
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

Bug: dawn:688
Change-Id: I81ec3d5298efea54b1417ff58569cf1c615ea372
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66400
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-15 14:28:32 +00:00
Dawn Autoroller 854899edb9 Roll Tint from a6969c4359 to c40d15d5da (1 revision)
https://dawn.googlesource.com/tint.git/+log/a6969c435943..c40d15d5da08

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: Ife7dfede25c5fe00f7bd4cce29edcf7d84b0a4ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66560
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-15 04:21:31 +00:00
Dawn Autoroller c2bc8d3a7d Roll Tint from 89fb370b30 to a6969c4359 (7 revisions)
https://dawn.googlesource.com/tint.git/+log/89fb370b3029..a6969c435943

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: I9bc6bf14318b4766b0728ffb00a0d663a0c1b11e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66540
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-14 23:31:08 +00:00
Dawn Autoroller 35a38d85c4 Roll Tint from f3f2d0a218 to 89fb370b30 (5 revisions)
https://dawn.googlesource.com/tint.git/+log/f3f2d0a218bd..89fb370b3029

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: Ia5277ae1c7df15f0bbccd295ad281005a5f30dea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66500
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-14 18:33:05 +00:00
Dawn Autoroller 8e09ac58de Roll Tint from 11c9656b14 to f3f2d0a218 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/11c9656b1410..f3f2d0a218bd

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: I24f8ae655c4b2fed3d7d7b856e198dee481cbe79
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66460
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-14 13:41:23 +00:00
Dawn Autoroller 43386522cf Roll Tint from 2aa6855914 to 11c9656b14 (1 revision)
https://dawn.googlesource.com/tint.git/+log/2aa6855914ed..11c9656b1410

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: I979f841b952a3ca5055a746b8794d7e46a608e77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66420
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-14 08:36:42 +00:00
Yunchao He daffd22b68 Add validation rule for depth/stencil between pipeline and pass
depthWrite/stencilWrite in DepthStencilState in RenderPipeline
should be compatible with depthReadOnly/stencilReadOnly in
DepthStencilAttachment in RenderPass. Otherwise, you may need
to generate validation errors.

Bug: dawn:485

Change-Id: I7b541056dafc4dee4eb31f4cefbac48c0ffc4b18
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66240
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-14 04:09:21 +00:00
Austin Eng 91851e23a8 Remove several compile-time constants in favor of limits
Bug: dawn:685
Change-Id: Ifac25116c741fdab7b6a8093b4230065beca4773
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65483
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-13 18:57:18 +00:00
Dawn Autoroller dcc520dc23 Roll Tint from d57a129810 to 2aa6855914 (1 revision)
https://dawn.googlesource.com/tint.git/+log/d57a12981005..2aa6855914ed

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: Iab2db7542d78d1cc200edee986ce9b17f0449aa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66320
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-13 05:19:37 +00:00
Jiawei Shao e0390b8967 Fix compilation error after ComputePipelineBase becomes virtual
This patch fixes a compilation error after the CL "Avoid redundant
creation of ComputePipelineBase in GetCachedComputePipeline" is
landed after "Adds destroy handling for BindGroupLayout without
new backend changes yet" is merged into upstream.

BUG=dawn:529

Change-Id: I5dcb2370093a96703ceb0618f3590364b4eff382
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66283
Reviewed-by: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-13 04:19:26 +00:00
Jiawei Shao 8fd1eb5443 Avoid redundant creation of ComputePipelineBase in GetCachedComputePipeline
This patch removes a redundant creation of ComputePipelineBase object
in GetCachedComputePipeline(). Instead, we directly compute the blueprint
hash from the uninitialized backend compute pipeline object.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I9b982664aa140ab385418a202270b9988cfcb9f3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66221
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-10-13 00:43:05 +00:00
Dawn Autoroller d174cef8fa Roll Tint from 37a666d91c to d57a129810 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/37a666d91c70..d57a12981005

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: I59a00d9705154098a20125cdbb7c6033be422ed4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66281
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-12 21:13:27 +00:00
Loko Kung 2f3fe95ad5 Adds destroy handling for BindGroupLayout without new backend changes yet.
- Start tracking BindGroupLayout objects at construction
- Utilizes untrack tag for blueprint layouts for caching purposes
- Adds dawn native test file for testing utilities that require static dawn native lib
- Adds testing macros and mocks for simple sanity unit testing

Bug: dawn:628
Change-Id: Ic85b60e9574e67cc5fc1804cc5300cd1f3a0f6fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65862
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-12 18:53:57 +00:00
Loko Kung fc5a7d414f Adds remaining setup logic to implement destroy in Device and ObjectBase.
- Renames some of the Device functions to be consistent with documentation
- Reverts change in https://dawn-review.googlesource.com/c/dawn/+/64820 for overloading mDevice == nullptr to determine if objects are alive because device is needed for error propagation. Instead, use list existence to determine if objects are alive
- Updates destroy api to return bool upwards in case we need to further process the extending objects
- Adds tracking functions in ObjectBase
- Adds final tag to all backend Device implementations
- Adds MoveInto LinkedList support to move list elements in O(1)

Bug: dawn:628
Change-Id: Iff70f4f7d55f46ee52d1bd0e02e3671819f2eed4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65861
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-12 17:46:26 +00:00
Dawn Autoroller e355bb8e65 Roll Tint from ce90ac52f4 to 37a666d91c (1 revision)
https://dawn.googlesource.com/tint.git/+log/ce90ac52f479..37a666d91c70

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@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: Id5c6f0b08b097d86363734444def147576569422
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66280
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-12 16:16:17 +00:00
François Beaufort a4c8c8d5bf Remove "extension"
Now that Chrome uses [1] "feature" instead of "extension", this CL
removes all occurrences of "extension".

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3205514

Change-Id: Ibbaaf5d6e99be62453604c71d8110eea9820c803
Bug: dawn:1149
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65900
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-12 13:21:56 +00:00
Loko Kung 6fd28ba4cb Adds iterators and a check to avoid segfault when removing node in LinkedList.
Bug: dawn:628
Change-Id: I1250ffe303155004572c2476ec357daa78b7bb3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65860
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-11 23:29:30 +00:00
Ben Clayton 34206ec07b dawn_node: Use wgpu::SupportedLimits
Query the Adapter / Device for limits instead of hardcoding them.

Bug: dawn:1143
Change-Id: Ib6d47bdb81df8e5e6eb767d35d346bbf34c5877a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65722
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-11 15:42:12 +00:00
Corentin Wallez 008cba9b29 Reenable timestamp queries on Metal macOS 11
They were previously disabled due to some new Metal alignement
constraint that has now been upstreamed in WebGPU and implemented in
Dawn. So we can reenable them.

Bug: dawn:940
Change-Id: I96e5ac57342fbc0cab09989fe90a6bc4c8f9f40d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66120
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Hao Li <hao.x.li@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-11 13:50:29 +00:00
Corentin Wallez 2d1762049b Make Dawn's feature name casing match WebGPU (- instead of _)
Bug: dawn:550
Change-Id: I1017b4a2e93a75925e8762f2d09ace9a8d5d7b49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65802
Reviewed-by: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: François Beaufort <fbeaufort@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-10-11 10:18:09 +00:00
Li Hao daf1cdbb28 Fix resolve range of resolveQuerySet on Metal
The second parameter of NSMakeRange(NSUInteger loc, NSUInteger len) is
length, here we just need to pass queryCount.

Bug: dawn:434
Change-Id: I3dfa82e523310258c81c45c4e1c3af80a3df8704
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-10-11 09:09:22 +00:00
Nico Weber 9a8099eb8b Fix Wbitwise-instead-of-logical warnings
`a && b` only evaluates b if a is true. `a & b` always evaluates
both a and b. If a and b are of type bool, `&&` is usually what you
want, so clang now warns on `&` where both arguments are of type bool.
From what I can tell, in Dawn it wasn't important if we evaluate both
branches or not in the places where this fired, so I went with `&&`
everywhere.

Bug: chromium:1255745
Change-Id: Ifa196a7150d5bdfb8527fe8b6f40d7e2e957d609
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66200
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2021-10-08 14:39:39 +00:00
Corentin Wallez 5497aad240 Improve validation errors for ShaderModule
Bug: dawn:563
Change-Id: I3c0809742f87517456fd8a5f7645005af636fa75
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65801
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-10-08 10:16:27 +00:00
Dawn Autoroller a1e0aff8b8 Roll Tint from d4b8f887a5 to ce90ac52f4 (1 revision)
https://dawn.googlesource.com/tint.git/+log/d4b8f887a5c8..ce90ac52f479

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@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: bclayton@google.com
Change-Id: I5f1c09d480435d940e756df863771dcc45f02a6a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66160
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-08 03:04:07 +00:00
Dawn Autoroller 3bf47122d2 Roll Tint from 7ff308fd18 to d4b8f887a5 (1 revision)
https://dawn.googlesource.com/tint.git/+log/7ff308fd1800..d4b8f887a5c8

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@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: bclayton@google.com
Change-Id: Ie611232aa22958997cce02a28f45bc9c73b85ab8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66140
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-07 21:28:26 +00:00
Dawn Autoroller c9b0df976a Roll Tint from 08146e2300 to 7ff308fd18 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/08146e2300ae..7ff308fd1800

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@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: bclayton@google.com
Change-Id: I8678d88b464fe439e370aa1096bcd021ce43a2f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66080
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-10-07 16:03:52 +00:00
Ryan Harrison 43d5849408 Replace usages of BoundArrayAccessors w/ Robustness
BoundArrayAccessors is an alias to Robustness, and removing it from
Tint will make code easier to read and search.

BUG=tint:1212

Change-Id: I31aabfcef396290178eff6ea8db7e5bb70b031ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66061
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-07 03:40:51 +00:00
Dawn Autoroller 080c5cae3e Roll Tint from 71763c84c2 to 08146e2300 (1 revision)
https://dawn.googlesource.com/tint.git/+log/71763c84c2fa..08146e2300ae

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@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: bclayton@google.com
Change-Id: I040798cec1f9c0d05dc785d5ca92741557276f43
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66020
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-06 19:24:31 +00:00
Dawn Autoroller ccbc1a39da Roll Tint from 8b2181c98f to 71763c84c2 (3 revisions)
https://dawn.googlesource.com/tint.git/+log/8b2181c98ff9..71763c84c2fa

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@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: bclayton@google.com
Change-Id: I0aaaaa6c4dec79e8f0723b9ff924053f207b9954
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65921
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-05 22:32:49 +00:00
Antonio Maiorano 22da31cf43 run-cts: add "log" arg to log test results to file
Bug: dawn:1123
Change-Id: Id9ad62dde8f7988cb66e39ca0d543c23d0fad341
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65781
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-05 21:18:10 +00:00
Ben Clayton 78632a644f dawn_node/interop: Return a Result instead of a bool
Provides a place to put error messages.
Helps actually figure out when an overload doesn't match, a dictionary is missing a field, etc.

Bug: dawn:1143
Change-Id: Ibca177f9f42676061511d27898a5c522d1e6cd8f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65721
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-10-05 19:44:09 +00:00
Ben Clayton bc6d30a2f8 dawn_node: Use IDL default parameter values
If the IDL provides a default value for a interface method parameter, then use that default value if no argument is provided.

Removes a bunch of std::optional<T>'s from the C++ interfaces, and simplifies binding implementations.

Also fix some defaults of buffer size from 0 to kWholeSize. This was partially done in an earlier CL, but it seems I missed a few.

Bug: dawn:1143
Change-Id: Ifc1bb29a5e7ead42dd015d2333c743165f2459a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65663
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-05 19:32:34 +00:00
Ben Clayton 01c6a44358 dawn_node: Fixes for GPU.cpp
Check the result of std::getenv() before constructing a std::string.
std::string cannot be constructed with nullptr.

Fix ambiguous overload resolution of std::tolower(), by wrapping it in a
lambda that explicitly takes a 'char' argument.

Bug: dawn:1123
Change-Id: I8a44524a6c0e71f7d2a49a5a9f730115c32df577
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65960
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-05 19:25:09 +00:00
Antonio Maiorano f71f843944 dawn_node: set default GPU adapter and override with env var
Bug: dawn:1123
Change-Id: I95e09477f7c5a5a4c49560aecdf7ee2b8dbce766
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65780
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-05 18:19:29 +00:00
Ben Clayton a12ac48f64 dawn_node: Add -j option to run-cts
Running with too many threads can cause device initialization failures.

Bug: dawn:1143
Change-Id: Ie8010ab7a95e88f560dc14ed8b96919313218062
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65662
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-10-05 16:47:45 +00:00
Ben Clayton 2c9fe21308 dawn_node: Make StaticValues property-like
Makes them appear in Object methods like length().

Fixes a number of webgpu:idl,constants,flags tests.

Bug: dawn:1123
Change-Id: I2f1baf9c3c51915ce0b0a5dc392cf86aac761676
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65661
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-05 16:33:19 +00:00
Dawn Autoroller 37144dee3c Roll Tint from 22daca166b to 8b2181c98f (1 revision)
https://dawn.googlesource.com/tint.git/+log/22daca166bbc..8b2181c98ff9

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@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: bclayton@google.com
Change-Id: Ia385c065115027353731eace7484ea6019f45c03
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65920
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-05 15:45:48 +00:00
Ben Clayton d611aebc10 dawn_node: Add README.md
Includes info on how to build, known issues, remaining work.

Bug: dawn:1123
Change-Id: I0a1fe827a1aba06eea7e3574de4a7d1e0fd3f0ab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65161
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-05 15:43:59 +00:00
Corentin Wallez 575a198764 Improve validation errors for Sampler
Bug: dawn:563
Change-Id: I4bc774fd89c1a0b7adfca2b5bd7734751257b18b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65800
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-05 01:09:00 +00:00
Brandon Jones a089e8c4f2 Improve validation errors in CommandValidation
Updates all validation messages in CommandValidation.cpp to give them
better contextual information.

Bug: dawn:563
Change-Id: I6af5b0a0d99218c09ef564039218b3a7fb6a74db
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65607
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-10-05 00:34:30 +00:00
Sven Zheng 01466b2bb6 Revert "Add deps to enable performing the cmake build of dawn_node on CQ"
This reverts commit ecbdd8fbe7.

Reason for revert: https://ci.chromium.org/ui/p/chrome/builders/official.infra/chrome-branch/977/overview
AssertionError: dep:src/third_party/dawn key:cmake_version value:version:3.13.5 != version:3.16.1

Original change's description:
> Add deps to enable performing the cmake build of dawn_node on CQ
>
> (and the cmake build of Dawn in general)
>
> Bug: dawn:688
> Change-Id: If7c037a03d237372739aed1f5dc78bffb7975a24
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65603
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: dawn:688, chromium:1255538
Change-Id: I4c44b511c6fc3ff177785adcaad5f01d2857a2c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65822
Reviewed-by: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: Leonard Grey <lgrey@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-04 23:35:49 +00:00
Brandon Jones da1a78db3b Improve validation errors in CommandEncoder
Updates all validation messages in CommandEncoder.cpp to give them
better contextual information.

Bug: dawn:563
Change-Id: I0aa2063c4805225a5124fdd07e350ee1a74a5f3c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65609
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-04 21:44:19 +00:00
Dawn Autoroller b4d59c83ee Roll Tint from 2271b9541c to 22daca166b (2 revisions)
https://dawn.googlesource.com/tint.git/+log/2271b9541c2a..22daca166bbc

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@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: bclayton@google.com
Change-Id: Iaac36c78355611bb724c8ece9faf4da49bbee99d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65821
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-04 16:58:13 +00:00
Jiawei Shao afe9138408 Reland "OpenGL: delete shaders and pipelines when they are not used any longer"
This is a reland of a57c1db878

in current Dawn implementation RenderPipelineGL and ComputePipelineGL
will be destroyed before calling their initialize() function when we
can find a proper pipeline object in the front-end cache, so mProgram
may not be assigned to a valid GL program ID when the destructor of
PipelineGL is called.

In this CL we always initialize mProgram to 0 in the constructor of
PipelineGL so that it won't be a garbage value in the destructor of
PipelineGL (0 is safe for glDeleteProgram() according to OpenGL SPEC).

Original change's description:
> OpenGL: delete shaders and pipelines when they are not used any longer
>
> Previously on OpenGL backend the GL pipelines and shaders are never
> deleted. With this patch the GL pipelines and shaders will be able to
> be destroyed correctly after they are not needed any longer.
>
> BUG=dawn:529
>
> Change-Id: I4f7f22c7b536825363fe1ecc0f5ffd1bb86fd774
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65140
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Stephen White <senorblanco@chromium.org>
> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>

Bug: dawn:529
Change-Id: Ie04ab069b9d26658f2b0d1b070d86bb650f3c878
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65486
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-10-04 12:31:22 +00:00