Commit Graph

8501 Commits

Author SHA1 Message Date
Dawn Autoroller 080c5cae3e Roll Tint from 71763c84c2 to 08146e2300 (1 revision)
https://dawn.googlesource.com/tint.git/+log/71763c84c2fa..08146e2300ae

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: bclayton@google.com
Change-Id: I040798cec1f9c0d05dc785d5ca92741557276f43
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66020
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-06 19:24:31 +00:00
Stephen White a9f8c7db81 Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.

triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.

Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
Alastair Donaldson 08146e2300 Fixes for 32-bit build of fuzzers
This change resolves some type-related issues that were leading to
loss-of-precision warnings when compiling for i386 in OSS-Fuzz.

Change-Id: I77912d6b3824a0f942d0f54f1e62914f69e14d7d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66000
Auto-Submit: Alastair Donaldson <afdx@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2021-10-06 17:54:28 +00:00
Dawn Autoroller ccbc1a39da Roll Tint from 8b2181c98f to 71763c84c2 (3 revisions)
https://dawn.googlesource.com/tint.git/+log/8b2181c98ff9..71763c84c2fa

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: bclayton@google.com
Change-Id: I0aaaaa6c4dec79e8f0723b9ff924053f207b9954
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65921
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-05 22:32:49 +00:00
Antonio Maiorano 22da31cf43 run-cts: add "log" arg to log test results to file
Bug: dawn:1123
Change-Id: Id9ad62dde8f7988cb66e39ca0d543c23d0fad341
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65781
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-05 21:18:10 +00:00
Ben Clayton 78632a644f dawn_node/interop: Return a Result instead of a bool
Provides a place to put error messages.
Helps actually figure out when an overload doesn't match, a dictionary is missing a field, etc.

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

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

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

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

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

Bug: dawn:1123
Change-Id: I8a44524a6c0e71f7d2a49a5a9f730115c32df577
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65960
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-05 19:25:09 +00:00
Ryan Harrison 71763c84c2 Update remaining fuzzers to use TransforBuilder
Missed some fuzzers in my last fix, because I was trying to git grep
between repos...

This should fix any outstanding issues with
NULL being passed into SetTransformManager in TintCommonFuzzer.

BUG=chromium:1255313

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

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

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

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

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: bclayton@google.com
Change-Id: Ia385c065115027353731eace7484ea6019f45c03
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65920
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-05 15:45:48 +00:00
Ben Clayton d611aebc10 dawn_node: Add README.md
Includes info on how to build, known issues, remaining work.

Bug: dawn:1123
Change-Id: I0a1fe827a1aba06eea7e3574de4a7d1e0fd3f0ab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65161
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-05 15:43:59 +00:00
James Price ceab140a8b validation: Reject struct builtins on wrong stages
Change-Id: I047f28c5be6a7d878b9f7ad37b6accc842b4fe98
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65840
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-10-05 15:02:17 +00:00
Ryan Harrison add3cb000b Convert fuzzer to use TransformBuilder
Missed this fuzzer when implementing this class.

BUG=chromium:1255122

Change-Id: Ic5c7ef031db04a779734faeffa1d72d972dd2254
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65880
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-05 14:51:28 +00:00
Alastair Donaldson 8b2181c98f Change injected failure from assert to abort
An assertion failure had been injected to check that black box fuzzing
is working, but as ClusterFuzz runs a release mode build this was not
triggering. This change turns the assertion failure into an abort. Once
it has been established that the abort is triggered by the black box
fuzzers, it should be removed.

Bug: https://crbug.com/1246587
Change-Id: I5afcea97132e5a7f13df4ba353121deccc901e60
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65901
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Alastair Donaldson <afdx@google.com>
2021-10-05 14:49:17 +00:00
Corentin Wallez 575a198764 Improve validation errors for Sampler
Bug: dawn:563
Change-Id: I4bc774fd89c1a0b7adfca2b5bd7734751257b18b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65800
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-05 01:09:00 +00:00
Brandon Jones a089e8c4f2 Improve validation errors in CommandValidation
Updates all validation messages in CommandValidation.cpp to give them
better contextual information.

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

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

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

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

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

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

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC bclayton@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Bug: None
Tbr: bclayton@google.com
Change-Id: Iaac36c78355611bb724c8ece9faf4da49bbee99d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65821
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-04 16:58:13 +00:00
Sarah 22daca166b cts: Change uniqueId() parameter to string. Add how-to-contribute to description.
- Update the spec version used to:
  https://www.w3.org/TR/2021/WD-WGSL-20210929/
