Commit Graph

3531 Commits

Author SHA1 Message Date
Corentin Wallez f78c28dcb7 Add support for dump_translated_shaders to the Metal backend
Bug: None
Change-Id: Icecbe221970ec10e6497309108dec5ccefc0a944
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57060
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-07-06 14:14:00 +00:00
Ben Clayton 2583b8d459 D3D12: Improve dump_translated_shaders debugging
If enabled:
* Don't enable the renamer transform. Helps with readability.
* Emit the produced WGSL when combined with --force_wgsl_step

Change-Id: I336de6e6a4eee08805eee82847bd97cd5a942306
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57040
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-07-06 11:53:40 +00:00
Dawn Autoroller 6ceaac3436 Roll Tint from 5d8eb4a758 to 692fc20797 (1 revision)
https://dawn.googlesource.com/tint.git/+log/5d8eb4a7582d..692fc2079778

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 bajones@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: bajones@google.com
Change-Id: I3453b5b0564697b59e1bf66f87b94be5ad30c02f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57020
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-06 11:34:30 +00:00
Ben Clayton 2828f35a71 D3D12: Re-enable FXC tests
Enough FXC workaround have been added to tint that these tests now pass again.

Fixed: tint:904
Change-Id: I6dd355d131ab903ae579391c0bfce93979dfc4f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57041
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-06 10:49:50 +00:00
Dawn Autoroller 435ebfcc40 Roll Tint from b4ff73e250 to 5d8eb4a758 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/b4ff73e250ab..5d8eb4a7582d

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 bajones@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: bajones@google.com
Change-Id: Ia33c18547a0190b6c0431c6db1d2997bcabc4dc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56980
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-06 01:40:51 +00:00
Dawn Autoroller 14f3813677 Roll Tint from 5cb31a8a7f to b4ff73e250 (7 revisions)
https://dawn.googlesource.com/tint.git/+log/5cb31a8a7fb5..b4ff73e250ab

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 bajones@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: bajones@google.com
Change-Id: I4c2cd80244e13eec3a15efd89e2f9af871536859
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56960
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-05 20:18:00 +00:00
Corentin Wallez 7ae959da60 Allowed mismatch sampler/comparison sampler when using SPIRV-Cross
When SPIRV-Cross we always reflect samplers as regular samplers. A
recent change implementing proper validation broke programs using
comparison samplers in that path.

Skip that bit of validation when using SPIRV-Cross, that hack can be
removed once we use Tint unconditionally for reflection.

Also reenables some BGL-ShaderModule compatibility tests with
SPIRV-Cross to cover the "fixed" validation.

Bug: dawn:571
Bug: dawn:367
Change-Id: I2d1a65aaea717b4927ac4e838942547a1b413d33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56900
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-07-05 15:07:49 +00:00
Dawn Autoroller 3be120026d Roll Tint from 0e41747281 to 5cb31a8a7f (1 revision)
https://dawn.googlesource.com/tint.git/+log/0e4174728128..5cb31a8a7fb5

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 sarahmashay@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: sarahmashay@google.com
Change-Id: I21249e3359713c3aedd27a6988ce05835fd13289
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56920
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-05 14:58:29 +00:00
Brandon Jones aeff235dc3 Drop deprecated rowsPerImage/bytesPerRow behavior
Removes the last remaining code paths supporting the old rowsPerImage
and bytesPerRow defaulting behavior, and updates all related tests to
strictly expect the spec-complaint behavior.

Change-Id: I022db0b142939d82e33d5989460488881e5a1ab3
Bug: dawn:520
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56803
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-07-04 18:31:29 +00:00
Corentin Wallez fc37b32c55 Vulkan: Check for required limits when initializing adapters
Also adds the new limits for maxComputeWorkgroupSize because there are
few systems where the .Z of that limit goes above 64.

