Commit Graph

11297 Commits

Author SHA1 Message Date
James Price b4049dcf40 tint/docs: Add uniformity entries to release notes
Change-Id: Id66969fe22e5afd39ef83692dec5568d5c1aa7a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117803
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-01-26 13:02:59 +00:00
James Price ab52881bb5 tint/validator: Test @diagnostic on invalid places
It was already being rejected everywhere it should be, but now we
actually test this to make sure.

Bug: tint:1809
Change-Id: I07f1d24b12e9e41a162e0d19194d4897c33b5324
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117802
Kokoro: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-01-26 13:00:43 +00:00
James Price 2f2400bfdc tint/validator: Check for conflicting diagnostic controls
Two diagnostic controls conflict if they have the same rule name and
different severities.

This change also allows duplicate diagnostic attributes.

Bug: tint:1809
Change-Id: I7622dd947ffa03292ad3340161688e00862d5b24
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117801
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-01-26 12:24:42 +00:00
Dawn Autoroller 272fb64105 Roll ANGLE from c9094ca6b3e3 to 5e43562b5f99 (7 revisions)
c9094ca6b3..5e43562b5f

2023-01-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 701fadbce737 to 5c03f547ddf9 (614 revisions)
2023-01-26 romanl@google.com Capture/Replay: disable more multi-threaded tests.
2023-01-25 cclao@google.com Vulkan: CommandProcessor::WaitForWorkComplete only if needed
2023-01-25 geofflang@chromium.org Metal: Remove the UNIMPLEMENTED from setBinaryRetrievableHint
2023-01-25 m.maiya@samsung.com Add support for glShaderBinary
2023-01-25 cclao@google.com Vulkan: Make CommandProcessor use ThreadSafeCommandQueue
2023-01-25 cclao@google.com Vulkan: Make ThreadSafeCommandQueue's wait without lock

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 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: I1a9b16a3f1fb810b80c3d15be8c204e8c2eec16e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117860
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-01-26 11:36:50 +00:00
James Price 2dbb7b4f6a tint/SingleEntryPoint: Handle diagnostic directive
Add some E2E tests to make sure that we actually produce valid code
for each backend when diagnostic filtering is present.

Bug: tint:1809
Change-Id: I5e903ac0d2ca385967211bb889f86cb85de8f418
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117590
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-26 11:31:19 +00:00
dan sinclair 1226320a5b Move ast_type.cc to type.cc.
This file is already in the ast/ folder, and has been marked as a TODO
to move for a while. Actually move.

Change-Id: I697ff903fc9906921e2768243bdfba581cf18d4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117589
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-01-26 10:49:19 +00:00
dan sinclair 3076a8bf17 Add missing sem headers
This CL is based off of https://dawn-review.googlesource.com/c/dawn/+/113561
and adds the updates into `libtint_syntax_parser_src` to allow the
resolver to build correctly when the headers are added.

Change-Id: I5d14a88111ea1bf87bb2155d066b95378163e451
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117588
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-01-26 02:15:50 +00:00
Brandon Jones f68f2e06d7 Fix GatherDeviceInfo on Vulkan 1.0 devices
A bad assert was causing devices that only supported Vulkan 1.0, such as
the Nexus 5X, to crash when querying information about adapter
properties and features. This change removes the need for the ASSERT.

(Note that this does not guarantee WebGPU support on Vulkan 1.0 devices.
For example, the Nexus 5X does not have the fragmentStoresAndAtomics
feature, which is required for WebGPU.)

Bug: dawn:286
Change-Id: I7f884290f29ae7e9607933f6186feac2ce8af540
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117840
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2023-01-26 00:36:16 +00:00
Dawn Autoroller 9803d6c955 Roll ANGLE from 660e4a7c0d4f to c9094ca6b3e3 (3 revisions)
660e4a7c0d..c9094ca6b3

