Commit Graph

8501 Commits

Author SHA1 Message Date
Ben Clayton 4dfa394a3c ProgramID: Move hot code out of template function
This is causing code bloat. Move common code out to a single function that's implemented in the .cc file.
Saves about 25k from the all-features-enabled Release build of tint for x64.

Bug: tint:1226
Change-Id: Idc2fef1b9ca92a2f48dfc5e252a3853721d048aa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66447
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-10-15 13:46:50 +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
Ben Clayton c40d15d5da resolver: Apply some missing explicit casts
These constructor parameters of StructMember take a uint32_t.
The compiler will normally warn / error about this, but there's some quirk of std::make_shared that makes the compiler silence this warning (possibly because the constructor call is in the STL?).

Was noticed when experimenting with BlockAllocator::Create() to reduce binary size.

Change-Id: I8cdf5078150927e5624752ee7374305c0a5982f0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66448
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-14 22:43:21 +00:00
David Neto a6969c4359 wgsl-reader: Hex float exponents are optional
Fixed: tint:1210
Change-Id: I4256494e3ca3f98082f360e0447d0392964073bd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66040
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-10-14 21:38:01 +00:00
Ben Clayton a095b26d17 CloneContext: Move hot code out of template members
This is causing code bloat. Move common code out to a single method that's implemented in the .cc file.
Saves about 10k from the all-features-enabled Release build of tint for x64.

Bug: tint:1226
Change-Id: I80b76e69521c3cc890c74b4bc73a68f1c9bdd3df
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66446
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-14 21:27:39 +00:00
Ben Clayton d1ee47a1cd ast: Remove to_str() and type_name()
This is no longer used.

Fixed: tint:1225
Change-Id: I0cfe9955687a2b7ded3e645c573f3bffbc2f1f84
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66380
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-14 21:25:49 +00:00
Ben Clayton a5b3f07ec7 reader/spirv: Test with WGSL writer intead of to_str()
This change replaces all the SPIR-V reader tests to their equivalent WGSL form.

Bug: tint:1225
Change-Id: Idf0e6050f49fad0a8223b50bac89014dbdcf9b2b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66444
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-14 21:22:19 +00:00
Ben Clayton 1364f202da Remove more uses of AST to_str() and type_name()
These methods are going to be removed as they provide little benefit over the WGSL form, are a maintainance burden and they massively bloat our codebase.

This change introduces sem::CallTargetSignature, which can be used as a std::unordered_map key.
This is used in writer/spirv to replace a map that was keyed off ast::Function::type_name().

Bug: tint:1225
Change-Id: Ic220b3155011f21b14d49eecc8042001148e4ca5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66443
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-14 21:17:29 +00:00
Ben Clayton 11ed0db30d resolver: Don't use ast to_str() methods
These return weird names that love the use of '__' and have little relation to WGSL.

Improve the duplicate case error message.

Clean up control_block_validation_test.cc by making used of the ProgramBuilder helpers.

Bug: tint:1225
Change-Id: I8c4cf3943145cf8372c00d33ae0166c0c0bcbb8b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66442
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-14 20:30:29 +00:00
Ben Clayton 262210f12b utils: Add ReplaceAll() string helper
Helpful for template string substitutions in tests, to reduce string concat noise.

Change-Id: I612084e2c267d93d79c92cf3ac0231b6b904f0e3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66440
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-10-14 20:24:50 +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
Ben Clayton 89fb370b30 samples/main: Fix warning when TINT_BUILD_GLSL_WRITER==0
The compiler moans that the program and options parameters are not used, which can be treated as an error.

Change-Id: Idcc190204be42b722488e86a4cd354ff6a401eda
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66445
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-10-14 16:18:37 +00:00
Stephen White b281dd168d GLSL: implement atan2.
GLSL has no atan2() instrinsic, but a 2-parameter overloaded atan()
instead.

Bug: tint:1222
Change-Id: I368b3989117cd329fea1020cd941daa0a69525cd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66360
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-14 16:17:38 +00:00
Ben Clayton 7f1c8d98c5 tools: Fix file regex in fix-tests
The old regex was not allowing numbers in the filenames.