Bug: dawn:796
Change-Id: I52e85e7b7c666da15493178e170ca82922d34017
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56082
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-07-03 04:30:56 +00:00
Dawn Autoroller 14d4a3b729 Roll Tint from 3124d43fda to 0e41747281 (6 revisions)
https://dawn.googlesource.com/tint.git/+log/3124d43fda3f..0e4174728128

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 sarahmashay@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: sarahmashay@google.com
Change-Id: Iea48de4fe65c540e1b0b984ae3a922ae09e072c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56860
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-03 03:33:46 +00:00
Dawn Autoroller 49a4c68a80 Roll Tint from 9bf951eee5 to 3124d43fda (6 revisions)
https://dawn.googlesource.com/tint.git/+log/9bf951eee520..3124d43fda3f

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 sarahmashay@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: sarahmashay@google.com
Change-Id: I53095d48d08f78dbcd8b2135f6ac773948b9003e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56804
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-02 22:19:06 +00:00
Dawn Autoroller a56358dcbe Roll Tint from 37cabbb468 to 9bf951eee5 (1 revision)
https://dawn.googlesource.com/tint.git/+log/37cabbb46828..9bf951eee520

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 sarahmashay@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: sarahmashay@google.com
Change-Id: I042975eecfc5e6e8645110f606a15c924ea17271
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56801
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-02 16:06:16 +00:00
Li Hao 551e7a1cc3 Fix internal storage buffer usage
TimestampQueryTests.ResolveTwiceToSameBuffer fails on Intel latest
driver on Windows, because the kInternalStorageBuffer is not treated
in buffer usage when adding resource barrier.

Add missed kInternalStorageBuffer in buffer usage and remove
D3D12_RESOURCE_STATE_UNORDERED_ACCESS from QueryResolve, which will be
added by kInternalStorageBuffer.

Bug: dawn:797
Change-Id: I78607002179ba443b0db09c9c3bbc85fcc97a85b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56523
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-07-02 09:51:18 +00:00
Corentin Wallez c7d0325e2c Roll third_party/swiftshader/ 8f075627d..314508f78 (15 commits)
https://swiftshader.googlesource.com/SwiftShader/+log/8f075627d16b..314508f788b2

$ git log 8f075627d..314508f78 --date=short --no-merges --format='%ad %ae %s'
2021-07-01 capn Work around MemorySanitizer false-positive
2021-06-28 cwallez Increase max workgroup size for WebGPU
2021-06-30 capn Disable the legacy OpenGL ES targets for Android
2021-06-29 capn Fix Android Vulkan build
2021-06-16 capn Implement Pragma() for Reactor MemorySanitizer instrumentation
2021-06-25 cwallez Increase limits to support base WebGPU.
2021-06-25 bclayton SpirvShader: Consider OpEntryPoint interface IDs
2021-06-10 capn Determine MSan instrumentation for Reactor at run-time
2021-06-20 stha09 GCC: readd visibility attributes for EGL/GLESv2
2021-06-25 capn Fix -warn-stack-size command line option for LLVM 12
2021-02-09 sugoi Only perform LOD computation when it is necessary
2021-06-28 swiftshader.regress Regres: Update test lists @ e4fea30b
2021-06-23 pkasting Fix -Wloop-analysis warnings in llvm-subzero.
2021-06-17 capn Enable the -Wdeprecated-copy compiler warning
2021-06-17 capn Prevent changing Reference<> address

Created with:
  roll-dep third_party/swiftshader

TBR=enga@chromium.org
Bug: dawn:796

Change-Id: Ieace99379c7fc2141bb587f973d77b48f37cfec2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-07-02 08:09:16 +00:00
Austin Eng a5f24e590a Validate textures with filtering/non-filtering/comparison samplers
Renames dawn_native::ComponentTypeBit to SampleTypeBit and makes
the bitmask match wgpu::TextureSampleType. wgpu::TextureComponentType
should be removed in a follow-up CL.

The Format table is augmented with float/unfilterable-float information
so that textures can be validated against the BGLEntry's
TextureSampleType.