2023-01-25 yuxinhu@google.com Skip flaky tests dEQP-GLES31.functional.image_load_store.buffer*
2023-01-25 lexa.knyazev@gmail.com Adjust STENCIL_INDEX8 caps
2023-01-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 7d74066a9406 to 701fadbce737 (593 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 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: I11392d20b28f1271597650a5f2288ef58ea8d2d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117820
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-01-25 22:41:12 +00:00
dan sinclair 1a26e80318 Create a libtint_ast_src.
This CL moves the ast files into a libtint_ast_src source set. Similar
to sem, the headers are duplicated into the libtint_syntax_tree_src due
to the dependencies with program_builder.

This makes the sem and ast source sets be setup the same.

Change-Id: If51fac6fab6763c4dcf729061de6ef983a94063a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117587
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-01-25 22:40:28 +00:00
Austin Eng f7f2d4ae82 Roll third_party/webgpu-cts/ 3f9b09b36..ad8abf400 (2 commits)
Regenerated:
 - expectations.txt
 - ts_sources.txt
 - test_list.txt
 - cache_list.txt
 - resource_files.txt
 - webtest .html files


3f9b09b36b..ad8abf400d
 - ad8abf Make fuzzy test match wpt fuzzy specs (#2194)
 - b38a15 Use screenshot library (#2193)

Created with './tools/run cts roll'

Change-Id: Id8767584c8ff808d50cf02eb7eb7ab647853cd84
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Include-Ci-Only-Tests: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117782
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Kokoro: Austin Eng <enga@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
2023-01-25 22:00:12 +00:00
Austin Eng 97f56bd0b8 Clamp the stencil reference to 255
Fixed: dawn:1645
Change-Id: I908fe0a2cb029c7cc6cf94b066f0f842e0f1e224
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117532
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 20:57:49 +00:00
dawn-autoroll 1696edfbbf Roll vulkan-deps from 71bd1907ea2f to ba538cd033e4 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/71bd1907ea2f..ba538cd033e4

Changed dependencies:
* vulkan-validation-layers: ac7c75bb51..3471e93ca1

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 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: I9a2176e1c6aef53fd5fbde028bc73f5ec3e0cbd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117533
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-01-25 20:57:06 +00:00
Peng Huang 8fc1758a3d Append pipeline barrier for mappable buffers for submissions
So the next MapAsync() call, doesn't need to record pipeline barrier
command into the pending command buffer, submit it, and wait for it
completion.

Bug: b/265152896
Change-Id: Ied7cbca24a7b1bc81c0a6402179452599aabfe9b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116920
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 19:55:52 +00:00
Austin Eng e8870efb1b Handle Tint inspector reflection of bgra8unorm storage texture
The fuzzer produced a shader with this format and hit an UNREACHABLE
in Dawn.

Bug: dawn:1641, chromium:1410048
Change-Id: Ia5ba66a18fc718f7e6dd803f4229ecb12b02753e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117531
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 19:52:32 +00:00
dan sinclair a3e90618dc Remove libtint_core_src.
This CL removes `libtint_core_src` and folds the dependencies into
`libtint`. Uses have been updated to require the specific libraries they
depend on.

Change-Id: I91118cc9db376c53597a8e588db654b3a4105386
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117586
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 19:52:28 +00:00
Maksim Sisov 549fa71c8d remove use_system_libwayland
It's removed from swiftshader in [1]

[1] https://swiftshader-review.googlesource.com/c/SwiftShader/+/70408

Bug: chromium:1385736
Change-Id: I6f314eca86407f7ee452d89979a3ce6c3664d819
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114500
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
2023-01-25 19:32:15 +00:00
dan sinclair 186fdaf815 Rename libtint_core_all_src to libtint_syntax_tree_src
This CL renames the source set to make it clear it does not include all
files in tint.

Change-Id: Ib37603ca8d46e2920d3f3c6d79a59a292493c3fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117585
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 19:22:25 +00:00
dan sinclair d108693b59 Move a few more headers to base_src.
This cl moves a couple more files up to `base_src` and splits tint.cc
out to a separate `initializer` source set.

Change-Id: I65347ac182f3434a57cc49f0eeb1024f6adb52b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117584
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-01-25 19:15:42 +00:00
dan sinclair b560dcdb9f Pull inspector out to gn source set.
This CL extracts the inspector from libtint_core_all_src and into a
libtint_inspector_src.

Change-Id: I0b138cc2e47526b8575b6f31cc3e15fc8bd92545
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117583
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-01-25 18:41:40 +00:00
dan sinclair 2da119a0ce Split constant and type out of libtint_core_all_src
This CL moves the constant and type headers out of the
`libtint_core_all_src` target. In order to do so a `libtint_base_src`
target is created with the bits of core_all that are required to build
constant/ and type/ along with all the util/ files.

Change-Id: Idb016f51e9dcaa84b6d7a14e4e5f62d4a46a4161
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117582
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-01-25 18:39:00 +00:00
James Price 58dd079e46 tint/resolver: Warn for unknown diagnostic rules
Suggest alternatives in the warning.

Bug: tint:1809
Change-Id: If55f162fbd44a1987b573888ca7cc02490f8b05e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117800
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 14:10:04 +00:00
James Price f629770bcd tint: Move "suggest alternatives" logic to utils
This will be used for suggesting alternative diagnostic rule names in
the Resolver.

Bug: tint:1809
Change-Id: Icc9af02937326f6f774fbaf2aeaa9314c88fdea6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117565
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-01-25 14:10:04 +00:00
dawn-autoroll 2cf9764e45 Roll vulkan-deps from a2f348c2039f to 71bd1907ea2f (9 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/a2f348c2039f..71bd1907ea2f

Changed dependencies:
* spirv-tools: 7f9184a5b2..5db6c38e65
* vulkan-loader: 0a2c1bece6..ced1be175f
* vulkan-validation-layers: 8f898553b5..ac7c75bb51

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 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: I5afb97622cba1cc97a962317e041d8a7e081057a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117529
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-01-25 06:12:15 +00:00
Dawn Autoroller b45bdf8007 Roll ANGLE from a654666c00c1 to 660e4a7c0d4f (2 revisions)
a654666c00..660e4a7c0d

2023-01-25 kbr@chromium.org Don't override D16_UNORM to D32_FLOAT on Apple GPUs.
2023-01-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from c1ebeb5013f9 to 821e153ac85a (20 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 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: I96c55ab86eb36c23cfdc35ae9bb2cd8e0ffb6fb6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117780
Bot-Commit: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2023-01-25 05:40:02 +00:00
James Price bb0229002d tint/uniformity: Violations are now errors
Switch the default severity for all uniformity violations to errors.

We now have an opt-out mechanism for deriviative operations (via
diagnostic filters), and a `workgroupUniformLoad()` builtin for
compute shaders.

Bug: tint:1809
Change-Id: I666c706d6195ca0d24ead14c4709e7f646bfcc64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117741
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 01:24:46 +00:00
James Price f38ee3e073 tint/exe: Add --allow-non-uniform-derivatives flag
When used with the SPIR-V reader, this will insert a module-scope
diagnostic directive to suppress uniformity violations for derivative
operations.

Bug: tint:1809
Change-Id: I2305265231ccffad49461d194669ba598484e8e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117740
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 01:24:46 +00:00
James Price e657c470bd tint/uniformity: Add derivative_uniformity filter
Add additional `RequiredToBeUniform` nodes for each severity
level. When processing a call to a derivative builtin, look up the
severity from the semantic info for that AST node, and add an edge to
the corresponding `RequiredToBeUniform` node.

Propagate the severities to the callsite and parameter tags for a
function that contains a builtin.

Traverse that graph from each `RequiredToBeUniform` node to look for
violations at each severity level, starting with the most severe. Only
stop the analysis if an error is found, otherwise report the violation
and keep going.

Bug: tint:1809
Change-Id: I4ac838e85da3f4fb3d63f4892dce7f12b096f74b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117602
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 01:24:46 +00:00
James Price 5853205342 tint/sem: Record diagnostic severity modifications
Each sem::Node has a map which stores the diagnostic modifications
applied to that node. The sem::Info class provides a query to get the
diagnostic severity for a given AST node, by walking up the semantic
tree to find the tightest diagnostic severity modification. The
default severity is used if it was not overridden.

This allows components outside of the Resolver/Validator to determine
the diagnostic severity while walking the AST, which is required for
the uniformity analysis.

Bug: tint:1809
Change-Id: I4caf99d7412fb22fb1183b2c8cfde349da2fefd3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117601
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-25 01:24:46 +00:00
James Price 613fbcf79a tint: Add diagnostic and enable to ModuleCloneTest
Bug: tint:1809
Change-Id: I671440bf2b1f988eb39bd476841e92c3a7e58ae7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117600
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 23:13:38 +00:00
James Price c744a23d77 tint/reader/wgsl: Parse @diagnostic attributes
Future patches will expand the places where they can be used.

Bug: tint:1809
Change-Id: I74d87ce5164119ae1351380041f9ef4b1091d854
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117571
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 21:01:36 +00:00
James Price 75326f88e6 tint/writer/wgsl: Handle diagnostic attributes
Bug: tint:1809
Change-Id: Id2176eff808b24bdb0e31c3eb397c32219ed59e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117570
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 21:01:36 +00:00
James Price 8dd35110c2 wgsl/reader: Parse diagnostic directives
Bug: tint:1809
Change-Id: I9f129685f22f51f577b67050edeef8aeea0c0bc5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117569
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 21:01:36 +00:00
James Price 02855b5060 tint/resolver: Handle diagnostic attributes on functions
Push a new diagnostic filter scope at the start of resolving a
function and process function attributes immediately.

Bug: tint:1809
Change-Id: I8a7f4a29e4b7556d0721ed28c49d795c166fea00
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117568
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 21:01:36 +00:00
James Price e8ea579bce tint/writer: Handle diagnostic directives
The WGSL writer emits them, the other writers ignore them.

Bug: tint:1809
Change-Id: I163d868005c076b8fd4602f13d3e267b16c474c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117567
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 21:01:36 +00:00
James Price 81e55754e1 tint/resolver: Handle diagnostic directives
The Resolver parses the diagnostic rule and sets the updated severity
in a ScopeStack, which is stored in the Validator.

Automatically generate the diagnostic rule enum and its parsing logic
using intrinsics.def.

Add a "chromium_unreachable_code" diagnostic rule to test this.

Bug: tint:1809
Change-Id: Ia94db4321b8019f01d31a84da0fda25dfdf72f5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117566
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-01-24 21:01:36 +00:00
James Price 098e3d8f90 tint/dependency_graph: Handle diagnostic controls
Bug: 1809
Change-Id: I376d0758a09463b37e2d71040cc8add5897ef8bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117564
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 21:01:36 +00:00
James Price 15bf15d55f tint/ast: Add global diagnostic controls to Module
Bug: tint:1809
Change-Id: I363abc60597a6c340d5a4b4d147fa7f5747c2d9b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117563
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 21:01:36 +00:00
Ben Clayton 5a2b5d9cc9 Roll third_party/webgpu-cts/ 9fbed0099..3f9b09b36 (8 commits)
Regenerated:
 - expectations.txt
 - ts_sources.txt
 - test_list.txt
 - cache_list.txt
 - resource_files.txt
 - webtest .html files


9fbed0099e..3f9b09b36b
 - 3f9b09 Adjust fuzzy value on canvas_colorspace_rgba16float ref test (#2188)
 - 63e279 Make canvas_colorspace_rgba16float ref test more fuzzy
 - ace40f op,render_pipeline,sample_mask depth stencil multisampled tests (#2179)
 - f26ab8 Implement the division param restrictions in atan2 (#2183)
 - 381672 math: Remove pointless lerp() in biasedRange
 - 381f3d Test GPUCanvasContext.configure colorSpace
 - 3436e5 Clear pages between pages. (#2182)
 - 7e5c20 Test colorSpace in readback tests

Created with './tools/run cts roll'

Change-Id: I0b755e9de472b1091d0719a781e1de41474dcc13
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Include-Ci-Only-Tests: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117660
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 20:32:05 +00:00
Ben Clayton 41884e4ebf tint: Update origin-trial-changes for parser changes.
Change-Id: Ia2571eea79bb7175b2578888c3e3857fff418b52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117214
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-01-24 19:32:04 +00:00
Ben Clayton 7d2b192439 tint: rename template argument token strings
Drop the `(opening|closing template argument list)` bit. It makes for messy diagnostics.

Change-Id: I92d29ece8a012362dd16da297089aab908571415
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117213
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
2023-01-24 19:31:51 +00:00
Ben Clayton f0d8edecee tint: Fix x86 build
Fixed: tint:1813
Change-Id: I97b7c0c0a4bfdda2f7e63983caddcfb3a1e19c2f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117215
Reviewed-by: dan sinclair <dsinclair@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-01-24 19:29:54 +00:00
Ben Clayton 355b70d2be tint/reader/wgsl: Use ClassifyTemplateArguments()
For parsing.

Bug: tint:1810
Change-Id: I189d06136e79615d39c842aaa9ad58595f80283e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117210
Kokoro: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2023-01-24 19:28:14 +00:00
James Price ef5434dcd1 tint/ast: Add DiagnosticAttribute AST node
Bug: tint:1809
Change-Id: I297d050e001f5177a6697d8332713a1f41899b87
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117562
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
2023-01-24 18:44:27 +00:00
Ben Clayton 4ff2645d16 tint/reader/wgsl: Add ClassifyTemplateArguments()
Applies a heuristic to disambiguate less-than / greater-than from template argument lists.

This function is not currently used by the parser.

Bug: tint:1810
Change-Id: Ibd72dbae53b3159282177bf79c00ad0808b123a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117208
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2023-01-24 17:56:57 +00:00
dawn-autoroll d4f318d0f3 Roll vulkan-deps from f93afca731ce to a2f348c2039f (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/f93afca731ce..a2f348c2039f

Changed dependencies:
* vulkan-validation-layers: 78b8e5d064..8f898553b5

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 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: Ibeafbaa4061b6027111c955830618094e09015de
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117528
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-01-24 17:08:28 +00:00
Dawn Autoroller c9b3336a63 Roll ANGLE from ab334105e766 to a654666c00c1 (3 revisions)
ab334105e7..a654666c00

2023-01-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from d7dfd14fa0d0 to a2f348c2039f (13 revisions)
2023-01-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from d184372e4c92 to 7d74066a9406 (534 revisions)
2023-01-24 cclao@google.com Vulkan: Fix the VVL error for shaderRead to shaderRead barrier

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 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: Ia058d22e0422a2fc9093c9934fccc77a56ac6a44
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117722
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-01-24 16:01:44 +00:00
Brandon Jones 6c8aa8aff9 Resolve some reader/writer dependency issues
The HLSL/MSL includes in data_builder.h appear unused, but gn was
flagging them as problematic when attempting to build with the
corresponding tint_build flags disabled.

module_clone_test.cc is dependent on the WGSL reader and writer, but
was not gated on the corresponding tint_build flags in BUILD.gn.

tint_unittests_transform and tint_unittests_glsl_writer were both
dependent on the WGSL reader/writer, so added it as an explicit
dependency.

Bug: dawn:286
Change-Id: I20906414e8173065eef9403c9e9c05286afeaee9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117580
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-01-24 15:16:43 +00:00
Ben Clayton c98d57d662 tint: Rename 'static_assert' to 'const_assert'
Bug: tint:1807
Change-Id: I2c2a205ada01ad14d0bf6620a3dc3ec84dd7ee67
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117212
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-01-24 14:59:43 +00:00
Ben Clayton 9dc48bcef3 tint: Rename 'type' to 'alias'
Bug: tint:1812
Change-Id: I50bd8b036b47b4ec223a81eda53bd658d19645e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117211
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2023-01-24 14:55:17 +00:00