Change-Id: Ic16de247f9caadefda6d6eb05896923ba4399ba5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66441
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-10-14 16:16:48 +00:00
Stephen White 2f963aaf82 More GLSL fixes.
Remove register-and-space decoration.
Add "main" to GLSL keywords, to force renaming.
Output correct compute width decoration (not numthreads).
Remove static keyword.

Bug: tint:1218 tint:1219 tint:1220
Change-Id: I171f183690b6531c76218414e0d81f6ef5e22e6b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66340
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-14 16:16:19 +00:00
Stephen White 7cf3b28a87 GLSL writer: validate all entry points with glslang.
Generate and validate all entry points individually.
This is required since GLSL has separate shader files, and
can only have a single "main" entry point.

Bug: tint:1217
Change-Id: Ie5cb510aaef3b7c8a7573f5fa9446815284afecb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/61920
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-14 14:39:36 +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
Ben Clayton f3f2d0a218 Resolver: Remove texture_storage read access
The intrinsics that did anything useful with this were deprecated
several releases ago.

Change-Id: I79e3c901b6a78583853a067ec46cfa98e346517c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66262
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-14 10:10:45 +00:00
Ben Clayton 14fc622161 ast: Rename CallExpression::params() to args()
Arguments are the values passed to a function.
Parameters receive arguments.

Fixed: tint:811
Change-Id: I82fe71aa795b8b365bc78981e84c86b419eb3eb2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66263
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-14 09:51:14 +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
Ben Clayton 11c9656b14 docs: Fix origin trial number
The listed changes aren't going to land into M97, as M96 has already been cut.

Change-Id: I7b636bf7a6da3b831ad8f121acd0f8c3f87a1423
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66381
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-14 03:17:32 +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
Ben Clayton 2aa6855914 intrinsics: Remove deprecated modf & frexp overloads
These have been deprecated for multiple chrome releases.

Change-Id: I4cc05a74ff8f085e6d13f93aefb93077480e52f5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66261
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-12 21:57:47 +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
Ben Clayton d57a129810 reader/spirv: Remove stdout spam in tests
Change-Id: I06361ae5bb0f69b3ac66c3ddc22abb5988e4c4fe
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66260
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2021-10-12 17:35:27 +00:00
Alastair Donaldson 8f780f1022 Choose black-box fuzzer back-end based on data
Instead of uploading separate black-box fuzzers for each target
language, it will be more convenient to have the target language chosen
based on the data file being processed. This change facilitates that.

Bug: https://crbug.com/1246587
Change-Id: I39f225835f8ca06cb8b8ea1c791b6c872f0f9d8f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66180
Auto-Submit: Alastair Donaldson <afdx@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2021-10-12 17:08:27 +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
Ryan Harrison 37a666d91c Add robustness pass to reader writer fuzzers
BUG=chromium:1255257,tint:1208

Change-Id: Ia5daeff8d839cbb7810bbbc12feab21039d0b681
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66060
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Alastair Donaldson <afdx@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2021-10-12 14:41:20 +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
Ryan Harrison ce90ac52f4 Remove BoundArrayAccessors
BUG=tint:1212

Change-Id: I054bedb6f20ef18d70408087f774ef252403b49c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66100
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-07 21:55:21 +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
Alastair Donaldson d4b8f887a5 Remove injected bug
Removes an abort that was injected to confirm that a fuzzer target was
working.

Bug: https://crbug.com/1246587
Change-Id: Ibe5270eacb3dfa2832b5de4c1fcf7b220af91fcc
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66121
Auto-Submit: Alastair Donaldson <afdx@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2021-10-07 18:20:29 +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
Sarah 7ff308fd18 cts: write test URL in url() instead of description
test name: from "... + section name" -> "section name + ..."

bug: tint:1203
Change-Id: Ic71f2cd3ef3e45d335f382dde93cc8694d998204
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65980
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 22:00:58 +00:00