EntryPointMetadata::ShaderBindingInfo no longer inherits BindingInfo
because the two types are diverging further. Most notably, this CL
reflects from Tint the supported SampleTypeBits for texture bindings.
This bitset is validated against the bind group layout.

Adds an isFiltering getter to SamplerBase. A filtering sampler must
not be used with a non-filtering sampler binding.

Lastly, the CL reflects sampler/texture pairs from Tint and validates
an entrypoint against the pipeline layout that a filtering sampler is
not used with an unfilterable-float texture binding.

Bug: dawn:367
Change-Id: If9f2c0d8fbad5641c2ecc30615a3c68a6ed6150a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56521
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-07-02 02:29:40 +00:00
Dawn Autoroller 8d72a7eec3 Roll Tint from d4c64af117 to 37cabbb468 (1 revision)
https://dawn.googlesource.com/tint.git/+log/d4c64af11783..37cabbb46828

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 sarahmashay@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: sarahmashay@google.com
Change-Id: Ib85b4c1ecdf65176d2ff365dba24c65eaa2b96e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56722
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-01 09:33:24 +00:00
Dawn Autoroller 2b1b14527d Roll Tint from d18f2e0d6e to d4c64af117 (17 revisions)
https://dawn.googlesource.com/tint.git/+log/d18f2e0d6ee6..d4c64af11783

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 sarahmashay@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: sarahmashay@google.com
Change-Id: Ib07b9eccbf9d10bc49820de1d4972c6e29420b24
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56721
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-07-01 03:41:04 +00:00
Kai Ninomiya 211b4aae7e Remove null-deref in test
Dereferencing a nullptr is UB by spec, even if the method called is
non-virtual and no memory access to nullptr appears to actually occur.
For example:

error: 'this' pointer cannot be null in well-defined C++ code;
comparison may be assumed to always evaluate to true
[-Werror,-Wtautological-undefined-compare]

Bug: b/179840737
Change-Id: I6385e157e9a883cdd65f5ef9be89bcc3a29324fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56720
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-07-01 01:43:34 +00:00
Sergey Karchevsky 3a75b1cea8 CMake: update backend selection
The single DAWN_ENABLE_OPENGL flag in the root CMakeLists.txt did not define
DAWN_ENABLE_BACKEND_DESKTOP_GL or DAWN_ENABLE_BACKEND_OPENGLES, so examples
with `-b opengl` reported `Backend isn't present` and failed to start.

ENABLE_OPENGL flag in root CMakeLists.txt was replaced by ENABLE_DESKTOP_GL
and ENABLE_OPENGLES flags, repeating the logic of similar flags
in GN buildsystem as done in src/common/BUILD.gn
and scripts/dawn_features.gni.

Change-Id: I6302de7aa98436ddc0aa002d83dd6b3e7102e49c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56283
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Sergey K <sergey.ext@gmail.com>
2021-06-30 15:06:43 +00:00
Ben Clayton bf832f07d6 Remove all use of deprecated tint APIs and WGSL syntax
Tint:
* Use the new transform::VertexFormat enum names

WGSL:
* The [[set(n)]] decoration is now [[group(n)]]
* [[builtin(vertex_idx)]] is now [[builtin(vertex_index)]]

Change-Id: I9cbf1368074488c4bb7fa81430bb12ec7581c1fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56540
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-06-30 11:33:04 +00:00
Peter Kasting 1ce20bf5cf Fix -Wunreachable-code-aggressive.
Bug: chromium:1066980
Change-Id: I9e00d3707972307e1c5395156c39aa153d5e170e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56522
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Peter Kasting <pkasting@google.com>
Commit-Queue: Peter Kasting <pkasting@google.com>
Auto-Submit: Peter Kasting <pkasting@google.com>
2021-06-30 11:17:16 +00:00
Corentin Wallez 0ecfece609 Metal: make (robustness AND tint) => vertex pulling
Tint's vertex pulling transform supports the whole GPUVertexState so
we can enable it by default when robustness is necessary.