- replace extra white spaces with "\s" instead of "\n"
- github PR: https://github.com/gpuweb/cts/pull/770

Bug: tint:1189
Change-Id: Ib8d0aaf57eac3fff4fd6943b4a3d2d0a691a9a0d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65740
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
2021-10-04 14:54:37 +00:00
Ryan Harrison 7f3b68edd5 Explictly use 64-bit random engine
Avoids downcasting issues for the seed on platforms where the random
engine is actually 32-bit.

Change-Id: Ia9e4cffb688e7c82f3f088b71f99002b76ad1df3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65640
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-10-04 14:40:26 +00:00
Jiawei Shao afe9138408 Reland "OpenGL: delete shaders and pipelines when they are not used any longer"
This is a reland of a57c1db878

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

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

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

Bug: dawn:529
Change-Id: Ie04ab069b9d26658f2b0d1b070d86bb650f3c878
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65486
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-10-04 12:31:22 +00:00
Dawn Autoroller 08ec67af0d Roll Tint from 5e35864c1b to 2271b9541c (1 revision)
https://dawn.googlesource.com/tint.git/+log/5e35864c1bda..2271b9541c2a

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 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: cwallez@google.com
Change-Id: If571db9530f32fbb1de8d8b863260dfc09c83f15
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65820
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-04 12:07:34 +00:00
François Beaufort 3f689a4c5a Rename "extension" to "feature"
This CL renames "extension" to "feature" to follow WebGPU. It still
supports both. A future Chromium CL will pick this change, then all
"extension" occurrences will be removed.

Change-Id: I070e32d7ae042f9b846df01f200b39f6741a0a14
Bug: dawn:1149
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65664
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
2021-10-04 11:30:02 +00:00
Corentin Wallez bf8c40b4f1 Vulkan: Implement StoreOp::Discard
It wasn't implemented because Discard wasn't implemented for a long
time.

Bug: dawn:1151
Change-Id: Ie26559dd65a2c97a32df418521ca93c1021dd837
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65720
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2021-10-04 11:02:17 +00:00
Ryan Harrison 2271b9541c Support reflecting uninitialized pipeline overrideable constants
Also adds testing for constants type reporting

BUG=tint:852

Change-Id: Ic644f3a4e6687446a552ce755951966743c8ee97
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65641
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-04 11:01:19 +00:00
Brandon Jones bb417ace11 Validate index formats in SetIndexBuffer
Fuzzer discovered that it was possible to send invalid IndexFormats
to SetIndexBuffer and cause IndexFormatSize to hit an UNREACHABLE().
This validates that the passed format is part of the enum before
doing any further operations on it.

Bug: 1254571
Change-Id: I1e4075f8d26afdb8e4bcae3cfc72e6219ff28f78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65610
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-02 01:54:31 +00:00
Brandon Jones 2f1d02b94b Improve validation errors in Texture
Updates all validation messages in Texture.cpp to give them
better contextual information.

Bug: dawn:563
Change-Id: Ibae48b6842c80253c82b63989d08dac95c4b5759
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65602
Commit-Queue: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-01 19:10:40 +00:00
Corentin Wallez 2bf51560eb Improve validation errors for Buffer
This required adding a version of device.ConsumedError that takes a
MaybeError and a formatted string context.

Also removes an unused method.

Bug: dawn:563
Change-Id: I7a2139cc47945d1f29bdfe926db3c932bf17c6d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65564
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@google.com>
2021-10-01 18:15:40 +00:00
Corentin Wallez 16b4246266 Improve validation errors for CopyTextureForBrowser
Also simplifies the call graph of the validation a bit (some functions
were called to do a single check, some others were doing redundant
checks).

Bug: dawn:563
Change-Id: I0c9c09832139ff33055292e6bfa22b3ef6719819
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65563
Reviewed-by: Brandon Jones <bajones@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-10-01 17:05:55 +00:00
Austin Eng ecbdd8fbe7 Add deps to enable performing the cmake build of dawn_node on CQ
(and the cmake build of Dawn in general)

