Corentin Wallez
ff6c9ca6f0
wgpu::InputStepMode -> VertexStepMode
...
See https://github.com/gpuweb/gpuweb/pull/1927
Adds a typedef to make a gradual deprecation.
Bug: dawn:1023
Change-Id: Ic81a933a95556fbf5726056530788dde017a1449
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59442
Reviewed-by: Austin Eng <enga@chromium.org >
Reviewed-by: Stephen White <senorblanco@chromium.org >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
2021-07-25 18:40:19 +00:00
Corentin Wallez
13081d4e46
Deprecate InputStepMode in favor of VertexStepMode
...
Bug: dawn:1023
Change-Id: Ib2b5f51538e25455779a303564b98b7ee4a7ab40
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59443
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
2021-07-25 17:21:15 +00:00
Dawn Autoroller
f004b6ec2a
Roll Tint from f7d0c1cbfe to 1c6ff0ec3b (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/f7d0c1cbfe46..1c6ff0ec3b6a
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: Ied649ccfde7ec4d80ff65159ffeb5720d8915aa1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59600
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-25 08:10:39 +00:00
James Price
1c6ff0ec3b
hlsl: Add 'line' to reserved keywords
...
Fixed: tint:1037
Change-Id: I46163ac6ec3e8ba7ba1fd31826d04c011fe04973
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59481
Auto-Submit: James Price <jrprice@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-07-25 06:44:03 +00:00
Dawn Autoroller
184a6b564c
Roll Tint from 70eb1d3573 to f7d0c1cbfe (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/70eb1d3573bf..f7d0c1cbfe46
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: I6dfa84b9d183f15e77be413a896ddc699a942b5d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59581
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-24 14:14:08 +00:00
Dawn Autoroller
d7086c91d3
Roll Tint from 48411444b4 to 70eb1d3573 (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/48411444b45e..70eb1d3573bf
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: I71d7656eb5db6a7d2bf836649ac231ebfa5e6522
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59580
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-24 08:15:18 +00:00
David Neto
f7d0c1cbfe
spirv-reader: polyfill scalar reflect
...
Fixed: tint:1018
Change-Id: I60916d6c4ac4ae8c1a88763c12acf83d19bb2e68
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58821
Commit-Queue: David Neto <dneto@google.com >
Auto-Submit: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@chromium.org >
2021-07-24 06:31:02 +00:00
David Neto
70eb1d3573
spirv-reader: polyfill scalar faceForward
...
Bug: tint:1018
Change-Id: I912c6deaed4e3c3f4c5dfb76e7ed7e917b4c6498
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58820
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: David Neto <dneto@google.com >
Auto-Submit: David Neto <dneto@google.com >
Reviewed-by: Ben Clayton <bclayton@chromium.org >
2021-07-24 06:11:52 +00:00
Dawn Autoroller
93a453da42
Roll Tint from 294cb95f0e to 48411444b4 (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/294cb95f0e23..48411444b45e
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: Iec491a91d1f16c891acffe5069c5312db9c57e8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59520
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-24 00:16:27 +00:00
Dawn Autoroller
6515e20a1e
Roll Tint from bd3edb564f to 294cb95f0e (7 revisions)
...
https://dawn.googlesource.com/tint.git/+log/bd3edb564fd6..294cb95f0e23
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: I00ba4b7494694f86122dde9eda6dd6b1d0feb6bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59500
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-23 19:06:17 +00:00
Li Hao
7839647a23
Disable Timestamp Query on macOS 11+
...
Bug: dawn:940
Change-Id: I74f5f3814dd4eb8b3b025f32ba1eb56a197cfec2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59480
Reviewed-by: Austin Eng <enga@chromium.org >
Commit-Queue: Austin Eng <enga@chromium.org >
2021-07-23 18:59:47 +00:00
Ben Clayton
48411444b4
writer/[hlsl,msl]: Default name_printed to false
...
Addresses the review comment:
https://dawn-review.googlesource.com/c/tint/+/59302/4/src/writer/msl/generator_impl.cc#1932
Change-Id: I4cd6e0e626748328ca2bacc74aa9127cb224cf4a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59448
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-07-23 18:40:32 +00:00
Ben Clayton
294cb95f0e
Re-generate expected outputs.
...
Change-Id: I97fc90d33fe7620b3fccfab343a9c0bbfdf6924c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59447
Auto-Submit: Ben Clayton <bclayton@google.com >
Commit-Queue: James Price <jrprice@google.com >
Reviewed-by: David Neto <dneto@google.com >
Reviewed-by: James Price <jrprice@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
2021-07-23 17:52:26 +00:00
Ben Clayton
5ac96af72c
test: Add FXC test cases for indexing arrays in structs
...
Also move:
test/fxc_bugs/vector_assignment_in_loop
to
test/bug/fxc/vector_assignment_in_loop
Change-Id: I7bbfc476fdb7a3296025609625e322fed8d16285
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59444
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-07-23 16:44:52 +00:00
Ben Clayton
7204756d4d
intrinsics: Add mix(vec, vec, f32) overload
...
Fixed: tint:1029
Change-Id: Ie367947bd9bf65ad6bb2c278bbe4bd0740512faa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59446
Reviewed-by: David Neto <dneto@google.com >
Reviewed-by: James Price <jrprice@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
2021-07-23 16:43:01 +00:00
Ben Clayton
053559d051
intrinsics: Add new struct form of modf(), frexp()
...
Implement these for all the writers.
SPIR-V reader not implemented (the old overloads weren't implemented either).
Deprecate the old overloads.
Fixed: tint:54
Change-Id: If66d26dbac3389ff604734f31b426abe47868b91
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59302
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-07-23 16:43:01 +00:00
Corentin Wallez
21528281fd
D3D12: Fix order of Tint transforms
...
FirstIndexOffset must happen after BindingRemapper otherwise some
invalid AST is produced after FirstIndexOffset.
This was found running a CTS test on Windows:
validation,vertex_state:vertex_shader_type_matches_attribute_format
Also adds a regression test.
Bug: dawn:1014
Change-Id: Icbe4b3adb5e5844ffc8435e0e67056c7dff23970
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59281
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
Auto-Submit: Corentin Wallez <cwallez@chromium.org >
2021-07-23 15:49:47 +00:00
Corentin Wallez
9bb32ba330
Make vertex attrib offsets require min(4, formatSize)
...
Bug: dawn:1010
Change-Id: Ib7e7fe7f9fb7fbf1a7701b72ed5a1c75d5c01209
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59282
Reviewed-by: Kai Ninomiya <kainino@chromium.org >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
2021-07-23 14:28:47 +00:00
Dawn Autoroller
77a399790c
Roll Tint from ba93d14c9a to bd3edb564f (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/ba93d14c9a92..bd3edb564fd6
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: Iaabfbd65b69375a70ecc8535c7d1ba30f64ced27
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59460
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-23 14:00:17 +00:00
Sarah
465c5aa51d
validation: clean up function attributes validation and unit-tests
...
- clean up function decorations unit tests
- clean up interpolate and invariant validation and unittest
- add separate unit-tests for each shader stage input and output
- add [[builtin(position)]] tests
- add validation and test for:
structures with 'location' decorated members cannot be used as compute shaders input
Bug: tint:1007
Change-Id: I12e97e163b3a77bc76ce21faba241683eec5d917
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58942
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-07-23 13:23:20 +00:00
Sarah
f76c227cee
parser: fix wgsl expect_const_expr()
...
Bug: tint:1025
Change-Id: I35aab866ffce57681662f59e4b8e701bb03cf718
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59220
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com >
2021-07-23 13:15:10 +00:00
Alastair Donaldson
f7e73d4ee3
Add tests derived from VK-GL-CTS
...
This adds SPIR-V assembly and WGSL tests derived from VK-GL-CTS commit
571256871c2e2f03995373e1e4a02958d8cd8cf5. The following procedure was
followed:
- Those .amber files in VK-GL-CTS wholly owned by Google were
identified
- All GLSL and SPIR-V shaders were extracted from the Amber files and
converted into SPIR-V binaries
- The compact-ids pass of spirv-opt was applied to each binary
- Duplicate binaries were removed
- spirv-opt -O was used to obtain an optimized version of each remaining
binary, with duplicates discarded
- Binaries that failed validation using spirv-val with target
environment SPIR-V 1.3 were discarded
- Those binaries that tint could not successfully convert into WGSL were
put aside for further investigation
- SPIR-V assembly versions of the remaining binaries are included in
this CL
- test-runner with -generate-expected and -generate-skip was used to
generate expected .spvasm, .msl, .hlsl and .wgsl outputs for these
SPIR-V assembly tests
- Each successfully-generated .expected.wgsl is included in this CL
again, as a WGLSL test
- test-runner with -generate-expected and -generate-skip was used again,
to generate expected outputs for these WGSL tests
Change-Id: Ibe9baf2729cf97e0b633db9a426f53362a5de540
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58842
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-07-23 13:10:12 +00:00
Alastair Donaldson
bd3edb564f
Disable size assertions in SPIR-V Tools fuzzer
...
The SPIR-V Tools fuzzer asserts that the binaries it receives have sizes
that are multiples of 4 bytes, as it should only ever run on valid
binaries. This is failing in ClusterFuzz, likely due to the fuzzer being
misconfigured, so for now these assertions have been replaced with early
exits. They should be reinstated once the fuzzer is correctly
configured.
Fixes: chromium:1232308
Change-Id: I1fa980d09ce9e5c349a2cfcebe0246ebad6613fb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59440
Reviewed-by: Ben Clayton <bclayton@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Kokoro: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Auto-Submit: Alastair Donaldson <afdx@google.com >
2021-07-23 11:21:41 +00:00
Yang Gu
a314f0963a
Use last 2 fields as Intel graphics driver build number
...
After discussion with driver team, there is no need to differentiate new
driver and legacy driver for build number, so the last 2 fields are used
consistently.
Bug: None
Change-Id: I43ac2b484f84ed209d46dd9283830930908b05ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59121
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com >
Reviewed-by: Austin Eng <enga@chromium.org >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Commit-Queue: Yang Gu <yang.gu@intel.com >
2021-07-23 06:48:00 +00:00
Dawn Autoroller
b16bcbdf73
Roll Tint from fced350b3d to ba93d14c9a (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/fced350b3d20..ba93d14c9a92
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: Id7a07c2098129871cde588be4d61d96aca34a4e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59400
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-23 04:49:41 +00:00
Dawn Autoroller
8f294552b6
Roll Tint from 4261466a84 to fced350b3d (2 revisions)
...
https://dawn.googlesource.com/tint.git/+log/4261466a843f..fced350b3d20
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: I3467f784646b0f01da165d84c36238b354b1cad4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59380
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-22 23:28:18 +00:00
Ben Clayton
ba93d14c9a
fuzzers: Fix use-after-free
...
Diagnostics hold a pointer to the source, used for printing the source in the error message.
Because of this, the source must live at least as long as the diag::list.
Fixed: chromium:1232097
Change-Id: Iad8b30a2bd69f505dd8bb0eadc5a35115400d047
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59360
Auto-Submit: Ben Clayton <bclayton@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Kokoro: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-07-22 22:53:24 +00:00
Ben Clayton
fced350b3d
sem::Type: Replace GetDefaultAlignAndSize() with Size() and Align()
...
This is a cleaner API, and the implementation doesn't have to know a bunch of information about all the derived types.
Change-Id: I96bebcb9f3ceda86fa34bd8e70961dee63fd7e13
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59301
Commit-Queue: Ben Clayton <bclayton@google.com >
Auto-Submit: Ben Clayton <bclayton@google.com >
Kokoro: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Antonio Maiorano <amaiorano@google.com >
2021-07-22 18:56:54 +00:00
Ben Clayton
f5ed2ba906
sem: Rename Vector::size() to Vector::Width()
...
`Size()` will be added which is the size of the type in bytes.
Change-Id: If997820d7859cd9d1bb0631d1b72150378e6a24b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59300
Auto-Submit: Ben Clayton <bclayton@google.com >
Reviewed-by: Antonio Maiorano <amaiorano@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
2021-07-22 18:31:34 +00:00
Dawn Autoroller
54d988d189
Roll Tint from 66b979d7fb to 4261466a84 (5 revisions)
...
https://dawn.googlesource.com/tint.git/+log/66b979d7fb75..4261466a843f
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: Ie52c3d68511883d356bc01f7bd40b5c039067a07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59261
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-22 18:18:30 +00:00
Austin Eng
01ceccb1eb
Disallow timestamp query creation if disallow_unsafe_apis
...
Bug: chromium:1226078
Change-Id: I567522c5562d8cba616ef4315c91a0420d5146d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59044
Reviewed-by: Hao Li <hao.x.li@intel.com >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Commit-Queue: Austin Eng <enga@chromium.org >
2021-07-22 18:13:00 +00:00
James Price
4261466a84
writer/hlsl: Ignore struct member offset attribute
...
These are generated by the SPIR-V reader. Structures used by the
storage and uniform storage classes are handled separately, so we can
safely ignore this attribute for the other storage classes which are
not shared with the host.
Fixed: tint:1027
Change-Id: I8df4b41c687922a97f3b0ed97804cecc17d8997a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59240
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-07-22 14:41:37 +00:00
James Price
eb39420ae6
reader/wgsl: Add support for block comments
...
Handles nested block comments.
Allow unterminated block comments at EOF, as it is not clear whether
WGSL will allow this or not.
Bug: tint:881
Change-Id: Ieae4e0073dab69f773adb32018a9bdaf4f352116
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59180
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-07-22 14:41:37 +00:00
Ryan Harrison
18d7e785d3
Fuzz WGSL and MSL generator options
...
BUG=tint:973
Change-Id: I94dc136444e9650dcf3d1c81a52e6d4491b21a16
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59221
Auto-Submit: Ryan Harrison <rharrison@chromium.org >
Commit-Queue: Ben Clayton <bclayton@google.com >
Reviewed-by: James Price <jrprice@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
2021-07-22 13:25:54 +00:00
Ben Clayton
4ffcf067a3
sem: Add Owner() to sem::Parameter
...
Change-Id: I3de1e2437b9604378b8368494363e19070443670
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59201
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ryan Harrison <rharrison@chromium.org >
Reviewed-by: James Price <jrprice@google.com >
2021-07-22 13:24:59 +00:00
Ben Clayton
0f2d95dea3
sem: Split sem::Variable into global, local and parameter
...
Each of these may contain information specific to their kind.
Change-Id: Ic8ac808088132b7bc2e43da6ce46a06571e0fed5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59200
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ryan Harrison <rharrison@chromium.org >
Reviewed-by: James Price <jrprice@google.com >
2021-07-22 13:24:59 +00:00
Dawn Autoroller
f844ff071c
Roll Tint from fe3ba95e6a to 66b979d7fb (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/fe3ba95e6a46..66b979d7fb75
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: I47c799263b2b9e8c1591619a29d0e1fdff99ffee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59260
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-22 12:44:00 +00:00
Corentin Wallez
e9c8225f54
Implement render pipeline vertex format base type validation.
...
Bug: dawn:1008
Change-Id: I04d1ff1d46c1106147a8c50415c989db5789cbfc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59031
Auto-Submit: Corentin Wallez <cwallez@chromium.org >
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
2021-07-22 11:43:10 +00:00
Alastair Donaldson
66b979d7fb
Override CMake cache for fuzzer options
...
Enabling particular fuzzers requires that certain other CMake options
are enabled. For example, enabling the SPIR-V Tools fuzzer requires
enabling the CMake option for building spirv-fuzz. This change uses the
FORCE parameter to force the CMake cache to be overridden in such cases.
The change also adds FORCE to other options where it seems appropriate,
and improves some doc strings associated with CMake options.
Fixes: tint:1024
Change-Id: Ia72ddc0b3af625bb21ff1cc1c7121185ec3908b6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59204
Auto-Submit: Alastair Donaldson <afdx@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Reviewed-by: Vasyl Teliman <vasniktel@gmail.com >
Reviewed-by: Ryan Harrison <rharrison@chromium.org >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Alastair Donaldson <afdx@google.com >
2021-07-22 10:14:34 +00:00
Corentin Wallez
1384e8b163
Replace VertexFormatUtils with a dawn_native table of formats
...
This replaces multiple switches with a single indexing into a data
table, and also adds information about the VertexFormatBaseType for
later validation.
Bug: dawn:1008
Change-Id: Ic3f564b0dc571cc0008a54785613f962ce223452
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59030
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com >
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com >
Auto-Submit: Corentin Wallez <cwallez@chromium.org >
2021-07-22 08:57:29 +00:00
Dawn Autoroller
c607e81de2
Roll Tint from 81d4ed0d9c to fe3ba95e6a (1 revision)
...
https://dawn.googlesource.com/tint.git/+log/81d4ed0d9c0e..fe3ba95e6a46
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: I282f833822d59b3804bb5df0db39e749de445fa5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59142
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-21 22:49:09 +00:00
Ken Rockot
2d41f8c1df
Enforce per-dimension dispatch size limits
...
Note that this is for direct dispatch calls only. Indirect dispatch
calls are still not validated.
Bug: dawn:1006
Change-Id: I061c15208a01dfb803923823ba4afd38667cad22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59122
Reviewed-by: Ryan Harrison <rharrison@chromium.org >
Reviewed-by: Austin Eng <enga@chromium.org >
Commit-Queue: Ken Rockot <rockot@google.com >
2021-07-21 20:44:09 +00:00
Ken Rockot
59668e95c7
Validate workgroup size and storage requirements
...
We define hard limits on these attributes for compute stages. This
enforces them.
BUG: dawn:322
Change-Id: I9b279774e877b5d40d912cb9f812f23d61c20a42
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56806
Commit-Queue: Ken Rockot <rockot@google.com >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
2021-07-21 20:19:20 +00:00
Ben Clayton
fe3ba95e6a
inspector: Use diagnostic lists
...
Instead of concatenating to a string
Change-Id: Ib70bba2b0dbf9fcb04a232e0e78d3b576ab3ba88
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59203
Auto-Submit: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ryan Harrison <rharrison@chromium.org >
Commit-Queue: Ben Clayton <bclayton@google.com >
2021-07-21 19:34:03 +00:00
Austin Eng
e50f8c65b7
Skip BufferZeroInitTests.ResolveQuerySet if not on MacOS 10
...
Bug: dawn:940
Change-Id: I830cebf2247b65ea0be58a10e02fbcc0542ff73b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59040
Reviewed-by: Stephen White <senorblanco@chromium.org >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Commit-Queue: Austin Eng <enga@chromium.org >
2021-07-21 18:34:19 +00:00
Brian Ho
4d94647e1f
Vulkan: Export VkSemaphores as SYNC_FDs instead of OPAQUE_FDs
...
For Dawn/Chrome interop, Chrome OS differs from Linux as it uses the
NativePixmap-based SharedImageBacking which stores image memory as
dma-bufs as opposed to opaque FDs. Likewise, for synchronization,
Chrome OS wants to use sync obj FDs as opposed to opaque FDs for
more flexibility.
The motivating difference between sync obj FDs and their opaque
counterparts is how they are created. As their name suggests, Opaque
FDs are mostly meaningless outside of the Vulkan ecosystem and must
be created from a VkDevice. As a result, Linux’s
ExternalVkImageBacking needs the Vulkan implementation to create the
FD even when accessing the SharedImage as a GL texture [1]. On Chrome
OS, however, we don’t guarantee Vulkan outside of Dawn, so we aren’t
able to create the opaque FD directly in Chrome.
Instead, we are always able to create sync objs (e.g. via a
fence [2]) which can be imported as VkSemaphores by simply changing
VkImportSemaphoreFdInfoKHR::handleType. Similarly, we can export
signal VkSemaphores as sync objs as well by updating
VkSemaphoreGetFdInfoKHR::handleType.
This CL adds conditional support for using SYNC_FDs on Chrome OS
when importing/exporting VkSemaphores and renames
SemaphoreServiceOpaqueFD accordingly. With this, we can properly
wait on reads/writes on a GL SharedImage representation before
accessing the same memory in Dawn [3].
[1] https://source.chromium.org/chromium/chromium/src/+/main:gpu/command_buffer/service/external_vk_image_gl_representation.cc;l=75;drc=f887797b3b527feabd5dfe9b3f2cc7f6deade49f
[2] https://source.chromium.org/chromium/chromium/src/+/main:gpu/command_buffer/service/shared_image_backing_gl_image.cc;l=681;drc=f887797b3b527feabd5dfe9b3f2cc7f6deade49f
[3] https://chromium-review.googlesource.com/c/chromium/src/+/3042460
BUG=b:172208313
Change-Id: I5357847fea40e41d1b982054e3573d363e17530c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59080
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
Reviewed-by: Austin Eng <enga@chromium.org >
Commit-Queue: Brian Ho <hob@chromium.org >
2021-07-21 17:49:20 +00:00
Dawn Autoroller
c635acdfba
Roll Tint from f3fffdaded to 81d4ed0d9c (5 revisions)
...
https://dawn.googlesource.com/tint.git/+log/f3fffdaded4b..81d4ed0d9c0e
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 cwallez@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/main/autoroll/README.md
Bug: None
Tbr: cwallez@google.com
Change-Id: I611b64ae52580ba4f2cf826496636e3ea2d9bb2c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59141
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com >
2021-07-21 17:28:49 +00:00
Ben Clayton
909a3c3ccf
Add toggles: disable_workgroup_init, disable_symbol_renaming
...
--disable_workgroup_init will disable the workgroup memory zero initiailization. Useful for benchmarking.
--disable_symbol_renaming will disable tint's symbol renamer. Useful for debugging output.
Bug: tint:1003
Fixed: dawn:1016
Change-Id: I92486ef88a2c1112d9ccb40f7920947bd2011c70
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58861
Commit-Queue: Ben Clayton <bclayton@google.com >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
Auto-Submit: Ben Clayton <bclayton@google.com >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
2021-07-21 16:31:30 +00:00
Dawn Autoroller
18f63b4e16
Metal: Handle failure to allocate an MTLCommandBuffer
...
This requires restructuring the logic around MTLCommandBuffer allocation
so that GetPendingCommandContext is guaranteed to never fail. Logic in
the Metal backend is now similar to the Vulkan backend: the
MTLCommandBuffer is prepared at device initialization time, or after a
submission, such that it is always valid.
A new mUsed boolean is added to CommandRecordingContext to say whether
any commands have been recording. Previously mCommandBuffer was used for
that purpose, but it is now always non-null.
Bug: dawn:801
Change-Id: I5dc6747d1e6d538054010cc50533a03a49af921a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58720
Auto-Submit: Corentin Wallez <cwallez@chromium.org >
Reviewed-by: Stephen White <senorblanco@chromium.org >
Reviewed-by: Austin Eng <enga@chromium.org >
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
2021-07-21 15:41:29 +00:00
Ben Clayton
81d4ed0d9c
Fix operator% for f32 and vecN<f32>
...
https://github.com/gpuweb/gpuweb/pull/1945 changes the SPIR-V mapping of this operator so that it now maps to OpFRem instead of OpFMod. Polyfill OpFMod with `x - y * floor(x / y)`
Also map the MSL output of this operator to use `fmod()`.
Behavior of this operator is now consistent across all backends.
Fixed: tint:945
Fixed: tint:977
Fixed: tint:1010
Change-Id: Iefa009b905989c55ace24e073ab0e261c7cf69b0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58393
Auto-Submit: Ben Clayton <bclayton@google.com >
Commit-Queue: Ben Clayton <bclayton@chromium.org >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: David Neto <dneto@google.com >
2021-07-21 14:11:01 +00:00