Adds a suppression for failing tests on Metal Intel.

Bug: dawn:805
Bug: dawn:966
Change-Id: Id7b2c6df2291671164647f65fc50c61e27de90b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56382
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-06-30 09:57:04 +00:00
Dawn Autoroller d3ebb17e73 Roll Tint from 077fe64b11 to d18f2e0d6e (11 revisions)
https://dawn.googlesource.com/tint.git/+log/077fe64b11b9..d18f2e0d6ee6

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 sarahmashay@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: dawn:805,dawn:956,dawn:963
Tbr: sarahmashay@google.com
Change-Id: I0ab9ccaaf75f9827dd36b2d8a2a3b53eb6b0c4f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56424
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-29 19:31:31 +00:00
Austin Eng 2a5fd58832 Remove double test instantiation with/without use_tint_generator
The test bots now instantiate separate test suites with/without
this toggle.

Bug: dawn:571
Change-Id: Ib4e8e89ac347d0030b233d1a3b14b318aa862aa6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56440
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-06-29 17:29:23 +00:00
Dawn Autoroller 3194a08615 Roll Tint from cb0309ed6c to 077fe64b11 (8 revisions)
https://dawn.googlesource.com/tint.git/+log/cb0309ed6c05..077fe64b11b9

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 sarahmashay@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: sarahmashay@google.com
Change-Id: Ibe80cc51c0b98a373abc6a797b40d5f179b07333
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56360
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-29 09:44:43 +00:00
Corentin Wallez 73b7cd624f Add missing WebGPU limits to Constants.h
This will help check that the Vulkan devices are enough for WebGPU in
a following CL.

In addition to additional limits this CL:

 - Change maxColorAttachments 4 -> 8 to match WebGPU
 - Renames kMinDynamicBufferOffsetAlignment to
   kMinUniformBufferOffsetAlignment.
 - Renames kMaxVertexBufferStride to kMaxVertexBufferArrayStride.
 - Changes validation of buffer offsets to use the separate uniform and
   storage limits (but no test is added because they are the same).
 - Adds validation and a test for kMaxStorageBufferBindingSize.
 - Augment the null::Device memory limit for that new test (it allocates
   a buffer of 512MB).
 - Fix the maxColorAttachment test to not use hardcoded values.

Bug: dawn:796
Change-Id: Ibe4219130a44355ae91c02aaa0a41cf5d9f9e234
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56081
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-06-29 08:12:00 +00:00
Li Hao 895bc934bb Implement zero-sized QuerySet
- Add zero-sized implementation in each backend.
- Test creating zero-sized query set for each type.

Bug: dawn:954
Change-Id: Ib2b8a7d890dae6ee40f5a05aac570a4600dedab8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56260
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-06-29 08:04:00 +00:00
Sergey Karchevsky 9b6872dd00 Fix examples linking error when building with CMake
ScopedAutoreleasePool.cpp was not added to dawn_utils library sources,
which caused unresolved externals while linking examples.

Change-Id: Ia9de3135b814663cce33b719dbbb22971b8b9d43
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56282
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-06-29 07:03:31 +00:00
Yunchao He 405bec157e Implement 3D texture sampling with e2e tests
This change implements 3D texture sampling with an en2end test.
It turns out that the implementation has already been done. The
test can pass with minor changes.

Bug: dawn:547

Change-Id: I5dfe1a446de3287392e39cb4dd58143e115b02cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-06-29 04:56:01 +00:00
Sarah 98ab91b474 Update compute shaders tests to include workgroup_size
Change-Id: I97ef98c1cfc1a06c5072d1a52233100ad3d37c09
Bug: tint:884
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56142
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2021-06-29 00:10:01 +00:00
Dawn Autoroller 1c7c088b91 Roll Tint from f24b37e122 to cb0309ed6c (4 revisions)
https://dawn.googlesource.com/tint.git/+log/f24b37e12257..cb0309ed6c05

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 sarahmashay@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: sarahmashay@google.com
Change-Id: I21f5ea3629bd5c6f47c6fa4e6a15e50ca7d68273
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56262
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-28 22:02:51 +00:00
Austin Eng 27b0162b96 Remove explicit test instantiation with use_tint_generator
We're migrating to run all tests with both Tint and SPIRV-Cross.
Remove explicitly instantiating only with Tint, and add
skips for tests that will not work if use_tint_generator is not
enabled.

