Ben Clayton
5d40a5621b
Add ParserImplTestWithParam to reduce boilerplate
...
There were a number of places where we were declaring classes derived from `testing::TestWithParam<T>` and then adding the same `parser()` helper logic.
Move this common logic down to a new `ParserImplTestWithParam<T>` class, and derive from that instead.
Removes a whole bunch of copy-pasta.
Change-Id: I8f308b77817fd6327c045d2fdee4462b7f32897a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31401
Commit-Queue: dan sinclair <dsinclair@chromium.org >
Reviewed-by: David Neto <dneto@google.com >
Reviewed-by: dan sinclair <dsinclair@chromium.org >
2020-10-29 19:19:34 +00:00
dawn-autoroll
c50dbf838d
Roll Tint from c8b2d23e9d to bfc2fceb84 (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/c8b2d23e9de7..bfc2fceb840a
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: I378f1ede36d0c4a6d3a0950ccea5cfce563d66f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31381
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-29 18:05:45 +00:00
dan sinclair
bfc2fceb84
Use min for bounded array accessing.
...
This CL updates the BoundArrayAccess transform to use `min(u32(val),
size)` instead of `clamp(val, 0, size)` so as to reduce the number of
instructions needed to clamp within range.
Bug: tint:285
Change-Id: Ic12bd67f3d755c8e52590f0585bac114ba9eaa94
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31360
Commit-Queue: David Neto <dneto@google.com >
Reviewed-by: David Neto <dneto@google.com >
2020-10-29 17:56:06 +00:00
dawn-autoroll
7055485706
Roll Tint from 6857ed0b0b to c8b2d23e9d (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/6857ed0b0bc3..c8b2d23e9de7
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: Icb77d13d147c5ff3bd35eb0fee2f5050f6cc6483
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31288
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-29 15:22:42 +00:00
dawn-autoroll
e326dbde2c
Roll Tint from c55fc39acb to 6857ed0b0b (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/c55fc39acba8..6857ed0b0bc3
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: Idc9f5356ca0bcac57fdc5201f32a159ce1f7bd9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31287
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-29 14:52:02 +00:00
dan sinclair
c8b2d23e9d
[spirv-writer] Emit access control information.
...
This CL adds emission of the decorations for the access control flags.
Bug: tint:208 tint:108
Change-Id: I3286132dad8edd2586228dc6e87749ad49451739
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31082
Commit-Queue: dan sinclair <dsinclair@chromium.org >
Reviewed-by: David Neto <dneto@google.com >
2020-10-29 14:45:02 +00:00
David Neto
6857ed0b0b
spirv-reader: apply access control to storage buffers
...
- Apply the AccessControlType wrappar around the struct type for any
variable in the StorageBuffer storage class.
- Drop the NonWritable member decorations for the struct type.
Bug: tint:108
Change-Id: I6496c8c3e8b5d92b2ed0071385915d2b8065a80d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31020
Reviewed-by: dan sinclair <dsinclair@chromium.org >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
2020-10-29 14:36:22 +00:00
dawn-autoroll
af64c73c17
Roll Tint from 4dd5665502 to c55fc39acb (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/4dd5665502ad..c55fc39acba8
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: I91ab5f7a6c39ae325c2f97ab2f7c6df0c22ec08a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31286
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-29 13:45:42 +00:00
dan sinclair
c55fc39acb
[ast] Unify the access control types.
...
This CL merges the StorageAccess enum with the AccessControl enum. The
enum is moved up to src/ast and placed in its own file for clarity.
Change-Id: I95a905a399b5d2e046ea1ea429b35f2064510c2d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31242
Commit-Queue: David Neto <dneto@google.com >
Reviewed-by: David Neto <dneto@google.com >
2020-10-29 13:36:32 +00:00
dawn-autoroll
a64fd1784a
Roll Tint from 62bbc6f6c0 to 4dd5665502 (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/62bbc6f6c050..4dd5665502ad
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: Ia2067cfc24b086854193f0281c7eb04b79ed0d07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31285
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-29 13:30:02 +00:00
Corentin Wallez
b0789fde61
Fix RPDesc::occlusionQuerySet not defaulting to nullptr
...
The default value for optional object structure members wasn't set
correctly for C++ structures.
Bug: dawn:22
Change-Id: I09e7f3675f6e0b5990ddcf03601b3b91cd25f553
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31200
Reviewed-by: Austin Eng <enga@chromium.org >
Reviewed-by: Shaobo Yan <shaobo.yan@intel.com >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
2020-10-29 13:09:12 +00:00
Ben Clayton
4dd5665502
Add tests for all reachable parser errors
...
These are _mostly_ covered in the over various test files, but unlike those, these new tests always parse from the root translation unit.
These new tests also use a new testing class which may be extended to verify error output for different error styles (verbosity, colors, etc).
Change-Id: I105488f9b16d90279af4cc418a1c845b6e239e9e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31263
Commit-Queue: Ben Clayton <bclayton@google.com >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
Reviewed-by: dan sinclair <dsinclair@chromium.org >
2020-10-29 13:05:52 +00:00
dawn-autoroll
dbc916c6f6
Roll Tint from d2fa57d26d to 62bbc6f6c0 (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/d2fa57d26dff..62bbc6f6c050
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: Id5d0d40e1fa8cd50c9a325a39afc1ee88ef3d2ab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31284
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-29 13:01:42 +00:00
dan sinclair
62bbc6f6c0
Fix doc tables
...
Change-Id: I9b82269c0dd77e3dc368c6f74cd02948e95f3b44
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31340
Reviewed-by: dan sinclair <dsinclair@chromium.org >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
2020-10-29 12:44:32 +00:00
dawn-autoroll
a584311a6a
Roll Tint from 5ede1190cf to d2fa57d26d (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/5ede1190cf97..d2fa57d26dff
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: Ic2eda20fd27a650b70e87b06c04339bc5de7dc59
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31283
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-29 03:55:45 +00:00
dan sinclair
d2fa57d26d
[doc] Add some documentation around translations.
...
This CL adds the start of a document listing how things translate into
various backends.
Change-Id: Iebeb4488450b4f299e83d0de7ee124b441795e98
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31240
Reviewed-by: David Neto <dneto@google.com >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
2020-10-29 03:39:34 +00:00
Kai Ninomiya
2bb8035ddc
Integrate deprecation testing into DawnTestBase
...
This makes it a lot easier to modify old tests to test deprecation
behavior, and means we can mark all of the places that are going to
break in the deprecation CL (while we're thinking about it) instead of
the removal CL (which is weeks later).
It also makes it so all deprecation warnings in the tests will be
caught. Turns out that they were already clean.
Bug: dawn:520
Change-Id: I429f667207b88df04341179369bb6d24e034ca65
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31141
Commit-Queue: Kai Ninomiya <kainino@chromium.org >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
2020-10-28 21:23:45 +00:00
dawn-autoroll
82cb8d8aba
Roll Tint from e8dc46a8c8 to 5ede1190cf (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/e8dc46a8c88b..5ede1190cf97
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: I7a6930e177a4087f4b1dc182ec3f3589847a028f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31282
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-28 21:19:25 +00:00
dawn-autoroll
87b886eecb
Roll Tint from c23a5652bd to e8dc46a8c8 (2 revisions)
...
https://dawn.googlesource.com/tint.git/+log/c23a5652bda1..e8dc46a8c88b
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: Ida8f8585aca77b1a0f79a96f1254ade8d984a4f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31281
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-28 21:09:05 +00:00
dan sinclair
5ede1190cf
[hlsl-writer] Add read-only storage buffers.
...
This CL updates the HLSL backend to emit based on the AccessControlType.
Bug: tint:208 tint:108
Change-Id: I25baccaaa9af99a214467fe67d55a2f4256dab8c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31105
Commit-Queue: dan sinclair <dsinclair@chromium.org >
Reviewed-by: David Neto <dneto@google.com >
2020-10-28 21:08:12 +00:00
dawn-autoroll
2971eb6749
Roll Tint from adb10d60de to c23a5652bd (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/adb10d60de32..c23a5652bda1
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: I28e3311142b228da36efe65e7845b8546fea6740
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31280
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-28 20:57:45 +00:00
dan sinclair
e8dc46a8c8
[msl-writer] Add read-only storage buffers.
...
This CL updates the MSL backend to emit based on the AccessControlType.
Bug: tint:208 tint:108
Change-Id: I02c0afe360c286888580135b496fb78a1e747d3b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31241
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com >
Reviewed-by: David Neto <dneto@google.com >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
2020-10-28 20:45:02 +00:00
dan sinclair
512ecc2762
Rename unwrap helpers.
...
With the addition of the AccessControlType we want to look through the
access control as well as the aliases as we work through the type tree.
This CL renames UnwrapAliasesIfNeeded to be UnwrapIfNeeded and
UnwrapAliasPtrAlias to UnwrapAll.
Change-Id: I5b027919c3143a89be24c4d87b8106f70358c03b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31104
Commit-Queue: David Neto <dneto@google.com >
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com >
Reviewed-by: David Neto <dneto@google.com >
2020-10-28 20:32:22 +00:00
Ben Clayton
c23a5652bd
Fix a couple of typos found in parser_impl.cc
...
Change-Id: Ice4047838ad5c5e48803d8a529f3ca24d2ce77c5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31262
Reviewed-by: dan sinclair <dsinclair@chromium.org >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
Commit-Queue: Ben Clayton <bclayton@google.com >
2020-10-28 20:18:22 +00:00
dawn-autoroll
47ee61679d
Roll Tint from bfd81096a5 to adb10d60de (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/bfd81096a5e6..adb10d60de32
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: I6bb4e9a6686d1d3667df019e14f6bf0e23573823
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31107
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-27 21:15:27 +00:00
Ben Clayton
adb10d60de
Add option and target for generating code cov info
...
The new `tint-generate-coverage` CMake target can be used with the clang toolchain to generate a `lcov.info` file at the root of the project, along with a `coverage.summary` human readable plain text file.
The `lcov.info` file can then be used by various tools to display code coverage information in your IDE / code editor.
Useful for ensuring decent test coverage.
Change-Id: I3d846f6da3af25d3d600d8e028f27b89e35b545f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31121
Commit-Queue: Ben Clayton <bclayton@google.com >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
Reviewed-by: dan sinclair <dsinclair@chromium.org >
2020-10-27 21:04:59 +00:00
David Neto
762b7c3457
Fix CMake build when building examples
...
Add subdirectory src/utils only once.
Change-Id: I3437e0a4c9ff250f4518ce485763117291889cd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31103
Reviewed-by: dan sinclair <dsinclair@chromium.org >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
2020-10-27 19:38:27 +00:00
dawn-autoroll
36b869c846
Roll Tint from 70a3f152f2 to bfd81096a5 (2 revisions)
...
https://dawn.googlesource.com/tint.git/+log/70a3f152f2f0..bfd81096a5e6
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: I1ab9628144955bfc72c7c1584929f833852ba170
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31102
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-27 19:31:47 +00:00
Kai Ninomiya
54123a391f
Allow unaligned source offset in writeTexture
...
With some refactoring of the relevant validation code.
Bug: dawn:520
Change-Id: Iedda0f7b1b67c20d3a88f2c4183dcc8eeae2096f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30742
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Commit-Queue: Kai Ninomiya <kainino@chromium.org >
2020-10-27 19:30:57 +00:00
dawn-autoroll
ff39c28c6a
Roll Tint from fcbc6efa8f to 70a3f152f2 (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/fcbc6efa8fd3..70a3f152f2f0
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: I68929b5eba6d291c6dc4ba645f996a0dbacedad3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31101
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-27 19:18:07 +00:00
dan sinclair
bfd81096a5
[ast] Add AccessControlType.
...
This CL adds the AST for an AccessControlType. This type contains an
access control (ReadOnly, WriteOnly, or ReadWrite) along with another
type pointer.
Bug: tint:208 tint:108
Change-Id: I2eed03f8760239f7e71dc2edd4a19a7c1661746e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31060
Reviewed-by: David Neto <dneto@google.com >
Reviewed-by: Ryan Harrison <rharrison@chromium.org >
Commit-Queue: David Neto <dneto@google.com >
2020-10-27 18:50:59 +00:00
Ben Clayton
ebe97f3ce1
Fix build for tests on gcc-9
...
```
../src/inspector/inspector_test.cc
[build] ../src/inspector/inspector_test.cc:203:13: error: explicit specialization in non-namespace scope ‘class tint::inspector::{anonymous}::InspectorHelper’
[build] 203 | template <>
[build] | ^
[build] ../src/inspector/inspector_test.cc:205:60: error: template-id ‘MakeLiteral<bool>’ in declaration of primary template
[build] 205 | bool* val)
```
These `MakeLiteral()` methods can just be standard non-templated overloads - so do that.
Change-Id: I7e0b4ec10636eaf772d1ed4d3e9341c5da4087af
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31120
Commit-Queue: Ben Clayton <bclayton@google.com >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
Reviewed-by: dan sinclair <dsinclair@chromium.org >
2020-10-27 18:47:39 +00:00
dawn-autoroll
f496d3b105
Roll Tint from 57694c8dab to fcbc6efa8f (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/57694c8dab3c..fcbc6efa8fd3
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: I92b3fd1e484d31e2bc3ffc55c2a65efc74ef38b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31100
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-27 18:41:37 +00:00
Ryan Harrison
70a3f152f2
Ran 'git cl format' over repo, found some nits
...
Change-Id: I5774e4cfc8a570522ac6533d69b5b87f7e5e0b6c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31081
Commit-Queue: Ryan Harrison <rharrison@chromium.org >
Reviewed-by: dan sinclair <dsinclair@chromium.org >
2020-10-27 18:14:29 +00:00
Ryan Harrison
fcbc6efa8f
[inspector] Extract storage-buffer information
...
BUG=tint:257
Change-Id: Ib85d76a3b972226b401e57ba2a632d6252e95f8f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31080
Commit-Queue: Ryan Harrison <rharrison@chromium.org >
Reviewed-by: dan sinclair <dsinclair@chromium.org >
2020-10-27 18:03:09 +00:00
Corentin Wallez
6b087819dd
s/OutputAttachment/RenderAttachment/g
...
But also keep OutputAttachment so it can be gradually changed in all
dependants.
See https://github.com/gpuweb/gpuweb/pull/1168 and
https://github.com/gpuweb/gpuweb/pull/1168
Bug: dawn:22
Change-Id: I6a1ec1de6c22ca4deac88b7fffde4b98d9d54a84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31040
Reviewed-by: Austin Eng <enga@chromium.org >
Reviewed-by: Stephen White <senorblanco@chromium.org >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
2020-10-27 15:35:56 +00:00
Corentin Wallez
25eeaa3d39
Make Surface reference its attached SwapChain
...
This solves an issues where when switching swapchains the previous
one was destroyed before the new one was created, doing so detached
itself from the Surface, which in turn made the new swapchain not do
a graceful transition via vkSwapchainCreateInfoKHR::oldSwapchain.
Keeping the reference on the surface makes sure we always have
knowledge of the previous swapchain when replacing it. It requires
re-working the lifetime model of NewSwapChainBase to not require a
call to DetachFromSurface in the destructor, and having the Device
explicitly tell a swapchain it got attached on creation (otherwise
there are ASSERTs firing when swapchain creation fails).
In addition, backends are changed to use a SwapChain::Create method
and fail with a validation error (for now) when the previous swapchain
didn't use the same API.
vulkan::SwapChain is updated to use the previous swapchain's device's
fenced deleter to destroy it which is important in the device
switching tests.
The SwapChainValidationTests are updated because with the lifetime
changes the texture view can be kept alive after the application has
lost the last reference to the wgpu::SwapChain.
TBRing since it was reviewed in a different CL (but for the wrong
branch).
TBR=enga@chromium.org
TBR=senorblanco@chromium.org
Bug: dawn:269
Change-Id: Ie4374b5685af990d68969ab9cd7767e53c287ace
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31041
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
2020-10-27 11:31:26 +00:00
dawn-autoroll
41c24933da
Roll Tint from 1bafdc3c45 to 57694c8dab (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/1bafdc3c45e7..57694c8dab3c
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: Ib80d1acf683b943cdab41d268f64a78baddea1c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31002
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-26 20:51:46 +00:00
Ryan Harrison
57694c8dab
Change test terminology to reflect WebGPU spec
...
The spec explicitly refers to these as uniform buffers, not uniform
buffer objects (UBOs).
Change-Id: Ia825f8ddd64fe9a3c20fb10914c6446346fc0217
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31001
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com >
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com >
2020-10-26 20:11:48 +00:00
dawn-autoroll
8036d99531
Roll Tint from f81c1081ea to 1bafdc3c45 (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/f81c1081ea7d..1bafdc3c45e7
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 rharrison@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: rharrison@google.com
Change-Id: Ic5e5e31f9d11f624ae30e7a69c5b830efac59ae9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30980
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-26 14:45:05 +00:00
David Neto
1bafdc3c45
spirv-writer: Generate load for return value, when needed
...
spirv-writer: treat function parameter as const
Bug: tint:274
Change-Id: Iba4d90ea10a70ce1f551b7b8da6efcc01fe97412
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30924
Commit-Queue: dan sinclair <dsinclair@chromium.org >
Reviewed-by: dan sinclair <dsinclair@chromium.org >
2020-10-26 14:27:08 +00:00
Jiawei Shao
42103bc2e9
Fix crash when device is removed before CreateReady*Pipeline callback
...
This patch fixes a crash issue when the device is destroyed before
the callback of CreateReady{Render, Compute}Pipeline is called. Now
when the callback is called in DeviceBase::ShutDown(), the cached
pipeline object will also be destroyed before the callback returns.
BUG=dawn:529
TEST=dawn_end2end_tests
Change-Id: I91ec2608b53591d265c0648f5c02daf7fadac85e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30744
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Reviewed-by: Austin Eng <enga@chromium.org >
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com >
2020-10-24 03:11:43 +00:00
Jiawei Shao
ebdbc03b77
Treat VK_SUBOPTIMAL_KHR as a valid return value of vkQueuePresentKHR
...
vkQueuePresentKHR() may return VK_SUBOPTIMAL_KHR when "a swapchain no
longer matches the surface properties exactly, but can still be used to
present to the surface successfully", so it can also be treated as a
valid return value that indicates vkQueuePresentKHR() has returned
successfully.
This patch fixes the crash when we run the dawn_end2end_test
SwapChainTests.ResizingWindowOnly on the latest Intel Vulkan Windows
driver.
BUG=dawn:269
TEST=dawn_end2end_tests
Change-Id: I571ee74ea75b7a7f6fa59c7eebeed87a2429180d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30842
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Reviewed-by: Austin Eng <enga@chromium.org >
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com >
2020-10-24 02:46:13 +00:00
dawn-autoroll
8180c71a35
Roll Tint from 9ab6e8b9eb to f81c1081ea (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/9ab6e8b9eb0e..f81c1081ea7d
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 dsinclair@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: dsinclair@google.com
Change-Id: I4cb016a596266c31b1af83979742929f3a204076
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30901
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-23 23:51:23 +00:00
David Neto
f81c1081ea
wgsl-reader: treat function formal params as const
...
They should only be singly-assigned.
This is required because consts can hold pointers, but
var's cannot. And we need to support pointer arguments.
Bug: tint:275
Change-Id: I00a58734725bd08d40df71c736854a93c364a33c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30923
Reviewed-by: dan sinclair <dsinclair@chromium.org >
Commit-Queue: dan sinclair <dsinclair@chromium.org >
2020-10-23 23:39:25 +00:00
Kai Ninomiya
c9d0b492d5
Implement new formula for requiredBytesInCopy
...
Changed upstream in:
- https://github.com/gpuweb/gpuweb/pull/1014
- https://github.com/gpuweb/gpuweb/pull/1130
Note that in some of the cases where width==0 || height==0 || depth==0,
this increases the number of linear data bytes required for a copy.
Since this is a corner case, no deprecation logic is added.
Removes a duplicated copy of this logic in TestUtils.cpp.
Bug: dawn:520
Change-Id: I3b3d079c6ef316df7d95ba5c349bf8de4646fa4d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30741
Reviewed-by: Austin Eng <enga@chromium.org >
Commit-Queue: Kai Ninomiya <kainino@chromium.org >
2020-10-23 21:21:33 +00:00
Austin Eng
ca5aa235da
Validate texture aspect on TextureView creation
...
Bug: dawn:439
Change-Id: Iba8c283e2f4551d9600410ff958d5a304a49ae2c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30724
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Reviewed-by: Stephen White <senorblanco@chromium.org >
Commit-Queue: Austin Eng <enga@chromium.org >
2020-10-23 20:06:03 +00:00
dawn-autoroll
8901df8ffe
Roll Tint from e6fda61ef0 to 9ab6e8b9eb (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/e6fda61ef0c4..9ab6e8b9eb0e
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 dsinclair@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: dsinclair@google.com
Change-Id: I7c9a4126ceb4d8aad4be23caa417d76c5be31a2c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30941
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-23 18:32:43 +00:00
David Neto
9ab6e8b9eb
spirv-reader: treat function parameters as const declarations
...
Change-Id: I5e5f35be15737c6dc46bb2e9dc1319f7c403eab8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30921
Reviewed-by: dan sinclair <dsinclair@chromium.org >
Commit-Queue: David Neto <dneto@google.com >
2020-10-23 18:19:10 +00:00
dawn-autoroll
4f06cd3f6d
Roll Tint from 79d271580e to e6fda61ef0 (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/79d271580e21..e6fda61ef0c4
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 dsinclair@google.com on the revert to ensure that a human
is aware of the problem.
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/master/autoroll/README.md
Bug: None
Tbr: dsinclair@google.com
Change-Id: I997fa1963fd53502a49852755b9da03597039dfd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30940
Reviewed-by: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2020-10-23 18:13:03 +00:00