Bug: dawn:688
Change-Id: If7c037a03d237372739aed1f5dc78bffb7975a24
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65603
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-01 16:21:05 +00:00
Yunchao He 698bb821c7 Refactor/remove dawn-defined buffer and texture usages
This change refactors dawn-defined buffer and texture usages.
It groups buffer usages together, and groups texture usages
together, in order to avoid values conflict. It also removes
kReadOnlyStorageTexture because its definition has already been
removed.

Bug: dawn:485
Change-Id: I8c772ebadd3d276905fbcdb3283f0d5d89f74dd6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65680
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-10-01 16:20:35 +00:00
Corentin Wallez d85bbb6128 Improve validation errors for CreateExternalTexture
Also adds a label to ExternalTextureDescriptor to match the pattern of
all other descriptors.

Also adds missing validation that the planes must not be multisampled
(with a test) and fixes the validation unittests to not leak state from
one test to another (so they test exactly what they need to).

Bug: dawn:563
Change-Id: I88a4d7a859e67e5af85efd5ba16572c9014df6ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65562
Reviewed-by: Brandon Jones <bajones@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-10-01 15:34:25 +00:00
Ben Clayton 14d33c36c1 dawn_node: Implement setlike keys()
Used by a number of CTS tests (webgpu:idl,constants,flags:*)

Bug: dawn:1143
Change-Id: Idd76c35a4debf54d5c53df11f59419de90f90162
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65660
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-10-01 12:42:45 +00:00
Dawn Autoroller 5d58bd1a4a Roll Tint from c57642cbd5 to 5e35864c1b (1 revision)
https://dawn.googlesource.com/tint.git/+log/c57642cbd5ed..5e35864c1bda

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 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: cwallez@google.com
Change-Id: I0b21cc498207b7454cf32749f568cc56861957ec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65606
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-01 10:25:05 +00:00
François Beaufort 7a93485410 Improve validation errors in Adapter
Updates all validation messages in Adapter.cpp to give them better
contextual information.

Bug: dawn:563
Change-Id: I71381f56b51ef69c3064af837fe20d6afa7ce271
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65581
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@google.com>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
2021-10-01 08:54:47 +00:00
Ben Clayton 5e35864c1b writer/spirv: Fix abs() on unsigned integers
GLSLstd450SAbs expects a *signed* integer.
abs() of an unsigned number is now a no-op.

Fixes WebGPU CTS tests:
webgpu:shader,execution,robust_access_vertex:vertex_buffer_access:*

Bug: tint:1194
Change-Id: I65c5e9f2f03aac0b788b9ba88c383cbec136d7c6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65620
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2021-10-01 08:41:55 +00:00
Yunchao He 5ad5250a3b Track read-only depth/stencil attachment as read-only usage
If a depth/stencil texture view is used as sampled texture and
read-only render attachment in the same render pass, it should be fine.
Because both usages are readonly. However, Dawn doesn't distinguish
read-only render attachment from writeable render attachment. So, this
situation is thought to be invalid.

This change fixes the issue and allows these read-only usages in one
pass, with a validation test for verification.

Bug: dawn:485

Change-Id: I0df5a4209651cddd6122487d96b1810717e4eb22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65485
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-10-01 01:45:14 +00:00
Dawn Autoroller ef23f4158d Roll Tint from ee23c17345 to c57642cbd5 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/ee23c1734546..c57642cbd5ed

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 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: cwallez@google.com
Change-Id: I7fa4d68db432051c67ddca03653b209d5c443842
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65605
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-10-01 00:07:44 +00:00
Austin Eng 901920a223 Grant flex-(ci/try)-led-users permission to trigger tasks
Change-Id: I269a5f8f4c647c860e284fb1241a1c2440aba797
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65604
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-09-30 23:01:31 +00:00
Ryan Harrison c57642cbd5 Refactor fuzzer transform generation
Also splits out various utility classes from tint_common_fuzzer and
uses consistent naming for utility classes.

BUG=tint:1106

Change-Id: Ic343741eea799366850c46834865d50885554a84
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65301
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2021-09-30 18:58:32 +00:00
Ben Clayton 75911ca2b5 dawn_node: Fix Windows build
Generate exported node symbols via a generated .lib file, and link against this, so the linker knows these are declared by node.exe.

Bug: dawn:1123
Change-Id: Id8c9c5de6bf5e6b925f26e2a1dbb85dd1e40668c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65565
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-30 18:51:40 +00:00
Corentin Wallez 94769acc2d Roll third_party/swiftshader/ 314508f78..562df4889 (122 commits)
https://swiftshader.googlesource.com/SwiftShader/+log/314508f788b2..562df4889b81