Bug: dawn:571
Change-Id: I8322dec688e75b6efa8c4f18c6b9439a2e325631
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56261
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2021-06-28 21:18:40 +00:00
Sergey Karchevsky 0db69f0052 Fix compilation error when building with CMake and Clang
RefBase::Detatch() method in RefBase.h calls std::move,
but no appropriate header was included. Error example was:
RefBase.h:137:22: error: no member named 'move' in namespace 'std'

Change-Id: I60f84bffba06ba5fd3fea7fb9c4908cfe3989472
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56281
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-06-28 20:20:50 +00:00
Brandon Jones 55a389762d Deprecated StoreOp::Clear in favor of Discard
Change-Id: Ifac3b980f23c3476d91bb89759b2a60ed5efbc17
Bug: dawn:937
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56045
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-06-28 18:38:24 +00:00
shrekshao 81372da137 Add placeholder virtual functions to dawn_wire Read/WriteHandle
Updated interface design is at
https://bugs.chromium.org/p/dawn/issues/detail?id=773#c21

Prelanding CL to avoid breaking change.
The proposed usage is at
https://dawn-review.googlesource.com/c/dawn/+/51164

Bug: dawn:773
Change-Id: If27396e60574b4a52fcda60e111bad33c9d63563
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-06-28 18:22:31 +00:00
Corentin Wallez a68489fb83 CopyTextureForBrowser(): Fix macro declaration
This is fixup for the
https://dawn-review.googlesource.com/c/dawn/+/54800
where the macre was not properly declared.
Clang doesn't claims about it, but GCC does.
The errors example for GCC 9.3.0:
/dawn/src/dawn_native/CopyTextureForBrowserHelper.cpp:40:5:
error: unterminated raw string
   40 |     R"(
      |     ^
/dawn/src/dawn_native/CopyTextureForBrowserHelper.cpp:46:6:
warning: missing terminating " character
   46 |     )"
      |      ^

Bug: chromium:1217153, chromium:819294
Change-Id: I47aa2dac37d9dfa7c02532caeb3341edd22fcd07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56066
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-06-28 16:57:13 +00:00
Dawn Autoroller 97a4f05bf9 Roll Tint from 67993b955e to f24b37e122 (5 revisions)
https://dawn.googlesource.com/tint.git/+log/67993b955eea..f24b37e12257

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 sarahmashay@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: sarahmashay@google.com
Change-Id: If8871b46cfcccc2a8bd1189ae5ee027f28b1073d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56202
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-28 16:52:04 +00:00
Dawn Autoroller ed77bfe497 Roll Tint from c03a09c106 to 67993b955e (1 revision)
https://dawn.googlesource.com/tint.git/+log/c03a09c10656..67993b955eea

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/main/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I268f104628a2390560a24041e2cba084fb3e2e6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56200
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-28 11:39:58 +00:00
Ben Clayton db7def5816 common: RefBase fixes and improvements
Fix missing Release() on RefBase::operator=(const T&).

Always acquire the new reference before dropping the existing reference.
Consider:
* Object A holds the only reference to object B.
* Ref of A is assigned B.
If A were released before referencing B, then B would be a dead pointer.

Remove RefBase::kNullValue, just use Traits::kNullValue. Avoids an unnecessary constexpr copy.

Add even more tests.

Change-Id: I111079d56cbf8c09162aa6e493078bead9ae97fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55882
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-06-28 10:26:08 +00:00
Corentin Wallez 220ff07ffd dawn_native: Add a force_wgsl_step toggle.
This makes SPIRV ingestion always go through a SPIRV->WGSL step first.
This will be used to make sure that path works correctly on existing
WebGPU SPIRV sites so we're confident the SPIRV->WGSL translation will
work when compiled to WASM.

Bug: dawn:960
Change-Id: I17efd8c64d9d60ff033ba89b8fff9295e66524ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56080
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-06-28 10:23:08 +00:00
James Price 0cb3d480ff Enable testing of Metal with Tint MSL generator
We are now passing all of Dawn's E2E tests with the Tint generator.

Bug: dawn:571
Change-Id: Ie74a07bde805b8652ac23af2bda2fa11597d04ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55980
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-06-28 09:39:08 +00:00
James Price a0b31e04e8 Add missing structure padding to test
WGSL specifies that the size of a host-shareable structure is a
multiple of the largest alignment of any member in that
structure. While SPIR-V cross doesn't generate this trailing padding,
Tint does, and so we need to pad the host structure to match to avoid
validation errors.

Bug: dawn:571
Change-Id: Id5de89125a74c0469ae69d6e86b4c570bbdb31ab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56120
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-06-28 08:38:28 +00:00
陈俊嘉 610de1d725 CMake: couple fixes for UWP
Fix a capitalization error in CMakeLists.txt
Link dxgi.lib only in UWP compilation in CMakeLists.txt

Bug: dawn:766
Change-Id: I011f44c8147998a9f4b3a55b25888ca1ad05a3e1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-06-28 08:19:28 +00:00
Jiawei Shao 3d5402c0a4 OpenGL: Return error when calling writeTexture() on stencil aspect
This patch adds a missing check in QueueGL::WriteTexture() to return
a validation error when we try to call writeTexture() on the stencil
aspect on OpenGL backends as copying from a buffer into a stencil
texture is not supported on OpenGL.

BUG=dawn:439

Change-Id: I203d40aefe346aea663a492c5a065248b74f8ea3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56002
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-06-27 05:38:05 +00:00
Jiawei Shao f7cde7e5a4 Fix wrong declaration in BufferZeroInitTest.BoundAsReadonlyStorageBuffer
This patch fixes a wrong buffer type declaration in the shader used
in BufferZeroInitTest.BoundAsReadonlyStorageBuffer. In this test the
buffer should be bound as a read-only storage buffer, so it should be
declared as var<storage, read> instead of var<storage, read_write>.

BUG: none
Change-Id: Ib85bf199f64e205b944b7233aae31323cbec1819
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56042
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-06-27 05:28:35 +00:00
Dawn Autoroller 134d85e584 Roll Tint from e25a8fc7f0 to c03a09c106 (1 revision)
https://dawn.googlesource.com/tint.git/+log/e25a8fc7f0d3..c03a09c10656

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/main/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I750c5fa35010939bece34b0fd3f14d1aad3844d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56160
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-26 13:08:35 +00:00
Dawn Autoroller 788f00aa8a Roll Tint from e225b556c6 to e25a8fc7f0 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/e225b556c6fa..e25a8fc7f0d3

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/main/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I34a3b890e8d1ebe8298a653679ec42aa0b39f98c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56044
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-25 19:40:52 +00:00
Ben Clayton 448e1e91a7 D3D12: Reenable EncodeManyUBOAndSamplers test
Tint has rolled, so this test can be re-enabled.

SPIRV-Cross produces bad results - likely the UBO layout for mat2x2 is
incorrectly padded - so this test is suppressed for !UseTintGenerator.

Fixed: dawn:946
Change-Id: If1d030314f51759e6a2a00dd8edc2597efb1eb4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55440
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-06-25 15:44:02 +00:00
Dawn Autoroller 2c460f9f2f Roll Tint from 5b9203cc05 to e225b556c6 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/5b9203cc0581..e225b556c6fa

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/main/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I5ceb35052ff99769b94818c4568a2ab88f5cfae6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56043
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-25 14:39:12 +00:00