$ git log 314508f78..562df4889 --date=short --no-merges --format='%ad %ae %s'
2021-09-25 capn Implement support for regular scaled buffer formats
2020-05-07 capn Eliminate Subzero's dependency on llvm::FoldingSet
2021-09-26 nicolascapens Fix dEQP setup documentation for Linux
2021-09-27 capn Fix obtaining the execution model from the intended entry point
2021-09-24 srisser Implement VK_EXT_4444_formats
2021-09-25 capn Revert "Work around dEQP-VK output_location test flakiness"
2021-09-24 capn Increase maxStorageBufferRange to MAX_MEMORY_ALLOCATION_SIZE (1 GiB)
2021-09-22 capn Rename rasterOperation() to blendColor()
2021-09-22 capn Support self-resolving vkGetInstanceProcAddr
2021-09-23 nicolascapens Regres: disable logging of decompiled SPIR-V and empty loginfo
2021-09-22 capn Fix exported extension functions
2021-09-23 capn Refactor SPIR-V binary optimization
2021-09-23 geofflang Only use -Wno-shadow on clang builds.
2021-09-22 capn Compute the image size in 64-bit arithmetic
2021-09-21 pkasting Force -Wno-shadow to avoid variable shadowing warnings.
2021-09-21 swiftshader.regress Regres: Update test lists @ 6cbc2468
2021-09-17 srisser Set all provoking vertex feature bools
2021-09-14 srisser Fully support all 16-bit packed texture formats
2021-09-16 capn Optimize SPIR-V binary cache reuse
2021-09-15 capn Add optimization state to the optimized SPIR-V binary cache key
2021-09-16 capn Cache optimized SPIR-V binaries instead of compiled shaders
2021-09-16 capn Fix use of deleted shader during compute execution
2021-09-15 capn Refactor SPIR-V binary storage
2021-09-09 srisser Return error for requested unsupported features
2021-09-11 capn Clamp depth before the depth test
2021-09-11 capn Skip depth bounds test when there is no depth attachment
2021-09-11 capn Rename render target to color buffer
2021-09-13 kjlubick Delete explicit copy assignment operator
2021-09-08 sugoi Add derived class for every type of external memory
2021-09-09 capn Fix decompression of cube-compatible layered 2D images
2021-09-09 capn Refactor image decompression and cube border update
2021-09-09 capn Refactor cube compatibility
2021-09-03 sugoi Refactor VkMemoryAllocateInfo parsing
2021-09-07 capn Remove vulkan_fuchsia_extras.h
2021-09-01 capn Use the shorter promoted Vulkan structure and enum names
2021-09-03 sugoi Revert "Add external memory parameter to size computations"
2021-09-02 srisser Update git-hooks to latest revision
2021-08-31 srisser Remove erroneous ASSERT for format lists
2021-08-30 srisser Minimize usage of global constructors in Reactor
2021-08-30 jmadill Increase maxComputeSharedMemorySize.
2021-08-31 tikuta update angle revision
2021-08-27 srisser Turn BC6 constructors into constexpr
2021-08-24 capn Implement VK_EXT_load_store_op_none
2021-08-24 capn Refactor determining the aspects to clear
2021-08-24 capn Refactor command execution
2021-08-24 capn Update Vulkan headers to version 1.2.189
2021-08-24 capn Eliminate custom Vulkan constants
2021-08-20 srisser Don't use global variables for CPUID
2021-08-23 srisser Remove global constructor from BC6
2021-08-21 capn Fix Subzero Optimizer run time variability
(...)
2021-07-26 capn Refactor sample shading state determination
2021-07-26 srisser Add Bias and Fetch to divergent Lod sampling
2021-07-19 srisser Optimize Lod and Grad texture sampling
2021-07-27 capn Initialize llvm::orc::ExecutionSession with default SelfExecutorProcessControl
2021-07-26 capn Remove -Wno-unused-but-set-variable flag usage
2021-07-26 pkasting Fix some instances of -Wunused-but-set-variable.
2021-03-01 mail Add missing dependency for LLVM 10 CMake builds
2021-07-19 capn Remove -Xclang -fuse-init-array from the Android build flags
2021-07-14 capn Move remaining Subzero x86 traits to their corresponding class
2021-07-14 capn Move Subzero Inst traits to the Inst header/source
2021-07-14 capn Move Subzero Assembler traits to the Assembler header/source
2021-07-13 capn Refactor AsmAddress creation
2021-07-13 capn Make AsmAddress producing methods static
2021-07-13 capn Increase Subzero x86-64 stack alignment to 16
2021-07-13 capn Fix RequiredStackAlignment initialization
2021-07-13 capn Rename Subzero Address to AsmAddress
2021-07-12 capn Rename Subzero traits Operand to AsmOperand
2021-07-06 capn Specialize Subzero X86 backends for 32- or 64-bit
2021-07-09 capn Don't templatize based on X86 traits
2021-07-08 capn Deduplicate X86 condition codes
2021-07-07 capn De-templatize the IceAssemblerX86Base class
2021-07-07 capn Duplicate X86 headers into X8632 and X8664 ones
2021-07-07 capn Define specialized PoolTypeConverter constants in the header
2021-07-14 adrian.ratiu Backport LLVM fix for mallinfo deprecation
2021-07-10 thakis Define NO_SANITIZE_FUNCTION on win/clang too
2021-07-09 thakis Stop building with -fno-operator-names
2021-07-09 thakis Stop defining _WINDLL
2021-07-09 thakis Remove workaround for 32-bit gold ICF bug
2021-07-08 thakis Remove -Wno-error flags
2021-07-08 thakis Remove now-unused gni imports
2021-07-08 thakis Remove x86/x64-specific arch flags
2021-07-08 thakis Try to unbreak build after https://swiftshader-review.googlesource.com/c/SwiftShader/+/55608
2021-07-08 thakis Remove mips-specific arch flags
2021-07-08 thakis Share ANGLE_DISABLE_TRACE-setting code between win and non-win
2021-07-08 thakis Stop passing -fomit-frame-pointers in swiftshader build file
2021-07-08 thakis Remove sysroot and mmacosx-version-min flag for mac/arm builds
2021-07-08 thakis Remove explicit -msse2 flags (and some other minor things)
2021-07-08 thakis Remove unnecessary flags from BUILD.gn
2021-06-30 capn Delete the legacy OpenGL ES build for Android
2021-07-06 capn Eliminate Subzero sandboxing support
2021-07-06 capn Assume Microsoft ABI on Windows
2021-07-05 capn Eliminate support for the PNaCl ABI
2021-05-27 srisser Replace curl command with git-hooks submodule
2021-07-03 capn Clarify contributing documentation for Windows users
2021-07-06 capn Fix -Wundefined-var-template warnings for ARM32 and MIPS32
2021-07-05 capn Define constant static template members as constexpr
2021-07-05 capn Make Subzero opcode pointer constant
2021-06-27 capn Fix -Wundefined-var-template warnings
2021-07-02 capn Regres: Increase MaxProcMemory to 6 GiB
2021-07-01 jerumble Fix gcc < 9 builds

Created with:
  roll-dep third_party/swiftshader

Change-Id: I39adb186c5c28ad35722d1b72c97bb867672c6c3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65243
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-09-30 18:47:31 +00:00
Austin Eng d84d7f1ea3 Disable DrawIndexedIndirect
Not passing CTS yet

Bug: dawn:809
Change-Id: Ib7c240372a8fdbd45803230292c374e2957c8d15
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65601
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-09-30 18:47:21 +00:00
shrekshao 99be407367 Improvement validation errors: Pipeline.cpp
Bug: dawn:563
Change-Id: Iac05390ab8e8dac9737974c3a9015110b9e55730
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65481
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-30 18:40:50 +00:00
Dawn Autoroller 274d9958b2 Roll Tint from 1ca6fbad8f to ee23c17345 (3 revisions)
https://dawn.googlesource.com/tint.git/+log/1ca6fbad8f23..ee23c1734546

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 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: cwallez@google.com
Change-Id: I6c3b5c2892235021a69e8250c9110d01cb82baf8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65600
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-30 18:24:50 +00:00
Ryan Harrison 0e193ac03e Unpin OSX SDK version being used
This is no longer needed, and removing will avoid the possibility of
needing reinstall XCode on every CQ run.

Change-Id: I29fa99734ec71349102d19fd77f9e416db8979d3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65300
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-30 18:08:40 +00:00